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
expand_token_type(CSTOKEN_TYPE t_type, int more) { switch (t_type) { case CS_OP_EXISTS: return "?"; case CS_OP_NOT: return "!"; case CS_OP_NUM: return "#"; case CS_OP_EQUAL: return "=="; case CS_OP_NEQUAL: return "!="; case CS_OP_LT: return "<"; case CS_OP_LTE: return "<="; case CS_O...
false
false
false
false
false
0
cap_and(sqlite3_context *context, int argc, sqlite3_value **argv){ int i, j; const char *z; char set[26]; char zResult[27]; if( argc!=2 ) return; for(i=0; i<26; i++) set[i] = 0; z = (const char*)sqlite3_value_text(argv[0]); if( z ){ for(i=0; z[i]; i++){ if( z[i]>='a' && z[i]<='z' ) set[z[i]-'a...
false
false
false
false
false
0
HasSharedSubdirectory(const CPath& path) { SharedMap::iterator it = m_lstShared.upper_bound(GetKey(path) + wxFileName::GetPathSeparator()); if (it == m_lstShared.end()) { return false; } // upper_bound() doesn't find the directory itself, so no need to check for that. return it->second.StartsWith(path); }
false
false
false
false
false
0
keyspan_fake_startup(struct usb_serial *serial) { char *fw_name; dev_dbg(&serial->dev->dev, "Keyspan startup version %04x product %04x\n", le16_to_cpu(serial->dev->descriptor.bcdDevice), le16_to_cpu(serial->dev->descriptor.idProduct)); if ((le16_to_cpu(serial->dev->descriptor.bcdDevice) & 0x8000) != 0x...
false
false
false
false
false
0
cb_key_press(GtkWidget *widget, GdkEventKey *event, gpointer userdata) { gboolean result = FALSE; if (event->type == GDK_KEY_PRESS) { switch (event->keyval) { case GDK_b: cb_button_clicked(widget, (gpointer)NEXT_BUTTON); result = TRUE; ...
false
false
false
false
false
0
ProcessRepliesIfAny(void) { unsigned char firstchar; int r; int received = false; for (;;) { r = pq_getbyte_if_available(&firstchar); if (r < 0) { /* unexpected error or EOF */ ereport(COMMERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), errmsg("unexpected EOF on standby connection"))); ...
false
false
false
false
false
0
overlapsLine(int line) const { return line >= start().line() && line <= end().line(); }
false
false
false
false
false
0
UpdateName( void ) { // don't do a thing if we're not fully synced if ( this->ID() == 0 && nameFromClient_.Len() <= 1 && sn_GetNetState() == nSERVER ) return; // monitor name changes eNameMessenger messenger( *this ); // apply client change, stripping excess spaces if ( sn_GetNetState(...
false
false
false
false
false
0
device_id_check(const char *modname, const char *device_id, unsigned long size, unsigned long id_size, void *symval) { int i; if (size % id_size || size < id_size) { if (cross_build != 0) return; fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo " "of the size of section __mod_%...
false
false
false
false
false
0
salist_ref (alist, key) StringAlist *alist; const char *key; { StringAlist *var; for (var = alist; var != NULL; var = var->next) if (strcmp (key, var->key) == 0) return var->value; return NULL; }
false
false
false
false
false
0
btree_close(btree* bt) { int result = 0; node_cache_close(bt); // a dirty header without alloc_bits must not happen, mmh if ((bt->attributes & BTREE_HEADDIRTY) && bt->alloc_bits) { btree_head* head = &bt->head; btree_node_desc* node = &bt->head_node; UInt16 node_size = head->no...
false
false
false
false
false
0
is_pmbr_valid(blkid_probe pr) { int flags = blkid_partitions_get_flags(pr); unsigned char *data; struct dos_partition *p; int i; if (flags & BLKID_PARTS_FORCE_GPT) goto ok; /* skip PMBR check */ data = blkid_probe_get_sector(pr, 0); if (!data) goto failed; if (!is_valid_mbr_signature(data)) goto fail...
false
false
false
false
false
0
makeColor(String str, Attribute deflt) { if (str.isEmpty()) return deflt; else if (('a' <= str[0] && str[0] <= 'z') || ('A' <= str[0] && str[0] <= 'Z')) return Attribute(true, str); else return Attribute(Color(str)); }
false
false
false
false
false
0
alx_free_irq(struct alx_priv *alx) { struct pci_dev *pdev = alx->hw.pdev; free_irq(pdev->irq, alx); if (alx->msi) { pci_disable_msi(alx->hw.pdev); alx->msi = false; } }
false
false
false
false
false
0
GC_local_malloc_atomic(size_t bytes) { if (EXPECT(!SMALL_ENOUGH(bytes), 0)) { return(GC_malloc_atomic(bytes)); } else { int index = INDEX_FROM_BYTES(bytes); ptr_t * my_fl = ((GC_thread)GC_getspecific(GC_thread_key)) -> tlfs.ptrfree_freelists + index; ptr_t my_entry = *my_fl; if (EXPEC...
false
false
false
false
false
0
calc_R_and_r(PStreamChol *pst, const int m) { register int i, j, k, l, n; double wu; for (i = 0; i < pst->T; i++) { pst->r[i] = pst->mseq[i][m]; pst->R[i][0] = pst->ivseq[i][m]; for (j = 1; j < pst->width; j++) pst->R[i][j] = 0.0; for (j = 1; j < pst->dw.num; j++) { for (k = pst...
false
false
false
false
false
0
xsh_shift_tab_create( xsh_instrument * instrument ) { xsh_shift_tab * result = NULL; XSH_MODE mode; XSH_ASSURE_NOT_NULL( instrument ) ; /* allocate memory */ XSH_CALLOC( result, xsh_shift_tab, 1); check (result->header = cpl_propertylist_new()); check( mode = xsh_instrument_get_mode( instrument)); re...
false
false
false
false
false
0
phy_disable_interrupts(struct phy_device *phydev) { int err; /* Disable PHY interrupts */ err = phy_config_interrupt(phydev, PHY_INTERRUPT_DISABLED); if (err) goto phy_err; /* Clear the interrupt */ err = phy_clear_interrupt(phydev); if (err) goto phy_err; return 0; phy_err: phy_error(phydev); return...
false
false
false
false
false
0
glade_widget_action_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GladeWidgetAction *action = GLADE_WIDGET_ACTION (object); g_return_if_fail (GLADE_IS_WIDGET_ACTION (object)); switch (prop_id) { case PROP_CLASS: act...
false
false
false
false
false
0
EmitConstant(uint64_t Val, unsigned Size, raw_ostream &OS) const { // Output the constant in little endian byte order. for (unsigned i = 0; i != Size; ++i) { unsigned Shift = IsLittleEndian ? i * 8 : (Size - 1 - i) * 8; EmitByte((Val >> Shift) & 0xff, OS); } }
false
false
false
false
false
0
max14577_charger_probe(struct platform_device *pdev) { struct max14577_charger *chg; struct power_supply_config psy_cfg = {}; struct max14577 *max14577 = dev_get_drvdata(pdev->dev.parent); int ret; chg = devm_kzalloc(&pdev->dev, sizeof(*chg), GFP_KERNEL); if (!chg) return -ENOMEM; platform_set_drvdata(pdev, ...
false
false
false
false
false
0
gfs_domain_split (GfsDomain * domain, gboolean one_box_per_pe) { SplitPar p; g_return_if_fail (domain != NULL); p.newboxp = gfs_temporary_variable (domain); gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, 1, (FttCellTraverseFunc) gfs_cell_reset, p.newboxp); p.boxlist = NULL; p.b...
false
false
false
false
false
0
picolcd_init_backlight(struct picolcd_data *data, struct hid_report *report) { struct device *dev = &data->hdev->dev; struct backlight_device *bdev; struct backlight_properties props; if (!report) return -ENODEV; if (report->maxfield != 1 || report->field[0]->report_count != 1 || report->field[0]->report_size...
false
false
false
false
false
0
value(VM &vm, const VarStyleObj *, Vector<size_t> &) const { if (value_) return vm.interp->makeTrue(); else return vm.interp->makeFalse(); }
false
false
false
false
false
0
callback(void) { if(0) { cout << " usart module TXREG::" << __FUNCTION__ << "\n"; } last_time = get_cycles().get(); start_time = last_time; if(txpin) { txpin->putState((txr & 1) ? true : false); if (0) { cout << "usart tx module sent a " << (txr&1) << ...
false
false
false
false
false
0
check(int n, TProtoFunc* tf, int at, int sp, int ss) { if (n==0) return sp; sp+=n; if (sp<00) UNSAFE("stack underflow (sp=%d)"),sp,ATLOC; if (sp>ss) UNSAFE("stack overflow (sp=%d ss=%d)"),sp,ss,ATLOC; return sp; }
false
false
false
false
false
0
set_gpass_option(struct mg_context *ctx) { struct file file; const char *path = ctx->config[GLOBAL_PASSWORDS_FILE]; if (path != NULL && !mg_stat(fc(ctx), path, &file)) { cry(fc(ctx), "Cannot open %s: %s", path, strerror(ERRNO)); return 0; } return 1; }
false
false
false
false
false
0
p_check_workpoint_file_and_use_single_fade_if_missing(GapMorphGlobalParams *mgpp) { if(g_file_test(&mgpp->workpoint_file_lower[0], G_FILE_TEST_EXISTS)) { mgpp->do_simple_fade = FALSE; /* use morph algortihm when workpoint file is available */ } else { mgpp->do_simple_fade = TRUE; /* u...
false
false
false
false
false
0
__local_memcache_create(const char *namespace, size_t size, long min_alloc_size, int force, int *ok, lmc_error_t* e) { int d; if (!ok) { ok = &d; } *ok = 1; local_memcache_t *lmc = calloc(1, sizeof(local_memcache_t)); if (!lmc || (lmc->namespace = strdup(namespace)) == NULL) return NULL; lmc->size = si...
false
false
false
false
false
0
findScript(int32_t script) const { if(script < 0 || 0xffff < script) { return -1; } for(int32_t i = 0; i < scriptsLength;) { int32_t limit = i + 2 + scripts[i + 1]; for(int32_t j = i + 2; j < limit; ++j) { if(script == scripts[j]) { return i; } } i = limit; } ...
false
false
false
false
false
0
Over(FloatLigne *a, float tresh) { Reset(); if ( a->runs.empty() ) { return; } bool startExists = false; float lastStart = 0; float lastEnd = 0; for (int i = 0; i < int(a->runs.size()); i++) { float_ligne_run runA = a->runs[i]; if ( runA.vst >= tresh ) { ...
false
false
false
false
false
0
luaH_getstr (Table *t, TString *key) { Node *n = hashstr(t, key); lua_assert(key->tt == LUA_TSHRSTR); for (;;) { /* check whether 'key' is somewhere in the chain */ const TValue *k = gkey(n); if (ttisshrstring(k) && eqshrstr(tsvalue(k), key)) return gval(n); /* that's it */ else { int nx...
false
false
false
false
false
0
on_buffer_insert_text (GtkTextBuffer *buffer, GtkTextIter *iter, gchar const *text, gint len, GitgDiffView *view) { if (view->priv->ignore_changes) { return; } /* if region is in current view and not scanne...
false
false
false
false
false
0
colorFor(QString text) { QColor color = defaultColor; foreach(QString code, workoutCodes.keys()) { if (text.contains(code, Qt::CaseInsensitive)) { color = workoutCodes[code]; } } return color; }
false
false
false
false
false
0
operator<<( std::ostream &out, GRA_colorMap const &cmap ) { if( cmap.name_ == wxT("USERDEFINED") ) { int cmapSize = cmap.colors_.size(); out << "<colormap name=\"USERDEFINED\" size=\"" << cmapSize << "\">\n"; for( int i=0; i<cmapSize; ++i )out << *cmap.colors_[i]; out << "</colormap>\n"; } else ...
false
false
false
false
false
0
create_privacy_prefs(gpointer key, gpointer _value, gpointer user_data) { GString *str = (GString *) user_data; gchar *encvalue; gchar *value = (gchar *) _value; if (str->len > 0) g_string_append_c(str, ','); encvalue = g_malloc0(B64LEN(strlen(value)) + 1); base64_encode(encvalue, (gchar *) value, strlen(valu...
false
false
false
false
false
0
SaveMeta ( int iDiskChunks ) { // sanity check if ( m_iLockFD<0 ) return; // write new meta CSphString sMeta, sMetaNew; sMeta.SetSprintf ( "%s.meta", m_sPath.cstr() ); sMetaNew.SetSprintf ( "%s.meta.new", m_sPath.cstr() ); CSphString sError; CSphWriter wrMeta; if ( !wrMeta.OpenFile ( sMetaNew, sError ) ) ...
false
false
false
false
false
0
__ohamt_down(struct ohamt_root *root, struct ohamt_state *s) { if (!slot_is_leaf(*s->ptr[s->level])) { struct ohamt_node *node = slot_to_node(root->mem, *s->ptr[s->level]); int slice = set_first(node->mask); s->hash = slice_set(s->hash, slice, s->level); int slot = set_slot_number(node->mask, sl...
false
false
false
false
false
0
vsn_printf(char* dst, size_t size, const char* format, va_list args) { int ret = vsnprintf(dst, size, format, args); if (ret >= size || ret < 0) { string_overflow_handler("Buffer truncated '%s'\n",dst); } return ret; }
false
false
false
false
false
0
_dbus_free_smartphone_data_world_sync_get_timezones_for_country_code (FreeSmartphoneDataWorldSync* self, GVariant* parameters, GDBusMethodInvocation* invocation) { GError* error = NULL; GVariantIter _arguments_iter; gchar* country_code = NULL; GVariant* _tmp367_; GDBusMessage* _reply_message; GVariant* _reply; G...
false
false
false
false
false
0
getRelocationTypeName( DataRefImpl Rel, SmallVectorImpl<char> &Result) const { const coff_relocation *Reloc = toRel(Rel); StringRef Res; switch (getMachine()) { case COFF::IMAGE_FILE_MACHINE_AMD64: switch (Reloc->Type) { LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_AMD64_ABSOLUTE); LLVM_COFF_SWITC...
false
false
false
false
false
0
lpfc_cmpl_els_npiv_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, struct lpfc_iocbq *rspiocb) { struct lpfc_vport *vport = cmdiocb->vport; IOCB_t *irsp; struct lpfc_nodelist *ndlp; struct Scsi_Host *shost = lpfc_shost_from_vport(vport); ndlp = (struct lpfc_nodelist *)cmdiocb->context1; irsp = &rspioc...
false
false
false
false
false
0
test_dns_resolver_create() { dns_resolver_t *resolver = NULL; t_assert("test_dns_resolver_create", 1, T_REQUIRED, "%s", "a resolver can be created successfully"); setup(); CHECK(make_resolver(&resolver)); destroy_resolver(&resolver); teardown(); t_result(T_PASS); }
false
false
false
false
false
0
iblock_end_io_flush(struct bio *bio) { struct se_cmd *cmd = bio->bi_private; if (bio->bi_error) pr_err("IBLOCK: cache flush failed: %d\n", bio->bi_error); if (cmd) { if (bio->bi_error) target_complete_cmd(cmd, SAM_STAT_CHECK_CONDITION); else target_complete_cmd(cmd, SAM_STAT_GOOD); } bio_put(bio); }
false
false
false
false
false
0
OnSpeakerChanged(cricket::Call* call, cricket::Session* session, const cricket::StreamParams& speaker) { if (!speaker.has_ssrcs()) { console_->PrintLine("Session %s has no current speaker.", session->id().c_str()); } els...
false
false
false
false
false
0
generate_sq_res_0x100 (int limb_bits) { int i, res; nsq_res_0x100 = (0x100 + limb_bits - 1) / limb_bits; sq_res_0x100 = xmalloc (nsq_res_0x100 * sizeof (*sq_res_0x100)); for (i = 0; i < nsq_res_0x100; i++) mpz_init_set_ui (sq_res_0x100[i], 0L); for (i = 0; i < 0x100; i++) { res = (i * i) % 0...
false
false
false
false
false
0
ssl_putc_flush(SSL *ssl_con) { if (putc_buf_pos>0) { if (SSL_write(ssl_con,putc_buf,putc_buf_pos)!=putc_buf_pos) { if (ssl_debug_flag) { BIO_printf(bio_err,"ssl_putc_flush: WRITE FAILED\n"); } putc_buf_pos=0; return -1; } } putc_buf_pos=0; return 0; }
false
false
false
false
false
0
e820_print_map(char *who) { int i; for (i = 0; i < e820.nr_map; i++) { printk(KERN_INFO "%s: [mem %#018Lx-%#018Lx] ", who, (unsigned long long) e820.map[i].addr, (unsigned long long) (e820.map[i].addr + e820.map[i].size - 1)); e820_print_type(e820.map[i].type); printk(KERN_CONT "\n")...
false
false
false
false
false
0
P_ThingHeightClip(mobj_t * thing) { boolean onfloor; onfloor = (thing->z == thing->floorz); P_CheckPosition(thing, thing->x, thing->y); // what about stranding a monster partially off an edge? thing->floorz = tmfloorz; thing->ceilingz = tmceilingz; if (onfloor) // walking monster...
false
false
false
false
false
0
SerializeUncovered(const string& source, const string& target, float weight){ stringstream output, outputinv; output << source << " [X] ||| " << target << " [X] ||| 0-0 ||| " << weight; outputinv << target << " [X] ||| " << source << " [X] ||| 0-0 ||| " << weight; return pair<string,string>(output.str(),out...
false
false
false
false
false
0
rowItems(int item_) { // This method returns a vector of all the items in the row that // contains the specified item_. Items are in ascending order. // First find out which column the current item is in int count=0; unsigned i; for (i=0;i<columns();i++) { int rows=rowCount(i); if (item_>=co...
false
false
false
false
false
0
apply_method_num(id,inst_num) element_id id; int inst_num; /* method instance number */ { struct method_instance *m; struct element *e_ptr; int type; /* of element */ struct gen_quant_method *gm; int i; /* search for method */ if ( inst_num < -meth_inst_count ) { kb_error(2178,"Internal error: Und...
false
false
false
false
false
0
assign(int n, bool value) { resize(n); uint32_t bits = (value ? 0xFFFFFFFFU : 0U); int copy = max_word(); for (int i = 0; i <= copy; i++) _data[i] = bits; if (value) clear_last(); return *this; }
false
false
false
false
false
0
logprint( s ) register char *s; { static int docomment = 1; while( *s != '\0' ) { if( docomment ) { (void) putc( '|', logfile ); (void) putc( ' ', logfile ); docomment = 0; } (void) putc( *s, logfile ); if( *s++ == '\n' ) docomment = 1; } }
false
false
false
false
false
0
__midgard_user_logout (MidgardUser *self) { g_return_val_if_fail(self != NULL, FALSE); g_return_val_if_fail(MIDGARD_IS_USER (self), FALSE); MidgardConnection *mgd = MGD_OBJECT_CNC (self); g_return_val_if_fail(mgd != NULL, FALSE); MIDGARD_ERRNO_SET(mgd, MGD_ERR_OK); GSList *list = mgd->priv->authstack; if (li...
false
false
false
false
false
0
setup_push_upstream(struct remote *remote) { struct strbuf refspec = STRBUF_INIT; struct branch *branch = branch_get(NULL); if (!branch) die(_("You are not currently on a branch.\n" "To push the history leading to the current (detached HEAD)\n" "state now, use\n" "\n" " git push %s HEAD:...
false
false
false
false
false
0
Java_com_sleepycat_db_internal_db_1javaJNI_DbSequence_1get_1key(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobject jarg2) { struct DbSequence *arg1 = (struct DbSequence *) 0 ; DBT *arg2 = (DBT *) 0 ; DBT_LOCKED ldbt2 ; db_ret_t result; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(struc...
false
false
false
false
false
0
show_mltiline(char *s) { int i; if (s != CNULL) { for (i = 0; s[i] != '\0'; i++) { if (s[i] == '\n') putchar('\\'); putchar(s[i]); } } putchar('\n'); }
false
false
false
false
false
0
smsc_ircc_start_interrupts(struct smsc_ircc_cb *self) { unsigned long flags; spin_lock_irqsave(&self->lock, flags); self->io.speed = 0; smsc_ircc_change_speed(self, SMSC_IRCC2_C_IRDA_FALLBACK_SPEED); spin_unlock_irqrestore(&self->lock, flags); }
false
false
false
false
false
0
find_any_client(const char *name) { struct Client *target_p; rb_dlink_node *ptr; unsigned int hashv; s_assert(name != NULL); if(EmptyString(name)) return NULL; /* hunting for an id, not a nick */ if(IsDigit(*name)) return (find_id(name)); hashv = hash_nick(name); RB_DLINK_FOREACH(ptr, clientTable[hashv...
false
false
false
false
false
0
AdvanceParameters() {//============================ // Called every 64 samples to increment the formant freq, height, and widths int x; int ix; static int Flutter_ix = 0; // advance the pitch wdata.pitch_ix += wdata.pitch_inc; if((ix = wdata.pitch_ix>>8) > 127) ix = 127; x = wdata.pitch_env[ix] * wdata.pitch_r...
false
false
false
false
false
0
chk_1wire(struct net_t *np) { struct sy_t *syp; syp = np->nsym; if (!syp->sydecl) { if (syp->sytyp == SYM_CA || syp->sytyp == SYM_PTH || syp->sytyp == SYM_TCHK) { __gferr(1147, syp->syfnam_ind, syp->sylin_cnt, "constructed internal %s %s may not appear in source - only as run time string", ...
false
false
false
false
false
0
gm_world_text_view_tags_overlap(GtkTextTag *t1, GtkTextTag *t2) { int i = 0; gboolean val1, val2; while (tag_checks[i]) { g_object_get(G_OBJECT(t1), tag_checks[i], &val1, NULL); g_object_get(G_OBJECT(t2), tag_checks[i], &val2, NULL); if (val1 && val2) { return TRUE; } ++i; } return FALSE;...
false
false
false
false
false
0
read_recarray(void *base, long eltsize, long numelts, file_info *field_info, char *rectype, long file_offset, long file_blocksize) { long i; file_info *curr; uchar *file_data; if (numelts==0) return NULL; if (int_buff) set_ibuff(file_offset,compute_recsize(field_info)); else buffreopen...
false
false
false
false
false
0
ReadPoints (istream& in, void* addr1, void* addr2, void* addr3, void* addr4) { Coord* x, *y; int n, bad; char ch = in.peek(); if (ch != ')' && ch != ':') bad = ParamList::parse_points(in, x, y, n); else { x = y = nil; n = 0; bad = 0; } if (!in.good() || bad) { delete x; delete ...
false
false
false
false
false
0
check_spell_expiry(object *spell) { const char *key; if (!spell->env || !spell->env->type == PLAYER) return; key = object_get_value(spell, "spell_expiry_warn_1"); if (key != NULL) { if (spell->duration == atoi(key)) { draw_ext_info_format(NDI_UNIQUE|NDI_NAVY, 0, spell->env,...
false
false
false
false
false
0
SimplifyFAddInst(Value *Op0, Value *Op1, FastMathFlags FMF, const Query &Q, unsigned MaxRecurse) { if (Constant *CLHS = dyn_cast<Constant>(Op0)) { if (Constant *CRHS = dyn_cast<Constant>(Op1)) { Constant *Ops[] = { CLHS, CRHS }; return ConstantFoldInstOperands(Instruction...
false
false
false
false
false
0
gkm_secret_module_dispose (GObject *obj) { GkmSecretModule *self = GKM_SECRET_MODULE (obj); if (self->tracker) g_object_unref (self->tracker); self->tracker = NULL; if (self->session_credential) g_object_unref (self->session_credential); self->session_credential = NULL; g_hash_table_remove_all (self->colle...
false
false
false
false
false
0
deliver_sms_to_queue(Msg *msg, Boxc *conn) { Msg *mack; int rc; /* * save modifies ID and time, so if the smsbox uses it, save * it FIRST for the reply message!!! */ mack = msg_create(ack); gw_assert(mack != NULL); uuid_copy(mack->ack.id, msg->sms.id); mack->ack.time = msg->s...
false
false
false
false
false
0
metacoordinateadaptorCacheInit(EnsPMetacoordinateadaptor mca) { ajuint csid = 0U; ajint length = 0; ajuint *Pcsid = NULL; ajint *Plength = NULL; AjPList css = NULL; AjPList list = NULL; AjPTable table = NULL; AjISqlrow sqli = NULL; AjPSqlrow sqlr = NULL; Aj...
false
false
false
false
false
0
entry_vattr_size(Slapi_Entry *e) { size_t size = 0; Slapi_Vattr *vattr = NULL; VATTR_READ_LOCK(e); for (vattr = e->e_virtual_attrs; vattr != NULL; vattr = vattr->next) { if (vattr->attrname != NULL) { size += strlen(vattr->attrname); ...
false
false
false
false
false
0
get(PointerType *Ty) { ConstantPointerNull *&Entry = Ty->getContext().pImpl->CPNConstants[Ty]; if (!Entry) Entry = new ConstantPointerNull(Ty); return Entry; }
false
false
false
false
false
0
Write(const char *_fileName) { if(_fileName != NULL) { FileName(_fileName); } M_SetupWriteFields(); if(!m_WriteStream) { m_WriteStream = new METAIO_STREAM::ofstream; } #ifdef __sgi // Create the file. This is required on some older sgi's METAIO_STREAM::ofstream tFile(m_FileName, M...
false
false
false
false
false
0
Edit (TextBuffer* t, int index) { delete display; display = new TextDisplay(); display->Draw(output, canvas); display->LineHeight(lineheight); display->TabWidth(tabsize * shape->hunits); text = t; int lines = text->Height(); for (int i = 0; i < lines; ++i) { int bol = text->LineI...
false
false
false
false
false
0
initialize_indentation_params (IndentCPlugin *plugin) { plugin->smart_indentation = g_settings_get_boolean (plugin->settings, PREF_INDENT_AUTOMATIC); /* Disable editor intern auto-indent if smart indentation is enabled */ ianjuta_editor_set_auto_indent (IANJUTA_EDITOR(plugin->current_editor), ...
false
false
false
false
false
0
hyperlink_to_user(const char *zU, const char *zD, const char *zSuf){ if( zU==0 || zU[0]==0 ) zU = "anonymous"; if( zSuf==0 ) zSuf = ""; if( g.perm.Hyperlink ){ if( zD && zD[0] ){ cgi_printf("%z%h</a>%s\n",(href("%R/timeline?c=%T&u=%T",zD,zU)),(zU),(zSuf)); }else{ cgi_printf("%z%h</a>%s\n",(hre...
false
false
false
false
false
0
gpiochip_irqchip_irq_valid(const struct gpio_chip *gpiochip, unsigned int offset) { /* No mask means all valid */ if (likely(!gpiochip->irq_valid_mask)) return true; return test_bit(offset, gpiochip->irq_valid_mask); }
false
false
false
false
false
0
jack_session_notify(jack_client_t* ext_client, const char* target, jack_session_event_type_t ev_type, const char* path) { JackGlobals::CheckContext("jack_session_notify"); JackClient* client = (JackClient*)ext_client; jack_log("jack_session_notify ext_client %x client %x ", ext_client, client); if (cli...
false
false
false
false
false
0
restore_expansion (uae_u8 *src) { fastmem_start = restore_u32 (); z3fastmem_start = restore_u32 (); gfxmem_start = restore_u32 (); rtarea_base = restore_u32 (); if (rtarea_base != 0 && rtarea_base != RTAREA_DEFAULT && rtarea_base != RTAREA_BACKUP) rtarea_base = 0; return src; }
false
false
false
false
false
0
importSection(QTextStream& stream, const QString& section, SpellingType spellingType) { //locate section QString line; while(true) { if(stream.atEnd()) { return false; } line = stream.readLine(); if(line.startsWith("...
false
false
false
false
false
0
mailimap_continue_req_free(struct mailimap_continue_req * cont_req) { switch (cont_req->cr_type) { case MAILIMAP_CONTINUE_REQ_TEXT: mailimap_resp_text_free(cont_req->cr_data.cr_text); break; case MAILIMAP_CONTINUE_REQ_BASE64: mailimap_base64_free(cont_req->cr_data.cr_base64); break; } free(con...
false
false
false
false
false
0
unreg_handler(t_handler htype) { switch (htype) { case HDLR_KEYS: ms->keys_handler = NULL; break; default: ms->handler = NULL; break; } }
false
false
false
false
false
0
sirdev_alloc_buffers(struct sir_dev *dev) { dev->tx_buff.truesize = SIRBUF_ALLOCSIZE; dev->rx_buff.truesize = IRDA_SKB_MAX_MTU; /* Bootstrap ZeroCopy Rx */ dev->rx_buff.skb = __netdev_alloc_skb(dev->netdev, dev->rx_buff.truesize, GFP_KERNEL); if (dev->rx_buff.skb == NULL) return -ENOMEM; skb_reserv...
false
false
false
false
false
0
r100_set_surface_reg(struct radeon_device *rdev, int reg, uint32_t tiling_flags, uint32_t pitch, uint32_t offset, uint32_t obj_size) { int surf_index = reg * 16; int flags = 0; if (rdev->family <= CHIP_RS200) { if ((tiling_flags & (RADEON_TILING_MACRO|RADEON_TILING_MICRO)) == (RADEON_TILING_MACRO|RAD...
false
false
false
false
false
0
formula_size(Formula f) { if (f->type == ATOM_FORM) return 1; else { int i; int n = 0; for (i = 0; i < f->arity; i++) n += formula_size(f->kids[i]); return n+1; } }
false
false
false
false
false
0
event_text(const char *data, SERVER_REC *server, EXEC_WI_REC *item) { if (!IS_EXEC_WI(item)) return; net_sendbuffer_send(item->process->out, data, strlen(data)); net_sendbuffer_send(item->process->out, "\n", 1); signal_stop(); }
false
false
false
false
false
0
remove_illegal_mods(LDAPMod **mods) { int i, j; LDAPMod *tmp; /* remove any attempts by the user to modify these attrs */ for ( i = 0; mods[i] != NULL; i++ ) { if ( strcasecmp( mods[i]->mod_type, numsubordinates ) == 0 || strcasecmp( mods[i]->mod_type, hassubordinates ) == 0 ) { tmp = mods[i]; fo...
false
false
false
false
false
0
lib_run_prog_sync (char **argv, gretlopt opt, PRN *prn) { gchar *sout = NULL; gchar *errout = NULL; gint status = 0; GError *gerr = NULL; int err = 0; g_spawn_sync(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &sout, &errout, &status, &gerr); if (gerr != NULL) { pprintf(prn, "%...
false
false
false
false
false
0
infc_browser_node_add_subdirectory(InfcBrowser* browser, InfcBrowserNode* parent, guint id, const gchar* name) { InfcBrowserPrivate* priv; InfcBrowserNode* node; g_assert(parent->type == INFC_BROWSER_NODE_SUB...
false
false
false
false
false
0
ili210x_read_reg(struct i2c_client *client, u8 reg, void *buf, size_t len) { struct i2c_msg msg[2] = { { .addr = client->addr, .flags = 0, .len = 1, .buf = &reg, }, { .addr = client->addr, .flags = I2C_M_RD, .len = len, .buf = buf, } }; if (i2c_transfer(client->adapter, msg, 2...
false
false
false
false
false
0
gfs2_lookup_root(struct super_block *sb, struct dentry **dptr, u64 no_addr, const char *name) { struct gfs2_sbd *sdp = sb->s_fs_info; struct dentry *dentry; struct inode *inode; inode = gfs2_inode_lookup(sb, DT_DIR, no_addr, 0, 0); if (IS_ERR(inode)) { fs_err(sdp, "can't read in %s inode: %ld\n", name, P...
false
false
false
false
false
0
process_state_iv_ctc(t30_state_t *s, const uint8_t *msg, int len) { switch (msg[2] & 0xFE) { case T30_CTR: /* Valid response to a CTC received */ /* T.30 says we change back to long training here */ s->short_train = FALSE; /* Initiate resending of the remainder of the frames....
false
false
false
false
false
0
tuplesort_heap_insert(Tuplesortstate *state, SortTuple *tuple, int tupleindex, bool checkIndex) { SortTuple *memtuples; int j; /* * Save the tupleindex --- see notes above about writing on *tuple. It's a * historical artifact that tupleindex is passed as a separate argument * and not in *tuple, but ...
false
false
false
false
false
0
is_local_mad(struct hfi1_ibport *ibp, const struct opa_mad *mad, const struct ib_wc *in_wc) { struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); const struct opa_smp *smp = (const struct opa_smp *)mad; if (smp->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) { return (smp->hop_cnt == 0 && smp->route.dr.dr_sli...
false
false
false
false
false
0
lang_from_name(char *name) { table_ty *tp; string_ty *s; string_ty *s2; sniff_ty *result; sub_context_ty *scp; /* * OK, so building a symbol table is over-kill, but it allows * some simple manipulations. */ if (!stp) { stp = symtab_alloc...
false
false
false
false
false
0
command_interestingness_getList(flickcurl* fc, int argc, char *argv[]) { int usage = 0; char* date = NULL; flickcurl_photos_list* photos_list = NULL; flickcurl_photos_list_params list_params; int rc; flickcurl_photos_list_params_init(&list_params); argv++; argc--; while(!usage && argc) { char...
false
false
false
false
false
0
stack_push(stack_t *stack,const void *input) { if(stack->size == stack->array_size){ void *temp = realloc(stack->array,stack->element_size *(stack->array_size+STACK_MEMORY_ALLOCATION_UNIT_SIZE)); if(!temp){ return STACK_MEMORY_ALLOCATION_ERROR; } stack->array = temp; stack->array_size = stack->array...
false
true
false
false
false
1
connman_inet_clear_ipv6_gateway_address(int index, const char *gateway) { struct in6_rtmsg rt; int sk, err = 0; DBG("index %d gateway %s", index, gateway); if (gateway == NULL) return -EINVAL; memset(&rt, 0, sizeof(rt)); if (inet_pton(AF_INET6, gateway, &rt.rtmsg_gateway) < 0) { err = -errno; goto out; ...
false
false
false
false
false
0
dynalogin_authenticate_internal (dynalogin_session_t *h, const dynalogin_userid_t userid, dynalogin_scheme_t scheme, struct oath_callback_pvt_t *pvt, oath_validate_strcmp_function strcmp_otp) { int rc; dynalogin_user_data_t *ud; dynalogin_result_t res; time_t now; dynalogin_counter_t _now, next_counter; ...
false
false
false
false
false
0
camerabin_dispose_elements (GstCameraBin * camera) { GST_INFO ("cleaning"); if (camera->capture_mutex) { g_mutex_free (camera->capture_mutex); camera->capture_mutex = NULL; } if (camera->cond) { g_cond_free (camera->cond); camera->cond = NULL; } if (camera->idle_cond) { g_cond_free (cam...
false
false
false
false
false
0