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
start_rule(bp, s_lineno) register bucket *bp; int s_lineno; { if (bp->class == TERM) terminal_lhs(s_lineno); bp->class = NONTERM; if (nrules >= maxrules) expand_rules(); plhs[nrules] = bp; rprec[nrules] = UNDEFINED; rassoc[nrules] = TOKEN; }
false
false
false
false
false
0
centre(Coordinate& centre) const { if (isNull()) return false; centre.x=(getMinX() + getMaxX()) / 2.0; centre.y=(getMinY() + getMaxY()) / 2.0; return true; }
false
false
false
false
false
0
egg_column_model_is_column_first (EggColumnModel *model, GtkTreeIter *iter) { g_return_val_if_fail (model->stamp == iter->stamp, FALSE); return (((GList *)iter->user_data)->prev == NULL); }
false
false
false
false
false
0
writememoryarea (int fd, Area *area, int stack_was_seen, int vsyscall_exists) { static void * orig_stack = NULL; /* Write corresponding descriptor to the file */ if (orig_stack == NULL && 0 == strcmp(area -> name, "[stack]")) orig_stack = area -> addr + area -> size; if (0 == strcmp(area -> name,...
false
false
false
false
false
0
FuncIO_readdir(Obj self) { Obj res; Int olderrno; if (ourDIR == 0) { SyClearErrorNo(); return Fail; } olderrno = errno; ourdirent = readdir(ourDIR); if (ourdirent == 0) { /* This is a bit of a hack, but how should this be done? */ if (errno == EBADF && olderrno != EBADF) { ...
false
false
false
false
false
0
aisleriot_conf_get_statistic (const char *game_module, AisleriotStatistic *statistic) { #ifdef HAVE_GNOME AisleriotStatistic *game_stat; char *game_name; game_name = game_module_to_game_name (game_module); game_stat = g_hash_table_lookup (stats, game_name); if (!game_stat) { ...
false
false
false
false
false
0
do_fiddle_smime_message(BODY *b, long msgno, char *section) { int modified_the_body = 0; if(!b) return 0; dprint((9, "do_fiddle_smime_message(msgno=%ld type=%d subtype=%s section=%s)", msgno, b->type, b->subtype ? b->subtype : "NULL", (section && *section) ? section : (section != NULL) ? "Top" : "NU...
true
true
false
false
false
1
guess_init(void) { dbstore_kv_t kv = { sizeof(gnet_host_t), gnet_host_length, sizeof(struct qkdata), sizeof(struct qkdata) + sizeof(uint8) + MAX_INT_VAL(uint8) }; dbstore_packing_t packing = { serialize_qkdata, deserialize_qkdata, free_qkdata }; if (!GNET_PROPERTY(enable_guess)) return; if (db_qkdata != N...
false
false
false
false
false
0
agp_alloc_bridge(void) { struct agp_bridge_data *bridge; bridge = kzalloc(sizeof(*bridge), GFP_KERNEL); if (!bridge) return NULL; atomic_set(&bridge->agp_in_use, 0); atomic_set(&bridge->current_memory_agp, 0); if (list_empty(&agp_bridges)) agp_bridge = bridge; return bridge; }
false
false
false
false
false
0
isl_args_free(struct isl_args *args, void *opt) { if (!opt) return; free_args(args->args, opt); free(opt); }
false
false
false
false
false
0
free_krb5_pa_pk_as_rep(krb5_pa_pk_as_rep **in) { if (*in == NULL) return; switch ((*in)->choice) { case choice_pa_pk_as_rep_dhInfo: krb5_free_data(NULL, (*in)->u.dh_Info.kdfID); free((*in)->u.dh_Info.dhSignedData.data); break; case choice_pa_pk_as_rep_encKeyPack: free((*i...
false
false
false
false
false
0
operator=(const FieldElement& a) { if(this==&a) { flog2 fprintf(Stderr,"FieldElement - selfassignment\n"); return *this; } if(implementingObject&& 0==(--(implementingObject->refCount))) { delete implementingObject; // fprintf(Stderr,"DELETE\n"); flog2 fprintf(Stderr,"...
false
false
false
false
false
0
putspriteimage ( int x1, int y1, void* pic ) { char* src = (char*) pic; if ( agmp->windowstatus == 100 ) { trleheader* hd = (trleheader*) pic; char* buf = (char*) (agmp->scanlinelength * y1 + x1 * agmp->byteperpix + agmp->linearaddress); if ( hd->id == 16973 ) { collategraphicoperat...
false
false
false
false
false
0
rq_completed(struct mapped_device *md, int rw, bool run_queue) { atomic_dec(&md->pending[rw]); /* nudge anyone waiting on suspend queue */ if (!md_in_flight(md)) wake_up(&md->wait); /* * Run this off this callpath, as drivers could invoke end_io while * inside their request_fn (and holding the queue lock). ...
false
false
false
false
false
0
sdsull2str(char *s, unsigned long long v) { char *p, aux; size_t l; /* Generate the string representation, this method produces * an reversed string. */ p = s; do { *p++ = '0'+(v%10); v /= 10; } while(v); /* Compute length and add null term. */ l = p-s; *p = '\...
false
false
false
false
false
0
free_rstorage(JCR *jcr) { if (jcr->rstorage) { delete jcr->rstorage; jcr->rstorage = NULL; } jcr->rstore = NULL; }
false
false
false
false
false
0
writeIndent(int depth) const { for (int i = 0; i < depth; ++i) writeMarkup(_indent); }
false
false
false
false
false
0
server_setxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, dict_t *xdata) { gf_common_rsp rsp = {0,}; rpcsvc_request_t *req = NULL; server_state_t *state = NULL; req = frame->local; state = C...
false
false
false
false
false
0
cf_pair2xml(FILE *fp, const CONF_PAIR *cp) { fprintf(fp, "<%s>", cp->attr); if (cp->value) { char buffer[2048]; char *p = buffer; const char *q = cp->value; while (*q && (p < (buffer + sizeof(buffer) - 1))) { if (q[0] == '&') { memcpy(p, "&amp;", 4); p += 5; } else if (q[0] == '<') { memc...
false
false
false
false
false
0
resolve_section (const char *name, asection *sections, bfd_vma *result) { asection *curr; unsigned int len; for (curr = sections; curr; curr = curr->next) if (strcmp (curr->name, name) == 0) { *result = curr->vma; return TRUE; } /* Hmm. still haven't found it. try pseudo-section names....
false
false
false
false
false
0
Clear(RNScalar value) { // Set all grid values to value RNScalar *grid_valuep = grid_values; for (int i = 0; i < grid_size; i++) *(grid_valuep++) = value; }
false
false
false
false
false
0
chase_scanname(dns_name_t *name, dns_rdatatype_t type, dns_rdatatype_t covers) { dns_rdataset_t *rdataset = NULL; dig_message_t * msg; for (msg = ISC_LIST_HEAD(chase_message_list2); msg != NULL; msg = ISC_LIST_NEXT(msg, link)) { if (dns_message_firstname(msg->msg, DNS_SECTION_ANSWER) == ISC_R_SUCCESS...
false
false
false
false
false
0
_prefsListener( XAP_Prefs *pPrefs, UT_StringPtrMap * /*phChanges*/, void *data ) { AP_LeftRuler *pLeftRuler = static_cast<AP_LeftRuler *>(data); UT_ASSERT( data && pPrefs ); const gchar *pszBuffer; pPrefs->getPrefsValue(static_cast<const gchar *>(AP_PREF_KEY_RulerUnits), &pszBuffer ); // or should I just default...
false
false
false
false
false
0
hhash_sorted_iter_next(hhash_iter_t* i) { if (hhash_iter_finished(i)) { return; } ++i->i; }
false
false
false
false
false
0
xmlSecNssSymKeyDataKlassCheck(xmlSecKeyDataKlass* klass) { #ifndef XMLSEC_NO_DES if(klass == xmlSecNssKeyDataDesId) { return(1); } #endif /* XMLSEC_NO_DES */ #ifndef XMLSEC_NO_AES if(klass == xmlSecNssKeyDataAesId) { return(1); } #endif /* XMLSEC_NO_AES */ #ifndef XMLSEC_NO_HMAC if(klass == ...
false
false
false
false
false
0
createControls() { mTrayMgr->createLabel(TL_TOPLEFT, "JuliaParamLabel", "Julia Parameters", 200); mTrayMgr->createThickSlider(TL_TOPLEFT, "RealSlider", "Real", 200, 80, -1, 1, 50)->setValue(global_real, false); mTrayMgr->createThickSlider(TL_TOPLEFT, "ImagSlider", "Imag", 200, 80, -1, 1, 50)...
false
false
false
false
false
0
cli_add_alternate_server(struct cli_session* cs, const char* pn) { if(cs && cs->ts && pn && *pn) { add_alternate_server(pn); } }
false
false
false
false
false
0
operator()(const Statistic *LHS, const Statistic *RHS) const { int Cmp = std::strcmp(LHS->getName(), RHS->getName()); if (Cmp != 0) return Cmp < 0; // Secondary key is the description. return std::strcmp(LHS->getDesc(), RHS->getDesc()) < 0; }
false
false
false
false
false
0
afs_zap_data(struct afs_vnode *vnode) { _enter("{%x:%u}", vnode->fid.vid, vnode->fid.vnode); /* nuke all the non-dirty pages that aren't locked, mapped or being * written back in a regular file and completely discard the pages in a * directory or symlink */ if (S_ISREG(vnode->vfs_inode.i_mode)) invalidate_rem...
false
false
false
false
false
0
gabedit_text_goto_end(GtkWidget *text) { GtkTextIter start; GtkTextIter end; GtkTextBuffer *buffer; if(!GTK_IS_TEXT_VIEW (text)) return; buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text)); gtk_text_buffer_get_bounds (buffer, &start, &end); gtk_text_buffer_place_cursor(buffer, &end); gtk_text_view_scro...
false
false
false
false
false
0
channel_ready_cb (GObject *source, GAsyncResult *result, gpointer user_data) { TpChannel *channel = TP_CHANNEL (source); InspectChannelData *data = user_data; guint handle_type, handle; gchar *channel_type; gchar **interfaces, **iter; GError *error = NULL; if (!tp_proxy_prepare_finish (channel, r...
false
false
false
false
false
0
onKeyRelease(FXObject*,FXSelector,void* ptr){ FXEvent* event=(FXEvent*)ptr; if(!isEnabled()) return 0; if(target && target->tryHandle(this,FXSEL(SEL_KEYRELEASE,message),ptr)) return 1; switch(event->code){ case KEY_Shift_L: case KEY_Shift_R: case KEY_Control_L: case KEY_Control_R: case KEY_A...
false
false
false
false
false
0
GetRecordHeader(SSL* ssl, const byte* input, word32* inOutIdx, RecordLayerHeader* rh, word16 *size) { if (!ssl->options.dtls) { XMEMCPY(rh, input + *inOutIdx, RECORD_HEADER_SZ); *inOutIdx += RECORD_HEADER_SZ; ato16(rh->length, size); } else { #ifdef CYASSL_...
false
false
false
false
false
0
virtblk_restore(struct virtio_device *vdev) { struct virtio_blk *vblk = vdev->priv; int ret; ret = init_vq(vdev->priv); if (ret) return ret; virtio_device_ready(vdev); blk_mq_start_stopped_hw_queues(vblk->disk->queue, true); return 0; }
false
false
false
false
false
0
Clone(FCDEntity* _clone, bool cloneChildren) const { FCDImage* clone = NULL; if (_clone == NULL) _clone = clone = new FCDImage(const_cast<FCDocument*>(GetDocument())); else if (_clone->HasType(FCDImage::GetClassType())) clone = (FCDImage*) _clone; FCDEntity::Clone(_clone, cloneChildren); if (clone != NUL...
false
false
false
false
false
0
picasso_FillRect (TrapContext *ctx) { uaecptr renderinfo = m68k_areg (regs, 1); uae_u32 X = (uae_u16)m68k_dreg (regs, 0); uae_u32 Y = (uae_u16)m68k_dreg (regs, 1); uae_u32 Width = (uae_u16)m68k_dreg (regs, 2); uae_u32 Height = (uae_u16)m68k_dreg (regs, 3); uae_u32 Pen = m68k_dreg (regs, 4); ...
false
false
false
false
false
0
createDIB(void *&data, const unsigned long size, const unsigned long frame, const int bits, const int upsideDown, const int paddin...
false
false
false
false
false
0
_wrap_lfc_startsess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; RETURNCODE result; if (!PyArg_ParseTuple(args,(char *)"OO:lfc_startsess",&obj0,&obj1)) SWIG_fail; { if (ob...
false
false
false
false
false
0
fdtv_start_feed(struct dvb_demux_feed *dvbdmxfeed) { struct firedtv *fdtv = dvbdmxfeed->demux->priv; int pidc, c, ret; u16 pids[16]; switch (dvbdmxfeed->type) { case DMX_TYPE_TS: case DMX_TYPE_SEC: break; default: dev_err(fdtv->device, "can't start dmx feed: invalid type %u\n", dvbdmxfeed->type); retur...
false
false
false
false
false
0
StandbyRecoverPreparedTransactions(bool overwriteOK) { DIR *cldir; struct dirent *clde; cldir = AllocateDir(TWOPHASE_DIR); while ((clde = ReadDir(cldir, TWOPHASE_DIR)) != NULL) { if (strlen(clde->d_name) == 8 && strspn(clde->d_name, "0123456789ABCDEF") == 8) { TransactionId xid; char *buf; ...
false
false
false
false
false
0
mprLoadNativeModule(MprModule *mp) { MprModuleEntry fn; MprPath info; char *at; void *handle; mprAssert(mp); /* Search the image incase the module has been statically linked */ #ifdef RTLD_MAIN_ONLY handle = RTLD_MAIN_ONLY; #else #ifdef RTLD_DEFA...
false
false
false
true
true
1
breaks_set_enabled_for_file(const char *file, gboolean enabled) { GList *breaks; enum dbs state = debug_get_state(); /* do not process async break manipulation on modules that do not support async interuppt */ if (DBS_RUNNING == state && !debug_supports_async_breaks()) return; breaks = breaks_get_for_documen...
false
false
false
false
false
0
dereference_iter_node(rbtdb_dbiterator_t *rbtdbiter) { dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)rbtdbiter->common.db; dns_rbtnode_t *node = rbtdbiter->node; nodelock_t *lock; if (node == NULL) return; lock = &rbtdb->node_locks[node->locknum].lock; NODE_LOCK(lock, isc_rwlocktype_read); decrement_reference(rbtdb, n...
false
false
false
false
false
0
__cpuidle_unset_driver(struct cpuidle_driver *drv) { if (drv == cpuidle_curr_driver) cpuidle_curr_driver = NULL; }
false
false
false
false
false
0
getY() { if (m_snakeParts.isEmpty()) { kDebug() << "Requested coordinate of inexistant snake"; return 0; } return m_snakeParts.last().getY(); }
false
false
false
false
false
0
topMargin(void) const {return _topPixel==5?0.0:(double)_topPixel/MSPointsPerInch;}
false
false
false
false
false
0
snd_info_card_id_change(struct snd_card *card) { mutex_lock(&info_mutex); if (card->proc_root_link) { proc_remove(card->proc_root_link); card->proc_root_link = NULL; } if (strcmp(card->id, card->proc_root->name)) card->proc_root_link = proc_symlink(card->id, snd_proc_root->p, card->proc_ro...
false
false
false
false
false
0
max8997_irq_resume(struct max8997_dev *max8997) { if (max8997->irq && max8997->irq_domain) max8997_irq_thread(0, max8997); return 0; }
false
false
false
false
false
0
gw_pm_get_catalog_plugin ( gchar* name) { GWCatalogPlugin * catalog_plugin = NULL; if ( my_plugins_manager.catalog_plugins != NULL) { GWPlugin *plugin = g_hash_table_lookup ( my_plugins_manager.catalog_plugins, name); if ( plugin != NULL) { catalog_plugin = plugin->data; } else {} } else {} return cat...
false
false
false
false
false
0
OnNavigationKey(wxNavigationKeyEvent& event) { if (!event.IsWindowChange()) { event.Skip(); return; } AdvanceTab(event.GetDirection()); }
false
false
false
false
false
0
draw_rev_graph(struct rev_graph *graph) { struct rev_filler { chtype separator, line; }; enum { DEFAULT, RSHARP, RDIAG, LDIAG }; static struct rev_filler fillers[] = { { ' ', REVGRAPH_LINE }, { '`', '.' }, { '\'', ' ' }, { '/', ' ' }, }; chtype symbol = get_rev_graph_symbol(graph); struct rev_filler *f...
false
false
false
false
false
0
symlist_merge(symlist_t *symlist_dest, symlist_t *symlist_src1, symlist_t *symlist_src2) { symbol_node_t *node; *symlist_dest = *symlist_src1; while((node = SLIST_FIRST(symlist_src2)) != NULL) { SLIST_REMOVE_HEAD(symlist_src2, links); SLIST_INSERT_HEAD(symlist_dest, node, links); } /* These are now em...
false
false
false
false
false
0
gt_multithread(GtThreadFunc function, void *data, GT_UNUSED GtError *err) { unsigned int i; gt_error_check(err); gt_assert(function); for (i = 0; i < gt_jobs; i++) function(data); return 0; }
false
false
false
false
false
0
ApplyN(Matrix m, int n, POINT_TYPE *in, POINT_TYPE *out) { int i, j; for (i = 0; i < n; i++) { out[i] = m.b[i]; for (j = 0; j < n; j++) out[i] += in[j] * m.A[j][i]; } return; }
false
false
false
false
false
0
ZuinIsEntering( ZuinData *pZuin ) { int i; if ( pZuin->kbtype >= KB_HANYU_PINYIN ) { if ( pZuin->pinYinData.keySeq[0] ) return 1; } else { for ( i = 0; i < ZUIN_SIZE; i++ ) if ( pZuin->pho_inx[ i ] ) return 1; } return 0; }
false
false
false
false
false
0
dc_sp_custom(int script, int* yield, int* preturnint, char* key, int sprite, int val) { RETURN_NEG_IF_BAD_SPRITE(sprite); if (spr[sprite].active == 0) { *preturnint = -1; } else { // Set the value if (val != -1) dinkc_sp_custom_set(spr[sprite].custom, key, val); *preturnint = ...
false
false
false
false
false
0
run(Module &M, ModuleAnalysisManager *AM) { LazyCallGraph &G = AM->getResult<LazyCallGraphAnalysis>(M); OS << "Printing the call graph for module: " << M.getModuleIdentifier() << "\n\n"; SmallPtrSet<LazyCallGraph::Node *, 16> Printed; for (LazyCallGraph::No...
false
false
false
false
false
0
autohelperaa_attackpat8(int trans, int move, int color, int action) { int b, A; UNUSED(color); UNUSED(action); b = AFFINE_TRANSFORM(722, trans, move); A = AFFINE_TRANSFORM(646, trans, move); return countlib(A)==2 && accuratelib(b, color, MAX_LIBERTIES, NULL)>1; }
false
false
false
false
false
0
isSafeAndProfitableToSinkLoad(LoadInst *L) { BasicBlock::iterator BBI = L, E = L->getParent()->end(); for (++BBI; BBI != E; ++BBI) if (BBI->mayWriteToMemory()) return false; // Check for non-address taken alloca. If not address-taken already, it isn't // profitable to do this xform. if (Alloc...
false
false
false
false
false
0
conf_set_service_name(void *data) { struct Client *target_p; const char *s; char *tmp; int dots = 0; for(s = data; *s != '\0'; s++) { if(!IsServChar(*s)) { conf_report_error("Ignoring service::name " "-- bogus servername."); return; } else if(*s == '.') dots++; } if(!dots) { conf_re...
false
false
false
false
false
0
zDNAScorePairLUT (zScanner *scanner, zDNA* genomic, zDNA* cdna, coor_t gpos, coor_t cpos) { coor_t i, p, index, length; coor_t gfocus = gpos - scanner->model->focus; coor_t cfocus = cpos - scanner->model->focus; /* user defines and boundaries */ if ((gpos < scanner->min_gpos) || (gpos > scanner->max_pos) || ...
false
false
false
false
false
0
arrayExpressiondoInline(Expressions *a, InlineDoState *ids) { Expressions *newa = NULL; if (a) { newa = new Expressions(); newa->setDim(a->dim); for (size_t i = 0; i < a->dim; i++) { Expression *e = (*a)[i]; if (e) e = e->doInline(ids); ...
false
false
false
false
false
0
getcompressedteximage_error_check(struct gl_context *ctx, GLenum target, GLint level, GLsizei clientMemSize, GLvoid *img) { struct gl_texture_object *texObj; struct gl_texture_image *texImage; const GLint maxLevels = _mesa_max_texture_levels(ctx, target); GLuint compressedS...
false
false
false
false
false
0
H5Tarray_create2(hid_t base_id, unsigned ndims, const hsize_t dim[/* ndims */]) { H5T_t *base; /* base datatype */ H5T_t *dt = NULL; /* new array datatype */ unsigned u; /* local index variable */ hid_t ret_value; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE3("i", "iIu*h", b...
false
false
false
false
false
0
L2() {register object *base=vs_base; register object *sup=base+VM2; VC2 vs_check;vs_top=sup; {object V2=base[0]->c.c_cdr; base[2]= (V2->c.c_car); V2=V2->c.c_cdr; base[3]= (V2->c.c_car);} base[4]= list(3,((object)VV[3]),base[2],list(3,((object)VV[4]),base[2],base[3])); vs_top=(vs_base=base+4)+1; return; }
false
false
false
false
false
0
i8042_aux_write(struct serio *serio, unsigned char c) { struct i8042_port *port = serio->port_data; return i8042_command(&c, port->mux == -1 ? I8042_CMD_AUX_SEND : I8042_CMD_MUX_SEND + port->mux); }
false
false
false
false
false
0
vt_group_free(MPI_Group group) { if (last_group == 1 && groups[0].group == group) { groups[0].refcnt--; if (groups[0].refcnt == 0) last_group--; } else if (last_group > 1) { uint32_t i; if ((i = group_search(group)) != (uint32_t)-1) { /* decrease refer...
false
false
false
false
false
0
xsh_model_binxy(xsh_xs_3* p_xs_3, int bin_X, int bin_Y) { XSH_INSTRCONFIG* instr_config=NULL; xsh_instrument* instr = NULL; if (bin_X!=1 || bin_Y!=1) { instr = xsh_instrument_new(); //printf("%lf %lf %lf %d %d %lf %lf \n ",p_xs_3->pix_X,p_xs_3->pix_Y,p_xs_3->pix,p_xs_3->ASIZE,p_xs_3->BSIZE,p...
false
false
false
false
false
0
giggle_view_shell_get_selected (GiggleViewShell *shell) { int page_num; GtkWidget *page; g_return_val_if_fail (GIGGLE_IS_VIEW_SHELL (shell), NULL); page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (shell)); page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (shell), page_num); if (GIGGLE_IS_VIEW (page...
false
false
false
false
false
0
log_io_complete_checkpoint(void) /*============================*/ { mutex_enter(&(log_sys->mutex)); ut_ad(log_sys->n_pending_checkpoint_writes > 0); log_sys->n_pending_checkpoint_writes--; if (log_sys->n_pending_checkpoint_writes == 0) { log_complete_checkpoint(); } mutex_exit(&(log_sys->mutex)); }
false
false
false
false
false
0
utf8_build( unsigned int value, unsigned char out[6], int in_pos, int out_pos ) { unsigned int in_mask, out_mask; int byte = 0; while ( in_pos < 32 ) { in_mask = 1 << ( 31 - in_pos ); out_mask = 1 << ( 7 - out_pos ); if ( value & in_mask ) out[byte] |= out_mask; in_pos++; out_pos++; if ( out_pos > 7 ) { ...
true
true
false
false
false
1
msi_bus_show(struct device *dev, struct device_attribute *attr, char *buf) { struct pci_dev *pdev = to_pci_dev(dev); struct pci_bus *subordinate = pdev->subordinate; return sprintf(buf, "%u\n", subordinate ? !(subordinate->bus_flags & PCI_BUS_FLAGS_NO_MSI) : !pdev->no_msi); }
false
true
false
false
false
1
output(const Char *s, size_t n, OutputByteStream *sb) { #ifdef SP_BIG_ENDIAN if (sizeof(Char) == 2) { sb->sputn((char *)s, n*2); return; } #endif allocBuf(n*2); for (size_t i = 0; i < n; i++) { buf_[i*2] = (s[i] >> 8) & 0xff; buf_[i*2 + 1] = s[i] & 0xff; } sb->sputn(buf_, n*2); }
false
false
false
false
false
0
internal_bpchar_pattern_compare(BpChar *arg1, BpChar *arg2) { int result; int len1, len2; len1 = bcTruelen(arg1); len2 = bcTruelen(arg2); result = strncmp(VARDATA_ANY(arg1), VARDATA_ANY(arg2), Min(len1, len2)); if (result != 0) return result; else if (len1 < len2) return -1; else if (len1 > len2) ...
false
false
false
false
false
0
show_funcname_line(struct grep_opt *opt, const char *name, char *buf, char *bol, unsigned lno) { while (bol > buf) { char *eol = --bol; while (bol > buf && bol[-1] != '\n') bol--; lno--; if (lno <= opt->last_shown) break; if (match_funcname(opt, bol, eol)) { show_line(opt, bol, eol, nam...
false
false
false
false
true
1
identify_update_path(ExtensionControlFile *control, const char *oldVersion, const char *newVersion) { List *result; List *evi_list; ExtensionVersionInfo *evi_start; ExtensionVersionInfo *evi_target; /* Extract the version update graph from the script directory */ evi_list = get_ext_ver_list(control);...
false
false
false
false
false
0
fake_writephonebook(gn_data *data, struct gn_statemachine *state) { int len, ofs; char req[256], *tmp; char number[64]; memset(number, 0, sizeof(number)); #if 1 fake_encode(AT_CHAR_UCS2, number, sizeof(number), data->phonebook_entry->number, strlen(data->phonebook_entry->number)); #else strncpy(number, data...
true
true
false
false
false
1
searchRangeTableForCol(ParseState *pstate, const char *alias, char *colname, int location) { ParseState *orig_pstate = pstate; FuzzyAttrMatchState *fuzzystate = palloc(sizeof(FuzzyAttrMatchState)); fuzzystate->distance = MAX_FUZZY_DISTANCE + 1; fuzzystate->rfirst = NULL; fuzzystate->rsecond = NULL; fuzzy...
false
false
false
false
false
0
nfs4_check_fh(struct svc_fh *fhp, struct nfs4_stid *stp) { if (!fh_match(&fhp->fh_handle, &stp->sc_file->fi_fhandle)) return nfserr_bad_stateid; return nfs_ok; }
false
false
false
false
false
0
resourceAvailable(const Jid& jid, const Resource& r) { if (r.status().hasPhotoHash()) { QString hash = r.status().photoHash(); if (!vcard_avatars_.contains(jid.bare())) { vcard_avatars_[jid.bare()] = new VCardAvatar(this, jid); connect(vcard_avatars_[jid.bare()],SIGNAL(avatarChanged(const Jid&)),this,SLOT(up...
false
false
false
false
false
0
error_thin_bio_list(struct thin_c *tc, struct bio_list *master, int error) { struct bio_list bios; unsigned long flags; bio_list_init(&bios); spin_lock_irqsave(&tc->lock, flags); __merge_bio_list(&bios, master); spin_unlock_irqrestore(&tc->lock, flags); error_bio_list(&bios, error); }
false
false
false
false
false
0
update() { ui.findButton->setEnabled(! ui.findEdit->text().isEmpty()); }
false
false
false
false
false
0
updateStringAttributeValue(DcmItem *dataset, const DcmTagKey &key, OFString &value) { DcmStack stack; DcmTag tag(key); OFCondition cond = EC_Normal; cond = dataset->search(key, stack, ESM_fromHere, OFFalse); if (cond != EC_Normal) { OFLOG_ERROR(storescuLogger, "updateStringAttributeValue: cannot find: " ...
false
false
false
false
false
0
widget_pokemem_print_list( unsigned int left_edge, unsigned int width ) { char buf[32]; unsigned int i, page_limit; entry_t *entry; trainer_t *trainer; if( store && pokemem_count ) { page_limit = top_index + page_size; for( i = top_index; i < pokemem_count && i < page_limit; i++ ) { entry = &g...
false
false
false
false
false
0
read_aist_tree(const guchar **p, gsize *size, AistContext *context) { gboolean is_data_node; gchar *name = NULL; guint i, nchildren; gboolean ok = FALSE; if (!read_qt_bool(p, size, &is_data_node)) goto fail; if (is_data_node) { gwy_debug("reading data"); if (!read_aist_...
false
false
false
false
false
0
_gnutls_hex2bin (const opaque * hex_data, int hex_size, opaque * bin_data, size_t * bin_size) { int i, j; opaque hex2_data[3]; unsigned long val; hex2_data[2] = 0; for (i = j = 0; i < hex_size;) { if (!isxdigit (hex_data[i])) /* skip non-hex such as the ':' in 00:FF */ ...
false
false
false
false
false
0
go_down(struct state *st) { st->frame++; if (st->frame > st->maxframe) st->frame = 0; jumpwin(st); }
false
false
false
false
false
0
gt_ranked_list_new(unsigned long maxsize, GtCompareWithData comparefunction, GtFree free_func, void *compareinfo) { GtRankedList *ranked_list; gt_assert(maxsize > 0 && comparefunction != NULL); ranked_list = gt_mal...
false
false
false
false
false
0
bnetLevelDFS( BnetNetwork * net, BnetNode * node) { int i; BnetNode *auxnd; if (node->visited == 1) { return(1); } node->visited = 1; /* Graphical sources have level 0. This is the final value if the ** node has no fan-ins. Otherwise the successive loop will ** increase the leve...
false
false
false
false
false
0
unset_var (const char *name) { VARIABLE var; for (var=variable_list; var && strcmp (var->name, name); var = var->next) ; if (!var) return; /* fprintf (stderr, "unsetting `%s'\n", name); */ if (var->type == VARTYPE_FD && var->value) { int fd; fd = atoi (var->value); if (fd != ...
false
false
false
false
false
0
add_placeholders_to_base_rels(PlannerInfo *root) { ListCell *lc; foreach(lc, root->placeholder_list) { PlaceHolderInfo *phinfo = (PlaceHolderInfo *) lfirst(lc); Relids eval_at = phinfo->ph_eval_at; if (bms_membership(eval_at) == BMS_SINGLETON) { int varno = bms_singleton_member(eval_at); RelOptI...
false
false
false
false
false
0
Module_hexchat_hook_timer(PyObject *self, PyObject *args, PyObject *kwargs) { int timeout; PyObject *callback; PyObject *userdata = Py_None; PyObject *plugin; Hook *hook; char *kwlist[] = {"timeout", "callback", "userdata", 0}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iO|O:hook_timer", kwlist, &tim...
false
false
false
false
false
0
n_setfont(int a) { int i, j; if (a) i = getrq(); else i = getsn(); if (!i || i == 'P') { j = font1; goto s0; } if (i == 'S' || i == '0') return; if ((j = findft(i)) == -1) return; s0: font1 = font; font = j; mchbits(); }
false
false
false
false
false
0
sge_security_verify_user(const char *host, const char *commproc, u_long32 id, const char *admin_user, const char *gdi_user, const char *progname) { DENTER(TOP_LAYER, "sge_security_verify_user"); if (gdi_user == NULL || host == NULL || commproc == NULL) { DPRINTF(("gdi user name...
false
false
false
false
false
0
decrByByte( off_t n ) { // check for underflow if (n > _byteOffset) return OutOfRange; else _byteOffset -= n; return _byteOffset; }
false
false
false
false
false
0
PK11_IsInternalKeySlot(PK11SlotInfo *slot) { PK11SlotInfo *int_slot; PRBool result; if (!slot->isInternal) { return PR_FALSE; } int_slot = PK11_GetInternalKeySlot(); result = (int_slot == slot) ? PR_TRUE : PR_FALSE; PK11_FreeSlot(int_slot); return result; }
false
false
false
false
false
0
gdip_region_bitmap_from_tree (GpPathTree *tree) { GpRegionBitmap *result; if (!tree) return NULL; /* each item has... */ if (tree->path) { /* (a) only a path (the most common case) */ result = gdip_region_bitmap_from_path (tree->path); } else { /* (b) two items with an binary operation */ GpRegionBitma...
false
false
false
false
false
0
Ns_ConnFlush(Ns_Conn *conn, char *buf, int len, int stream) { Conn *connPtr = (Conn *) conn; NsServer *servPtr = connPtr->servPtr; Tcl_Encoding encoding; Tcl_DString enc, gzip; char *ahdr; int status; Tcl_DStringInit(&enc); Tcl_DStringInit(&gzip); if (len < 0) { len = strlen(buf);...
false
false
false
false
false
0
ena_alloc_skb(struct ena_ring *rx_ring, bool frags) { struct sk_buff *skb; if (frags) skb = napi_get_frags(rx_ring->napi); else skb = netdev_alloc_skb_ip_align(rx_ring->netdev, rx_ring->rx_copybreak); if (unlikely(!skb)) { u64_stats_update_begin(&rx_ring->syncp); rx_ring->rx_stats.skb_alloc_fail++; ...
false
false
false
false
false
0
closeEvent( QCloseEvent* e ) { if( d->topLevel ) e->ignore(); // mainly for the fallback mode else QMenuBar::closeEvent( e ); }
false
false
false
false
false
0