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
append_date(char *buf, struct timeval when, size_t bufsize) { char tmp[80] = ""; struct ast_tm tm; if (strlen(buf) > bufsize - 3) return -1; if (ast_tvzero(when)) { strncat(buf, ",", bufsize - strlen(buf) - 1); return 0; } ast_localtime(&when, &tm, usegmtime ? "GMT" : NULL); ast_strftime(tmp, sizeof(tmp...
true
true
false
false
false
1
p_fmac_add_filter_to_file(const char *filtermacro_file, const char *plugin_name) { FILE *fp; gint l_rc; l_rc = -1; if(gap_lib_file_exists(filtermacro_file) == 0 ) { /* file does not exist, or is empty */ fp = g_fopen(filtermacro_file, "w"); if(fp) { fprintf(fp, "# FILTERMACRO FILE (G...
false
false
false
false
false
0
draw3DSunkenPane(IGUIElement* element, video::SColor bgcolor, bool flat, bool fillBackGround, const core::rect<s32>& r, const core::rect<s32>* clip) { if (!Driver) return; core::rect<s32> rect = r; if (flat) { // draw flat sunken pane if (fillBackGround) Driver->draw2DRectangle(...
false
false
false
false
false
0
isMoveImmediate(MachineInstr *MI, SmallSet<unsigned, 4> &ImmDefRegs, DenseMap<unsigned, MachineInstr*> &ImmDefMIs) { const MCInstrDesc &MCID = MI->getDesc(); if (!MCID.isMoveImmediate()) return false; if (MCID.getNumDefs() != 1) retu...
false
false
false
false
false
0
generateRefFunc(CompileState* comp, OpValue* funOut, OpValue* thisOut) { OpValue baseV = expr->generateEvalCode(comp); OpValue varName = OpValue::immIdent(&ident); OpValue baseReg; comp->requestTemporary(OpType_value, thisOut, &baseReg); CodeGen::emitOp(comp, Op_SymGetAndBind, funOut, &baseReg, &ba...
false
false
false
false
false
0
bam_maqcns_prepare(bam_maqcns_t *bm) { if (bm->errmod == BAM_ERRMOD_MAQ2) bm->aux->em = errmod_init(1. - bm->theta); cal_coef(bm); cal_het(bm); }
false
false
false
false
false
0
h_scrollbar_cb(Fl_Scrollbar* b, Fl_Text_Display* textD) { if (b->value() == textD->mHorizOffset) return; textD->scroll(textD->mTopLineNum, b->value()); }
false
false
false
false
false
0
set_cave_dimensions(struct cave *c, int h, int w) { int i, n = h * w; c->height = h; c->width = w; if (cave_squares != NULL) FREE(cave_squares); cave_squares = C_ZNEW(n, int); for (i = 0; i < n; i++) cave_squares[i] = i; }
false
false
false
false
false
0
create_gtkmorph_menuSettings () { g_assert(gtkmorph_settings==NULL); gtkmorph_settings=gtk_settings_alloc(gtkmorph_template); g_assert(gtkmorph_settings); return gtk_settings_create(gtkmorph_template, gtkmorph_settings, gtkmorph_settings_callback,NULL); }
false
false
false
false
false
0
click_random_srandom() { static const int bufsiz = 64; union { char c[bufsiz]; uint32_t u32[bufsiz / 4]; } buf; int pos = 0; ((Timestamp *) (buf.c + pos))->set_now(); pos += sizeof(Timestamp); #if CLICK_USERLEVEL # ifdef O_NONBLOCK int fd = open("/dev/random", O_RDONLY | O_NONBLOCK); # e...
false
false
false
false
false
0
L5() {register object *base=vs_base; register object *sup=base+VM5; VC5 vs_check;vs_top=sup; {object V9=base[0]->c.c_cdr; base[2]= (V9->c.c_car); V9=V9->c.c_cdr; base[3]= V9;} V10= list(2,((object)VV[9]),make_cons(((object)VV[10]),base[3])); V11= make_cons(/* INLINE-ARGS */V10,Cnil); base[4]= list(3,((object)V...
false
false
false
false
false
0
app_version_desc(BEST_APP_VERSION& bav, char* buf) { if (!bav.present) { safe_strcpy(buf, "none"); return; } if (bav.cavp) { sprintf(buf, "anonymous platform (%s)", proc_type_name(bav.host_usage.proc_type)); } else { sprintf(buf, "[AV#%d]", bav.avp->id); } }
false
false
false
false
false
0
First0(Node *p, BitArray *mark) { BitArray *fs = new BitArray(terminals->Count); while (p != NULL && !((*mark)[p->n])) { mark->Set(p->n, true); if (p->typ == Node::nt) { if (p->sym->firstReady) { fs->Or(p->sym->first); } else { BitArray *fs0 = First0(p->sym->graph, mark); fs->Or(fs0); delete...
false
false
false
false
false
0
textsnapshot_getTextRunInfo(const fn_call& fn) { TextSnapshot_as* ts = ensure<ThisIsNative<TextSnapshot_as> >(fn); if (!ts->valid()) return as_value(); if (fn.nargs != 2) { return as_value(); } const size_t start = std::max<boost::int32_t>(0, toInt(fn.arg(0), getVM(fn))); ...
false
false
false
false
false
0
smscore_gpio_set_level(struct smscore_device_t *coredev, u8 pin_num, u8 new_level) { u32 total_len; int rc; void *buffer; struct set_gpio_msg { struct sms_msg_hdr x_msg_header; u32 msg_data[3]; /* keep it 3 ! */ } *p_msg; if ((new_level > 1) || (pin_num > MAX_GPIO_PIN_NUMBER)) return -EINVAL; total_l...
false
false
false
false
false
0
warp(const Client *c) { Window dummy; int x, y, di; unsigned int dui; if (!c) { XWarpPointer(dpy, None, root, 0, 0, 0, 0, selmon->wx + selmon->ww / 2, selmon->wy + selmon->wh/2); return; } XQueryPointer(dpy, root, &dummy, &dummy, &x, &y, &di, &di, &dui); if((x > c->x && y > c->y && x < c->x + c->w && y < ...
false
false
false
false
false
0
definePhysReg(MachineInstr *MI, unsigned PhysReg, RegState NewState) { UsedInInstr.set(PhysReg); switch (unsigned VirtReg = PhysRegState[PhysReg]) { case regDisabled: break; default: spillVirtReg(MI, VirtReg); // Fall through. case regFree: case regReserved: PhysRe...
false
false
false
false
false
0
set_tx_beacon_cmd23a(struct rtw_adapter *padapter) { struct cmd_obj *ph2c; struct Tx_Beacon_param *ptxBeacon_parm; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; u8 res = _SUCCESS; int len_diff = 0...
false
true
false
false
false
1
query () { gchar *l_ecp_key; /* video encoder standard parameters (same for each encoder) */ static GimpParamDef args_raw_enc[] = { {GIMP_PDB_INT32, "run_mode", "non-interactive"}, {GIMP_PDB_IMAGE, "image", "Input image"}, {GIMP_PDB_DRAWABLE, "drawable", "Input drawable (unused)"}, {GIMP_...
false
false
false
false
false
0
lm8323_pwm_work(struct work_struct *work) { struct lm8323_pwm *pwm = work_to_pwm(work); int div512, perstep, steps, hz, up, kill; u16 pwm_cmds[3]; int num_cmds = 0; mutex_lock(&pwm->lock); /* * Do nothing if we're already at the requested level, * or previous setting is not yet complete. In the latter * c...
false
false
false
false
false
0
rename_selected_file (GeditFileBrowserWidget *obj) { GtkTreeModel *model; GtkTreeIter iter; model = gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview)); if (!GEDIT_IS_FILE_BROWSER_STORE (model)) return; if (gedit_file_browser_widget_get_first_selected (obj, &iter)) { gedit_file_browser_view_start...
false
false
false
false
false
0
find_AT_string (const char *str) { struct indirect_string_node *node; void **slot; if (! debug_str_hash) debug_str_hash = htab_create_ggc (10, debug_str_do_hash, debug_str_eq, NULL); slot = htab_find_slot_with_hash (debug_str_hash, str, htab_hash_string (str), INSERT); if (*slot == NULL...
false
false
false
false
false
0
report_print_custom_section(const seaudit_log_t * log, const seaudit_report_t * report, xmlTextReaderPtr reader, xmlChar * title, FILE * outfile) { size_t len, i; int rt, error = 0, retval = -1, end_of_element = 0; xmlChar *view_filePath = NULL, *name = NULL; if (title != NULL) { if (report->format ==...
false
false
false
false
false
0
qla24xx_calc_dsd_lists(uint16_t dsds) { uint16_t dsd_lists = 0; dsd_lists = (dsds/QLA_DSDS_PER_IOCB); if (dsds % QLA_DSDS_PER_IOCB) dsd_lists++; return dsd_lists; }
false
false
false
false
false
0
FS_NextPath (char *prevpath) { char *nextpath; int i = 0; if ( prevpath == NULL ) { // return the first nextpath = fs_gamesearch[0]; } else { // scan the fs_gamesearch elements for an address match with prevpath nextpath = NULL; while ( prevpath != fs_gamesearch[i++] ) { if ( i >= GAME_SEARCH_SLOTS )...
false
false
false
false
false
0
tilePresent(int z, int y, int x) { if ((y < 0) || (x < 0) || (z < 0) || (y > m_height - 1) || (x > m_width - 1) || (z > m_depth - 1)) { return false; } return (BoardData(z, y, x) != 0 && MaskData(z, y, x) == '1'); }
false
false
false
false
false
0
doAddNext(TiffComponent::AutoPtr tiffComponent) { TiffComponent* tc = 0; if (mn_) { tc = mn_->addNext(tiffComponent); } return tc; }
false
false
false
false
false
0
xmlSecParseFile(const char *filename) { xmlDocPtr ret; xmlParserCtxtPtr ctxt; char *directory = NULL; xmlSecAssert2(filename != NULL, NULL); xmlInitParser(); ctxt = xmlCreateFileParserCtxt(filename); if (ctxt == NULL) { return(NULL); } /* todo: set directories from current do...
false
false
false
false
false
0
restore_cpu_ipis(unsigned int cpu) { struct evtchn_bind_ipi bind_ipi; int ipi, irq, evtchn; for (ipi = 0; ipi < XEN_NR_IPIS; ipi++) { if ((irq = per_cpu(ipi_to_irq, cpu)[ipi]) == -1) continue; BUG_ON(ipi_from_irq(irq) != ipi); /* Get a new binding from Xen. */ bind_ipi.vcpu = cpu; if (HYPERVISOR_even...
false
false
false
false
false
0
function_addrs_compare (const void *v1, const void *v2) { const struct function_addrs *a1 = (const struct function_addrs *) v1; const struct function_addrs *a2 = (const struct function_addrs *) v2; if (a1->low < a2->low) return -1; if (a1->low > a2->low) return 1; if (a1->high < a2->high) return ...
false
false
false
false
false
0
GC_unix_get_mem(word bytes) { # if defined(MMAP_SUPPORTED) /* By default, we try both sbrk and mmap, in that order. */ static GC_bool sbrk_failed = FALSE; ptr_t result = 0; if (!sbrk_failed) result = GC_unix_sbrk_get_mem(bytes); if (0 == result) { sbrk_failed = TRUE; result = GC_...
false
false
false
false
false
0
createBasicInstance(const UnicodeString& id, const UnicodeString* canon) { UParseError pe; UErrorCode ec = U_ZERO_ERROR; TransliteratorAlias* alias = 0; Transliterator* t = 0; umtx_lock(&registryMutex); if (HAVE_REGISTRY(ec)) { t = reg...
false
false
false
false
false
0
ldns_str2rdf_ilnp64(ldns_rdf **rd, const char *str) { unsigned int a, b, c, d; uint16_t shorts[4]; int l; if (sscanf(str, "%4x:%4x:%4x:%4x%n", &a, &b, &c, &d, &l) != 4 || l != (int)strlen(str) || /* more data to read */ strpbrk(str, "+-") /* signed hexes */ ) { return LDNS_STATUS_INVALID_ILNP64; ...
false
false
false
false
false
0
resetbflag(unsigned int b_idx, unsigned int mask) { unsigned int *flags; flags = get_ptr_bflags( b_idx ); if (flags==0) return -1; (*flags) &= ~mask; return 1; }
false
false
false
false
false
0
map_window(FvwmWindow *t) { XWindowAttributes winattrs; unsigned long eventMask = 0; Status ret; if (IS_SCHEDULED_FOR_DESTROY(t)) { return; } /* * Prevent the receipt of an UnmapNotify, since that would * cause a transition to the Withdrawn state. */ ret = XGetWindowAttributes(dpy, FW_W(t), &winattrs);...
false
false
false
false
false
0
redisCheckSocketError(redisContext *c, int fd) { int err = 0; socklen_t errlen = sizeof(err); if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &errlen) == -1) { __redisSetErrorFromErrno(c,REDIS_ERR_IO,"getsockopt(SO_ERROR)"); close(fd); return REDIS_ERR; } if (err) { ...
false
false
false
false
false
0
perform_autoscroll() { bool scrolled = false; AWT_canvas *canvas = db->canvas(); if (canvas && (nailedAbsPos != -1 || autoscroll)) { AW_device *device = canvas->aww->get_device(AW_MIDDLE_AREA); if (nailedAbsPos != -1) { { int absPos = nailedAbsP...
false
false
false
false
false
0
zr364xx_s_ctrl(struct v4l2_ctrl *ctrl) { struct zr364xx_camera *cam = container_of(ctrl->handler, struct zr364xx_camera, ctrl_handler); int temp; switch (ctrl->id) { case V4L2_CID_BRIGHTNESS: /* hardware brightness */ send_control_msg(cam->udev, 1, 0x2001, 0, NULL, 0); temp = (0x60 << 8) + 127 - ctrl->val;...
false
false
false
false
false
0
InstallMethodArgs ( Obj oper, Obj func ) { Obj name; Int i; /* get the name */ name = NAME_FUNC(oper); /* clone the function ...
false
false
false
false
false
0
drain_BMC2HOST(struct si_sm_data *bt) { int i, size; if (!(BT_STATUS & BT_B2H_ATN)) /* Not signalling a response */ return; BT_CONTROL(BT_H_BUSY); /* now set */ BT_CONTROL(BT_B2H_ATN); /* always clear */ BT_STATUS; /* pause */ BT_CONTROL(BT_B2H_ATN); /* some BMCs are stubborn */ BT_CONTROL(BT_CLR_RD_PT...
false
false
false
false
false
0
load_data_new (GthBrowser *browser, GFile *location, GFile *file_to_select, GList *selected, double vscroll, GthAction action, gboolean automatic, GFile *entry_point) { LoadData *load_data; GFile *file; load_data = g_new0 (Load...
false
false
false
false
false
0
GetSolutionByNo(const uint no) const { int realno = GetRealGameNo(no); int gameix = GetGameIxByNo(realno); if (gameix > 0) { realno -= mGameNos[gameix - 1][0]; } vector<int> solvec; int* sol = mAllTable[mPos2AllIx[realno - 1]]; for (int i = 0; i < mPegCnt; ++i) { s...
false
false
false
false
false
0
netsnmp_delete_subtree_cache(netsnmp_agent_session *asp) { while (asp->treecache_num >= 0) { /* * don't delete subtrees */ netsnmp_delete_request_infos(asp->treecache[asp->treecache_num]. requests_begin); asp->treecache_num--; } }
false
false
false
false
false
0
unrrdu_unquantizeMain(int argc, const char **argv, const char *me, hestParm *hparm) { hestOpt *opt = NULL; char *out, *err; Nrrd *nin, *nout; int dbl, pret; double oldMin, oldMax; airArray *mop; /* mandatory arg so that "unu unquantize" produces usage info */ hestOptAdd(&opt, "i,i...
false
false
false
false
false
0
build_quota_change(struct gfs2_inode *per_node, unsigned int j) { struct gfs2_sbd *sdp = per_node->i_sbd; struct gfs2_meta_header mh; char name[256]; struct gfs2_inode *ip; unsigned int blocks = sdp->qcsize << (20 - sdp->sd_sb.sb_bsize_shift); unsigned int x; unsigned int hgt; struct gfs2_buffer_head *bh; mem...
false
false
false
false
false
0
fsp_session_get_auth_url_finish (FspSession *self, GAsyncResult *res, GError **error) { FspDataAuthToken *auth_token = NULL; gchar *auth_url = NULL; g_return_val_if_fail (FSP_IS_SESSION (self), NULL); g_return_v...
false
false
false
false
false
0
find_ucmd(eap, p, full, xp, compl) exarg_T *eap; char_u *p; /* end of the command (possibly including count) */ int *full; /* set to TRUE for a full match */ expand_T *xp; /* used for completion, NULL otherwise */ int *compl; /* completion flags or NULL */ { int len = (int)(p - eap->cmd); ...
false
false
false
false
false
0
buffer_find_string(struct buffer *buffer, const char *string, size_t start, size_t *offset) { char *terminator, *data; size_t length; length = strlen(string); do { data = buffer->data + buffer->used + start; terminator = memchr(data, string[0], buffer->left - start); ...
false
false
false
false
false
0
scObjectClone(const CFunctionsScopePtr &c, void *) { CScriptVarPtr obj = c->getArgument("this"); c->setReturnVar(obj->clone()); }
false
false
false
false
false
0
make_call_declarator (cp_declarator *target, tree parms, cp_cv_quals cv_qualifiers, cp_virt_specifiers virt_specifiers, cp_ref_qualifier ref_qualifier, tree exception_specification, tree late_return_type) { cp_declarator *declarator; declarator = make_declarator (cdk...
false
false
false
false
false
0
parse_sst(char *sstbuf,int bufsize) { int i; /* index into sst */ unsigned char *curString; /* pointer into unparsed buffer*/ unsigned char *barrier=(unsigned char *)sstbuf+bufsize; /*pointer to end of buffer*/ unsigned char **parsedString;/*pointer into parsed array*/ sstsize = getlong(sstbuf+4,0); sst=mall...
false
true
false
false
true
1
find_common_reg_term (rtx op0, rtx op1) { if ((GET_CODE (op0) == REG || GET_CODE (op0) == PLUS) && (GET_CODE (op1) == REG || GET_CODE (op1) == PLUS)) { rtx op00; rtx op01; rtx op10; rtx op11; if (GET_CODE (op0) == PLUS) op01 = XEXP (op0, 1), op00 = XEXP (op0, 0); else ...
false
false
false
false
false
0
lua_resume (lua_State *L, int nargs) { int status; lu_byte old_allowhooks; lua_lock(L); if (L->ci == L->base_ci) { if (nargs >= L->top - L->base) return resume_error(L, "cannot resume dead coroutine"); } else if (!(L->ci->state & CI_YIELD)) /* not inside a yield? */ return resume_error(L, "ca...
false
false
false
false
false
0
validate_exec(const char *dir, const char *cmdName) { char path[MAXPGPATH]; struct stat buf; snprintf(path, sizeof(path), "%s/%s", dir, cmdName); #ifdef WIN32 /* Windows requires a .exe suffix for stat() */ if (strlen(path) <= strlen(EXE_EXT) || pg_strcasecmp(path + strlen(path) - strlen(EXE_EXT), EXE_EXT) !=...
true
true
false
false
true
1
vg_error_timestamp_to_string (const timestamp_t *stamp, GString *str) { switch (stamp->format) { case TIMESTAMP_FORMAT_2_4_0: g_string_append_printf (str, VG_2_4_0_TIME_STAMP_FORMAT " ", stamp->ts_year, stamp->ts_month, stamp->ts_day, stamp->ts_hour, stamp->ts_min, stamp->ts_sec, stamp->ts_msec); break;...
false
false
false
false
false
0
upsdrv_shutdown(void) { /* tell the UPS to shut down, then return - DO NOT SLEEP HERE */ unsigned char answer[5], cbuf[3]; int res, sec; /* Get vars from ups.conf */ if (getval("shutdown_delay") != NULL) bcmxcp_status.shutdowndelay = atoi(getval("shutdown_delay")); else bcmxcp_status.shutdowndelay = 120; ...
false
false
false
false
false
0
tsq_mcontains(PG_FUNCTION_ARGS) { TSQuery query = PG_GETARG_TSQUERY(0); TSQuery ex = PG_GETARG_TSQUERY(1); TSQuerySign sq, se; int i, j; QueryItem *iq, *ie; if (query->size < ex->size) { PG_FREE_IF_COPY(query, 0); PG_FREE_IF_COPY(ex, 1); PG_RETURN_BOOL(false); } sq = makeTSQuerySign...
false
false
false
false
false
0
nameserver_read(struct nameserver *ns) { u8 packet[1500]; struct sockaddr_storage ss; socklen_t addrlen = sizeof(ss); for (;;) { const int r = recvfrom(ns->socket, packet, sizeof(packet), 0, (struct sockaddr*)&ss, &addrlen); if (r < 0) { int err = last_error(ns->socket); if (error_is_eagai...
false
false
false
false
false
0
_ecore_event_purge_deleted(void) { Ecore_Event *itr = events; inpurge++; while (itr) { Ecore_Event *next = (Ecore_Event *)EINA_INLIST_GET(itr)->next; if ((!itr->references) && (itr->delete_me)) _ecore_event_del(itr); itr = next; } inpurge--; while (purge_event...
false
false
false
false
false
0
timeout_change_level( struct net_device *dev ) { struct net_local *nl = netdev_priv(dev); nl->cur_rxl_index = timeout_rxl_tab[ nl->timeout_rxl ]; if( ++nl->timeout_rxl >= 4 ) nl->timeout_rxl = 0; nl->csr1.rxl = rxl_tab[ nl->cur_rxl_index ]; inb( dev->base_addr + CSR0 ); outb( *(unsigned char *)&nl->csr1, de...
false
false
false
false
false
0
struncmp(register char *o, register char *r, register int n) { if(n < 1) return 0; if(o == NULL){ if(r == NULL) return 0; else return -1; } else if(r == NULL) return 1; n--; while(n && *o && *r && ((isupper((unsigned char)(*o)) ? (unsigned char)tolower((unsigned ch...
false
false
false
false
false
0
ntp_validate_timex(struct timex *txc) { if (txc->modes & ADJ_ADJTIME) { /* singleshot must not be used with any other mode bits */ if (!(txc->modes & ADJ_OFFSET_SINGLESHOT)) return -EINVAL; if (!(txc->modes & ADJ_OFFSET_READONLY) && !capable(CAP_SYS_TIME)) return -EPERM; } else { /* In order to mo...
false
false
false
false
false
0
read_input(char* filename) { FILE *infile; cipher_cont *t_cipher; int i=0; int j=0; unsigned long plain[MAX_FILE_LINES][2]; unsigned long cipher[MAX_FILE_LINES][2]; char v[255]; if(!(infile=fopen(filename,"r"))) { fprintf(stderr,"ERROR: failed to open intput file: %s\n",filename); exit(0); } ...
false
true
false
false
true
1
butWin_rmFromTable(ButWin *win) { ButEnv *env = win->env; int i; assert(MAGIC(win)); assert(MAGIC(env)); for (i = 0; (env->winlist[i] != win) && (i < env->wllen); ++i); if (i < env->wllen) { --env->wllen; while (i < env->wllen) { env->winlist[i] = env->winlist[i+1]; ++i; } ...
false
false
false
false
false
0
column_width(wchar_t wc) { #ifdef HAVE_ISWCTYPE static int kanji_set; static wctype_t kanji; if (!kanji_set) { kanji = wctype("kanji"); kanji_set = 1; } if (kanji && iswctype(kanji, wc)) return 2; #endif return 1; }
false
false
false
false
false
0
btrfs_init_dev_stats(struct btrfs_fs_info *fs_info) { struct btrfs_key key; struct btrfs_key found_key; struct btrfs_root *dev_root = fs_info->dev_root; struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; struct extent_buffer *eb; int slot; int ret = 0; struct btrfs_device *device; struct btrfs_path *pa...
false
false
false
false
false
0
page_zip_dir_add_slot( /*==================*/ page_zip_des_t* page_zip, /*!< in/out: compressed page */ ulint is_clustered) /*!< in: nonzero for clustered index, zero for others */ { ulint n_dense; byte* dir; byte* stored; ut_ad(page_is_comp(page_zip->data)); UNIV_MEM_ASSERT_RW(page_zip->data, page_zip_ge...
false
false
false
false
false
0
operator==(const Normalizer& that) const { return this==&that || fUMode==that.fUMode && fOptions==that.fOptions && *((CharacterIterator *)(text->context))==*((CharacterIterator *)(that.text->context)) && buffer==that.buffer && bufferPos==that.bufferPos && next...
false
false
false
false
false
0
automap_delete_cycles(void) { equalist *p; for(p = equats; p; p=p->next) LEdestroy(p->eq); LEdestroy(equats); }
false
false
false
false
false
0
extReadRecord(stream_t *streamptr, double *data, int *nmiss) { int vlistID, fileID; int status; int recID, vrecID, tsID; off_t recpos; int header[4]; int varID, gridID; int i, size; double missval; extrec_t *extp; vlistID = streamptr->vlistID; fileID = streamptr->fileID; tsID = streamptr->c...
false
false
false
false
false
0
plip_preempt(void *handle) { struct net_device *dev = (struct net_device *)handle; struct net_local *nl = netdev_priv(dev); /* Stand our ground if a datagram is on the wire */ if (nl->connection != PLIP_CN_NONE) { nl->should_relinquish = 1; return 1; } nl->port_owner = 0; /* Remember that we released the bu...
false
false
false
false
false
0
get_network_timestamp (TpMessage *message) { GDateTime *datetime = g_date_time_new_now_utc (); gint64 now = g_date_time_to_unix (datetime); gint64 timestamp; timestamp = tp_message_get_sent_timestamp (message); if (timestamp == 0) timestamp = tp_message_get_received_timestamp (message); if (timestamp...
false
false
false
false
false
0
fcntl_clear_flag(int fd, int flag) { int flags; if ((flags = fcntl(fd, F_GETFL, 0)) == -1) return -1; return fcntl(fd, F_SETFL, flags & ~flag); }
false
false
false
false
false
0
CreateUnderworldLevel(int level, int xSize, int ySize, char const *name) { MakeRegions(level, xSize, ySize); pRegionArrays[level]->SetName(name); pRegionArrays[level]->levelType = ARegionArray::LEVEL_UNDERWORLD; SetRegTypes(pRegionArrays[level], R_NUM); SetupAnchors(pRegionArrays[level]); GrowTerrain(pRegio...
false
false
false
false
false
0
prctl_check(void) { int fail = 0; int i; for (i=0; i < sizeof(test_table)/sizeof(struct test_elem); ++i) { struct test_elem *elem = test_table + i; int result = 0; switch (elem->type) { case my_type_int_ptr: { int tmp; if (elem->value.i == -1) break; result = prctl(elem->read, ...
true
true
false
false
true
1
L18() {register object *base=vs_base; register object *sup=base+VM18; VC18 vs_check; {register object V46; object V47; V46=(base[0]); V47=(base[1]); vs_top=sup; goto TTL; TTL:; {object V49; base[2]= (((object)VV[22])->s.s_dbind); base[3]= (V46); vs_top=(vs_base=base+2)+2; Lgetf(); vs_top=sup; V50= vs_bas...
false
false
false
false
false
0
rc_get_path(char * package) { const char * rc_name = "options"; char * path; char * dirname = NULL; char * filename = NULL; int length = 0; /* find the base path */ if (!(path=getenv("HOME"))) { fprintf(stderr,_("Cannot find your 'HOME' environment variable.\n")); path="."; ...
false
false
false
false
false
0
Script_p(CTX ctx, kOutputStream *w, kRawPtr *o, int level) { if(IS_FMTdump(level)) { const knh_ClassTBL_t *ct = O_cTBL(o); kScript *scr = (kScript*)o; size_t i; for(i = 0; i < ct->fsize; i++) { kfieldinfo_t *cf = ct->fields + i; if(cf->type == TYPE_void) continue; { ktype_t type = ktype_tocid(ctx,...
false
false
false
false
false
0
copyDir(cchar *fromDir, cchar *toDir) { MprList *files; MprDirEntry *dp; char *from, *to; int next; files = mprGetPathFiles(fromDir, 1); for (next = 0; (dp = mprGetNextItem(files, &next)) != 0 && !app->error; ) { if (!checkPath(dp->name)) { continue; ...
false
false
false
false
false
0
mono_metadata_decode_value (const char *_ptr, const char **rptr) { const unsigned char *ptr = (const unsigned char *) _ptr; unsigned char b = *ptr; guint32 len; if ((b & 0x80) == 0){ len = b; ++ptr; } else if ((b & 0x40) == 0){ len = ((b & 0x3f) << 8 | ptr [1]); ptr += 2; } else { len = ((b & 0x1f) <<...
false
false
false
false
true
1
GetDestination(float& x, float& y, float& z) { if (m_owner->movespline->Finalized()) { return false; } const G3D::Vector3& dest = m_owner->movespline->FinalDestination(); x = dest.x; y = dest.y; z = dest.z; return true; }
false
false
false
false
false
0
GC_get_stack_base(struct GC_stack_base *b) { pthread_attr_t attr; size_t size; if (pthread_getattr_np(pthread_self(), &attr) != 0) { WARN("pthread_getattr_np failed\n", 0); return GC_UNIMPLEMENTED; } if (pthread_attr_getstack(&attr, &(b -> mem_base), &size) != 0) { ABORT("pt...
false
false
false
false
false
0
ctrl_general_get_contexts(const CtrlInfo *ctrl) { GSList *list = NULL; if(ctrl != NULL && ctrl->general != NULL) g_hash_table_foreach(ctrl->general, general_prepend, &list); return list; }
false
false
false
false
false
0
sx_name_handler( xmlNodePtr node, gpointer sx_pdata ) { struct sx_pdata *pdata = sx_pdata; SchedXaction *sx = pdata->sx; gchar *tmp = dom_tree_to_text( node ); g_debug("sx named [%s]", tmp); g_return_val_if_fail( tmp, FALSE ); xaccSchedXactionSetName( sx, tmp ); g_free( tmp ); return TRU...
false
false
false
false
false
0
find_recurse(const pcre_uchar *code, BOOL utf) { for (;;) { register pcre_uchar c = *code; if (c == OP_END) return NULL; if (c == OP_RECURSE) return code; /* XCLASS is used for classes that cannot be represented just by a bit map. This includes negated single high-valued characters. The length in the tab...
false
false
false
false
false
0
cmd_assign(struct token_t *varname, struct token_t *vardef) { if (ShowTokens) { PrintToken(varname->ttype, varname->value, "variable_name"); PrintToken(EQ, "=", "assignment"); PrintToken(vardef->ttype, vardef->value, "variable_def"); } add_var(varname->value,vardef->value); tk_free(varname); tk_free(vardef...
false
false
false
false
false
0
reproduceRelativePath(FWObject *lib, const FWObject *source) { list<FWObject*> path; FWObject *p = source->getParent(); while (p && !Library::isA(p)) { path.push_front(p); p = p->getParent(); } FWObject *target = lib; FW...
false
false
false
false
false
0
png_do_read_intrapixel(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_read_intrapixel"); if ( (row_info->color_type & PNG_COLOR_MASK_COLOR)) { int bytes_per_pixel; png_uint_32 row_width = row_info->width; if (row_info->bit_depth == 8) { png_bytep rp; ...
false
false
false
false
false
0
g_pkcs11_array_ref (GPkcs11Array *array) { GRealPkcs11Array *rarray = (GRealPkcs11Array*) array; g_return_val_if_fail (array, NULL); g_return_val_if_fail (g_atomic_int_get (&rarray->ref_count) > 0, array); g_atomic_int_inc (&rarray->ref_count); return array; }
false
false
false
false
false
0
comba_negate(_MIPD_ big x,big w) { /* fast modular subtraction */ unsigned int i; big modulus; mr_small *a,*b,*c; mr_small carry,su; #ifdef MR_WIN64 mr_small ma,mb,u; #endif #ifdef MR_ITANIUM mr_small ma,u; #endif #ifdef MR_NOASM mr_large u; #endif #ifdef MR_OS_THREADS miracl *mr_mip=...
false
false
false
false
false
0
fuse_getattr_resume (fuse_state_t *state) { if (!state->fd || IA_ISDIR (state->loc.inode->ia_type)) { gf_log ("glusterfs-fuse", GF_LOG_TRACE, "%"PRIu64": GETATTR %"PRIu64" (%s)", state->finh->unique, state->finh->nodeid, sta...
false
false
false
false
false
0
NK7110_IncomingIdentify(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[3]) { case 0x02: if (data->imei) { int n; unsigned char *s = strchr(message + 4, '\n'); if (s) n = s - message - 3; else n = GN_IMEI_MAX_LENGTH; snprintf(data-...
false
false
false
false
false
0
InitTalentForLevel() { UpdateFreeTalentPoints(); Unit* owner = GetOwner(); if (!owner || owner->GetTypeId() != TYPEID_PLAYER) return; if (!m_loading) ((Player*)owner)->SendTalentsInfoData(true); }
false
false
false
false
false
0
changeWindowsDesk(FvwmWindow *t,int val1) { if(val1 == t->Desk) return; /* Scan the window list, mapping windows on the new Desk, * unmapping windows on the old Desk */ /* Only change mapping for non-sticky windows */ if(!((t->flags & ICONIFIED)&&(Scr.flags & StickyIcons)) && (!(t->flags & STICKY))...
false
false
false
false
false
0
init_property_list(void) { int r; PROPERTY_LIST_ADD_PROP("hiragana", CR_Hiragana); PROPERTY_LIST_ADD_PROP("katakana", CR_Katakana); PropertyInited = 1; end: return r; }
false
false
false
false
false
0
free_ltlines(LINES_TO_TAKE **lt_list) { LINES_TO_TAKE *current, *ctmp; if(lt_list && (current = (*lt_list))){ while(current->prev) current = current->prev; while(current){ ctmp = current->next; free_ltline(&current); current = ctmp; } *lt_list = NULL; } }
false
false
false
false
false
0
recogProcessSingleLabelled(L_RECOG *recog, PIX *pixs, BOX *box, char *text, PIXA **ppixa) { char *textdata; l_int32 textinpix, textin; PIX *pixc, *pixb, *pixd; PROCNAME("recogProces...
false
false
false
false
false
0
name_insert (const void *nodep, VISIT value, int level) { struct name *name; unsigned int idx; unsigned int hval2; if (value != leaf && value != postorder) return; name = *(struct name **) nodep; idx = name->hashval % hash_size; hval2 = 1 + name->hashval % (hash_size - 2); while (hash_table[idx]....
false
false
false
false
false
0
_dessert_cli_cmd_showmeshifs(struct cli_def *cli, char *command, char *argv[], int argc) { dessert_meshif_t *meshif = dessert_meshiflist_get(); if (meshif == NULL) { cli_print(dessert_cli, "No mesh interfaces registered!"); return CLI_ERROR; } else { MESHIFLIST_ITERATOR_START(meshif) { _dessert_cli_cm...
false
false
false
false
false
0
mem_cgroup_css_from_page(struct page *page) { struct mem_cgroup *memcg; rcu_read_lock(); memcg = page->mem_cgroup; if (!memcg || !cgroup_subsys_on_dfl(memory_cgrp_subsys)) memcg = root_mem_cgroup; rcu_read_unlock(); return &memcg->css; }
false
false
false
false
false
0