functionSource
stringlengths
20
97.4k
CWE-119
bool
2 classes
CWE-120
bool
2 classes
CWE-469
bool
2 classes
CWE-476
bool
2 classes
CWE-other
bool
2 classes
combine
int64
0
1
sgen_split_nursery_init (SgenMinorCollector *collector) { collector->is_split = TRUE; collector->alloc_for_promotion = minor_alloc_for_promotion; collector->par_alloc_for_promotion = minor_par_alloc_for_promotion; collector->prepare_to_space = prepare_to_space; collector->clear_fragments = clear_fragments; coll...
false
false
false
false
false
0
pm3393_interrupt_handler(struct cmac *cmac) { u32 master_intr_status; /* Read the master interrupt status register. */ pmread(cmac, SUNI1x10GEXP_REG_MASTER_INTERRUPT_STATUS, &master_intr_status); if (netif_msg_intr(cmac->adapter)) dev_dbg(&cmac->adapter->pdev->dev, "PM3393 intr cause 0x%x\n", master_i...
false
false
false
false
false
0
PyFFFont_Generate(PyObject *self, PyObject *args, PyObject *keywds) { char *filename; char *locfilename = NULL; FontViewBase *fv = ((PyFF_Font *) self)->fv; PyObject *flags=NULL; int iflags = -1; int resolution = -1; char *bitmaptype="", *subfontdirectory=NULL, *namelist=NULL; NameList *...
false
false
false
false
false
0
enet_peer_disconnect (ENetPeer * peer, enet_uint32 data) { ENetProtocol command; if (peer -> state == ENET_PEER_STATE_DISCONNECTING || peer -> state == ENET_PEER_STATE_DISCONNECTED || peer -> state == ENET_PEER_STATE_ZOMBIE) return; enet_peer_reset_queues (peer); command.header....
false
false
false
false
false
0
current_done(int ok) { if (!fp) return; fclose(fp); fp = NULL; if (!snarfing) ahead_cache[0].status = ok ? StatusOk : StatusEmpty; if (cache_notice) show_cache_stats(); }
false
false
false
false
false
0
cb_systray_volume_scroll (GtkWidget *widget, GdkEventScroll *event) { gint volume; GtkAdjustment *volume_adj; if (event->type != GDK_SCROLL) return; volume_adj = gtk_range_get_adjustment (GTK_RANGE(volume_scale)); switch (event->direction) { case GDK_SCROLL_UP: volume = gtk_adjustment_get_value (GTK_ADJU...
false
false
false
false
false
0
hgroup_list_exists(const lList *this_list, lList **answer_list, const lList *href_list) { bool ret = true; DENTER(HGROUP_LAYER, "hgroup_list_exists"); if (href_list != NULL && this_list != NULL) { lListElem *href; for_each(href, href_list) { const char *name = lGetHost...
false
false
false
false
false
0
read(hsStream* S) { fType = S->readByte(); switch (fType) { case kString: case kAny: fString = S->readSafeStr(); break; case kBool: fBool = S->readBool(); break; case kByte: fByte = S->readByte(); break; case kInt: case kUint: fUint...
false
false
false
false
false
0
f_create_chan(int var, const char* fname, int rd_wr) { GLEFile* file = new GLEFile(); int freechn = -1; for (vector<GLEFile*>::size_type i = 0; i < g_Files.size() && freechn == -1; i++) { if (g_Files[i] == NULL) { freechn = i; } } if (freechn == -1) { freechn = g_Files.size(); g_Files.push_back(file); ...
false
false
false
false
true
1
ExecResult(ResultState *node) { TupleTableSlot *outerTupleSlot; TupleTableSlot *resultSlot; PlanState *outerPlan; ExprContext *econtext; ExprDoneCond isDone; econtext = node->ps.ps_ExprContext; /* * check constant qualifications like (2 > 1), if not already done */ if (node->rs_checkqual) { bool qual...
false
false
false
false
false
0
hz_value(data_t prev, data_t curr, data_t itv) { //bb_error_msg("curr:%lld prev:%lld G.hz:%u", curr, prev, G.hz); return ((double)overflow_safe_sub(prev, curr)) / itv * G.hz; }
false
false
false
false
false
0
create_cipher (GkmSecret *login, int calgo, int halgo, const guchar *salt, gsize n_salt, guint iterations, gcry_cipher_hd_t *cipher) { gsize n_key, n_block; const gchar *password; gsize n_password; guchar *key, *iv; gcry_error_t gcry; g_assert (login); g_assert (salt); g_assert (cipher); n_key...
false
false
false
false
false
0
find_lb_table(void) { struct lb_header *head; head = 0; if (!head) { /* First try at address 0 */ head = __find_lb_table(0x00000, 0x1000); } if (!head) { /* Then try at address 0xf0000 */ head = __find_lb_table(0xf0000, 0x100000); } return head; }
false
false
false
false
false
0
test_cases(std::string filename) { //Variables for parsing the data file std::string line; std::stringstream parse; int ssize = 100; //establish a buffer size to store attribute values, which for binary classification string are no bigger than 1 char c[ssize]; char delimiter = ','; //Variables to store the va...
false
false
false
false
false
0
item_event_valid (GooCanvasItem *item, GooCanvasItem *target, GdkEventButton *event, gpointer data) { if (((char *)data)[0]=='R') { // The user is Ready wait_for_ready = FALSE; ask_ready(FALSE); pause_board(FALSE); } else if(!wait_for_ready) { if ((((char *)data)[0...
true
true
false
false
false
1
_print_printer_name (GtkPrinter *printer, PhotoData *data) { GtkPrintBackend *backend; const char *backend_name; /* Don't list the "Print to File" printer */ backend = gtk_printer_get_backend (printer); backend_name = G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (backend)); if (g_strc...
false
false
false
false
false
0
import_style (CRDocHandler * a_this, GList * a_media_list, CRString * a_uri, CRString * a_uri_default_ns, CRParsingLocation *a_location) { enum CRStatus status = CR_OK; CRString *uri = NULL; CRStatement *stmt = NULL, *stmt...
false
false
false
false
false
0
fill(FXColor color){ if(data){ register FXColor *pix=data; register FXColor *end=pix+height*width; do{ *pix++=color; }while(pix<end); } }
false
false
false
false
false
0
iobuf_writestr (iobuf_t a, const char *buf) { int rc; for (; *buf; buf++) if ((rc=iobuf_writebyte (a, *buf))) return rc; return 0; }
false
false
false
false
false
0
dai_unit_new_adv_task(struct unit *punit, enum adv_unit_task task, struct tile *ptile) { /* Keep ai_unit_task in sync with adv task */ switch(task) { case AUT_AUTO_SETTLER: ai_unit_new_task(punit, AIUNIT_AUTO_SETTLER, ptile); break; case AUT_BUILD_CITY: ai_unit_new_task(punit, AIUNIT_BUIL...
false
false
false
false
false
0
arvo_raw_event(struct hid_device *hdev, struct hid_report *report, u8 *data, int size) { struct arvo_device *arvo = hid_get_drvdata(hdev); if (size != 3) return 0; if (arvo && arvo->roccat_claimed) arvo_report_to_chrdev(arvo, data); return 0; }
false
false
false
false
false
0
show_create_trigger_impl(THD *thd, Table_triggers_list *triggers, int trigger_idx) { int ret_code; Protocol *p= thd->protocol; List<Item> fields; LEX_STRING trg_name; ulonglong trg_sql_mode; LEX_STRING trg_sql_mode_str; LEX_STRING...
false
false
false
false
false
0
getKey() { static const QString keyTemplate("solid-disk-info-1-%1-%2"); static const QString tableSize( QString::number(sizeof(ContentTypesCache))); return keyTemplate.arg(tableSize, QString::number(geteuid())); }
false
false
false
false
false
0
ldns_axfr_next(ldns_resolver *resolver) { ldns_rr *cur_rr; uint8_t *packet_wire; size_t packet_wire_size; ldns_lookup_table *rcode; ldns_status status; /* check if start() has been called */ if (!resolver || resolver->_socket == 0) { return NULL; } if (resolver->_cur_axfr_pkt) { if (resolver->_axfr_i == ...
false
false
false
false
false
0
Match_find(Match_Type type){ if(!local_match_cache[type]){ local_match_cache[type] = Match_create(type); local_match_cache[Match_Type_mirror(type)] = local_match_cache[type]->mirror; } return local_match_cache[type]; }
false
false
false
false
false
0
FindPluginByFileName(const wxString& pluginFileName) { for (unsigned int i = 0; i < m_Plugins.GetCount(); ++i) { PluginElement* plugElem = m_Plugins[i]; if (plugElem->fileName == pluginFileName) return plugElem->plugin; } return nullptr; }
false
false
false
false
false
0
nvkm_memx_nsec(struct nvkm_memx *memx, u32 nsec) { nvkm_debug(&memx->pmu->subdev, " DELAY = %d ns\n", nsec); memx_cmd(memx, MEMX_DELAY, 1, (u32[]){ nsec }); memx_out(memx); /* fuc can't handle multiple */ }
false
false
false
false
false
0
gmpc_provider_music_tree_check_directory_for_files_finish (GmpcProviderMusicTree* self, GAsyncResult* _res_, GList** list) { GmpcProviderMusicTreeCheckDirectoryForFilesData* _data_; _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_)); if (list) { *list = _data_->list; } else { __g...
false
false
false
false
false
0
transaction_direct(struct tdb_context *tdb, tdb_off_t off, size_t len, bool write_mode) { size_t blk = off / PAGESIZE, end_blk; /* This is wrong for zero-length blocks, but will fail gracefully */ end_blk = (off + len - 1) / PAGESIZE; /* Can only do direct if in single block and we've already copied. */ if (...
false
false
false
false
false
0
match(const giopAddressList& addrlist) const { if (addrlist.size() != pd_addresses.size()) return 0; if (orbParameters::offerBiDirectionalGIOP != pd_offerBiDir) return 0; giopAddressList::const_iterator i, last, j; i = addrlist.begin(); j = pd_addresses.begin(); last = addrlist.end(); for (; i != l...
false
false
false
false
false
0
WriteData() { vtkPointSet *input = vtkPointSet::SafeDownCast(this->GetInput()); vtkIdType numberOfPoints = 0; if (input) { numberOfPoints = input->GetNumberOfPoints(); } // OpenVTKFile() will report any errors that happen ostream *outfilep = this->OpenVTKFile(); if (!outfilep) { return...
false
false
false
false
false
0
klp_enable_patch(struct klp_patch *patch) { int ret; mutex_lock(&klp_mutex); if (!klp_is_patch_registered(patch)) { ret = -EINVAL; goto err; } ret = __klp_enable_patch(patch); err: mutex_unlock(&klp_mutex); return ret; }
false
false
false
false
false
0
genie_assignation_constant (NODE_T * p) { NODE_T *dst = SUB (p); NODE_T *src = SOURCE (&PROP (GINFO (NEXT_NEXT (dst)))); A68_REF *z = (A68_REF *) STACK_TOP; PROP_T self; UNIT (&self) = genie_assignation_constant; SOURCE (&self) = p; EXECUTE_UNIT (dst); CHECK_REF (p, *z, MOID (p)); COPY (ADDRESS (z), C...
false
false
false
false
false
0
InitializeClass() { if (NOT DXType::DXTypeClassInitialized) { // // Create and initialize the type list with the base types. // DXType::TypeList = new List; for (int i = 0; i < _numBaseTypes; i++) { DXType::TypeList->appendElement(&_baseType[i]); } DXType::DXTypeClassInitialized = TRUE; } }
false
false
false
false
false
0
xmlSecGnuTLSKeyDataRsaAdoptPublicKey(xmlSecKeyDataPtr data, gnutls_datum_t * m, gnutls_datum_t * e) { gnutls_datum_t params[2]; gcry_mpi_t mpis[2]; gcry_sexp_t pub_key = NULL; int rc; int ret; xmlSecAssert2(xmlSecKeyDataCheckId(data, xmlSecGnuTLSKeyDataRsaId...
false
false
false
false
false
0
next_log(int log_num) { return log_num>=log_generations?1:log_num+1; }
false
false
false
false
false
0
sign()const { if(isZero())return 0; return p.terms.rbegin()->second.sign(); }
false
false
false
false
false
0
update_tooltip(GtkTreeView *tv, GtkTreePath *path) { const struct node_data *data = NULL; GtkTreeModel *model; GtkTreeIter iter; g_assert(tv != NULL); if (path) { GtkTreeIter parent; model = gtk_tree_view_get_model(tv); if (!gtk_tree_model_get_iter(model, &iter, path)) { g_warning("gtk_tree_model_get...
false
false
false
false
false
0
inode_dead_file_copy_added(gfarm_ino_t inum, gfarm_int64_t igen, struct host *host) { struct inode *inode = inode_lookup(inum); if (inode == NULL || !inode_is_file(inode)) return; if (igen != inode->i_gen) return; inode_add_replica_internal(inode, host, FILE_COPY_BEING_REMOVED, 0); }
false
false
false
false
false
0
func_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data) { EBookBackendLDAPSExpData *ldap_data = data; ESExpResult *r; /* just replace the head of the list with the NOT of it. */ if (argc > 0) { gchar *term = ldap_data->list->data; ldap_data->list->data = ...
false
false
false
false
false
0
pa_globals_init() { // global variables cache_managers=new Cache_managers; // in various libraries gc_substitute_memory_management_functions(); // hex value setup_hex_value(); #ifdef XML // initializing xml libs // Register the EXSLT extensions and the test module exsltRegisterAll(); xsltRegisterTestMod...
false
false
false
false
false
0
Problem_6(MATRIX &matrix){ int N = matrix.size(); if(N<=1) return; int numRound = N/2; for(int i=0; i<numRound; ++i){ //for each inner round for(int j=i; j<N-i-1; ++j){ int temp = matrix[i][j]; matrix[i][j]=matrix[N-1-j][i]; matrix[N-1-j][i]=matrix[N-1-i][N-1-j]; matrix[N-1-i][N-1...
false
false
false
false
false
0
UpdateMapPointersInObject(HeapObject* obj) { ASSERT(!obj->IsMarked()); Map* map = obj->map(); ASSERT(Heap::map_space()->Contains(map)); MapWord map_word = map->map_word(); ASSERT(!map_word.IsMarked()); if (map_word.IsOverflowed()) { Map* new_map = GetForwardedMap(map_word); ASSERT(He...
false
false
false
false
false
0
start_resource(struct ast_module *mod) { char tmp[256]; enum ast_module_load_result res; if (mod->flags.running) { return AST_MODULE_LOAD_SUCCESS; } if (!mod->info->load) { return AST_MODULE_LOAD_FAILURE; } res = mod->info->load(); switch (res) { case AST_MODULE_LOAD_SUCCESS: if (!ast_fully_booted) {...
false
false
false
false
false
0
log_store_pidgin_search_new (TplLogStore *self, const gchar *text, gint type_mask) { GList *files; GList *retval; g_return_val_if_fail (TPL_IS_LOG_STORE_PIDGIN (self), NULL); g_return_val_if_fail (!tp_str_empty (text), NULL); if (!(type_mask & TPL_EVENT_MASK_TEXT)) return NULL; files = log_st...
false
false
false
false
false
0
b44_suspend(struct ssb_device *sdev, pm_message_t state) { struct net_device *dev = ssb_get_drvdata(sdev); struct b44 *bp = netdev_priv(dev); if (!netif_running(dev)) return 0; del_timer_sync(&bp->timer); spin_lock_irq(&bp->lock); b44_halt(bp); netif_carrier_off(bp->dev); netif_device_detach(bp->dev); b4...
false
false
false
false
false
0
P_SpawnPuff ( fixed_t x, fixed_t y, fixed_t z ) { mobj_t* th; int t; t = P_Random(); z += ((t - P_Random()) << 10); // [STRIFE] removed momz and tics randomization th = P_SpawnMobj(x, y, z, MT_STRIFEPUFF); // [STRIFE]: new type // don't make punches spark on the wall // [STRI...
false
false
false
false
false
0
gcr_trust_is_certificate_pinned_finish (GAsyncResult *result, GError **error) { trust_closure *closure; g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), FALSE); g_return_val_if_fail (!error || !*error, FALSE); g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL, gcr_t...
false
false
false
false
false
0
sys_close(void) { if (new_style_driver && ppp_dev_fd >= 0) close(ppp_dev_fd); if (sock_fd >= 0) close(sock_fd); #ifdef INET6 if (sock6_fd >= 0) close(sock6_fd); #endif if (slave_fd >= 0) close(slave_fd); if (master_fd >= 0) close(master_fd); }
false
false
false
false
false
0
suggest_hentry_gen(hentry * rv, char * pattern) { char result[MAXLNLEN]; *result = '\0'; int sfxcount = get_sfxcount(pattern); if (get_sfxcount(HENTRY_DATA(rv)) > sfxcount) return NULL; if (HENTRY_DATA(rv)) { char * aff = pAMgr->morphgen(HENTRY_WORD(rv), rv->blen, rv->astr, rv->alen, ...
false
false
false
false
false
0
qf_free(qi, idx) qf_info_T *qi; int idx; { qfline_T *qfp; while (qi->qf_lists[idx].qf_count) { qfp = qi->qf_lists[idx].qf_start->qf_next; vim_free(qi->qf_lists[idx].qf_start->qf_text); vim_free(qi->qf_lists[idx].qf_start->qf_pattern); vim_free(qi->qf_lists[idx].qf_start); qi->qf_lists[idx].qf...
false
false
false
false
false
0
autohelperowl_attackpat298(int trans, int move, int color, int action) { int a, b, c, d; UNUSED(color); UNUSED(action); a = AFFINE_TRANSFORM(722, trans, move); b = AFFINE_TRANSFORM(759, trans, move); c = AFFINE_TRANSFORM(796, trans, move); d = AFFINE_TRANSFORM(720, trans, move); return play_attack_def...
false
false
false
false
false
0
SkipFrame() { AVM_WRITE(__MODULE__, 2, "SkipFrame()\n"); if (m_pPacket) m_pPacket->Release(); m_pPacket = 0; Flush(); return m_pPacket ? 0 : -1; }
false
false
false
false
false
0
ipmiconsole_packet_object (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_VALID (p)); if (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ) return (c->connection.obj_authen...
false
false
false
false
false
0
toFile(QAction *action) { if (action == aSavePdf) { QString f = QFileDialog::getSaveFileName(this, tr("Save File"), QDir::homePath(), tr("PDF file (*.pdf)")); if (f.isEmpty()) return; ...
false
false
false
false
false
0
Selector() : // Mark this class as non-derived to allow C++ vfuncs to be skipped. Glib::ObjectBase(0), Gxw::Regler(Glib::ConstructParams(selector_class_.init())) { }
false
false
false
false
false
0
CanRead( const std::string& pFile, IOSystem* pIOHandler, bool cs) const { const std::string extension = GetExtension(pFile); if (extension == "hmp" ) return true; // if check for extension is not enough, check for the magic tokens if (!extension.length() || cs) { uint32_t tokens[3]; tokens[0] = AI_HMP_MAGI...
false
false
false
false
false
0
gck_attribute_init_copy (GckAttribute *dest, const GckAttribute *src) { g_return_if_fail (dest != NULL); g_return_if_fail (src != NULL); dest->type = src->type; if (src->length == G_MAXULONG) { dest->value = NULL; dest->length = G_MAXULONG; } else if (src->value == NULL) { dest->val...
false
false
false
false
false
0
gtc_visit (tree t1, tree t2, struct sccs *state, vec<type_pair_t> *sccstack, struct pointer_map_t *sccstate, struct obstack *sccstate_obstack) { struct sccs *cstate = NULL; type_pair_t p; void **slot; tree leader1, leader2; /* Check first for the obvious case of pointer identity. */ if (t1...
false
false
false
false
false
0
setGroupName(GroupRecord *groupRec, Symbol groupID) { GroupRecord *grec = NUL(GroupRecord*); if (this->groups) grec = (GroupRecord*)this->groups->findDefinition (groupID); else if (groupRec) this->groups = new Dictionary; if (grec) { if (groupRec) this->groups->replaceDefinition (groupID, groupRe...
false
false
false
false
false
0
do_write(void * data, const char * str, size_t length) { MMAPString * f; f = data; if (mmap_string_append_len(f, str, length) == NULL) return 0; else return (int) length; }
false
false
false
false
false
0
inthash_insert(inthash_t *tptr, int key, int data) { int tmp; inthash_node_t *node; int h; /* check to see if the entry exists */ if ((tmp=inthash_lookup(tptr, key)) != HASH_FAIL) return(tmp); /* expand the table if needed */ while (tptr->entries>=HASH_LIMIT*tptr->size) rebuild_table_int(tptr); ...
false
false
false
false
false
0
net_read( DirectStream *stream, unsigned int length, void *buf, unsigned int *read_out ) { int size; size = recv( stream->fd, buf, length, 0 ); switch (size) { case 0: return DR_EOF; case -1: if (errno == EAGA...
false
false
false
false
false
0
res_compare_resource (sc_resourceref_t from, sc_resourceref_t with) { return strcmp (from->name, with->name) == 0 && from->offset == with->offset && from->length == with->length; }
false
false
false
false
false
0
index_index2prefix (const char* indextype) { char* prefix; if ( indextype == NULL ) prefix = NULL; else if ( indextype == indextype_PRESENCE ) prefix = prefix_PRESENCE; else if ( indextype == indextype_EQUALITY ) prefix = prefix_EQUALITY; else if ( indextype == indextype_APPROX ) prefix = pre...
false
false
false
false
false
0
slapi_index_register_decoder(char *plugin_id, index_validate_callback validate_op) { static int firstTime = 1; static int gotIDLapi = 0; int ret = 0; indexPlugin *plg; if(firstTime) { /* create the cache */ theCache = (globalIndexCache*)slapi_ch_malloc(sizeof(globalIndexCache)); if(theCache) { theCach...
false
false
false
false
false
0
exceptions_attribute_print(const ExceptionsAttribute* exceptions, const ConstantPool* constant_pool) { char* exception_name; int j; printf("throws"); if (exceptions->no_exceptions > 0) { exception_name = jclass_cp_get_class_name(constant_pool, exceptions->exception_index[0], 0); printf(" %s", exception_nam...
false
false
false
false
false
0
get_query_def(Query *query, StringInfo buf, List *parentnamespace, TupleDesc resultDesc, int prettyFlags, int startIndent) { deparse_context context; deparse_namespace dpns; /* * Before we begin to examine the query, acquire locks on referenced * relations, and fix up deleted columns in JOIN RTEs. This ens...
false
false
false
false
false
0
_clutter_master_clock_add_timeline (ClutterMasterClock *master_clock, ClutterTimeline *timeline) { gboolean is_first; if (g_slist_find (master_clock->timelines, timeline)) return; is_first = master_clock->timelines == NULL; master_clock->timelines = g_slist_prepend ...
false
false
false
false
false
0
halfpict ( void* vbuf ) { char* buf = (char*) vbuf; Uint16* wp = (Uint16*) xlatbuffer; char* dest = (char*) xlatbuffer; trleheader* hd = (trleheader*) vbuf; if ( hd->id == 16973 ) { wp[0] = hd->x / 2; wp[1] = hd->y / 2; if ( ( wp[0] + 1 ) * ( wp[1] + 1 ) + 4 >= xlatbuffersize ) ...
false
false
false
false
false
0
copy_skel_file( const char *sfile, /*source file*/ const char *dfile, /*destination file*/ const struct stat *st, /*stat of source file*/ uid_t uid, /*file owner*/ gid_t gid ) /*file group*/ { char buf[ READ_BUF_SIZE ]; int sfd, dfd, count = 0, n; /*must be absolute path*/ if( ! sfile || ! dfile ||...
false
false
false
false
false
0
ubiblock_queue_rq(struct blk_mq_hw_ctx *hctx, const struct blk_mq_queue_data *bd) { struct request *req = bd->rq; struct ubiblock *dev = hctx->queue->queuedata; struct ubiblock_pdu *pdu = blk_mq_rq_to_pdu(req); if (req->cmd_type != REQ_TYPE_FS) return BLK_MQ_RQ_QUEUE_ERROR; if (rq_data_dir(req) != READ...
false
false
false
false
false
0
df_bb_luids_set (struct df *df, basic_block bb) { rtx insn; int luid = 0; /* The LUIDs are monotonically increasing for each basic block. */ for (insn = BB_HEAD (bb); ; insn = NEXT_INSN (insn)) { if (INSN_P (insn)) DF_INSN_LUID (df, insn) = luid++; DF_INSN_LUID (df, insn) = luid; if (...
false
false
false
false
false
0
gfs_stat_caching(const char *path, struct gfs_stat *st) { int nattrs; char **attrnames; void **attrvalues; size_t *attrsizes; gfarm_error_t e = gfs_getattrplus_caching(path, gfarm_xattr_caching_patterns(), gfarm_xattr_caching_patterns_number(), st, &nattrs, &attrnames, &attrvalues, &attrsizes); if...
false
false
false
false
false
0
__pyx_tp_clear_6Cython_8Compiler_7Visitor_RecursiveNodeReplacer(PyObject *o) { PyObject* tmp; struct __pyx_obj_6Cython_8Compiler_7Visitor_RecursiveNodeReplacer *p = (struct __pyx_obj_6Cython_8Compiler_7Visitor_RecursiveNodeReplacer *)o; __pyx_tp_clear_6Cython_8Compiler_7Visitor_TreeVisitor(o); tmp = ((PyObject*...
false
false
false
false
false
0
get_array_subscript_semnode(SemanticNode *array_node, int dim) { List *tlist; for(tlist = array_node->ldata->data.leaf->subtree; dim > 0 && tlist != NULL; dim--, tlist = tlist->next); return tlist->data; }
false
false
false
true
false
1
fffile (qdaemon, qtrans, fstart, fsend, cbytes, pfhandled) struct sdaemon *qdaemon; struct stransfer *qtrans; boolean fstart; boolean fsend; long cbytes ATTRIBUTE_UNUSED; boolean *pfhandled; { DEBUG_MESSAGE3 (DEBUG_PROTO, "fffile: fstart %s; fsend %s; fFacked %s", fstart ? "true" : "...
false
false
false
false
false
0
createTabWidget() { //return new QStackedWidget(this); FTabWidget * tabWidget = new FTabWidget(this); tabWidget->setObjectName("sketch_tabs"); return tabWidget; }
false
false
false
false
false
0
blinkTimeOut(void) { V v = (model()!=0)?((AplusModel*)model())->aplusVar():0; if (blinkPhase()==Normal) { A newBlink=blinkFunc()->invoke(v,aplus_nl); if (verifyBlink(newBlink)==MSTrue) { MSBoolean stopTimer=(drawBlink(newBlink,Reverse)==MSTrue)?MSFalse:MSTrue; blink(newBlink); toggleBlinkPhase...
false
false
false
false
false
0
gretl_list_from_vector (const gretl_vector *v, int *err) { int i, n = gretl_vector_get_length(v); int *list = NULL; if (n == 0) { *err = E_DATA; } else { list = gretl_list_new(n); if (list == NULL) { *err = E_ALLOC; } else { for (i=0; i<n; i++) { list[i+1] = (int) v->val[i]; } } ...
false
false
false
false
false
0
stmpe811_enable(struct stmpe *stmpe, unsigned int blocks, bool enable) { unsigned int mask = 0; if (blocks & STMPE_BLOCK_GPIO) mask |= STMPE811_SYS_CTRL2_GPIO_OFF; if (blocks & STMPE_BLOCK_ADC) mask |= STMPE811_SYS_CTRL2_ADC_OFF; if (blocks & STMPE_BLOCK_TOUCHSCREEN) mask |= STMPE811_SYS_CTRL2_TSC_OF...
false
false
false
false
false
0
spawnPrenegs(int num) { int loopstart, node, spawned = 0, r; if(nextprenegnode < 0) nextprenegnode = rand() % (maxvpnnodeid + 1); loopstart = nextprenegnode; node = loopstart; for(;;) { if(NODEINFO_EXISTS(node) && node != global_config.id && !NODEINFO_INFO(node).negotiated) { if(!tcpcon_checkExistingConn(node...
false
false
false
false
false
0
ui_create_properties (const ui_property_t *prop, se_o_t *parent, se_prop_type_t type) { int i; se_prop_cb_t cb = NULL; switch (type) { case SE_TYPE_INT: cb = ui_prop_set_int; break; case SE_TYPE_BOOL: cb = ui_prop_set_bool; break; default:; } for (i = 0; prop[i].name; ++i) { se_o_t *obj ...
false
false
false
false
false
0
resolve_symbol (const char *name, bfd *input_bfd, struct elf_final_link_info *flinfo, bfd_vma *result, Elf_Internal_Sym *isymbuf, size_t locsymcount) { Elf_Internal_Sym *sym; struct bfd_link_hash_entry *global_entry; const char *candidate = NULL; Elf_Internal_Shdr *symtab_hdr; size_t i; symtab_hd...
false
false
false
false
false
0
merge_identical_invariants (void) { unsigned i; struct invariant *inv; htab_t eq = htab_create (VEC_length (invariant_p, invariants), hash_invariant_expr, eq_invariant_expr, free); FOR_EACH_VEC_ELT (invariant_p, invariants, i, inv) find_identical_invariants (eq, inv); htab_delete (eq); }
false
false
false
false
false
0
statistic_result_get_pos(gint tmpfor, guint from, Transaction *ope) { gint pos = 0; switch(tmpfor) { case STAT_CATEGORY: { Category *catentry = da_cat_get(ope->kcat); if(catentry) pos = (catentry->flags & GF_SUB) ? catentry->parent : catentry->key; } break; case STAT_SUBCATEGORY: pos = op...
false
false
false
false
false
0
sarrayCreateLinesFromString(char *string, l_int32 blankflag) { l_int32 i, nsub, size, startptr; char *cstring, *substring; SARRAY *sa; PROCNAME("sarrayCreateLinesFromString"); if (!string) return (SARRAY *)ERROR_PTR("textstr not defined", procName, NULL); ...
false
false
false
false
false
0
depmod_load_dependencies(struct depmod *depmod) { struct mod **itr, **itr_end; DBG("load dependencies (%zd modules, %u symbols)\n", depmod->modules.count, hash_get_count(depmod->symbols)); itr = (struct mod **)depmod->modules.array; itr_end = itr + depmod->modules.count; for (; itr < itr_end; itr++) { str...
false
false
false
false
false
0
openoutput(struct mimestruct *m) { if (!m->outputfile) m->outputfile="-"; m->outputfp= openfile_or_pipe(m->outputfile, "w"); }
false
false
false
false
false
0
find_output_segment(elfcpp::PT type, elfcpp::Elf_Word set, elfcpp::Elf_Word clear) const { for (Segment_list::const_iterator p = this->segment_list_.begin(); p != this->segment_list_.end(); ++p) if (static_cast<elfcpp::PT>((*p)->type()) == type && ((*p)->flags() & set) == set && ((*p)->flag...
false
false
false
false
false
0
decimal_bin_size(int precision, int scale) { int intg=precision-scale, intg0=intg/DIG_PER_DEC1, frac0=scale/DIG_PER_DEC1, intg0x=intg-intg0*DIG_PER_DEC1, frac0x=scale-frac0*DIG_PER_DEC1; DBUG_ASSERT(scale >= 0 && precision > 0 && scale <= precision); return intg0*sizeof(dec1)+dig2bytes[intg0x]+ ...
false
false
false
false
false
0
vmw_dx_shader_unbind(struct vmw_resource *res, bool readback, struct ttm_validate_buffer *val_buf) { struct vmw_private *dev_priv = res->dev_priv; struct vmw_fence_obj *fence; int ret; BUG_ON(res->backup->base.mem.mem_type != VMW_PL_MOB); mutex_lock(&dev_priv->binding_mutex); ret = vmw_dx_shader_scrub(r...
false
false
false
false
false
0
o_material(obj, material) struct obj* obj; unsigned material; { register struct obj* otmp; struct obj *temp; if (objects[obj->otyp].oc_material == material) return obj; if (Has_contents(obj)) { for (otmp = obj->cobj; otmp; otmp = otmp->nobj) if (objects[otmp->otyp].oc_material == material) retur...
false
false
false
false
false
0
kvm_load_guest_xcr0(struct kvm_vcpu *vcpu) { if (kvm_read_cr4_bits(vcpu, X86_CR4_OSXSAVE) && !vcpu->guest_xcr0_loaded) { /* kvm_set_xcr() also depends on this */ xsetbv(XCR_XFEATURE_ENABLED_MASK, vcpu->arch.xcr0); vcpu->guest_xcr0_loaded = 1; } }
false
false
false
false
false
0
SetColorTable( GDALColorTable *poColorTable ) { RMFDataset *poGDS = (RMFDataset *) poDS; if ( poColorTable ) { if ( poGDS->eRMFType == RMFT_RSW && poGDS->nBands == 1 ) { GDALColorEntry oEntry; GUInt32 i; if ( !poGDS->pabyColorTable ) ...
false
false
false
false
false
0
pointer_diff (tree op0, tree op1, tree ptrtype, tsubst_flags_t complain) { tree result; tree restype = ptrdiff_type_node; tree target_type = TREE_TYPE (ptrtype); if (!complete_type_or_else (target_type, NULL_TREE)) return error_mark_node; if (TREE_CODE (target_type) == VOID_TYPE) { if (complai...
false
false
false
false
false
0
_dbus_string_append_byte_as_hex (DBusString *str, unsigned char byte) { const char hexdigits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; if (!_dbus_string_append_byte (str, hexdigits[(byte >> 4...
true
true
false
false
false
1
unpack_border(int n, int first, double *buf) { int i,m,last; m = 0; last = first + n; for (i = first; i < last; i++) { if (i == nmax) grow(0); x[i][0] = buf[m++]; x[i][1] = buf[m++]; x[i][2] = buf[m++]; tag[i] = static_cast<int> (buf[m++]); type[i] = static_cast<int> (buf[m++]); mas...
false
false
false
false
false
0
libnet_seed_prand() { struct timeval seed; if (gettimeofday(&seed, NULL) == -1) { perror("seed_rand: cannot gettimeofday"); return (-1); } /* * More entropy then just seeding with time(2). */ srandom((unsigned)(seed.tv_sec ^ seed.tv_usec)); return (1); }
false
false
false
false
false
0
last_chars(struct fa *fa) { bitset *bs = bitset_init(UCHAR_NUM); list_for_each(s, fa->initial) { for (int i=0; i < s->tused; i++) { if (s->trans[i].to->accept) { for (uint c = s->trans[i].min; c <= s->trans[i].max; c++) bitset_set(bs, c); } ...
false
false
false
false
false
0