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
probe_unixware_pt(blkid_probe pr, const struct blkid_idmag *mag __attribute__((__unused__))) { struct unixware_disklabel *l; struct unixware_partition *p; blkid_parttable tab = NULL; blkid_partition parent; blkid_partlist ls; int i; l = (struct unixware_disklabel *) blkid_probe_get_sector(pr, UNIXWARE_SECT...
false
false
false
false
false
0
demon_sound_w(UINT8 sound_val, UINT8 bits_changed) { int pc = activecpu_get_pc(); if (pc == 0x0fbc || pc == 0x1fed || pc == 0x2ff1 || pc == 0x3fd3) { sound_latch[sound_latch_wp] = ((sound_val & 0x07) << 3); } if (pc == 0x0fc8 || pc == 0x1ff9 || pc == 0x2ffd || pc == 0x3fdf) { soun...
false
false
false
false
false
0
blkid_get_cache_filename(struct blkid_config *conf) { char *filename; filename = safe_getenv("BLKID_FILE"); if (filename) filename = blkid_strdup(filename); else if (conf) filename = blkid_strdup(conf->cachefile); else { struct blkid_config *c = blkid_read_config(NULL); if (!c) filename = blkid_strdup(...
false
false
false
false
false
0
AddButtonRow(wxBoxSizer *mainColumn) { // the order in which the buttons are created determines the TAB order - at least under MSWindows... // although the 'back' button appears before the 'next' button, a more userfriendly tab order is // to activate the 'next' button first (create the next button before t...
false
false
false
false
false
0
SetPosition( int x, int y ) { wxCHECK_RET( m_rect, _T("unexpected SetPosition() call") ); m_rect->x = x; m_rect->y = y; }
false
false
false
false
false
0
DtsDevRegisterWr( HANDLE hDevice, uint32_t offset, uint32_t Value ) { BC_CMD_REG_ACC *reg_acc_wr; BC_IOCTL_DATA *pIocData = NULL; DTS_LIB_CONTEXT *Ctx = NULL; BC_STATUS sts = BC_STS_SUCCESS; DTS_GET_CTX(hDevice, Ctx); if (!(pIocData = DtsAllocIoctlData(Ctx))) return BC_STS_INSUFF_RES; re...
false
false
false
false
false
0
unmountFS(EncFS_Context *ctx) { shared_ptr<EncFS_Args> arg = ctx->args; if( arg->opts->mountOnDemand ) { rDebug("Detaching filesystem %s due to inactivity", arg->mountPoint.c_str()); ctx->setRoot( shared_ptr<DirNode>() ); return false; } else { // Time to unmount! // xgroup(diag) rWarning(_...
false
false
false
false
false
0
detect_any_signoff(char *letter, int size) { char *cp; int seen_colon = 0; int seen_at = 0; int seen_name = 0; int seen_head = 0; cp = letter + size; while (letter <= --cp && *cp == '\n') continue; while (letter <= cp) { char ch = *cp--; if (ch == '\n') break; if (!seen_at) { if (ch == '@') ...
false
false
false
false
false
0
replaceChildren (pANTLR3_TREE_NODE_STREAM tns, pANTLR3_BASE_TREE parent, ANTLR3_INT32 startChildIndex, ANTLR3_INT32 stopChildIndex, pANTLR3_BASE_TREE t) { if (parent != NULL) { pANTLR3_BASE_TREE_ADAPTOR adaptor; pANTLR3_COMMON_TREE_ADAPTOR cta; adaptor = tns->getTreeAdaptor(tns); cta = (pANTLR3_COMMON_TR...
false
false
false
false
false
0
send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid, __u8 genl_cmd, __u16 nla_type, void *nla_data, int nla_len) { struct nlattr *na; struct sockaddr_nl nladdr; int r, buflen; char *buf; struct msgtemplate msg = { { 0, } }; msg.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); msg.n.nlmsg_type = nlmsg_type; ...
false
false
false
false
false
0
apply_warning_emblem (GIcon **base, gboolean symbolic) { GIcon *warning, *emblemed_icon; GEmblem *emblem; if (symbolic) { warning = g_themed_icon_new ("dialog-warning-symbolic"); } else { warning = g_themed_icon_new ("dialog-warning"); } emblem = g_emblem_new (warning); emblemed_icon = g_emblemed_i...
false
false
false
false
false
0
CDB___db_addpage_print(notused1, dbtp, lsnp, notused2, notused3) DB_ENV *notused1; DBT *dbtp; DB_LSN *lsnp; int notused2; void *notused3; { __db_addpage_args *argp; u_int32_t i; u_int ch; int ret; i = 0; ch = 0; notused1 = NULL; notused2 = 0; notused3 = NULL; if ((ret = CDB___db_addpage_read(dbtp->data...
false
false
false
false
false
0
get_recv_comp_slot( struct netvsc_device *nvdev, struct vmbus_channel *channel, u16 q_idx) { u32 filled, avail, next; struct recv_comp_data *rcd; if (!nvdev->recv_section) return NULL; if (!nvdev->mrc[q_idx].buf) return NULL; if (atomic_read(&nvdev->num_outstanding_recvs) > nvdev->recv_section->num_su...
false
false
false
false
false
0
i40e_vsi_clear(struct i40e_vsi *vsi) { struct i40e_pf *pf; if (!vsi) return 0; if (!vsi->back) goto free_vsi; pf = vsi->back; mutex_lock(&pf->switch_mutex); if (!pf->vsi[vsi->idx]) { dev_err(&pf->pdev->dev, "pf->vsi[%d] is NULL, just free vsi[%d](%p,type %d)\n", vsi->idx, vsi->idx, vsi, vsi->type); ...
false
false
false
false
false
0
fr_process_begin_command_at (FrProcess *process, const char *arg, int index) { FrCommandInfo *info, *old_c_info; g_return_if_fail (process != NULL); g_return_if_fail (index >= 0 && index <= process->priv->n_comm); process->priv->current_comm = index; old_c_info = g_ptr_array_index (proc...
false
false
false
false
false
0
yajl_gen_map_close(yajl_gen g) { ENSURE_VALID_STATE; DECREMENT_DEPTH; if (g->pretty) g->print(g->ctx, "\n", 1); APPENDED_ATOM; INSERT_WHITESPACE; g->print(g->ctx, "}", 1); FINAL_NEWLINE; return yajl_gen_status_ok; }
false
false
false
false
false
0
appendOrdinal(unsigned long n) { os() << n; switch (n % 10) { case 1: appendFragment(MessageFormatterMessages::ordinal1); break; case 2: appendFragment(MessageFormatterMessages::ordinal2); break; case 3: appendFragment(MessageFormatterMessages::ordinal3); break; default: appendFr...
false
false
false
false
false
0
setNumberWithoutControlKey(const QString &number) { QString s = number; s = s.remove(" "); d->ui->nss->setText(s.left(13)); checkControlKey(); }
false
false
false
false
false
0
mock_interaction_ask_password_finish (GTlsInteraction *interaction, GAsyncResult *result, GError **error) { g_return_val_if_fail (g_task_is_valid (result, interaction), G_TLS_INTERACTION_UNHANDLED); if (g_task_had_er...
false
false
false
false
false
0
unBogus() { if(fFlags & kIsBogus) { setToEmpty(); } }
false
false
false
false
false
0
read_config_store_data_prefix(char prefix, int type, char *storeto, void *dataptr, size_t len) { int *intp; u_char **charpp; unsigned int *uintp; struct in_addr in; oid **oidpp; if (dataptr && storeto) switch (type) { ...
false
true
false
false
false
1
random(char* buf, int n) { #ifdef unix FILE* in=fopen("/dev/urandom", "rb"); if (in && fread(buf, 1, n, in)==n) fclose(in); else { error("key generation failed"); } #else HCRYPTPROV h; if (CryptAcquireContext(&h, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT) && CryptGenRandom(h, n, (BYTE*)bu...
false
false
false
false
true
1
get_partition_number( const Glib::ustring & partition_name ) { Glib::ustring dmraid_name = get_dmraid_name( partition_name ) ; return std::atoi( Utils::regexp_label( partition_name, dmraid_name + "p?([0-9]+)" ) .c_str() ) ; }
false
false
false
false
false
0
xMax(int iSkip) { // Minimum requirement on remaining energy > nominal mass for hadron. double xLeft = 1.; if (isHadron()) xLeft -= m() / e(); if (size() == 0) return xLeft; // Subtract what was carried away by initiators (to date). for (int i = 0; i < size(); ++i) if (i != iSkip && resolved[i].isFro...
false
false
false
false
false
0
tree_model_iter_prev(GtkTreeModel *store, GtkTreeIter *iter) { GtkTreePath *tpath; gboolean result; tpath = gtk_tree_model_get_path(store, iter); result = gtk_tree_path_prev(tpath); if (result) gtk_tree_model_get_iter(store, iter, tpath); gtk_tree_path_free(tpath); return result; }
false
false
false
false
false
0
AcpiDsCreateWalkState ( ACPI_OWNER_ID OwnerId, ACPI_PARSE_OBJECT *Origin, ACPI_OPERAND_OBJECT *MethodDesc, ACPI_THREAD_STATE *Thread) { ACPI_WALK_STATE *WalkState; ACPI_FUNCTION_TRACE (DsCreateWalkState); WalkState = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_WA...
false
false
false
false
false
0
pop_string() { int len; char* res; MPI_Unpack(m_buffer,m_buffersize,&m_unpack_pos,&len,1,MPI_INT,m_comm); res=new char[len+1]; // +1 for terminating '\0' MPI_Unpack(m_buffer,m_buffersize,&m_unpack_pos,res,len,MPI_CHAR,m_comm); res[len]='\0'; string str=string(res); delete [] res; return str; }
false
false
false
false
false
0
falcon_notify_tx_desc ( struct efab_nic *efab, struct efab_tx_queue *tx_queue ) { efab_dword_t reg; int ptr = tx_queue->write_ptr % EFAB_TXD_SIZE; EFAB_POPULATE_DWORD_1 ( reg, FCN_TX_DESC_WPTR_DWORD, ptr ); falcon_writel ( efab, &reg, FCN_TX_DESC_UPD_REG_KER_DWORD ); }
false
false
false
false
false
0
md_command(XID id, int cmd, void *data, int data_len, char **buffer) { int res; struct mcmd_header mcmd; *buffer=NULL; mcmd.id = id; mcmd.cmd = cmd; mcmd.len = data_len; if(md_write(&mcmd, sizeof(mcmd))!=sizeof(mcmd) || md_write(data, data_len)!=data_len || md_read(&res, sizeof(res))!=sizeof(...
false
false
false
false
false
0
readCache(std::istream &ifs) { XML_Parser xP = XML_ParserCreate(NULL); XML_SetElementHandler(xP, elementBeginHandler, elementEndHandler); XML_SetCharacterDataHandler(xP, elementCharHandler); while (ifs.good()) { char buf[1001] = {0}; ifs.read(buf, 1000); if (buf[0] == 0) { XML_Parse(xP...
false
false
false
false
false
0
onCmdTabOrient(FXObject*,FXSelector sel,void*){ FXuint sid=FXSELID(sel); switch(sid){ case ID_TABS_TOP: tabbook->setTabStyle(TABBOOK_TOPTABS); tab1->setTabOrientation(TAB_TOP); tab2->setTabOrientation(TAB_TOP); tab3->setTabOrientation(TAB_TOP); tab4->setTabOrientation(TAB_TOP); ...
false
false
false
false
false
0
pg_wcsformat(unsigned char *pwcs, size_t len, int encoding, struct lineptr * lines, int count) { int w, chlen = 0; int linewidth = 0; unsigned char *ptr = lines->ptr; /* Pointer to data area */ for (; *pwcs && len > 0; pwcs += chlen) { chlen = PQmblen((char *) pwcs, encoding); if (len < (size_t) c...
false
false
false
false
false
0
check_file(struct minix_inode * dir, unsigned int offset) { static char blk[MINIX_BLOCK_SIZE]; struct minix_inode * inode; unsigned int ino; char * name; int block; block = map_block(dir,offset/MINIX_BLOCK_SIZE); read_block(block, blk); name = blk + (offset % MINIX_BLOCK_SIZE) + 2; ino = * (unsigned short *) ...
false
false
false
false
false
0
bond_info_seq_next(struct seq_file *seq, void *v, loff_t *pos) { struct bonding *bond = seq->private; struct list_head *iter; struct slave *slave; bool found = false; ++*pos; if (v == SEQ_START_TOKEN) return bond_first_slave_rcu(bond); bond_for_each_slave_rcu(bond, slave, iter) { if (found) return slave...
false
false
false
false
false
0
gt_storerandomcodes(void *processinfo, GT_UNUSED bool firstinrange, GT_UNUSED unsigned long pos, GtCodetype code) { GtRandomcodesinfo *fci = (GtRandomcodesinfo *) processinfo; gt_assert(fci != NULL && firstinrange && ...
false
false
false
false
false
0
uv_tcp_connect(uv_connect_t* req, uv_tcp_t* handle, struct sockaddr_in address, uv_connect_cb cb) { if (handle->type != UV_TCP || address.sin_family != AF_INET) return UV_EINVAL; else return uv__tcp_connect(req, handle, address, cb); }
false
false
false
false
false
0
lexAppendc(int c) { lexBuf.strs[lexBuf.strsLen] = c; /* append up to zero termination */ if (c == 0) return; lexBuf.strsLen++; if (lexBuf.strsLen >= lexBuf.maxToken) { /* double the token string size */ lexBuf.maxToken <<= 1; lexBuf.strs = (char*) realloc(lexBuf.strs,(size_t)lexBuf.maxToken);...
false
false
false
false
false
0
readHeaderPng(const char *filename, l_int32 *pwidth, l_int32 *pheight, l_int32 *pbps, l_int32 *pspp, l_int32 *piscmap) { l_int32 ret; FILE *fp; PROCNAME("readHeaderPng"); if (!filename) return ERROR_INT("filename ...
false
false
false
false
false
0
get_ilist(void) { struct ilist *p; ilist_gets++; if (ilist_avail == NULL) p = (struct ilist *) tp_alloc((int) sizeof(struct ilist)); else { ilist_avails--; p = ilist_avail; ilist_avail = ilist_avail->next; } p->next = NULL; p->i = 0; return(p); }
false
false
false
false
false
0
media_device_register_entity(struct media_device *mdev, struct media_entity *entity) { /* Warn if we apparently re-register an entity */ WARN_ON(entity->parent != NULL); entity->parent = mdev; spin_lock(&mdev->lock); if (entity->id == 0) entity->id = mdev->entity_id++; else mdev->entity_id = max(e...
false
false
false
false
false
0
transport_setup(struct transport *t, int toplevel) { if (toplevel) { /* Only the toplevel (virtual) transport has sendqueues. */ LOG_DBG((LOG_TRANSPORT, 70, "transport_setup: virtual transport %p", t)); TAILQ_INIT(&t->sendq); TAILQ_INIT(&t->prio_sendq); t->refcnt = 0; } else { /* udp and udp_encap ...
false
false
false
false
false
0
Write_am(ostream &ff) const { OFortranUnFormattedFile f(ff); Int4 i,j; assert(this && nbt); Int4 * reft = new Int4[nbt]; Int4 nbInT = ConsRefTriangle(reft); f.Record(); f << nbv << nbInT ; f.Record(); for (i=0;i<nbt;i++) if(reft[i]>=0) { f << Number(triangles[i][0]) +1 ; f << Number(...
false
false
false
false
false
0
get_begin() { int i; nbits=bs.get_uint(NBITS_NBITS_VAL,"nbits"); if(verbose>1)printf("get_begin nbits:%d\n",nbits); nlev=bs.get_uint(5,"nlev"); if(verbose>1)printf("get_begin nlev:%d\n",nlev); nintervals=pow2(nlev); intervals=new int [nintervals]; CHECK_MEM(intervals); intervalsizes...
false
false
false
false
false
0
procRules() { int count = 0; set<int> alive_states; while(type != XML_READER_TYPE_END_ELEMENT || name != L"section-rules") { step(); if(name == L"rule") { if(type != XML_READER_TYPE_END_ELEMENT) { count++; } } else if(name == L"pattern") { if(type != XML_REA...
false
false
false
false
false
0
_clear_data(E_Config_Dialog_Data *cfdata) { E_FREE(cfdata->name); E_FREE(cfdata->class); E_FREE(cfdata->title); E_FREE(cfdata->role); E_FREE(cfdata->command); E_FREE(cfdata->desktop); cfdata->mode = 0; memset(&cfdata->remember, 0, sizeof(cfdata->remember)); }
false
false
false
false
false
0
ul_send(ULHandler * const ulhandler) { double ts_start = 0.0; off_t uploaded = (off_t) 0; int pollret; int timeout; int ret; if (ulhandler->bandwidth > 0UL && (ts_start = get_usec_time()) <= 0.0) { error(451, "gettimeofday()"); return -1; } for (;;) { if (ulh...
false
false
false
false
false
0
_dxf_ReadImageSizesIM ( char *name, int startframe, SizeData *data, int *use_numerics, int *multiples ) { #if !defined(HAVE_LIBMAGICK) DXErrorReturn(ERROR_NOT_IMPLEMENTED,"ImageMagick 5 not included in build"); #else Image *image; ImageInfo *image_info = NULL; Exc...
false
false
false
false
false
0
bearerbox_to_sql(void *arg) { Boxc *conn = (Boxc *)arg; Msg *msg; while (sqlbox_status == SQL_RUNNING) { msg = read_from_box(conn->bearerbox_connection, conn); if (msg == NULL) { /* garbage/connection lost */ /* tell sqlbox to die */ conn->alive = 0; ...
false
false
false
false
false
0
deleteImageAndAlloc(VimosImage *image) { if (image != NULL) { if (image->data != NULL) { pil_free(image->data); image->data = NULL; } } deleteImage(image); }
false
false
false
false
false
0
__amd64_read_pci_cfg_dword(struct pci_dev *pdev, int offset, u32 *val, const char *func) { int err = 0; err = pci_read_config_dword(pdev, offset, val); if (err) amd64_warn("%s: error reading F%dx%03x.\n", func, PCI_FUNC(pdev->devfn), offset); return err; }
false
false
false
false
false
0
SetFlags(int fd, int s, int c) #else SetFlags(fd, s, c) int fd, s, c; #endif { int flags; if ((flags = fcntl(fd, F_GETFL)) >= 0) { flags |= s; flags &= ~c; if (fcntl(fd, F_SETFL, flags) < 0) { Error("SetFlags(): fcntl(%u,F_SETFL): %s", fd, strerror(errno)); return 0; } } else { Error...
false
false
false
false
false
0
posix_acl_alloc(int count, gfp_t flags) { const size_t size = sizeof(struct posix_acl) + count * sizeof(struct posix_acl_entry); struct posix_acl *acl = kmalloc(size, flags); if (acl) posix_acl_init(acl, count); return acl; }
false
false
false
false
false
0
Malloc(size_t bytes) { void *x; x = malloc(bytes); if (x) return x; die("Can't malloc %d bytes.\n", (char *)bytes); return 0; }
false
false
false
false
false
0
get_line_fgets(FILE * fp, const char * prompt) { ASSERT(fp != NULL); if (prompt) { printf("%s", prompt); } char buf[1024]; char * p = fgets(buf, sizeof(buf)-1, fp); if (p != NULL) { char * ret = (char *) malloc((strlen(p)+1) * sizeof(char)); strcpy(ret, p); return ret; } else { return NULL; } }
false
false
false
false
false
0
commit() { // write to a tmp file std::string outFile(_zipFile + ".tmp"); ZipArchive retVal(compress(outFile)); //renaming { Poco::File aFile(_zipFile); if (_backupOriginalFile) { Poco::File tmp(_zipFile+".bak"); if (tmp.exists()) tmp.remove(); aFile.renameTo(_zipFile+".bak"); } else aFil...
false
false
false
false
false
0
ooSendStatus(OOH323CallData *call) { int ret; H225Status_UUIE *status; Q931Message *q931msg=NULL; /* OOCTXT *pctxt = &gH323ep.msgctxt; */ OOCTXT *pctxt = call->msgctxt; OOTRACEDBGC3("Building StatusMsg (%s, %s)\n", call->callType, call->callToken); ret = ooCreateQ931Message(p...
false
false
false
false
false
0
gconf_pk_update_can_set_cache (const gchar *key, gboolean mandatory) { time_t now; GHashTable **cache; CacheEntry *entry; time (&now); cache = mandatory ? &mandatory_cache : &defaults_cache; if (!*cache) *cache = g_hash_table_new (g_str_hash, g_str_equa...
false
false
false
false
false
0
mwifiex_set_mef_filter(struct mwifiex_private *priv, struct cfg80211_wowlan *wowlan) { int ret = 0, num_entries = 1; struct mwifiex_ds_mef_cfg mef_cfg; struct mwifiex_mef_entry *mef_entry; if (wowlan->n_patterns || wowlan->magic_pkt) num_entries++; mef_entry = kcalloc(num_entries, sizeof(*mef_entry), GFP...
false
false
false
false
false
0
gwy_tool_spot_remover_data_changed(GwyPlainTool *plain_tool) { GwyToolSpotRemover *tool; tool = GWY_TOOL_SPOT_REMOVER(plain_tool); tool->drawn = FALSE; gwy_tool_spot_remover_selection_changed(plain_tool, -1); if (!tool->drawn) gwy_tool_spot_remover_draw_zoom(tool); }
false
false
false
false
false
0
GetAllData(const unsigned int dt) { std::vector<OBGenericData *> matches; // return all values matching this type OBDataIterator i; for (i = _vdata.begin();i != _vdata.end();++i) if ((*i)->GetDataType() == dt) matches.push_back(*i); return(matches); }
false
false
false
false
false
0
nm_ip6_config_take_address (NMIP6Config *config, NMIP6Address *address) { NMIP6ConfigPrivate *priv; g_return_if_fail (NM_IS_IP6_CONFIG (config)); g_return_if_fail (address != NULL); priv = NM_IP6_CONFIG_GET_PRIVATE (config); priv->addresses = g_slist_append (priv->addresses, address); }
false
false
false
false
false
0
parse_for_num(LexState *ls, GCstr *varname, BCLine line) { FuncState *fs = ls->fs; BCReg base = fs->freereg; FuncScope bl; BCPos loop, loopend; /* Hidden control variables. */ var_new_fixed(ls, FORL_IDX, VARNAME_FOR_IDX); var_new_fixed(ls, FORL_STOP, VARNAME_FOR_STOP); var_new_fixed(ls, FORL_STEP, VARNA...
false
false
false
false
false
0
bg_task_resume(struct bgtask *bt) { bg_task_check(bt); g_assert(!(bt->flags & TASK_F_RUNNING)); bg_sched_remove(bt); bt->flags |= TASK_F_RUNNING; tm_now_exact(&bt->start); }
false
false
false
false
false
0
lock_fmt(void *fmt) { struct format *fd; for (fd = format_tb; fd->name; fd++) if (fd->v == fmt) break; if (fd->name == 0) return; fd->lock = 1; }
false
false
false
false
false
0
CreateLayer( const char * pszLayerName, OGRSpatialReference *poSRSIn, OGRwkbGeometryType /* eGeomTypeIn */, char ** /* papszOptions */ ) { IMapInfoFile *poFile; char *pszFullFilename; /* --------...
false
false
false
false
false
0
msg_run_add(struct msg *msg) { if (++msg->run_length >= msg->run_num_allocated) { int tobe_allocated = msg->run_num_allocated; struct run** new_data = NULL; tobe_allocated = !tobe_allocated ? 1 : tobe_allocated << 1; new_data = (struct run**) realloc(msg->run_data, tobe_allocated * sizeof(stru...
false
false
false
false
false
0
i_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { long val; int field; if (get_long(value, &val) < 0) return NULL; memcpy(&field, ptr, sizeof(field)); field = SWAP_INT(field); field = SET(field, (int)val, size); field = SWAP_INT(field); memcpy(ptr, &field, sizeof(field)); ...
false
false
false
false
false
0
make_tlg_dlg_car_layer_debug(TlgDlgCarLayer *layer) { List *li; mfprintf(stdout, "<<-- fusion target -->>\n"); for (li = layer->tlg_dlg_nodes; li != NULL; li = li->next) { TlgDlgCarNode *n = li->data; mfprintf(stdout, " "); fput_tlg_dlg_car_node(stdout, n); } for...
false
false
false
false
false
0
CLASS_sizeof(CLASS *class) { if (CLASS_is_struct(class)) return class->size - sizeof(CSTRUCT); else return class->size - sizeof(OBJECT); }
false
false
false
false
false
0
add_used_regs_1 (rtx *loc, void *data) { int regno, i; regset live; rtx x; x = *loc; live = (regset) data; if (REG_P (x)) { regno = REGNO (x); if (!HARD_REGISTER_NUM_P (regno)) regno = reg_renumber[regno]; if (regno >= 0) for (i = hard_regno_nregs[regno][GET_MODE (x)] - 1; i >= 0; i...
false
false
false
false
false
0
free_quest(void) { quest_player *pq = player_states, *next; while (pq) { next = pq->next; free_state(pq); free_string(pq->player_name); free(pq); pq = next; } player_states = NULL; }
false
false
false
false
false
0
__db_print_fileid(env, id, suffix) ENV *env; u_int8_t *id; const char *suffix; { DB_MSGBUF mb; int i; if (id == NULL) { STAT_ISSET("ID", id); return; } DB_MSGBUF_INIT(&mb); for (i = 0; i < DB_FILE_ID_LEN; ++i, ++id) { __db_msgadd(env, &mb, "%x", (u_int)*id); if (i < DB_FILE_ID_LEN - 1) __db_msgadd...
false
false
false
false
false
0
npdl_open(gx_device * dev) { int xdpi = dev->x_pixels_per_inch; int ydpi = dev->y_pixels_per_inch; /* Print Resolution Check */ if (xdpi != ydpi) return_error(gs_error_rangecheck); else if (xdpi != 160 && xdpi != 200 && xdpi != 240 && xdpi != 400 && xdpi != 600) return_...
false
false
false
false
false
0
conf_set_listen_port_both(void *data, int ssl) { conf_parm_t *args = data; for (; args; args = args->next) { if((args->type & CF_MTYPE) != CF_INT) { conf_report_error ("listener::port argument is not an integer " "-- ignoring."); continue; } if(listener_address == NULL) ...
false
false
false
false
false
0
UnregisterClients(void) { m_libcec->AddLog(CEC_LOG_DEBUG, "unregistering all CEC clients"); vector<CCECClient *> clients = m_libcec->GetClients(); for (vector<CCECClient *>::iterator client = clients.begin(); client != clients.end(); client++) UnregisterClient(*client); CLockObject lock(m_mutex); m_clie...
false
false
false
false
false
0
processregex(char *src, const char *regex, int patterngroups, int wantedgroup, char *dest, size_t dest_size, st_driver_t drv) { regex_t preg; regmatch_t pmatch[patterngroups]; //log_debug(ZONE,"processregex: src='%s' regex='%s'", src, regex); if (regcomp(&preg, regex, REG_ICASE|REG_EXTENDED) !=0) { log_...
false
true
false
false
false
1
tagLabel() const { const char* pt = XmpProperties::propertyTitle(*this); if (!pt) return tagName(); return pt; }
false
false
false
false
false
0
av_file_truncate(vfile *vf, avoff_t length) { int res; struct avfs *avfs = vf->mnt->avfs; if(length < 0) return -EINVAL; res = check_file_access(vf, AVO_WRONLY); if(res == 0) { AVFS_LOCK(avfs); res = avfs->truncate(vf, length); AVFS_UNLOCK(avfs); } return r...
false
false
false
false
false
0
ff_mjpeg_decode_init(AVCodecContext *avctx) { MJpegDecodeContext *s = avctx->priv_data; s->avctx = avctx; dsputil_init(&s->dsp, avctx); ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct); s->buffer_size = 0; s->buffer = NULL; s->start_code = -1; s->first_picture...
false
false
false
false
false
0
has_base_town_in_region(int regionId) { for( int i=0 ; i<ai_region_count ; i++ ) { if( ai_region_array[i].region_id == regionId ) return ai_region_array[i].base_town_count > 0; } return 0; }
false
false
false
false
false
0
pushsettings( SETTINGS *v ) { for( ; v; v = v->next ) v->value = var_swap( v->symbol, v->value ); }
false
false
false
false
false
0
readmt(struct MF *mf, char *s) { int n = 0; char *p = s; int c = 0; while (n++ < 4 && (c = mf->Mf_getc(mf)) != EOF) { if (c != *p++) { char buff[32]; snprintf(buff, sizeof(buff), "expecting %s", s); mferror(mf, buff); } } return c; }
true
true
false
false
false
1
scm_trampoline_2 (SCM proc) { scm_t_trampoline_2 trampoline; if (SCM_IMP (proc)) return NULL; switch (SCM_TYP7 (proc)) { case scm_tc7_subr_2: case scm_tc7_subr_2o: case scm_tc7_rpsubr: case scm_tc7_asubr: trampoline = call_subr2_2; break; case scm_tc7_lsubr_2: tramp...
false
false
false
false
false
0
schedule_interfaces_check(int msecs, int override) { struct timeval timeout; timeval_add_msec(&timeout, &now, roughly(msecs)); if(override) check_interfaces_timeout = timeout; else timeval_min(&check_interfaces_timeout, &timeout); }
false
false
false
false
false
0
FGetLine(char *buffer, int *size, FILE *inFile) { char *ptr; int cont = FFalse; if (buffer == (char *) NULL) { if ((buffer = (char *) malloc (BLOCKSIZE * sizeof (char))) == (char *) NULL) { CMmsgPrint (CMmsgSysError, "Memory Allocation Error in: %s %d",__FILE__,__LINE__); *size = 0; return ((char *...
false
false
false
false
false
0
dig_node_angle_check(struct Plus_head *plus, plus_t line, int type) { int next, prev; float angle1, angle2; plus_t node; P_LINE *Line; G_debug(3, "dig_node_angle_check: line = %d, type = %d", line, type); Line = plus->Line[abs(line)]; if (line > 0) node = Line->N1; else node = Line-...
false
false
false
false
false
0
server_shutdown(PT_main *pm,aisc_string passwd){ /** passwdcheck **/ pm = pm; if( strcmp(passwd, "47@#34543df43%&3667gh") ) return 1; printf("\nI got the shutdown message.\n"); /** shoot clients **/ aisc_broadcast(psg.com_so, 0, "SERVER UPDATE BY ADMINISTRATOR!\nYou'll get the...
false
false
false
false
false
0
_ibar_unfocus(IBar *b) { IBar_Icon *ic; Eina_List *l; if (!b->focused) return; b->focused = EINA_FALSE; EINA_LIST_FOREACH(b->icons, l, ic) { if (ic->focused) { _ibar_icon_unfocus_focus(ic, NULL); break; } } }
false
false
false
false
false
0
ast_xml_open(char *filename) { xmlDoc *doc; if (!filename) { return NULL; } doc = xmlReadFile(filename, NULL, XML_PARSE_RECOVER); if (doc) { /* process xinclude elements. */ if (xmlXIncludeProcess(doc) < 0) { xmlFreeDoc(doc); return NULL; } } return (struct ast_xml_doc *) doc; }
false
false
false
false
false
0
dhcp_next_offer ( struct dhcp_session *dhcp, uint8_t type ) { struct dhcp_offer *offer; struct dhcp_offer *best = NULL; for ( offer = dhcp->offers ; offer < dhcp->offers + DHCP_MAX_OFFERS ; offer++ ) { if ( ( offer->valid & type ) && ( ( best == NULL ) || ( offer->priority > best...
false
false
false
false
false
0
flush_wqes(struct nes_device *nesdev, struct nes_qp *nesqp, u32 which_wq, u32 wait_completion) { struct nes_cqp_request *cqp_request; struct nes_hw_cqp_wqe *cqp_wqe; u32 sq_code = (NES_IWARP_CQE_MAJOR_FLUSH << 16) | NES_IWARP_CQE_MINOR_FLUSH; u32 rq_code = (NES_IWARP_CQE_MAJOR_FLUSH << 16) | NES_IWARP_CQE_MINOR_F...
false
false
false
false
false
0
recff_select(jit_State *J, RecordFFData *rd) { TRef tr = J->base[0]; if (tr) { ptrdiff_t start = lj_ffrecord_select_mode(J, tr, &rd->argv[0]); if (start == 0) { /* select('#', ...) */ J->base[0] = lj_ir_kint(J, J->maxslot - 1); } else if (tref_isk(tr)) { /* select(k, ...) */ ptrdiff_t n = ...
false
false
false
false
false
0
gsql_session_get_active (void) { GSQL_TRACE_FUNC; return active_session; }
false
false
false
false
false
0
ConvertToOutputFormat(const char* source, OutputFormat output) { std::string result = source; // Convert it to an output path. if (output == MAKEFILE) { result = cmSystemTools::ConvertToOutputPath(result.c_str()); } else if( output == SHELL) { ...
false
false
false
false
false
0
addbuf(struct mpstr * mp, char *buf, int size) { struct buf *nbuf; nbuf = malloc(sizeof(struct buf)*8); // JP: added *8 if (!nbuf) { fprintf(stderr, " l.1189: Out of memory!\n"); return NULL; } nbuf->pnt = malloc(size); if (!nbuf->pnt) { free(nbuf); return NULL; } nbuf->size = size; ...
false
false
false
false
true
1
nautilus_search_engine_model_set_query (NautilusSearchProvider *provider, NautilusQuery *query) { NautilusSearchEngineModel *model; model = NAUTILUS_SEARCH_ENGINE_MODEL (provider); g_object_ref (query); g_clear_object (&model->details->query); model->details->query = query; }
false
false
false
false
false
0
js_GetFunctionNamespace(JSContext *cx, jsval *vp) { JSRuntime *rt; JSObject *obj; JSAtom *atom; JSString *prefix, *uri; /* An invalid URI, for internal use only, guaranteed not to collide. */ static const char anti_uri[] = "@mozilla.org/js/function"; /* Optimize by avoiding JS_LOCK_GC(rt) ...
false
false
false
false
false
0
sig_chldhandler( int signo ) { DBG( _DBG_PROC, "(SIG) Child is down (signal=%d)\n", signo ); if (sc) { sc->calibrating = SANE_FALSE; sc = NULL; } }
false
false
false
false
false
0
load_args(GwyContainer *settings, ExportParameters *params) { *params = load_defaults; gwy_container_gis_boolean_by_name(settings, labels_key, &params->labels); gwy_container_gis_boolean_by_name(settings, units_key, &params->units); gwy_container_gis_boolean_by_name(settings, metadata_key, &pa...
false
false
false
false
false
0
static_cell_increase (gamgi_enum lattice, gamgi_cell *cell) { switch (lattice) { case GAMGI_PHYS_ORTHORHOMBIC_F: case GAMGI_PHYS_CUBIC_F: case GAMGI_PHYS_ORTHORHOMBIC_I: case GAMGI_PHYS_CUBIC_I: cell->n1 *= 2; cell->n2 *= 2; cell->n3 *= 2; break; case GAMGI_PHYS_MONOCLINIC_C: case GAMGI_PHYS_ORTHORH...
false
false
false
false
false
0