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
gs_cie_cache_init(cie_cache_params * pcache, gs_sample_loop_params_t * pslp, const gs_range * domain, client_name_t cname) { /* We need to map the values in the range [domain->rmin..domain->rmax]. However, if rmin < 0 < rmax and the function is non-linear, this can lead to anomal...
false
false
false
false
false
0
isParallel (const HepLorentzVector & w, double epsilon) const { double norm = euclideanNorm(); double wnorm = w.euclideanNorm(); if ( norm == 0 ) { if ( wnorm == 0 ) { return true; } else { return false; } } if ( wnorm == 0 ) { return false; } HepLorentzVector w1 = *this / norm...
false
false
false
false
false
0
get_free_tei(struct manager *mgr) { DECLARE_BITMAP(ids, 64) = { [0 ... BITS_TO_LONGS(64) - 1] = 0 }; int i; struct layer2 *l2; list_for_each_entry(l2, &mgr->layer2, list) { if (l2->ch.nr == 0) continue; if ((l2->ch.addr & 0xff) != 0) continue; i = l2->ch.addr >> 8; if (i < 64) continue; i -= 64...
false
false
false
false
false
0
SplitPath(char *path,char **dirpart,char **filepart) { static char DOT[] = "."; char *dpart; char *fpart; if ((fpart = strrchr(path, '/')) == NULL) { if ((dpart = STRDUP(DOT)) == NULL) return -1; if ((fpart = STRDUP(path)) == NULL) { DISPOSE(dpart); return -1; } } else { if (...
false
true
false
false
false
1
home_server_addr_cmp(const void *one, const void *two) { int rcode; const home_server *a = one; const home_server *b = two; if (a->server && !b->server) return -1; if (!a->server && b->server) return +1; if (a->server && b->server) { rcode = a->type - b->type; if (rcode != 0) return rcode; return strcmp(a-...
false
false
false
false
false
0
update_size() { GetClientSize(&_width, &_height); if (_width > 0 && _height > 0) { _memdc.SelectObject (wxNullBitmap); if (_backing_store) { delete _backing_store; } _backing_store = new wxBitmap(_width, _height); _memdc.SelectObject(*_backing_store); } }
false
false
false
false
false
0
XTRAP_FakeKeyEvent_wr(Display* dpy, KeyCode key, Bool down, unsigned long delay) { RAWFB_RET_VOID #if NO_X11 nox11_exit(1); if (!dpy || !key || !down || !delay) {} return; #else if (! xtrap_present) { DEBUG_SKIPPED_INPUT(debug_keyboard, "keyboard: no-XTRAP"); return; } /* unused vars warning: */ if (k...
false
false
false
false
false
0
find_adapter(DBusConnection *conn, DBusMessage *msg, void *data) { DBusMessage *reply; struct btd_adapter *adapter; const char *pattern; int dev_id; const gchar *path; if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &pattern, DBUS_TYPE_INVALID)) return NULL; /* hci_devid() would make sens...
false
false
false
false
false
0
glusterd_profile_volume_use_rsp_dict (dict_t *aggr, dict_t *rsp_dict) { int ret = 0; glusterd_pr_brick_rsp_conv_t rsp_ctx = {0}; int32_t brick_count = 0; int32_t count = 0; dict_t *ctx_dict = NULL; glusterd_op_t op = GD_OP_NONE; GF_ASSERT (rsp_dict); ...
false
false
false
false
false
0
asn1PE_H225TerminalInfo (OOCTXT* pctxt, H225TerminalInfo* pvalue) { int stat = ASN_OK; ASN1BOOL extbit; /* extension bit */ extbit = 0; encodeBit (pctxt, extbit); encodeBit (pctxt, (ASN1BOOL)pvalue->m.nonStandardDataPresent); /* encode nonStandardData */ if (pvalue->m.nonStandardDataPresen...
false
false
false
false
false
0
c_ncvdef ( int ncid, /* netCDF ID */ const char *varname,/* name of variable */ nc_type datatype, /* netCDF datatype of variable */ int ndims, /* number of dimensions of variable */ int *dimids, /* array of ndims dimensions IDs */ int *rcode /* returned error code */ ) { int varid, status...
false
false
false
false
false
0
method_exc_leave (MonoProfiler *prof, MonoMethod *method) { uint64_t now; LogBuffer *logbuffer; if (nocalls) return; logbuffer = ensure_logbuf (16); if (--logbuffer->call_depth > max_call_depth) return; now = current_time (); ENTER_LOG (logbuffer, "eleave"); emit_byte (logbuffer, TYPE_EXC_LEAVE | TYPE_METHO...
false
false
false
false
false
0
acpi_free_power_resources_lists(struct acpi_device *device) { int i; if (device->wakeup.flags.valid) acpi_power_resources_list_free(&device->wakeup.resources); if (!device->power.flags.power_resources) return; for (i = ACPI_STATE_D0; i <= ACPI_STATE_D3_HOT; i++) { struct acpi_device_power_state *ps = &devi...
false
false
false
false
false
0
Perl_atfork_lock(void) { dVAR; #if defined(USE_ITHREADS) /* locks must be held in locking order (if any) */ # ifdef USE_PERLIO MUTEX_LOCK(&PL_perlio_mutex); # endif # ifdef MYMALLOC MUTEX_LOCK(&PL_malloc_mutex); # endif OP_REFCNT_LOCK; #endif }
false
false
false
false
false
0
__ecereProp___ecereNameSpace__ecere__com__Array_Set_minAllocSize(struct __ecereNameSpace__ecere__com__Instance * this, unsigned int value) { struct __ecereNameSpace__ecere__com__Array * __ecerePointer___ecereNameSpace__ecere__com__Array = (struct __ecereNameSpace__ecere__com__Array *)(this ? (((char *)this) + 24) : 0);...
false
true
false
true
false
1
numaFindPeaks(NUMA *nas, l_int32 nmax, l_float32 fract1, l_float32 fract2) { l_int32 i, k, n, maxloc, lloc, rloc; l_float32 fmaxval, sum, total, newtotal, val, lastval; l_float32 peakfract; NUMA *na, *napeak; PROCNAME("numaFindPeaks"); if (!nas) ...
false
false
false
false
false
0
read(hsStream* S) { bool hasData = true; if (S->getVer().isLive() || S->getVer().isHexIsle()) hasData = S->readBool(); if (hasData) { for (int y=0; y<4; y++) for (int x=0; x<4; x++) data[y][x] = S->readFloat(); } else { Reset(); } }
false
false
false
false
false
0
mono_bitset_count (const MonoBitSet *set) { guint32 i, count; gsize d; count = 0; for (i = 0; i < set->size / BITS_PER_CHUNK; ++i) { d = set->data [i]; #ifdef __GNUC__ if (sizeof (gsize) == sizeof (unsigned long)) count += __builtin_popcountl (d); else count += __builtin_popcount (d); #else while (d)...
false
false
false
false
false
0
motion_notify_cb (GtkWidget * w, GdkEventMotion * event, splotd * sp) { displayd *display = sp->displayptr; cpaneld *cpanel = &display->cpanel; GGobiData *d = display->d; ggobid *gg = GGobiFromSPlot (sp); gboolean button1_p, button2_p; gint k; if (cpanel->ee_mode == ADDING_EDGES) { mousepos_get_motio...
false
false
false
false
false
0
get_nth_dentry(struct dentry *parent, unsigned nr) { struct dentry *dentry; if (!S_ISDIR(parent->ddent->mode)) return ERR_PTR(ENOTDIR); if (nr >= parent->size) return ERR_PTR(ENOENT); lock(&parent->mutex); dentry = __get_nth_dentry(parent, nr); unlock(&parent->mutex); return dentry; }
false
false
false
false
false
0
sdma_sw_clean_up_task(unsigned long opaque) { struct sdma_engine *sde = (struct sdma_engine *) opaque; unsigned long flags; spin_lock_irqsave(&sde->tail_lock, flags); write_seqlock(&sde->head_lock); /* * At this point, the following should always be true: * - We are halted, so no more descriptors are getting...
false
false
false
false
false
0
constructArrayTypeDIE(DIE &Buffer, const DICompositeType *CTy) { if (CTy->isVector()) addFlag(Buffer, dwarf::DW_AT_GNU_vector); // Emit the element type. addType(Buffer, resolve(CTy->getBaseType())); // Get an anonymous type for index type. // FIXME: This type should be passed down from the front end ...
false
false
false
false
false
0
keyspan_pda_break_ctl(struct tty_struct *tty, int break_state) { struct usb_serial_port *port = tty->driver_data; struct usb_serial *serial = port->serial; int value; int result; if (break_state == -1) value = 1; /* start break */ else value = 0; /* clear break */ result = usb_control_msg(serial->dev, usb_s...
false
false
false
false
false
0
SimplifyGEPInst(ArrayRef<Value *> Ops, const TargetData *TD, const DominatorTree *) { // The type of the GEP pointer operand. PointerType *PtrTy = cast<PointerType>(Ops[0]->getType()); // getelementptr P -> P. if (Ops.size() == 1) return Ops[0]; if (isa<UndefValue>(Ops[0])) ...
false
false
false
false
false
0
mwifiex_write_data_complete(struct mwifiex_adapter *adapter, struct sk_buff *skb, int aggr, int status) { struct mwifiex_private *priv; struct mwifiex_txinfo *tx_info; struct netdev_queue *txq; int index; if (!skb) return 0; tx_info = MWIFIEX_SKB_TXCB(skb); priv = mwifiex_get_priv_by_id(adapter, tx_info-...
false
false
false
false
false
0
list_types(const char *const *sys) { enum { COLS = 3 }; unsigned last[COLS]; unsigned done, next, size; int i; for (size = 0; sys[size]; size++) continue; done = 0; for (i = COLS-1; i >= 0; i--) { done += (size + i - done) / (i + 1); last[COLS-1 - i] = done; } i = done = next = 0; do { printf("%c%...
false
false
false
true
false
1
set_aprop_delete_button(P_Styles *page, Style *style) { gboolean unique, ovr; unique = stl_style_property_is_unique(style, page->curr_prop); gtk_label_set_text(GTK_LABEL(GTK_BIN(page->dpaction.adel)->child), unique ? _("Delete Action") : _("Revert to Inherited Command")); ovr = stl_style_property_get_override...
false
false
false
false
false
0
CheckSplit(const char* title, const char* file, int force=0) { if ( (static_cast<long>(this->Stream.tellp()) - this->CurrentPosition) > this->MaxLen || force ) { this->Count ++; this->Stream << ";" << endl; this->PrintHeader(title, file); } }
false
false
false
false
false
0
frameImageComponentToString(FrameImageComponent imageComp) { switch (imageComp) { case FIC_TOP_LEFT_CORNER: return String("TopLeftCorner"); break; case FIC_TOP_RIGHT_CORNER: return String("TopRightCorner"); break; case FIC_BOTTO...
false
false
false
false
false
0
neg(target) struct symstruct *target; { scalar_t scalar; struct symstruct *source; if ((scalar = target->type->scalar) & DLONG) long1op(NEGOP, target); else if (scalar & RSCALAR) float1op(NEGOP, target); else { if (scalar & SHORT) extend(target); if (!(target->storage & ALLDATREGS)) {...
false
false
false
false
false
0
prefix_with_context (GError **error, const char *section, ValidateContext *ctx) { GString *str = g_string_new (NULL); GSList *link; char *buf; link = ctx->context_stack; if (!link) { g_prefix_error (error, "In %s:", section); return; } for (; link; link = link->next) ...
false
false
false
false
false
0
HexConvert_S16(HexDialogVal64 *val, HexConversionProperties *prop) { guchar in[2]; int i, local = 0; if (prop->endian == LITTLE) { in[0] = val->v[0]; in[1] = val->v[1]; } else { in[0] = val->v[1]; in[1] = val->v[0]; } for (i = 0; i < 8; i++) lo...
false
false
false
false
false
0
getVar(StackHandler & sa,VarRef * vr,void * data) { switch (vr->type) { case TypeInfo<INT_T>::TypeID: { if (!(vr->access & VAR_ACCESS_CONSTANT)) { INT_T * val = (INT_T *)data; // Address if (val) { return sa.Return(*val); } // if } else { INT_T * val = (INT_T *)&data; // Cons...
false
false
false
false
false
0
deref() { if (refCount) { --refCount; } if (!refCount) { if (!keepOpenCheck->isChecked()) { closeNow(); } else { slotClean(); } } }
false
false
false
false
false
0
DoGetValidator() const { #if wxUSE_VALIDATORS WX_PG_DOGETVALIDATOR_ENTRY() wxValidator* validator = new wxNumericPropertyValidator( wxNumericPropertyValidator::Unsigned, m_realBase); WX_PG_DOGETVALIDATOR_EXIT(validator) #else retu...
false
false
false
false
false
0
mlxsw_sp_fdb_notify_work(struct work_struct *work) { struct mlxsw_sp *mlxsw_sp; char *sfn_pl; u8 num_rec; int i; int err; sfn_pl = kmalloc(MLXSW_REG_SFN_LEN, GFP_KERNEL); if (!sfn_pl) return; mlxsw_sp = container_of(work, struct mlxsw_sp, fdb_notify.dw.work); rtnl_lock(); do { mlxsw_reg_sfn_pack(sfn_pl...
false
false
false
false
false
0
get_period (KKamPanel *p) { int per; if ((per = panel_cursource (p)->seconds) == 0) return p->default_period; return per; }
false
false
false
false
false
0
decode_lf_string (const uchar *s, int n_chars, char *result) { int i; for (i = 0; i < n_chars; ++i) { if (s[i] == 0x0a) { *result++ = '\0'; break; } else if (s[i] == 0x00) { /* Convert embedded 0's to spaces */ *result++ = ' '; } else { *r...
false
false
false
false
false
0
_zoom_momentum_get(Zoom_Type *st, unsigned int tm_end, double zoom_val) { unsigned int tm_total; if (!st->m_st_tm) /* Init, and we don't start computing momentum yet */ { st->m_st_tm = st->m_prev_tm = tm_end; st->m_base = zoom_val; return 0.0; ...
false
false
false
false
false
0
click() { QMouseEvent me(QEvent::MouseButtonRelease, QPoint(0,0),Qt::LeftButton, Qt::LeftButton, 0); dispatchMouseEvent(&me,EventImpl::CLICK_EVENT, 1); }
false
false
false
false
false
0
rf(C *s,FILE *f) { if(s)*++K=MV(s=scp(s)),*++K=-1; AbortLoad=0; for(;;) { if(!u_f1(f))if(EoF||go()||AbortLoad)break; if(s)--*K; } AbortLoad=0; /* this was a char printf changed to cast */ if(c||v)H("%s OPEN %c\n",b,(char)(c?c:'{')),c=v=0;if(s)K-=2,mf((I *)s); }
false
false
false
false
false
0
mpris_playlists_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) { gpointer* data; gpointer object; data = user_data; object = data[0]; if (strcmp (property_name, "Or...
false
false
false
false
false
0
z_store (void) { zword value = zargs[1]; if (zargs[0] == 0) *sp = value; else if (zargs[0] < 16) *(fp - zargs[0]) = value; else { zword addr = h_globals + 2 * (zargs[0] - 16); SET_WORD (addr, value) } }
false
false
false
false
false
0
gameMoveBy(int change) { if(game().moveByPly(change)) { if(m_training->isChecked()) { slotGameChanged(); } else { slotMoveChanged(); } m_gameView->setFocus(); return true; } return false; }
false
false
false
false
false
0
mpg123_replace_buffer(mpg123_handle *mh, unsigned char *data, size_t size) { if(data == NULL || size < mpg123_safe_buffer()) { mh->err = MPG123_BAD_BUFFER; return MPG123_ERR; } if(mh->own_buffer && mh->buffer.data != NULL) free(mh->buffer.data); mh->own_buffer = FALSE; mh->buffer.data = data; mh->buffer.size...
false
false
false
false
false
0
kook_LET_asm(CTX ctx, kStmtExpr *stmt) { kTerm *tkL = tkNN(stmt, 1); kTerm *tkV = tkNN(stmt, 2); kTerm *tk3 = KNH_TNULL(Term); if (IS_Term(tkV)) { tk3 = tkV; } CALL(ctx, COMPILER_API.LET, 4, stmt, tkL, tkV, tk3); }
false
false
false
false
false
0
mmu_lookup_pagetable(uaecptr addr, int super, int write) { uae_u32 desc, desc_addr, wp; int i; wp = 0; desc = super ? regs.srp : regs.urp; /* fetch root table descriptor */ i = (addr >> 23) & 0x1fc; desc_addr = (desc & MMU_ROOT_PTR_ADDR_MASK) | i; desc = phys_get_long(desc_addr); if ((desc & 2) == 0) { D(b...
false
false
false
false
false
0
setValue(double value) { QString newText = QString("%1").arg(qRound(value)); m_lineEdit->setText(newText); sliderTextEdited(newText, false); }
false
false
false
false
false
0
menubarContainer(bool createIfNotExist) { // creates menu bar ActionContainer *mb = actionManager()->actionContainer(Constants::MENUBAR); if (createIfNotExist && !mb) { mb = actionManager()->createMenuBar(Constants::MENUBAR); mb->appendGroup(Core::Constants::G_GENERAL); mb->appendGro...
false
false
false
false
false
0
gpk_application_package_row_activated_cb (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *col, GpkApplicationPrivate *priv) { GtkTreeModel *model; GtkTreeIter iter; gboolean ret; PkBitfield state; gchar *package_id = NULL; /* get selection */ model = gtk_tree_view_get_model (treeview); ret ...
false
false
false
false
false
0
object_from_item_idx(int item) { if (item >= 0) return &p_ptr->inventory[item]; else return object_byid(0 - item); }
false
false
false
false
false
0
caribou_keyboard_model_populate_group (CaribouKeyboardModel* self, const gchar* group, const gchar* variant) { CaribouGroupModel* result = NULL; CaribouGroupModel* grp = NULL; const gchar* _tmp0_ = NULL; const gchar* _tmp1_ = NULL; const gchar* _tmp2_ = NULL; CaribouGroupModel* _tmp3_ = NULL; CaribouGroupModel* ...
false
false
false
false
false
0
find_worker_by_random(struct work_queue *q, struct work_queue_task *t) { char *key; struct work_queue_worker *w = NULL; struct list *valid_workers = list_create(); int random_worker; hash_table_firstkey(q->worker_table); while(hash_table_nextkey(q->worker_table, &key, (void**)&w)) { if(check_worker_against_tas...
false
false
false
false
false
0
deepcopy(PyObject* object, PyObject* memo) { /* do a deep copy of the given object */ PyObject* args; PyObject* result; if (!elementtree_deepcopy_obj) { PyErr_SetString( PyExc_RuntimeError, "deepcopy helper not found" ); return NULL; } args ...
false
false
false
false
true
1
mimeAddType(mime_t *mime, /* I - MIME database */ const char *super, /* I - Super-type name */ const char *type) /* I - Type name */ { mime_type_t *temp; /* New MIME type */ size_t typelen; /* Length of type name */ DEBUG_printf(("mimeAddType(mime=%p, super=\"%s\", type=\"%s\")", mime...
false
false
false
false
false
0
_k_updateRandomArenaModeArenaList(QListWidgetItem* item) { QString arenaName = arenaMap.value(item->text())->fileName(); arenaName.remove(0, 7); //length of "arenas/" if(item->checkState() == Qt::Checked) { m_tempRandomArenaModeArenaList.append(arenaName); } else { int index ...
false
false
false
false
false
0
makeSessionID(HttpConn *conn) { char idBuf[64]; static int nextSession = 0; mprAssert(conn); /* Thread race here on nextSession++ not critical */ mprSprintf(idBuf, sizeof(idBuf), "%08x%08x%d", PTOI(conn->data) + PTOI(conn), (int) mprGetTime(), nextSession++); return mprGetMD5WithPrefix...
false
false
false
false
false
0
lwres_conf_parsesortlist(lwres_context_t *ctx, FILE *fp) { int delim, res, idx; char word[LWRES_CONFMAXLINELEN]; char *p; lwres_conf_t *confdata; confdata = &ctx->confdata; delim = getword(fp, word, sizeof(word)); if (strlen(word) == 0U) return (LWRES_R_FAILURE); /* Empty line after keyword. */ while (str...
true
true
false
false
false
1
doAction(SoAction *action) // //////////////////////////////////////////////////////////////////////// { SoState *state = action->getState(); // Note, we are not supporting isIgnored flags: if (vertex.getNum() > 0) SoCoordinateElement::set3(state, this, vertex.getNum(), vertex.getValues(0)); i...
false
false
false
false
false
0
expand_shrink_general(obj, shrink, small, conv) CcWnnObject obj; int shrink; int small; int conv; { int status; normalState(obj); if (shrink) { status = jcShrink(JCBUF(obj), small, conv); } else { status = jcExpand(JCBUF(obj), small, conv); } if (status < 0) beep(obj); ccContextClear(CC...
false
false
false
false
false
0
perft(const board_t * board, int depth) { int me; list_t list[1]; int i, move; board_t new_board[1]; ASSERT(board_is_ok(board)); ASSERT(depth_is_ok(depth)); ASSERT(!is_in_check(board,colour_opp(board->turn))); // init NodeNb++; // leaf if (depth == 0) { LeafNb++; retu...
false
false
false
false
false
0
diff_flush_name(struct diff_filepair *p, struct diff_options *opt) { char *path = p->two->path; if (opt->line_termination) path = quote_one(p->two->path); printf("%s%c", path, opt->line_termination); if (p->two->path != path) free(path); }
false
false
false
false
false
0
xlgo(LVAL label) { XLCONTEXT *cptr; LVAL *argv; int argc; /* find a tagbody context */ for (cptr = xlcontext; cptr; cptr = cptr->c_xlcontext) if (cptr->c_flags & CF_GO) { argc = cptr->c_xlargc; argv = cptr->c_xlargv; while (--argc >= 0) if...
false
false
false
false
false
0
arg( void ) { unsigned n = *sp++; char *ap; cell nc = 0; cell *cp = constop + D_DATA + 1; if( n >= gargc ) { *--sp = flag = 0; return; } ap = gargv[ n ]; while( *ap ) { /* copy the string */ *cp++ = *ap++; nc += 1; } constop[ D_DATA ] = nc; /* put the count where it belongs */ fixate_literal_str...
false
false
false
false
false
0
ath10k_wmi_tlv_op_pull_phyerr_ev_hdr(struct ath10k *ar, struct sk_buff *skb, struct wmi_phyerr_hdr_arg *arg) { const void **tb; const struct wmi_tlv_phyerr_ev *ev; const void *phyerrs; int ret; tb = ath10k_wmi_tlv_parse_alloc(ar, skb->data, skb->len, GFP_ATOMIC); if (IS_ERR(tb)) { ret = PTR_ERR(tb)...
false
false
false
false
false
0
mg_userlist_showhide (session *sess, int show) { session_gui *gui = sess->gui; int handle_size; int right_size; right_size = MAX (prefs.hex_gui_pane_right_size, prefs.hex_gui_pane_right_size_min); if (show) { gtk_widget_show (gui->user_box); gui->ul_hidden = 0; gtk_widget_style_get (GTK_WIDGET (gui->hpan...
false
false
false
false
false
0
git__strcasecmp(const char *a, const char *b) { while (*a && *b && tolower(*a) == tolower(*b)) ++a, ++b; return (tolower(*a) - tolower(*b)); }
false
false
false
false
false
0
Lookahead_set(Lookahead *lookahead, gint advance, gpointer data){ register gint index_pos = Lookahead_index_pos(lookahead, advance); g_assert(advance >= 0); g_assert(advance <= lookahead->max_advance); g_assert(!Lookahead_get(lookahead, advance)); lookahead->index[index_pos] = data; lookahead->m...
false
false
false
false
false
0
isHadron() const { if (idSave <= 100 || (idSave >= 1000000 && idSave <= 9000000) || idSave >= 9900000) return false; if (idSave == 130 || idSave == 310) return true; if (idSave%10 == 0 || (idSave/10)%10 == 0 || (idSave/100)%10 == 0) return false; return true; }
false
false
false
false
false
0
BuildRecord(DBData &data, size_t &offset, const IConverter *ic) { DBData temp; if( !FetchRecord(temp, ic) ) return false; // copy the metadata data.SetVersion(temp.GetVersion()); data.SetDBName(temp.GetDBName()); data.SetIds(temp.GetRecType(), temp.GetUniqueId()); data.SetOffset(offset); // copy dat...
false
false
false
false
false
0
check3 (const char *xs, unsigned long y, mpfr_rnd_t rnd_mode, const char *zs) { mpfr_t xx,zz; mpfr_inits2 (53, xx, zz, (mpfr_ptr) 0); mpfr_set_str1 (xx, xs); mpfr_sub_ui (zz, xx, y, rnd_mode); if (mpfr_cmp_str1(zz, zs)) { printf ("expected sum is %s, got ", zs); mpfr_print_binary(zz); p...
false
false
false
false
false
0
disconnect_nobc(struct at_state_t **at_state_p, struct cardstate *cs) { unsigned long flags; spin_lock_irqsave(&cs->lock, flags); ++(*at_state_p)->seq_index; /* revert to selected idle mode */ if (!cs->cidmode) { cs->at_state.pending_commands |= PC_UMMODE; gig_dbg(DEBUG_EVENT, "Scheduling PC_UMMODE");...
false
false
false
false
false
0
requestData(Packet* pack) { CMT3LOGDAT("L3: requestData %p\n",pack); CMT3EXITLOGDAT; if (isXm()) return m_lastResult = XRV_INVALIDOPERATION; Message snd(CMT_MID_REQDATA); m_serial.writeMessage(&snd); return readDataPacket(pack); }
false
false
false
false
false
0
atp_resume(struct usb_interface *iface) { struct atp *dev = usb_get_intfdata(iface); if (dev->open && usb_submit_urb(dev->urb, GFP_ATOMIC)) return -EIO; return 0; }
false
false
false
false
true
1
wc_get_worker_for_name(const char *name, jk_logger_t *l) { jk_worker_t *rc; JK_TRACE_ENTER(l); if (!name) { JK_LOG_NULL_PARAMS(l); JK_TRACE_EXIT(l); return NULL; } rc = jk_map_get(worker_map, name, NULL); if (JK_IS_DEBUG_LEVEL(l)) jk_log(l, JK_LOG_DEBUG, "%s a ...
false
false
false
false
false
0
iwl_pcie_rx_init_rba(struct iwl_rb_allocator *rba) { int i; lockdep_assert_held(&rba->lock); INIT_LIST_HEAD(&rba->rbd_allocated); INIT_LIST_HEAD(&rba->rbd_empty); for (i = 0; i < RX_POOL_SIZE; i++) list_add(&rba->pool[i].list, &rba->rbd_empty); }
false
false
false
false
false
0
odf_button_event_listener (GsfXMLIn *xin, xmlChar const **attrs) { OOParseState *state = (OOParseState *)xin->user_state; char const *event_name = NULL; char const *language = NULL; char const *macro_name = NULL; if (state->cur_control == NULL) return; for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2...
false
false
false
false
false
0
build_protocol_initializer (tree type, tree protocol_name, tree protocol_list, tree inst_methods, tree class_methods) { tree expr, ttyp; location_t loc; VEC(constructor_elt,gc) *inits = NULL; /* TODO: pass the loc in or find it from args. */ loc = input_location; ttyp = build_pointer_type (xref_tag...
false
false
false
false
false
0
write_data_header(IO_CACHE* file) { char buf[LOAD_HEADER_LEN]; int4store(buf + L_THREAD_ID_OFFSET, slave_proxy_id); int4store(buf + L_EXEC_TIME_OFFSET, exec_time); int4store(buf + L_SKIP_LINES_OFFSET, skip_lines); buf[L_TBL_LEN_OFFSET] = (char)table_name_len; buf[L_DB_LEN_OFFSET] = (char)db_len; int4store...
false
false
false
false
false
0
brasero_data_project_clear (BraseroDataProject *self) { BraseroDataProjectPrivate *priv; priv = BRASERO_DATA_PROJECT_PRIVATE (self); if (priv->spanned) { g_slist_free (priv->spanned); priv->spanned = NULL; } /* clear the tables. * NOTE: reference hash doesn't need to be cleared. */ g_hash_table_foreach_r...
false
false
false
false
false
0
execute_sm_if_changed (edge ex, tree mem, tree tmp_var, tree flag) { basic_block new_bb, then_bb, old_dest; bool loop_has_only_one_exit; edge then_old_edge, orig_ex = ex; gimple_stmt_iterator gsi; gimple stmt; struct prev_flag_edges *prev_edges = (struct prev_flag_edges *) ex->aux; bool irr = ex->flags & ...
false
false
false
false
false
0
__ecereInstMeth___ecereNameSpace__ecere__gui__controls__ListBox_OnKeyHit__00000003(struct __ecereNameSpace__ecere__com__Instance * this, unsigned int key, unsigned int ch) { return (key == 0x1C) ? 0x0 : ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, unsigned int key, unsigned int ch))__ecereClass__...
false
false
false
false
false
0
get_first_named_action(resource_t * rsc, const char *action, gboolean only_valid, node_t * current) { action_t *a = NULL; GListPtr action_list = NULL; char *key = generate_op_key(rsc->id, action, 0); action_list = find_actions(rsc->actions, key, current); if (action_list == NULL || action_list->da...
false
false
false
false
false
0
read_entry_variables(struct emf_ObjectData_X* od, int var_alloc_count, int var_size) { // Buffer sizes int old_var_buffer_size, new_var_buffer_size; // Extra size allocated for this entry int var_alloc_size; // Actual nof of read values int var_read_count; var_alloc_size...
false
false
false
false
false
0
write_CollectiveClass(fstream& tex, uint64_t cclassType, vector< string> xLabels, int xnum, MinMaxMsgData minMax) { /***** invocations *****/ write_ybarPlotHead(tex, cclassType, INVOCATIONS, vector<string> (), minMax.count); write_CollectiveClassMetricPlot(tex, cclassType, INVOCATIONS, x...
false
false
false
false
false
0
readSettings() { QSettings settings(m_console->m_dir->name(), "bat"); settings.beginGroup("FileSet"); restoreGeometry(settings.value("geometry").toByteArray()); settings.endGroup(); }
false
false
false
false
false
0
addWhiteSpaceXlate(const char* txt, char* xlateTable) { char c = 0; char outChar = 0; if (sscanf(txt, "%c %c", &c, &outChar) != 2) return; xlateTable[(int)' '] = outChar; xlateTable[(int)'\t'] = outChar; }
false
false
false
false
false
0
xfs_dir3_data_put_ftype( struct xfs_dir2_data_entry *dep, __uint8_t type) { ASSERT(type < XFS_DIR3_FT_MAX); ASSERT(dep->namelen != 0); dep->name[dep->namelen] = type; }
false
false
false
false
false
0
searchSubmit() { // return hit / key pressed if (text() != "") { filtered = true; mode == Search ? submitQuery(text()) : submitFilter(text()); } }
false
false
false
false
false
0
strip_trailing_slashes (char *file) { char *base = last_component (file); char *base_lim; bool had_slash; /* last_component returns "" for file system roots, but we need to turn "///" into "/". */ if (! *base) base = file; base_lim = base + base_len (base); had_slash = (*base_lim != '\0'); *b...
false
false
false
false
false
0
dotype(const char *arg) { replycode = 200; /* bloody awful hack */ if (!arg || !*arg) { addreply(501, MSG_MISSING_ARG "\n" "A(scii) I(mage) L(ocal)"); } else if (tolower((unsigned char) *arg) == 'a') type = 1; else if (tolower((unsigned char) *arg) == 'i') type = 2; ...
false
false
false
false
false
0
slot_get(struct gfs2_quota_data *qd) { struct gfs2_sbd *sdp = qd->qd_sbd; unsigned int bit; int error = 0; spin_lock(&sdp->sd_bitmap_lock); if (qd->qd_slot_count != 0) goto out; error = -ENOSPC; bit = find_first_zero_bit(sdp->sd_quota_bitmap, sdp->sd_quota_slots); if (bit < sdp->sd_quota_slots) { set_bit(...
false
false
false
false
false
0
jsvSetValueOfName(JsVar *name, JsVar *src) { assert(name && jsvIsName(name)); assert(name!=src); // no infinite loops! // all is fine, so replace the existing child... /* Existing child may be null in the case of Z = 0 where * we create 'Z' and pass it down to '=' to have the value * filled in (or it may ...
false
false
false
false
false
0
countAddr() { SPtr< TOpt> ptr; SubOptions.first(); int count = 0; while ( ptr = SubOptions.get() ) { if (ptr->getOptType() == OPTION_IAADDR) count++; } return count; }
false
false
false
false
false
0
Image_resizeTo(Image *self, int w, int h, Image *outImage) { int componentCount = self->componentCount; int inStride = self->width * componentCount; uint8_t *inPtr = Image_data(self); int outStride = w * componentCount; uint8_t *outPtr; int y; UArray *outUArray = UArray_new(); UArray_setSize_(outUArray, h *...
false
true
false
false
false
1
check_autovacuum_work_mem(int *newval, void **extra, GucSource source) { /* * -1 indicates fallback. * * If we haven't yet changed the boot_val default of -1, just let it be. * Autovacuum will look to maintenance_work_mem instead. */ if (*newval == -1) return true; /* * We clamp manually-set values to...
false
false
false
false
false
0
get_context_class_tag (GtkSourceContextEngine *ce, gchar const *name) { GtkTextTag *ret; ret = g_hash_table_lookup (ce->priv->context_classes, name); if (ret == NULL) { ret = gtk_text_buffer_create_tag (ce->priv->buffer, NULL, NULL); g_object_set_data_full (G_OBJECT (ret), ...
false
false
false
false
false
0
e820_reserve_resources(void) { int i; struct resource *res; u64 end; res = alloc_bootmem(sizeof(struct resource) * e820.nr_map); e820_res = res; for (i = 0; i < e820.nr_map; i++) { end = e820.map[i].addr + e820.map[i].size - 1; if (end != (resource_size_t)end) { res++; continue; } res->name = e820_...
false
false
false
false
false
0
is_sa(const ubyte_t *T, int *SA, int n) { if ((T == NULL) || (SA == NULL) || (n < 0)) return -1; SA[0] = n; if (n <= 1) { if (n == 1) SA[1] = 0; return 0; } return sais_main(T, SA+1, 0, n, 256, 1); }
false
false
false
false
false
0
notify_destroy (gpointer pdata, GObject *obj) { gboolean *data = (gboolean*)pdata; if (! (*data)) *data = TRUE; }
false
false
false
false
false
0