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
connection_ap_attach_pending(void) { entry_connection_t *entry_conn; smartlist_t *conns = get_connection_array(); SMARTLIST_FOREACH(conns, connection_t *, conn, { if (conn->marked_for_close || conn->type != CONN_TYPE_AP || conn->state != AP_CONN_STATE_CIRCUIT_WAIT) continue; entry_...
false
false
false
false
false
0
rev_uniq_file (rev_commit *uniq, rev_commit *common, int *nuniqp) { int i, j; int nuniq = 0; rev_file_list *head = NULL, **tail = &head, *fl; if (!uniq) return NULL; for (i = 0; i < uniq->ndirs; i++) { rev_dir *dir = uniq->dirs[i]; for (j = 0; j < dir->nfiles; j++) if (!rev_commit_has...
false
false
false
false
false
0
do_pci_entry(const char *filename, struct pci_device_id *id, char *alias) { /* Class field can be divided into these three. */ unsigned char baseclass, subclass, interface, baseclass_mask, subclass_mask, interface_mask; id->vendor = TO_NATIVE(id->vendor); id->device = TO_NATIVE(id->device); id->subvendor = T...
false
false
false
false
false
0
find_first_not_of(StringRef Chars, size_t From) const { std::bitset<1 << CHAR_BIT> CharBits; for (size_type i = 0; i != Chars.size(); ++i) CharBits.set((unsigned char)Chars[i]); for (size_type i = std::min(From, Length), e = Length; i != e; ++i) if (!Char...
false
false
false
false
false
0
fz_draw_free_user(fz_device *devp) { fz_draw_device *dev = devp->user; fz_context *ctx = dev->ctx; /* pop and free the stacks */ if (dev->top > 0) fz_warn(ctx, "items left on stack in draw device: %d", dev->top+1); while(dev->top-- > 0) { fz_draw_state *state = &dev->stack[dev->top]; if (state[1].mask != s...
false
false
false
false
false
0
prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id) { struct net_device *ndev; u8 latency_tmr; u32 mem_addr; islpci_private *priv; int rvalue; /* Enable the pci device */ if (pci_enable_device(pdev)) { printk(KERN_ERR "%s: pci_enable_device() failed.\n", DRV_NAME); return -ENODEV; } /* ch...
false
false
false
false
false
0
_factor_pollard_rho_method(mpz_class &rop, const mpz_class &n, const mpz_class &a, const mpz_class &s, unsigned steps = 10000) { if (n < 5) throw std::runtime_error("Require n > 4 to use pollard's-rho method"); mpz_class u, v, g, m; u = s; v = s; for (unsigned i = 0; i < steps; i+...
false
false
false
false
false
0
getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<DominatorTree>(); AU.addRequired<LoopInfo>(); AU.addRequired<ScalarEvolution>(); AU.addRequiredID(LoopSimplifyID); AU.addRequiredID(LCSSAID); if (EnableIVRewrite) AU.addRequired<IVUsers>(); AU.addPreserved<Scala...
false
false
false
false
false
0
sb_write_clause_jmap(String_buf sb, Topform c, int format, I3list map) { Term t; if (c->compressed) t = NULL; else t = topform_to_term(c); if (format == CL_FORM_BARE) { if (t == NULL) sb_append(sb, "clause_is_compressed"); else sb_write_term(sb, t); sb_append(sb, "."...
false
false
false
false
false
0
ddsche_write_gettask_call(fsbe_context *cx, Hmdf_context *hcx) { char name[64]; int pe_num; ddsche_make_gettask_module_name(name, hcx); if (opt_generate_log_code) write_log_f(cx->out_ptr, "PE%d: start gettask mtg%d", get_current_pe_number(), hcx->mtg_id); if( opt_mpi_task_code){ pe_num =...
true
true
false
false
false
1
message(const char *s, ...) { va_list ap; if (!quiet && verbose) { va_start(ap, s); (void)vfprintf(stderr, s, ap); va_end(ap); fputs("\n", stderr); } }
false
false
false
false
false
0
utf8_compare(const gchar *s1, const gchar *s2, gboolean case_sensitive) { gchar *s1_key, *s2_key; gchar *s1_t, *s2_t; gint ret; g_assert(g_utf8_validate(s1, -1, NULL)); g_assert(g_utf8_validate(s2, -1, NULL)); if (!case_sensitive) { s1_t = g_utf8_casefold(s1, -1); s2_t = g_utf8_casefold(s2, -1); } else...
false
false
false
false
true
1
varprint_namelen (const GRETL_VAR *var, const DATASET *dset, int rmax, int block) { int len, maxlen = 0; int i, k, v; for (i=0; i<rmax; i++) { k = rmax * block + i - 1; if (k < 0) { continue; } if (k >= var->neqns) { break; } v = var->ylist[k+1]; len = strlen(dset->varname...
false
false
false
false
false
0
id_parse(CODE code) { if (CHECK('(')) { DROP(); if (!expr_parse(code)) return 0; CHKERR(')', "Unmatched close-paren in grouping parens"); DROP(); return applic_parse(code, NULL, 0, 0); } else if (CHECK(IDENT)) { OVECTOR currid = (OVECTOR) yylval; DROP(); return applic_parse(cod...
false
false
false
false
false
0
gfs_pio_putc(GFS_File gf, int c) { gfarm_error_t e; gfarm_timerval_t t1, t2; GFARM_TIMEVAL_FIX_INITIALIZE_WARNING(t1); gfs_profile(gfarm_gettimerval(&t1)); e = gfs_pio_check_view_default(gf); if (e != GFARM_ERR_NO_ERROR) { gflog_debug(GFARM_MSG_1001325, "gfs_pio_check_view_default() failed: %s", gfarm_e...
false
false
false
false
false
0
vtkROIStencilSourceCylinderY( vtkROIStencilSource *self, vtkImageStencilData *data, int extent[6], double origin[3], double spacing[3]) { int subextent[6]; double icenter[3]; double iradius[3]; vtkROIStencilSourceSubExtent(self, origin, spacing, extent, subextent, icenter, iradius); // for keeping t...
false
false
false
false
false
0
write_header(AVFormatContext *s) { ASSContext *ass = s->priv_data; AVCodecContext *avctx= s->streams[0]->codec; uint8_t *last= NULL; if(s->nb_streams != 1 || avctx->codec_id != CODEC_ID_SSA){ av_log(s, AV_LOG_ERROR, "Exactly one ASS/SSA stream is needed.\n"); return -1; } while...
false
false
false
false
false
0
gnc_prefs_connect_one (const gchar *name, GtkWidget *widget, gpointer user_data) { /* These tests must be ordered from more specific widget to less * specific widget. */ if (GTK_IS_FONT_BUTTON(widget)) { DEBUG(" %s - entry", name); gnc_pre...
false
false
false
false
false
0
getVM(const DcmTagKey &tag) const { DcmElement *elem = search(tag); if (elem != NULL) return elem->getVM(); return 0; }
false
false
false
false
false
0
gst_base_video_encoder_change_state (GstElement * element, GstStateChange transition) { GstBaseVideoEncoder *base_video_encoder; GstBaseVideoEncoderClass *base_video_encoder_class; GstStateChangeReturn ret; base_video_encoder = GST_BASE_VIDEO_ENCODER (element); base_video_encoder_class = GST_BASE_VIDEO_E...
false
false
false
false
false
0
non_terminal_string (char *buf, int att) { if (att > 0 && att < WILDCARD) { if (attribute_names[att] != NO_TEXT) { char *q = buf; bufcpy (q, attribute_names[att], BUFFER_SIZE); while (q[0] != NULL_CHAR) { if (q[0] == '_') { q[0] = '-'; } else { q[0] = (char) T...
false
false
false
false
false
0
main_window_support_drag_and_drop (MainWindow* self) { GtkTargetEntry* _tmp0_ = NULL; GtkTargetEntry* _tmp1_ = NULL; gint _tmp1__length1 = 0; g_return_if_fail (self != NULL); _tmp0_ = g_new0 (GtkTargetEntry, 0); _tmp1_ = _tmp0_; _tmp1__length1 = 0; gtk_drag_dest_set ((GtkWidget*) self, GTK_DEST_DEFAULT_ALL, _tm...
false
false
false
false
false
0
gen_altivec_vperm_ti (rtx operand0, rtx operand1, rtx operand2, rtx operand3) { rtx _val = 0; start_sequence (); { rtx operands[4]; operands[0] = operand0; operands[1] = operand1; operands[2] = operand2; operands[3] = operand3; #line 1885 "../../src/gcc/config/rs6000/altivec.md" { if (!VE...
false
false
false
false
false
0
HTMLTDBegin(li, env, p) HTMLInfo li; HTMLEnv env; MLElement p; { HTable *ts; HRow *rs; HData *ds; ts = (HTable *)env->penv->closure; env->closure = ts; if (ts->pass == 0) { rs = (HRow *)GListGetTail(ts->grid); myassert(rs != NULL, "Could not find row data (1)."); ds = (HData *)MPCGet(ts->mp...
false
false
false
true
false
1
gluebi_get_device(struct mtd_info *mtd) { struct gluebi_device *gluebi; int ubi_mode = UBI_READONLY; if (!try_module_get(THIS_MODULE)) return -ENODEV; if (mtd->flags & MTD_WRITEABLE) ubi_mode = UBI_READWRITE; gluebi = container_of(mtd, struct gluebi_device, mtd); mutex_lock(&devices_mutex); if (gluebi->re...
false
false
false
false
false
0
gen_struct_or_union_type_die (tree type, dw_die_ref context_die, enum debug_info_usage usage) { dw_die_ref type_die = lookup_type_die (type); dw_die_ref scope_die = 0; int nested = 0; int complete = (TYPE_SIZE (type) && (! TYPE_STUB_DECL (type) || ! TYPE_DECL_SUPPRESS_DEBUG (TYPE_STUB_DECL (type...
false
false
false
false
false
0
glade_editor_table_load (GladeEditable *editable, GladeWidget *widget) { GladeEditorTable *table = GLADE_EDITOR_TABLE (editable); GladeEditorProperty *property; GList *list; /* abort mission */ if (table->loaded_widget == widget) return; if (table->loaded_widget) { g_signal_handlers_...
false
false
false
false
false
0
__set_expr_onrhs(struct expr_t *ndp) { struct net_t *np; if (__isleaf(ndp)) { if (ndp->optyp == ID || ndp->optyp == GLBREF) { np = ndp->lu.sy->el.enp; if (np->nrngrep == NX_CT) { if (np->iotyp == NON_IO) np->nu.ct->n_onrhs = TRUE; } if (!__expr_rhs_decl) np->n_onprocrhs =...
false
false
false
false
false
0
get_shiftadd_cost (tree expr, enum machine_mode mode, comp_cost cost0, comp_cost cost1, tree mult, bool speed, comp_cost *cost) { comp_cost res; tree op1 = TREE_OPERAND (expr, 1); tree cst = TREE_OPERAND (mult, 1); tree multop = TREE_OPERAND (mult, 0); int m = exact_log2 (int_cst_value (cst...
false
false
false
false
false
0
decode_dmi(const struct dmi_device *dmi_dev) { struct dmi_header *dm = dmi_dev->device_data; u8 *data = (u8 *) dm; u8 len = dm->length; unsigned short myaddr; int slave_addr; if (num_addrs >= MAX_SSIF_BMCS) return -1; if (len < 9) return -1; if (data[0x04] != 4) /* Not ...
false
false
false
false
false
0
lock_fd(int fd) { #ifdef _WIN32 # if 1 return _locking(fd, _LK_NBLCK, 1); # else HANDLE fl = (HANDLE)_get_osfhandle(fd); OVERLAPPED o; memset(&o, 0, sizeof(o)); return (LockFileEx(fl, LOCKFILE_EXCLUSIVE_LOCK, 0, 1, 0, &o)) ? 0 : GetLastError(); # endif #else struct flock fl; int ret; fl.l_type = F_WRLCK; ...
false
false
false
false
false
0
ycbcra_to_rgba (char *src, char *dst, long n) { while (n--) { double luminance = ((double *) src)[0]; double cb = ((double *) src)[1]; double cr = ((double *) src)[2]; double alpha = ((double *) src)[3]; double red, green, blue; ...
false
false
false
false
false
0
is_defined_config(const char *name, int len) { const char * pconfig; const char * plast = str_config + len_config - len; for ( pconfig = str_config + 1; pconfig < plast; pconfig++ ) { if (pconfig[ -1] == '\n' && pconfig[len] == '\n' && !memcmp(pconfig, name, len)) return 1; } return 0; }
false
false
false
false
false
0
serverClose(JsNetwork *net, JsVar *server) { JsVar *arr = socketGetArray(HTTP_ARRAY_HTTP_SERVERS,false); if (arr) { // close socket _socketConnectionKill(net, server); // remove from array JsVar *idx = jsvGetArrayIndexOf(arr, server, true); if (idx) { jsvRemoveChild(arr, idx); jsvUnL...
false
false
false
false
false
0
pci_suspend(struct pci_dev *dev, pm_message_t state) { struct fw_ohci *ohci = pci_get_drvdata(dev); int err; software_reset(ohci); err = pci_save_state(dev); if (err) { ohci_err(ohci, "pci_save_state failed\n"); return err; } err = pci_set_power_state(dev, pci_choose_state(dev, state)); if (err) ohci_err...
false
false
false
false
false
0
send_referrals_from_entry(Slapi_PBlock *pb, Slapi_Entry *referral) { Slapi_Value *val=NULL; Slapi_Attr *attr=NULL; int i=0, numValues=0; struct berval **refscopy=NULL; struct berval **url=NULL; slapi_entry_attr_find( referral, "ref", &attr ); if(attr != NULL) { slapi_attr_get_nu...
false
false
false
true
false
1
magnatune_add_album_row_activated(GtkTreeView *tree, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data) { GtkTreeModel *model = gtk_tree_view_get_model(tree); GtkTreeIter iter_r; if(gtk_tree_model_get_iter(model, &iter_r, path)) { gchar *path; gtk_tree_model_get(model, &iter_r, M...
false
false
false
false
false
0
OnClosedConnection(const SystemAddress &systemAddress, RakNetGUID rakNetGUID, PI2_LostConnectionReason lostConnectionReason ) { for (unsigned int i=0; i < worldsList.Size(); i++) { worldsList[i]->OnClosedConnection(systemAddress, rakNetGUID, lostConnectionReason); } }
false
false
false
false
false
0
xhp_preprocess(istream &in, string &out, bool isEval, string &errDescription, uint32_t &errLineno) { // Read stream to string stringbuf sb; in >> noskipws >> &sb; string buffer = sb.str(); return xhp_preprocess(buffer, out, isEval, errDescription, errLineno); }
false
false
false
false
false
0
generic_sendinfoid3(mpg123_handle *mh) { mpg123_id3v1 *v1; mpg123_id3v2 *v2; if(MPG123_OK != mpg123_id3(mh, &v1, &v2)) { error1("Cannot get ID3 data: %s", mpg123_strerror(mh)); return; } if(v1 != NULL) { generic_sendv1(v1, "I"); } if(v2 != NULL) { generic_send_lines("I ID3v2.title:%s", v2->title); ...
false
false
false
false
false
0
handle_hsc_elseif(HSCPRC * hp, HSCTAG * tag) { BOOL new_condbool = get_varbool_byname(tag->attr, CONDITION_ATTR); if_t new_cond = bool2ift(new_condbool); if (is_empty(hp)) { /* this can happen, if <$if> had errors in args */ DIF(fprintf(stderr, DHL "%s: unhandled handler conditional\n",...
false
false
false
false
true
1
halve_volume (void) { if (opt.music) { Mix_VolumeMusic ((13 - opt.music_volume) * MIX_MAX_VOLUME / 13 / 2); dmsg (D_SOUND_TRACK, "set volume to %d/%d", (13 - opt.music_volume) * MIX_MAX_VOLUME / 13 / 2, MIX_MAX_VOLUME); } else { Mix_VolumeMusic (0); dmsg (D_SOUND_TRACK, "set volume to 0/%d", MIX_...
false
false
false
false
false
0
setDayPeriods(const QList<KDayPeriod> &dayPeriods) { if (dayPeriods.count() > 0) { foreach (const KDayPeriod &dayPeriod, dayPeriods) { if (!dayPeriod.isValid()) { return; } } m_dayPeriods = dayPeriods; } }
false
false
false
false
false
0
fax_tree_view_drag_begin(GdkDragContext* context_p, void* data) { FaxListManager* instance_p = static_cast<FaxListManager*>(data); instance_p->drag_is_fax = true; SelectedRowsHandle rows_handle(instance_p->fax_tree_view_p); rows_handle.get_ref_list(gtk_tree_view_get_model(instance_p->fax_tr...
false
false
false
false
false
0
_g_directory_create_tmp (void) { GFile *tmp_dir; GFile *dir = NULL; int n; tmp_dir = g_file_new_for_path (g_get_tmp_dir ()); if (tmp_dir == NULL) return NULL; for (n = 0; n < MAX_ATTEMPS; n++) { char *name; name = _g_rand_string (12); dir = g_file_get_child (tmp_dir, name); g_free (name); if (...
false
false
false
false
true
1
json_enum_option(lua_State *l, int optindex, int *setting, const char **options, int bool_true) { static const char *bool_options[] = { "off", "on", NULL }; if (!options) { options = bool_options; bool_true = 1; } if (!lua_isnil(l, optindex)) { if (b...
false
false
false
false
false
0
gedit_panel_grab_focus (GtkWidget *w) { GeditPanel *panel = GEDIT_PANEL (w); GtkWidget *tab; gint n; n = gtk_notebook_get_current_page (GTK_NOTEBOOK (panel->priv->notebook)); if (n == -1) return; tab = gtk_notebook_get_nth_page (GTK_NOTEBOOK (panel->priv->notebook), n); g_return_if_fail (tab != NULL); ...
false
false
false
false
false
0
mvwaddnstr (WINDOW * a1, int a2, int a3, const char * a4, int z) { T((T_CALLED("mvwaddnstr(%p,%d,%d,%s,%d)"), a1, a2, a3, _nc_visbuf2(3,a4), z)); returnCode((wmove(a1,a2,a3) == (-1) ? (-1) : waddnstr(a1,a4,z))); }
false
false
false
false
false
0
embHitidxBinSearch(const AjPStr id, EmbPHitidx const *arr, ajint siz) { int l; int m; int h; int c; l = 0; h = siz-1; while(l<=h) { m=(l+h)>>1; if((c=ajStrCmpCaseS(id, arr[m]->Id)) < 0) h = m-1; else if(c>0) l = m+1; else return m...
false
false
false
false
false
0
ap_reducedproduct_to_box(ap_manager_t* manager, ap_reducedproduct_t* a) { ap_reducedproduct_internal_t* intern = get_internal_init1(manager,AP_FUNID_TO_BOX,a); size_t i,j; ap_interval_t** gbox = NULL; size_t nbdims = 0; for (i=0;i<intern->size;i++){ ap_manager_t* man = intern->tmanagers[i]; ap_in...
false
false
false
false
false
0
EmitRegisterName(int64_t Register) { if (InstPrinter && !MAI.useDwarfRegNumForCFI()) { const MCRegisterInfo &MRI = getContext().getRegisterInfo(); unsigned LLVMRegister = MRI.getLLVMRegNum(Register, true); InstPrinter->printRegName(OS, LLVMRegister); } else { OS << Register; } }
false
false
false
false
false
0
boxcox_cb (GtkAdjustment *adj, ggobid *gg) { GtkWidget *tree_view = get_tree_view_from_object (G_OBJECT(gg->tform_ui.window)); GGobiData *d = (GGobiData *) g_object_get_data(G_OBJECT (tree_view), "datad"); gint *vars; // = (gint *) g_malloc (d->ncols * sizeof(gint)); gint nvars; vars = get_selections_from_...
false
false
false
false
false
0
qh_memalloc(int insize) { void **freelistp, *newbuffer; int index, size; int outsize, bufsize; void *object; if ((unsigned) insize <= (unsigned) qhmem.LASTsize) { index= qhmem.indextable[insize]; freelistp= qhmem.freelists+index; if ((object= *freelistp)) { qhmem.cntquick++; *freeli...
false
false
false
false
false
0
vcc_DefBackend(struct vcc *tl, const struct token *nm) { struct symbol *sym; sym = VCC_GetSymbolTok(tl, nm, SYM_BACKEND); AN(sym); if (sym->ndef > 0) { VSB_printf(tl->sb, "Backend %.*s redefined\n", PF(tl->t)); vcc_ErrWhere(tl, nm); return; } sym->fmt = BACKEND; sym->eval = vcc_Eval_Backend; sym->ndef++...
false
false
false
true
false
1
mousePressEvent( QMouseEvent *event ) { if ( event->button() == Qt::RightButton ) { if ( d->isEmptyTabbarSpace( event->pos() ) ) { emit( contextMenu( mapToGlobal( event->pos() ) ) ); return; } } QTabWidget::mousePressEvent( event ); }
false
false
false
false
false
0
apply(double (*f)(double, int, int)) const #ifdef HEP_GNU_OPTIMIZED_RETURN return mret(num_row()); { #else { HepDiagMatrix mret(num_row()); #endif HepMatrix::mcIter a = m.begin(); HepMatrix::mIter b = mret.m.begin(); for(int ir=1;ir<=num_row();ir++) { *(b++) = (*f)(*(a++), ir, ir); } return mret; }
false
false
false
false
false
0
trace_dump_resource_template(const struct pipe_resource *templat) { if (!trace_dumping_enabled_locked()) return; if(!templat) { trace_dump_null(); return; } trace_dump_struct_begin("pipe_resource"); trace_dump_member(int, templat, target); trace_dump_member(format, templat, format...
false
false
false
false
false
0
_issue_deauth(struct adapter *padapter, unsigned char *da, unsigned short reason, u8 wait_ack) { struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; unsigned char *pframe; struct rtw_ieee80211_hdr *pwlanhdr; __le16 *fctrl; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv...
false
false
false
false
false
0
OGRFeatureShadow_GetFieldAsDouble__SWIG_1(OGRFeatureShadow *self,char const *name){ int i = OGR_F_GetFieldIndex(self, name); if (i == -1) CPLError(CE_Failure, 1, "No such field: '%s'", name); else return OGR_F_GetFieldAsDouble(self, i); return 0; }
false
false
false
false
false
0
FreeListInternalRep(Jim_Interp *interp, Jim_Obj *objPtr) { int i; for (i = 0; i < objPtr->internalRep.listValue.len; i++) { Jim_DecrRefCount(interp, objPtr->internalRep.listValue.ele[i]); } Jim_Free(objPtr->internalRep.listValue.ele); }
false
false
false
false
false
0
LocateModules() { // Collect the set of modules provided and required by all sources. typedef cmDependsFortranInternals::ObjectInfoMap ObjectInfoMap; ObjectInfoMap const& objInfo = this->Internal->ObjectInfo; for(ObjectInfoMap::const_iterator infoI = objInfo.begin(); infoI != objInfo.end(); ++infoI) {...
false
false
false
false
false
0
find_block_info_by_block(Block_info *block_info, Block *block) { Layer_info *l; List *li; if (block_info_get_block(block_info) == block) return block_info; l = block_info_get_layer_info(block_info); if (l != NULL) { for (li = layer_info_get_block_info_list(l); li != N...
false
false
false
false
false
0
treeActivated(QTreeWidgetItem *item) { d->m_Browser->setSource(d->m_Title_Page.value(item->text(0))); }
false
false
false
false
false
0
rc_gethostbyaddr(const char *addr, size_t length, int format) { struct hostent *hp; #ifdef GETHOSTBYADDR_R #if defined (GETHOSTBYADDRRSTYLE_SYSV) || defined (GETHOSTBYADDRRSTYLE_GNU) struct hostent hostbuf; size_t hostbuflen; char *tmphostbuf; int res; int herr; hostbuflen = 1024; tmphostbuf = malloc(hostbuf...
false
false
false
false
false
0
tasteLinks() { mBlop[0].execEvent(event_keyleft); mBlop[1].execEvent(event_keyleft); if (steuerbar()) { FallPos fp2 = mPos; fp2.x--; if (!testBelegt(fp2)) { mPos = fp2; /* Auf dem Bildschirm soll der Fall noch nicht fertigverschoben erscheinen */ mExtraX = am_schieben_start; } ...
false
false
false
false
false
0
execDeleteLaters() { while (!global_deleteLaterQueue.empty()) { // ordering here is important, in cases where deleting 'foo' causes // other objects to be 'deleteLater'ed; we want to clean them up in // this same cycle, not leave the hanging around. BaseDeleteLater* dl = glo...
false
false
false
false
false
0
parser_read_file( const char *tree_name, const char *fname ) { int size; char magic = 0; FILE *file = 0; PData *top = 0; /* open file */ if ( ( file = fopen( fname, "r" ) ) == 0 ) { sprintf( parser_error, "%s: file not found", fname ); return 0; } /* create top level pdat...
false
true
false
false
true
1
__indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) { struct glx_context * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 20; emit_header(gc->pc, X_GLrop_Histogram, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); (void) memcpy((void *)(gc->...
false
true
false
false
false
1
removeIndirectObject(Ref r) { xrefLocker(); if (r.num < 0 || r.num >= size) { error(errInternal, -1,"XRef::removeIndirectObject on unknown ref: {0:d}, {1:d}\n", r.num, r.gen); return; } XRefEntry *e = getEntry(r.num); if (e->type == xrefEntryFree) { return; } e->obj.free(); e->type = xrefEnt...
false
false
false
false
false
0
adjustDeletePosition(UT_uint32 &iDocumentPosition, UT_uint32 &iCount) { UT_uint32 iRunOffset = getBlockOffset() + getBlock()->getPosition(); UT_return_if_fail( iDocumentPosition >= iRunOffset && iDocumentPosition < iRunOffset + getLength() && m_pRenderInfo); PD_StruxIterator * text = new PD_StruxIterator...
false
false
false
false
false
0
ExecForRange ( Stat stat ) { UInt leave; /* a leave-statement was executed */ UInt lvar; /* local variable */ Int first; /* first value of range */ Int last; ...
false
false
false
false
false
0
CompareVariableValue(void *rval,char rtype,struct CfAssoc *ap) { struct Rlist *list, *rp; if (ap == NULL || rval == NULL) { return 1; } switch (rtype) { case CF_SCALAR: return strcmp(ap->rval,rval); case CF_LIST: list = (struct Rlist *)rval; for (rp = list; rp != NUL...
false
false
false
false
false
0
readDefineButton2Tag(SWFStream& in, movie_definition& m) { // Character ID has been read already in.ensureBytes(1 + 2); // flags + actions offset // Read the menu flag // (this is a single bit, the first 7 bits are reserved) const boost::uint8_t flags = in.read_u8(); _trackAsMenu = flags & (1 ...
false
false
false
false
false
0
infc_session_proxy_handle_session_close(InfcSessionProxy* proxy, InfXmlConnection* connection, xmlNodePtr xml, GError** error) { InfcSessionProxyPrivate* priv; priv = INFC_SESSION_PROXY_PRIVATE(pr...
false
false
false
false
false
0
apparmor_dointvec(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { if (!policy_admin_capable(NULL)) return -EPERM; if (!apparmor_enabled) return -EINVAL; return proc_dointvec(table, write, buffer, lenp, ppos); }
false
false
false
false
false
0
set_ma_divs(__isl_keep isl_basic_map *bmap, __isl_keep isl_multi_aff *ma, int n_before, int n_after, int n_div) { int i; int n_param; int n_set; isl_local_space *ls; if (n_div == 0) return 0; ls = isl_aff_get_domain_local_space(ma->p[0]); if (!ls) return -1; n_param = isl_local_space_dim(ls, isl_dim_par...
false
false
false
false
false
0
UpdateOOGL() { void (*old_start)ARGS((void)); void (*old_end)ARGS((void)); void (*old_gedge)ARGS((struct graphdata *,edge_id)); void (*old_gfacet)ARGS((struct graphdata*,facet_id)); /* if user has asked us to quit, don't bother redisplaying */ /* (especially since graphgen resets breakflag!) */ if (b...
false
false
false
false
false
0
getWidthProperty(pLayout, pComputed, iContaining) LayoutContext *pLayout; HtmlComputedValues *pComputed; int iContaining; { return PIXELVAL( pComputed, WIDTH, pLayout->minmaxTest ? PIXELVAL_AUTO : iContaining ); }
false
false
false
false
false
0
setparam(char **argv) { char **newparam; char **ap; int nparam; for (nparam = 0 ; argv[nparam] ; nparam++); ap = newparam = ckmalloc((nparam + 1) * sizeof *ap); while (*argv) { *ap++ = savestr(*argv++); } *ap = NULL; freeparam(&shellparam); shellparam.malloc = 1; shellparam.nparam = nparam; shellparam.p ...
false
false
false
false
false
0
empty ( ) { for (int i = 0; i < 8; i++) for (int j = 0; j < 8; j++) for (int k = 0; k < 3; k++) { if ( avail[i][j].resource(k) ) return false; if ( paid[i][j].resource(k) ) return false; } return true; }
false
false
false
false
false
0
cdc_ncm_status(struct usbnet *dev, struct urb *urb) { struct cdc_ncm_ctx *ctx; struct usb_cdc_notification *event; ctx = (struct cdc_ncm_ctx *)dev->data[0]; if (urb->actual_length < sizeof(*event)) return; /* test for split data in 8-byte chunks */ if (test_and_clear_bit(EVENT_STS_SPLIT, &dev->flags)) { cd...
false
false
false
false
false
0
ld_xtensa_move_section_after (xtensa_ld_iter *to, xtensa_ld_iter *current) { lang_statement_union_type *to_next; lang_statement_union_type *current_next; lang_statement_union_type **e; #if EXTRA_VALIDATION size_t old_to_count, new_to_count; size_t old_current_count, new_current_count; #endif if (to == cur...
false
false
false
false
false
0
L6__DEF_ERROR_TYPE__serror() {register object *base=vs_base; register object *sup=base+VM6; VC6 vs_reserve(VM6); check_arg(2);vs_top=sup; {object V46=base[0]->c.c_cdr; if(endp(V46))invalid_macro_call(); base[2]= (V46->c.c_car); V46=V46->c.c_cdr; if(endp(V46))invalid_macro_call(); {object V47= (V46->c.c_car); ...
false
false
false
false
false
0
checkInputAudioSet(struct node *node, __u32 audioset) { struct v4l2_audio input; unsigned i; int ret; ret = doioctl(node, VIDIOC_G_AUDIO, &input); if (audioset == 0 && ret != ENOTTY && ret != EINVAL) return fail("No audio inputs, but G_AUDIO did not return ENOTTY or EINVAL\n"); if (audioset) { if (ret) re...
false
false
false
false
false
0
SetTokenKindImage(int kind, const wxBitmap& bitmap, cb_unused const wxColour& maskColour) { if (kind < PARSER_IMG_MIN || kind > PARSER_IMG_MAX) return; m_ImageList->Replace(kind, bitmap);//, maskColour); }
false
false
false
false
false
0
get_last_file_mod_timestamp_c(z_file *fileref) { struct stat stat_buf; if (fstat(fileno((FILE*)fileref->file_object), &stat_buf) != 0) return -1; else return stat_buf.st_ctime; }
false
false
false
false
false
0
cavan_display_draw_polygon_standard4(struct cavan_display_device *display, size_t count, int x, int y, int r, int rotation, cavan_display_color_t color) { int ret; ret = cavan_display_draw_polygon_standard3(display, count, x, y, r, rotation, color); if (ret < 0) { return ret; } return cavan_display_draw_circl...
false
false
false
false
false
0
function_agent(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) { char *parse; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(agentid); AST_APP_ARG(item); ); char *tmp; struct agent_pvt *agent; buf[0] = '\0'; if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "The AGENT function r...
false
false
false
false
false
0
change_var_dir(Directive *dir, int entry, Var_table *vpt) { Directive *tmp_dir; Directive_arg *dir_arg; tmp_dir = dir; while(tmp_dir != NULL){ dir_arg = tmp_dir->func->opt; while(dir_arg != NULL){ if(dir_arg->type == DIR_EXP){ ...
false
false
false
false
false
0
get_address(char *outputbuf, int outlen) { outputbuf[0] = '\0'; #ifdef HAVE_INET_NTOP # ifdef HAVE_IPV6 inet_ntop(saddr->sa_family, saddr->sa_family == AF_INET ? (void*)&(saddr4->sin_addr) : (void*)&(saddr6->sin6_addr), outputbuf, outlen); # else inet_ntop(saddr->sa_family, (void*)&...
false
false
false
false
false
0
FGetFieldPos (char *buffer,int fieldID) { int i = 0, colID; for (colID = 0;colID < fieldID;++colID) { for (;(i < (int) strlen (buffer)) && (buffer [i] != '\t');++i); i++; } return (i <= (int) strlen (buffer) ? i : FFault); }
false
false
false
false
false
0
islower( const std::string & str ) { std::string::size_type len = str.size(), i; if ( len == 0 ) return false; if( len == 1 ) return ::islower( str[0] ); for ( i = 0; i < len; ++i ) { if ( !::islower( str[i] ) ) return false; } return true; }
false
false
false
false
false
0
GLRenderBelowPath(SoGLRenderAction *action) //////////////////////////////////////////////////////////////////////// { SoState *state = action->getState(); // Do a cull test, if culling is turned on: int savedCullBits; // For now, just do culling if turned ON explicitly. Eventually, // we might ...
false
false
false
false
false
0
luaF_getlocalname (const Proto *f, int local_number, int pc) { int i; for (i = 0; i<f->sizelocvars && f->locvars[i].startpc <= pc; i++) { if (pc < f->locvars[i].endpc) { /* is variable active? */ local_number--; if (local_number == 0) return getstr(f->locvars[i].varname); } } return...
false
false
false
false
false
0
load_engine_params(string category, int y) { string engine = engine_combo[y].get_active_text(); // cout << "selected engine " << engine << " for category " << category << endl; // debugging ;-) ConfigLoader::attach_engine(engine, category, m_pConfig, engine_cbox[y].get_active()); }
false
false
false
false
false
0
sizeHint() const { if( !d->topLevel || block_resize > 0 ) return QMenuBar::sizeHint(); // Since QMenuBar::sizeHint() may indirectly call resize(), // avoid infinite recursion. ++block_resize; // find the minimum useful height, and enlarge the width until the menu fits in that height (one row...
false
false
false
false
false
0
_HandleXferAccept() { DEBUG_LOG("Entering _HandleXferAccept"); recv_skip(1); InitPatch(); return true; }
false
false
false
false
false
0
js_PrimitiveToObject(JSContext *cx, jsval *vp) { JSClass *clasp; JSObject *obj; /* Table to map primitive value's tag into the corresponding class. */ JS_STATIC_ASSERT(JSVAL_INT == 1); JS_STATIC_ASSERT(JSVAL_DOUBLE == 2); JS_STATIC_ASSERT(JSVAL_STRING == 4); JS_STATIC_ASSERT(JSVAL_SPECIAL =...
false
false
false
false
false
0
digest_set_val(struct param *param, int idx, unsigned int *val) { if (*val & DIGEST_CRC32C && param[idx].val & DIGEST_CRC32C) *val = DIGEST_CRC32C; else *val = DIGEST_NONE; param[idx].val = *val; return 0; }
false
false
false
false
false
0
set_success(uint32 scode) { this->scode = scode; message.clear(); setHeader(HH_CONTENT_LENGTH, "0", false); }
false
false
false
false
false
0