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
list_remove_range_unlocked(List *list, ssize_t index, ssize_t range) { if (!list) return set_errnull(EINVAL); if (index < 0) index = list->length + 1 + index; if (index < 0) return set_errnull(EINVAL); if (range < 0) range = list->length + 1 + range - index; if (range < 0) return set_errnull(EINVAL);...
false
false
false
false
false
0
Execute () { FontVar* _fontVar = (FontVar*) GetEditor()->GetState("FontVar"); if (_fontVar != nil) { _fontVar->SetFont(GetFont()); } Command::Execute(); }
false
false
false
false
false
0
__init_waitqueue_head(wait_queue_head_t *q, const char *name, struct lock_class_key *key) { spin_lock_init(&q->lock); lockdep_set_class_and_name(&q->lock, key, name); INIT_LIST_HEAD(&q->task_list); }
false
false
false
false
false
0
lock_RCS (const char *user, RCSNode *rcs, const char *rev, const char *repository) { char *branch = NULL; int err = 0; /* * For a specified, numeric revision of the form "1" or "1.1", (or when * no revision is specified ""), definitely move the branch to the trunk * before locking ...
false
false
false
false
false
0
nullPointerLinkedList() { const SymbolDatabase* const symbolDatabase = _tokenizer->getSymbolDatabase(); // looping through items in a linked list in a inner loop. // Here is an example: // for (const Token *tok = tokens; tok; tok = tok->next) { // if (tok->str() == "hello") // ...
false
false
false
false
false
0
transBinds(bs) /* Translate list of bindings: */ List bs; { /* eliminating pattern matching on */ List newBinds = NIL; /* lhs of bindings. */ for (; nonNull(bs); bs=tl(bs)) { #if IPARAM Cell v = fst(hd(bs)); while (isAp(v) && fun(v) == nameInd) v = arg(v); fst(hd(bs)) = v; if (is...
false
false
false
false
false
0
stackTrace2Buffer(Frame *last, void **data, int max_depth) { int limit = max_depth * 2, depth = 0; do { for(; last->mb != NULL; last = last->prev) { if(depth == limit) return; data[depth++] = last->mb; data[depth++] = last->last_pc; } } w...
false
false
false
false
false
0
operator>>(QDataStream& in, QContactId& id) { id = QContactId(); quint8 formatVersion; in >> formatVersion; if (formatVersion == 1) { QString managerUri; QContactLocalId localId; in >> managerUri >> localId; id.setManagerUri(managerUri); id.setLocalId(localId); ...
false
false
false
false
false
0
usart_read(Usart *p_usart, uint32_t *c) { if (!(p_usart->US_CSR & US_CSR_RXRDY)) { return 1; } /* Read character */ *c = p_usart->US_RHR & US_RHR_RXCHR_Msk; return 0; }
false
false
false
false
false
0
SetLookupTable(vtkScalarsToColors *l) { vtkSetObjectBodyMacro(LookupTable, vtkScalarsToColors, l); this->LookupTable = l; if (this->ColorMap) { this->ColorMap->SetLookupTable(this->LookupTable); } }
false
false
false
false
false
0
cdb_sql_exec (sqlite3 *db, const gchar *stmt, gint (*callback)(gpointer ,gint,gchar **,gchar **), gpointer data, GError **error) { gchar *errmsg = NULL; gint ret = -1; d (g_print ("Camel SQL Exec:\n%s\n", stmt)); ret = sqlite3_exec (db, stmt, callback, dat...
false
false
false
false
false
0
do_twiddle(triggen *t, INT ir, INT m, INT vn, R *xr, R *xi) { void (*rotate)(triggen *, INT, R, R, R *) = t->rotate; INT im, iv; for (im = 0; im < m; ++im) for (iv = 0; iv < vn; ++iv) { /* TODO: modify/inline rotate function so that it can do whole vn vector at once? */ R c[2]; ...
false
false
false
false
false
0
IndentComment(EBuffer *B, int Row, int /*StateLen*/, hsState * /*StateMap*/) { int I = 0; char ChFind; if (Row > 0) { I = SearchBackContext(B, Row - 1, ChFind); if (I != -1) switch (ChFind) { case 's': case 'd': case 'c': case 't':...
false
false
false
false
false
0
___cleanup_shell_module ___PVOID { if (___shell_mod.setup) { #ifdef USE_environ if (___shell_mod.environ_was_extended) ___free_mem (environ); #endif ___shell_mod.setup = 0; } }
false
false
false
false
false
0
branch_greatest_num(THREADNODE *tree, int is_subthread) { unsigned long ret, branch_ret; ret = tree->num; if(tree->next && (branch_ret = branch_greatest_num(tree->next, 1)) > ret) ret = branch_ret; if(is_subthread && tree->branch && (branch_ret = branch_greatest_num(tree->branch, 1)) > re...
false
false
false
false
false
0
_wapi_handle_update_refs (void) { guint32 i, k; int thr_ret; guint32 now = (guint32)(time (NULL) & 0xFFFFFFFF); thr_ret = _wapi_handle_lock_shared_handles (); g_assert (thr_ret == 0); /* Prevent file share entries racing with us */ thr_ret = _wapi_shm_sem_lock (_WAPI_SHARED_SEM_FILESHARE); g_assert(thr_ret =...
false
false
false
false
false
0
avi_vdata(void *handle, unsigned int drop) { struct avi_handle *h = handle; struct ng_video_buf *buf; struct iovec *line; uint32_t size; unsigned int i,y; /* drop frames */ for (i = 0; i < drop; i++) { if (0 == avi_find_chunk(h,FCC('0','0','d','b'),&h->v_pos)) return NULL; h->frames+...
false
false
false
false
false
0
initLabelData() { if ( ptrGmtr == NULL ) return; if ( labelData == NULL ) { labelData = new LabelData; labelData->label = NULL; } // Make an id-string. ostrstream id_str; id_str << 'V' << Tag() << ends; update_dyna_string(labelData->label, id_str.str()); //---Get 'nice' position for the i...
false
false
false
false
false
0
sel_push_prefetched_row( /*====================*/ plan_t* plan) /*!< in: plan node for a table */ { sym_node_t* column; sel_buf_t* sel_buf; dfield_t* val; byte* data; ulint len; ulint pos; ulint val_buf_size; if (plan->n_rows_prefetched == 0) { pos = 0; plan->first_prefetched = 0; } else { pos = pl...
false
false
false
false
false
0
edialign_alloc_closure(edialignCLOSURE *clos) { ajlong na; ajint x; /* sera re'alloue' */ clos->predFrontier = (ajint **) edialign_callouer_mat(sizeof(int), clos->maxLong+2, clos->seqNbr+1); /* sera re'alloue' */ clos->succFrontier = (ajint **) edialign_callouer_mat(sizeof(in...
false
false
false
false
true
1
journal_reclaim(struct cache_set *c) { struct bkey *k = &c->journal.key; struct cache *ca; uint64_t last_seq; unsigned iter, n = 0; atomic_t p; while (!atomic_read(&fifo_front(&c->journal.pin))) fifo_pop(&c->journal.pin, p); last_seq = last_seq(&c->journal); /* Update last_idx */ for_each_cache(ca, c, it...
false
false
false
false
false
0
glade_gtk_box_set_child_property (GladeWidgetAdaptor *adaptor, GObject *container, GObject *child, const gchar *property_name, GValue *value) { GladeWidget *gbox, *gchild, *gchild_iter; GList *children, *list; gboolean is_position; gint ...
false
false
true
false
true
1
nfs_sync_mapping(struct address_space *mapping) { int ret = 0; if (mapping->nrpages != 0) { unmap_mapping_range(mapping, 0, 0, 0); ret = nfs_wb_all(mapping->host); } return ret; }
false
false
false
false
false
0
xmlSchemaParseModelGroupDefRef(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlNodePtr node) { xmlSchemaParticlePtr item; xmlNodePtr child = NULL; xmlAttrPtr attr; const xmlChar *ref = NULL, *refNs = NULL; int min, max; if ((ctx...
false
false
false
false
false
0
get_p_cbp(MpegEncContext * s, DCTELEM block[6][64], int motion_x, int motion_y){ int cbp, i; if(s->flags & CODEC_FLAG_CBP_RD){ int best_cbpy_score= INT_MAX; int best_cbpc_score= INT_MAX; int cbpc = (-1), cbpy= (-1); const int offset= (...
false
false
false
false
false
0
check_eos_locked (GstLiveAdder * adder) { GList *item; /* We can't be EOS if we have no sinkpads */ if (adder->sinkpads == NULL) return FALSE; for (item = adder->sinkpads; item; item = g_list_next (item)) { GstPad *pad = item->data; GstLiveAdderPadPrivate *padprivate = gst_pad_get_element_private ...
false
false
false
false
false
0
convert_callers (struct cgraph_node *node, tree old_decl, ipa_parm_adjustment_vec adjustments) { basic_block this_block; cgraph_for_node_and_aliases (node, convert_callers_for_node, &adjustments, false); if (!encountered_recursive_call) return; FOR_EACH_BB (this_block) { gimple_stm...
false
false
false
false
false
0
adv76xx_unregister_clients(struct adv76xx_state *state) { unsigned int i; for (i = 1; i < ARRAY_SIZE(state->i2c_clients); ++i) { if (state->i2c_clients[i]) i2c_unregister_device(state->i2c_clients[i]); } }
false
false
false
false
false
0
display_clear_display (DISPLAY_LINE **display) { register int i; for (i = 0; display[i]; i++) { display[i]->text[0] = '\0'; display[i]->textlen = 0; display[i]->inverse = 0; } }
false
false
false
false
false
0
brasero_medium_get_write_speeds (BraseroMedium *medium) { BraseroMediumPrivate *priv; guint64 *speeds; guint max = 0; guint i; g_return_val_if_fail (medium != NULL, NULL); g_return_val_if_fail (BRASERO_IS_MEDIUM (medium), NULL); priv = BRASERO_MEDIUM_PRIVATE (medium); if (!priv->wr_speeds) return NULL; w...
false
false
false
false
false
0
countRecords() const { int cnt = 0; int i, n = this->blocks.count(); for (i = 0; i < n; i++) cnt += this->blocks[i]->countRecords(); return cnt + 2; // two records are written in write() }
false
false
false
false
false
0
rtl92cu_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); switch (variable) { case HW_VAR_RCR: *((u32 *)(val)) = mac->rx_conf; break; case HW_VAR_RF_STATE: *((enu...
false
false
false
false
false
0
vt_env_stat_props() { static int propflags = 0; char* tmp; if (propflags == 0) { tmp = getenv("VT_STAT_PROPS"); if (tmp != NULL && strlen(tmp) > 0) { char tmpbuf[128]; char* p; char* tk; int dc; vt_cntl_msg(2, "VT_STAT_PROPS=%s", tmp); ...
true
true
true
false
true
1
setDesignMode(bool enable) { if (!impl) throw DOMException(DOMException::INVALID_STATE_ERR); static_cast<DocumentImpl*>( impl )->setDesignMode( enable ); }
false
false
false
false
false
0
analyze_class(GB_DESC *desc) { const char *name = desc->name; char *parent = NULL; bool autocreate = FALSE; bool nocreate = FALSE; uintptr_t hook; int nsymbol; int *sort; GB_DESC *p; int i; if (out_list && name[0] != '.') fprintf(out_list, "%s\n", name); desc++; while (desc->name) { hook = (uintptr_...
false
false
false
false
false
0
_afQueryMarker (int arg1, int arg2, int arg3, int arg4) { switch (arg1) { case AF_QUERY_SUPPORTED: return _af_pv_long(_af_units[arg2].markerCount != 0); case AF_QUERY_MAX_NUMBER: return _af_pv_long(_af_units[arg2].markerCount); } _af_error(AF_BAD_QUERY, "bad query selector"); return AU_NULL_PVLIST; }
false
false
false
false
false
0
build_create_shellscript(const gchar *fname, const gchar *cmd, gboolean autoclose, GError **error) { FILE *fp; gchar *str; gboolean success = TRUE; #ifdef G_OS_WIN32 gchar *expanded_cmd; #endif fp = g_fopen(fname, "w"); if (! fp) { set_file_error_from_errno(error, errno, "Failed to create file"); return FAL...
false
false
false
false
false
0
rkg_instack(int prior) { int x; switch(OperStack[TopOfOperStack].oper_type) { case LEFTPAREN: case KEYWORD: return(0); case OPERATOR: x = opr_tbl_priority(OperStack[TopOfOperStack].id)*2; x += (opr_tbl_rtol(OperStack[TopOfOperStack].id)?-1:1); return( x > prior*...
false
false
false
false
false
0
node_extract_schedule_multi_aff( struct isl_sched_node *node) { int i, j; isl_space *space; isl_local_space *ls; isl_aff *aff; isl_multi_aff *ma; int nrow, ncol; isl_int v; nrow = isl_mat_rows(node->sched); ncol = isl_mat_cols(node->sched) - 1; space = isl_space_from_domain(isl_space_copy(node->dim)); spac...
false
false
false
false
false
0
tempdisk(void) { char buf[4096]; int fd = temp_file(buf, sizeof buf); if (fd >= 0) remove(buf); return fd; }
false
false
false
false
false
0
getID(SymbolType type, int tsid) const throw (UnknownTypeSpecificIDException, NotYetFrozenException) { if (!frozen) throw NotYetFrozenException(); switch (type) { case eEndogenous: if (tsid < 0 || tsid >= (int) endo_ids.size()) throw UnknownTypeSpecificIDException(tsid, type); else ...
false
false
false
false
false
0
clientCommand(redisClient *c) { listNode *ln; listIter li; redisClient *client; if (!strcasecmp(c->argv[1]->ptr,"list") && c->argc == 2) { sds o = getAllClientsInfoString(); addReplyBulkCBuffer(c,o,sdslen(o)); sdsfree(o); } else if (!strcasecmp(c->argv[1]->ptr,"kill") && c->...
false
false
false
false
false
0
core_create_syms_from (const char * sym_table_file) { const int BUFSIZE = 1024; char * buf = (char *) xmalloc (BUFSIZE); char * address = (char *) xmalloc (BUFSIZE); char type; char * name = (char *) xmalloc (BUFSIZE); bfd_vma min_vma = ~(bfd_vma) 0; bfd_vma max_vma = 0; FILE * f; f = fopen (sym_tabl...
false
false
false
false
true
1
JABBERDialog(void *data) { JABBER_Dialog_PTR jd; if (!data) return; eb_debug(DBG_JBR, ">\n"); jd = (JABBER_Dialog_PTR) data; eb_do_dialog(jd->message, jd->heading, jabber_dialog_callback, (gpointer) jd); eb_debug(DBG_JBR, "<\n"); return; }
false
false
false
false
false
0
do_proc_dointvec_jiffies_conv(bool *negp, unsigned long *lvalp, int *valp, int write, void *data) { if (write) { if (*lvalp > LONG_MAX / HZ) return 1; *valp = *negp ? -(*lvalp*HZ) : (*lvalp*HZ); } else { int val = *valp; unsigned long lval; if (val < 0) { *negp = true; lval = -(unsigned...
false
false
false
false
false
0
message_dump(int in_fd, int out_fd, struct message *m) { char buf[8196]; int bytes; if (m != NULL && m->type != MESSAGE_NONE) { message_write(out_fd, m); } while ((bytes = full_read(in_fd, 1, buf, 8192, 8192)) > 0) { if (bytes != full_write(out_fd, 1, buf, bytes)) { libspamc_log(m->priv->fla...
false
false
false
false
false
0
dst_check_sum(u8 *buf, u32 len) { u32 i; u8 val = 0; if (!len) return 0; for (i = 0; i < len; i++) { val += buf[i]; } return ((~val) + 1); }
false
false
false
false
false
0
regcache_sync_region(struct regmap *map, unsigned int min, unsigned int max) { int ret = 0; const char *name; bool bypass; BUG_ON(!map->cache_ops); map->lock(map->lock_arg); /* Remember the initial bypass state */ bypass = map->cache_bypass; name = map->cache_ops->name; dev_dbg(map->dev, "Syncing %s ca...
false
false
false
false
false
0
e_kbd_dict_matches_lookup(E_Kbd_Dict *kd) { // find all matches and sort them while (kd->matches.list) { E_Kbd_Dict_Word *kw; kw = kd->matches.list->data; eina_stringshare_del(kw->word); free(kw); kd->matches.list = eina_list_remove_list(kd->matches.list, kd->matches....
false
false
false
false
false
0
efx_mcdi_flush_rxqs(struct efx_nic *efx) { struct efx_channel *channel; struct efx_rx_queue *rx_queue; MCDI_DECLARE_BUF(inbuf, MC_CMD_FLUSH_RX_QUEUES_IN_LEN(EFX_MAX_CHANNELS)); int rc, count; BUILD_BUG_ON(EFX_MAX_CHANNELS > MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MAXNUM); count = 0; efx_for_each_channel(...
false
false
false
false
false
0
gog_color_polar_plot_set_property (GObject *obj, guint param_id, GValue const *value, GParamSpec *pspec) { GogColorPolarPlot *plot = GOG_COLOR_POLAR_PLOT (obj); switch (param_id) { case GOG_COLOR_POLAR_PROP_HIDE_OUTLIERS: plot->hide_outliers = g_value_get_boolean (value); break; default: G_OBJECT_WARN_IN...
false
false
false
false
false
0
grl_tracker_source_browse_filesystem (GrlSource *source, GrlSourceBrowseSpec *bs) { GrlTrackerSourcePriv *priv = GRL_TRACKER_SOURCE_GET_PRIVATE (source); gchar *constraint; gchar *sparql_select; gchar *sparql_final; gchar ...
false
false
false
false
false
0
find_score_maximum(GwyDataField *correlation_score, gint *max_col, gint *max_row) { gint i, n, maxi = 0; gdouble max = -G_MAXDOUBLE; const gdouble *data; n = gwy_data_field_get_xres(correlation_score) *gwy_data_field_get_yres(correlation_score); data = ...
false
false
false
false
false
0
krelease(But *but, const char *keystr, KeySym sym) { ButOut retval = BUTOUT_CAUGHT; int newflags = but->flags; Ct *ct = but->iPacket; bool pressRf = FALSE; if (!(newflags & BUT_KEYPRESSED)) return(0); newflags &= ~(BUT_KEYPRESSED|BUT_PRESSED|BUT_LOCKED); if (keystr != NULL) { /* If keystr...
false
false
false
false
false
0
bnx2_resume(struct device *device) { struct pci_dev *pdev = to_pci_dev(device); struct net_device *dev = pci_get_drvdata(pdev); struct bnx2 *bp = netdev_priv(dev); if (!netif_running(dev)) return 0; bnx2_set_power_state(bp, PCI_D0); netif_device_attach(dev); bnx2_request_irq(bp); bnx2_init_nic(bp, 1); bnx2...
false
false
false
false
false
0
ftp_lite_open( const char *host, int port ) { char buffer[FTP_LITE_LINE_MAX]; struct ftp_lite_server *s; int response; int save_errno; int net=-1; s = malloc(sizeof(*s)); if(!s) return 0; s->authtype = PLAIN; s->auth_done = 0; s->hostname = strdup(host); s->went_binary = 0; s->data_channel_authentication ...
false
false
false
false
false
0
readdict(n, argc, argv) int n, argc; char *CONST argv[]; { FILE *fp; struct stat st; off_t size; int c, max; if (nocontent) return; qsort(hinsilist, HINSILISTSIZ, sizeof(hinsitable), cmphinsi); for (; n < argc; n++) { size = (off_t)0; if (verbose) { fprintf(stdout, "%s:\n", argv[n]); if (stat(argv[n]...
false
false
false
false
false
0
test_requeststat() { icalproperty *p; icalrequeststatus s; struct icalreqstattype st, st2; char temp[1024]; s = icalenum_num_to_reqstat(2,1); ok("icalenum_num_to_reqstat(2,1)",(s == ICAL_2_1_FALLBACK_STATUS)); ok("icalenum_reqstat_major()",(icalenum_reqstat_major(s) == 2)); ok("icalen...
true
true
false
false
false
1
bc_write (GtsObject * o, FILE * fp) { g_assert (GFS_BC (o)->v); fprintf (fp, "%s %s", o->klass->info.name, GFS_BC (o)->v->name); }
false
false
false
false
false
0
xfs_iformat_local( xfs_inode_t *ip, xfs_dinode_t *dip, int whichfork, int size) { xfs_ifork_t *ifp; int real_size; /* * If the size is unreasonable, then something * is wrong and we just bail out rather than crash in * kmem_alloc() or memcpy() below. */ if (unlikely(size > XFS_DFORK_SIZE(dip, ip->i_...
false
true
false
false
false
1
save(ghnode *n) { if (gsp >= stacksize) { int nstacksize = stacksize * 2 + 100 ; alloced += sizeof(ghnode *)*(nstacksize-stacksize) ; stack = (ghnode **)realloc(stack, nstacksize * sizeof(ghnode *)) ; if (stack == 0) lifefatal("Out of memory (3).") ; stacksize = nstacksize ; ...
false
false
false
true
false
1
CreateProjectFolders(cmMakefile& makefile, const cmTarget& target) const { string projectDirectory = GetOutputDirectory(makefile, target); if (!cmSystemTools::MakeDirectory(projectDirectory.c_str())) { cmSystemTools::Error( "Error creating directory ", projectDirectory.c_str()); } strin...
false
false
false
false
false
0
md_init_ctx( md_context_t *ctx, const md_info_t *md_info ) { if( md_info == NULL || ctx == NULL ) return POLARSSL_ERR_MD_BAD_INPUT_DATA; memset( ctx, 0, sizeof( md_context_t ) ); if( ( ctx->md_ctx = md_info->ctx_alloc_func() ) == NULL ) return POLARSSL_ERR_MD_ALLOC_FAILED; ctx->md_inf...
false
false
false
false
false
0
move(int dx, int dy) { if (dx || dy) { if (bounds_initialized) { xmin+=dx; ymin+=dy; xmax+=dx; ymax+=dy; } gma_move(dx, dy); } }
false
false
false
false
false
0
close_bus (void) { if (!bus_open) { write_log (_T("IMAGE close_bus() when already closed!\n")); return; } for (int i = 0; i < MAX_TOTAL_SCSI_DEVICES; i++) { struct cdunit *cdu = &cdunits[i]; if (cdu->open) close_device (i); cdu->enabled = false; } bus_open = 0; write_log (_T("IMAGE driver closed.\n")...
false
false
false
false
false
0
jas_stream_fillbuf(jas_stream_t *stream, int getflag) { int c; /* The stream must not be in an error or EOF state. */ if ((stream->flags_ & (JAS_STREAM_ERRMASK)) != 0) { return EOF; } /* The stream must be open for reading. */ if ((stream->openmode_ & JAS_STREAM_READ) == 0) { return EOF; } /* Make a half...
false
false
false
false
false
0
findTagByNum( FLMUINT uiTagNum, FLMUINT * puiInsertPos ) { FLM_TAG_INFO * pTagInfo = NULL; FLMUINT uiTblSize; FLMUINT uiLow; FLMUINT uiMid; FLMUINT uiHigh; FLMUINT uiTblTagNum; // Do binary search in the table if ((uiTblSize = m_uiNumTags) == 0) { if (puiInsertPos) { *puiInsertPos = 0; ...
false
false
false
false
false
0
et_disconnect_model (ETable *et) { if (et->model == NULL) return; if (et->table_model_change_id != 0) g_signal_handler_disconnect ( et->model, et->table_model_change_id); if (et->table_row_change_id != 0) g_signal_handler_disconnect ( et->model, et->table_row_change_id); if (et->table_cell_change_id !=...
false
false
false
false
false
0
Save() { if(!state_file) return; FileStream *f=new FileStream(state_file,O_WRONLY|O_TRUNC|O_CREAT); f->set_lock(); f->set_create_mode(0600); state_io=new IOBufferFDStream(f,IOBuffer::PUT); Save(state_io); state_io->PutEOF(); }
false
false
false
false
false
0
seahorse_operation_mark_progress_full (SeahorseOperation *op, const gchar *message, gdouble current, gdouble total) { if (current > total) current = total; seahorse_operation_mark_progress (op, message, total <= 0 ? -1 : current / total); }
false
false
false
false
false
0
proc_get_long(char **buf, size_t *size, unsigned long *val, bool *neg, const char *perm_tr, unsigned perm_tr_len, char *tr) { int len; char *p, tmp[TMPBUFLEN]; if (!*size) return -EINVAL; len = *size; if (len > TMPBUFLEN - 1) len = TMPBUFLEN - 1; memcpy(tmp, *buf, len); tmp[len] = 0; p = tmp; ...
true
true
false
false
false
1
ContextItemAt(GrpLineAndFile & lnf, int irit, std::string staInput, std::string staAlias) { Assert(irit <= static_cast<int>(m_vprit.size())); if (irit == signed(m_vprit.size())) { Symbol psymClass = g_cman.SymbolTable()->FindSymbol(staInput); GdlRuleItem * prit; if (psymClass && psymClass->FitsSymbolType(ksy...
false
false
false
false
false
0
make_nl_model (MODEL *pmod, nlspec *spec, const DATASET *dset) { nl_model_allocate(pmod, spec); if (pmod->errcode) { return pmod->errcode; } pmod->t1 = spec->t1; pmod->t2 = spec->t2; pmod->nobs = spec->nobs; /* hmm */ pmod->dfn = pmod->ncoeff; pmod->dfd = pmod->nobs - pm...
false
false
false
false
false
0
notify_task_finish (TrackerExtractTask *task, gboolean success) { TrackerExtract *extract; TrackerExtractPrivate *priv; StatisticsData *stats_data; extract = task->extract; priv = TRACKER_EXTRACT_GET_PRIVATE (extract); /* Reports and ongoing tasks may be * accessed from other th...
false
false
false
false
false
0
stringlist_add(struct stringlist **list, const char *string) { struct stringlist *tmp; assert(list); assert(string); tmp = xmalloc(sizeof(struct stringlist)); tmp->str = xstrdup(string); tmp->next = *list; *list = tmp; }
false
false
false
false
false
0
clear_pasid_state(struct device_state *dev_state, int pasid) { struct pasid_state **ptr; unsigned long flags; spin_lock_irqsave(&dev_state->lock, flags); ptr = __get_pasid_state_ptr(dev_state, pasid, true); if (ptr == NULL) goto out_unlock; *ptr = NULL; out_unlock: spin_unlock_irqrestore(&dev_state->lock, ...
false
false
false
false
false
0
brcms_c_update_beacon_hw(struct brcms_c_info *wlc, struct sk_buff *beacon, u16 tim_offset, u16 dtim_period) { struct brcms_hardware *wlc_hw = wlc->hw; struct bcma_device *core = wlc_hw->d11core; /* Hardware beaconing for this config */ u32 both_valid = MCMD_BCN0VLD | MCMD_BCN1VLD; /* Check if b...
false
false
false
false
false
0
glusterd_op_reset_volume (dict_t *dict) { glusterd_volinfo_t *volinfo = NULL; int ret = -1; char *volname = NULL; char *key = NULL; int32_t is_force = 0; ret = dict_get...
false
false
false
false
false
0
rv8803_alarm_irq_enable(struct device *dev, unsigned int enabled) { struct i2c_client *client = to_i2c_client(dev); struct rv8803_data *rv8803 = dev_get_drvdata(dev); int ctrl, flags, err; unsigned long irqflags; ctrl = rv8803->ctrl; if (enabled) { if (rv8803->rtc->uie_rtctimer.enabled) ctrl |= RV8803_CTRL...
false
false
false
false
false
0
is_startline(const pcre_uchar *code, unsigned int bracket_map, compile_data *cd, int atomcount) { do { const pcre_uchar *scode = first_significant_code( code + PRIV(OP_lengths)[*code], FALSE); register int op = *scode; /* If we are at the start of a conditional assertion group, *both* the conditiona...
false
false
false
false
false
0
translate_outgoing_seek (GnlObject * object, GstEvent * event) { GstEvent *event2; GstFormat format; gdouble rate; GstSeekFlags flags; GstSeekType curtype, stoptype; GstSeekType ncurtype; gint64 cur; guint64 ncur; gint64 stop; guint64 nstop; guint32 seqnum = GST_EVENT_SEQNUM (event); gst_event_...
false
false
false
false
false
0
pk_transaction_list_cancel_background (PkTransactionList *tlist) { guint i; GPtrArray *array; PkTransactionItem *item; PkTransactionState state; g_return_if_fail (PK_IS_TRANSACTION_LIST (tlist)); /* cancel all running background transactions */ array = tlist->priv->array; for (i = 0; i < array->len; i++) { ...
false
false
false
false
false
0
gf_isom_set_track_id(GF_ISOFile *movie, u32 trackNumber, u32 trackID) { GF_TrackReferenceTypeBox *ref; GF_TrackBox *trak, *a_trak; u32 i, j, k; trak = gf_isom_get_track_from_file(movie, trackNumber); if (trak && (trak->Header->trackID==trackID)) return GF_OK; a_trak = gf_isom_get_track_from_id(movie->moov, track...
false
false
false
false
false
0
mei_txe_aliveness_set(struct mei_device *dev, u32 req) { struct mei_txe_hw *hw = to_txe_hw(dev); bool do_req = hw->aliveness != req; dev_dbg(dev->dev, "Aliveness current=%d request=%d\n", hw->aliveness, req); if (do_req) { dev->pg_event = MEI_PG_EVENT_WAIT; mei_txe_br_reg_write(hw, SICR_HOST_ALIVENESS_REQ...
false
false
false
false
false
0
MarkRequired(InRootSetFunc &userFunc) { if (_config->Find("APT::Solver", "internal") != "internal") return true; bool follow_recommends; bool follow_suggests; bool debug_autoremove = _config->FindB("Debug::pkgAutoRemove",false); // init the states for(PkgIterator p = PkgBegin(); !p.end(); ++p)...
false
false
false
false
false
0
save() const { AppSettings->beginGroup("/History/"); AppSettings->setValue("RecentFiles", items()); AppSettings->endGroup(); }
false
false
false
false
false
0
rpc_time(const char *host, unsigned int ping_vers, unsigned int ping_proto, long seconds, long micros, unsigned int option, double *result) { int status; double taken; struct timeval start, end; struct timezone tz; char *proto = (ping_proto & RPC_PING_UDP) ? "udp" : "tcp"; unsigned long vers = ping_ve...
false
false
false
false
false
0
_q_updateNativeSize() { const QSize &size = surface->surfaceFormat().sizeHint(); if (nativeSize != size) { nativeSize = size; updateRects(); emit q_ptr->nativeSizeChanged(nativeSize); } }
false
false
false
false
false
0
HeapOverflowSanityCheck(const size_t count, const size_t quantum) { size_t size; size=count*quantum; if ((count == 0) || (quantum != (size/count))) { errno=ENOMEM; return(MagickTrue); } return(MagickFalse); }
false
false
false
false
false
0
GC_maybe_gc(void) { static int n_partial_gcs = 0; GC_ASSERT(I_HOLD_LOCK()); ASSERT_CANCEL_DISABLED(); if (GC_should_collect()) { if (!GC_incremental) { /* FIXME: If possible, GC_default_stop_func should be used here */ GC_try_to_collect_inner(GC_never_stop_func); ...
false
false
false
false
false
0
autohelperaa_attackpat24(int trans, int move, int color, int action) { int A, B; UNUSED(color); UNUSED(action); A = AFFINE_TRANSFORM(649, trans, move); B = AFFINE_TRANSFORM(723, trans, move); return countlib(A) == 3 && countlib(B) > 1 && play_attack_defend_n(color, 1, 1, move, A); }
false
false
false
false
false
0
__ecereMethod_Workspace_RemoveBreakpoint(struct __ecereNameSpace__ecere__com__Instance * this, struct Breakpoint * bp) { struct Workspace * __ecerePointer_Workspace = (struct Workspace *)(this ? (((char *)this) + __ecereClass_Workspace->offset) : 0); __ecerePointer_Workspace->bpCount--; __ecereMethod_BreakpointsView_R...
true
true
false
false
false
1
delete_table(Pointer p) { struct _string *s, *n; struct _table *table = (struct _table *)p; HashTable hash = table->hash; DXDestroyHash(hash); for (s = table->strings; s; s = n) { n = s->next; DXFree((Pointer)s); } return OK; }
false
false
false
false
false
0
task_clear_jobctl_pending(struct task_struct *task, unsigned long mask) { BUG_ON(mask & ~JOBCTL_PENDING_MASK); if (mask & JOBCTL_STOP_PENDING) mask |= JOBCTL_STOP_CONSUME | JOBCTL_STOP_DEQUEUED; task->jobctl &= ~mask; if (!(task->jobctl & JOBCTL_PENDING_MASK)) task_clear_jobctl_trapping(task); }
false
false
false
false
false
0
gf_log_get_xl_loglevel (void *this) { xlator_t *xl = this; if (!xl) return 0; return xl->loglevel; }
false
false
false
false
false
0
mkprogname (char *s) { char *t; t = strrchr (s, '/'); if (t == (char *)NULL) t = s; else t++; return my_strdup (t); }
false
false
false
false
false
0
add_ie(PLCI *plci, byte code, byte *p, word p_length) { word i; if (!(code & 0x80) && !p_length) return; if (plci->req_in == plci->req_in_start) { plci->req_in += 2; } else { plci->req_in--; } plci->RBuffer[plci->req_in++] = code; if (p) { plci->RBuffer[plci->req_in++] = (byte)p_length; for (i = 0; i...
false
false
false
false
true
1
addCacheEntry() { QDialog dialog(this); dialog.resize(400, 200); dialog.setWindowTitle(tr("Add Cache Entry")); QVBoxLayout* l = new QVBoxLayout(&dialog); AddCacheEntry* w = new AddCacheEntry(&dialog, this->AddVariableCompletions); QDialogButtonBox* btns = new QDialogButtonBox( QDialogButtonBox::Ok | Q...
false
false
false
false
false
0
qla4_8xxx_minidump_process_l2tag(struct scsi_qla_host *ha, struct qla8xxx_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr) { uint32_t addr, r_addr, c_addr, t_r_addr; uint32_t i, k, loop_count, t_value, r_cnt, r_value; unsigned long p_wait, w_time, p_mask; uint32_t c_value_w, c_value_r; struct qla8xxx_min...
false
false
false
false
false
0
StartAssociation() { // need to make sure no cached PresContAC are around: Internals->mConnection->GetAcceptedPresentationContexts().clear(); if( Internals->mConnection->GetPresentationContexts().empty() ) { return false; } ULEvent theEvent(eAASSOCIATERequestLocalUser, NULL); network::EStateID th...
false
false
false
false
false
0