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
kbd_reply(struct cpssp *cpssp, unsigned char byte) { if (! cpssp->outcount && cpssp->state_clkrunning) { /* Sending/receiving a byte using 9600 Baud takes about 1ms. */ cpssp->outrunning = 1; time_call_after(TIME_HZ / 1000, kbd_reply2, cpssp); } cpssp->outbuf[cpssp->outhead] = byte; cpssp->outhead = (cpssp...
false
false
false
false
false
0
__logbf (float x) { int32_t ix, rix; float ret; GET_FLOAT_WORD (ix, x); ix &= 0x7fffffff; /* high |x| */ if (ix == 0) return (float) -1.0 / fabsf (x); if (ix >= 0x7f800000) return x * x; if (__builtin_expect ((rix = ix >> 23) == 0, 0)) { /* POSIX specifies that denormal number is treat...
false
false
false
false
false
0
validate_expr_tree(node *tree) { int res = validate_eval_input(tree); if (!res && !PyErr_Occurred()) err_string("could not validate expression tuple"); return (res); }
false
false
false
false
false
0
giraffe_flat_apply(GiExtraction *extraction, const GiTable *fibers, const GiImage *flat, const GiImage* errors, GiFlatConfig *config) { cxint status = 0; if (extraction == NULL || extraction->spectra == NULL) { return -1; } if (fibers == NULL) { ...
false
false
false
false
false
0
rem_log_tree(struct namespace *ns, struct entry *ent) { char *path; struct entry *next; while(ent != NULL) { path = av_namespace_getpath(ent); av_log(AVLOG_ERROR, " %s", path); av_free(path); rem_log_tree(ns, av_namespace_subdir(ns, ent)); next = av_namespace_next...
false
false
false
false
false
0
resolves_to_fixed_type_p (tree instance, int* nonnull) { tree t = TREE_TYPE (instance); int cdtorp = 0; tree fixed; /* processing_template_decl can be false in a template if we're in fold_non_dependent_expr, but we still want to suppress this check. */ if (processing_template_decl || (current_fun...
false
false
false
false
false
0
wm8904_set_deemph(struct snd_soc_codec *codec) { struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); int val, i, best; /* If we're using deemphasis select the nearest available sample * rate. */ if (wm8904->deemph) { best = 1; for (i = 2; i < ARRAY_SIZE(deemph_settings); i++) { if (abs(deemp...
false
false
false
false
false
0
videocodec_register (const struct videocodec *codec) { struct codec_list *ptr, *h = codeclist_top; if (!codec) { dprintk(1, KERN_ERR "videocodec_register: no data!\n"); return -EINVAL; } dprintk(2, "videocodec: register '%s', type: %x, flags %lx, magic %lx\n", codec->name, codec->type, codec->flags, codec...
false
false
false
false
false
0
find_config(struct capicard *cards, char *driver) { struct capicard *card; for (card = cards; card; card = card->next) { if (card->found) continue; if (strcmp(card->driver,driver) == 0) break; } if (card) { card->found = 1; return card; } if (strcmp(driver, "b1pci") == 0) { for (card = cards; ca...
false
false
false
false
false
0
MmapHook(const void* result, const void* start, size_t size, int prot, int flags, int fd, off_t offset) { if (FLAGS_mmap_log) { // log it // We use PRIxS not just '%p' to avoid deadlocks // in pretty-printing of NULL as "nil". // TODO(maxim): instead should use a safe snprintf reimpl...
false
false
false
false
false
0
cmp_huffman_symbol(const void* a, const void* b) { int status = 0; huffman_canon_t* ha = ((huffman_canon_t*)a); huffman_canon_t* hb = ((huffman_canon_t*)b); if (ha->nbits == hb->nbits) status = (ha->symbol - hb->symbol); return status; }
false
false
false
false
false
0
blx_writecell(blxcontext_t *ctx, blxdata *cell, int cellrow, int cellcol) { unsigned char *uncompbuf=NULL,*outbuf=NULL; int bufsize, uncompsize, compsize; int status=0; int i,allundef; /* Calculate statistics and find out if all elements have undefined values */ allundef=1; for(i=0; i < ctx...
false
false
false
false
false
0
accept_local_connections(fd_set *readfds) { int rc; if(local_server_socket < 0 || !FD_ISSET(local_server_socket, readfds)) return 0; int s; s = accept(local_server_socket, NULL, NULL); if(s < 0) { if(errno != EINTR && errno != EAGAIN) { perror("accept(local_server_sock...
false
false
false
false
false
0
krb5_cc_set_default_name(krb5_context context, const char *name) { krb5_error_code ret = 0; char *p = NULL, *exp_p = NULL; if (name == NULL) { const char *e = NULL; if(!issuid()) { e = getenv("KRB5CCNAME"); if (e) { p = strdup(e); if (context->default_cc_name_env) free(context->defau...
false
false
false
false
false
0
H5B2_hdr_delete(H5B2_hdr_t *hdr, hid_t dxpl_id) { unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting v2 B-tree header */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) /* Sanity check */ HDassert(hdr); #ifndef NDEBUG { unsigned hdr_status = 0;...
false
false
false
false
false
0
slotEngineDone() { finishedCurrentFeed(); d->currentText = fetchMoreText(); if ( d->currentText.isNull() ) { emit done(); } else { d->engine->setText( d->currentText ); d->engine->start(); } }
false
false
false
false
false
0
check_sound(event_t moo) /* called from main event loop */ { if(moo.type == evtype_SoundNotify) { zword dummylocals[16]; in_timer = TRUE; mop_call(moo.val2, 0, dummylocals, -2); /* add a special stack frame */ decode(); /* start interpreting the routine */ in_timer = F...
false
false
false
false
false
0
event_enter_client(ObClient *client) { g_assert(config_focus_follow); if (is_enter_focus_event_ignored(event_curserial)) { ob_debug_type(OB_DEBUG_FOCUS, "Ignoring enter event with serial %lu " "on client 0x%x", event_curserial, client->window); return; } ob_debug_...
false
false
false
false
false
0
AllocNewBlock(const size_t block_size) { AllocatedBlock *block; // Find the next block. if ( blocks_alloced_ < arraysize(first_blocks_) ) { // Use one of the pre-allocated blocks block = &first_blocks_[blocks_alloced_++]; } else { // oops, out of space, move to the vector if (overf...
false
false
false
false
false
0
ldapsvr_modify_dn(GHashTable *hash, gchar *dn) { Rdn *rdn; gchar *pos, *compare; gchar *rest; gchar *val; cm_return_val_if_fail(hash != NULL || dn != NULL, NULL); pos = g_strstr_len(dn, strlen(dn), "="); if (!pos) return NULL; compare = g_strndup(dn, pos - dn); pos++; rest = g_strstr_len(pos, strlen(pos...
false
false
false
false
false
0
bnxt_open(struct net_device *dev) { struct bnxt *bp = netdev_priv(dev); int rc = 0; rc = bnxt_hwrm_func_reset(bp); if (rc) { netdev_err(bp->dev, "hwrm chip reset failure rc: %x\n", rc); rc = -1; return rc; } return __bnxt_open_nic(bp, true, true); }
false
false
false
false
false
0
notify_goto_response(GtkWidget *w, gint response) { struct city *pcity = NULL; struct tile *ptile = g_object_get_data(G_OBJECT(w), "tile"); switch (response) { case 1: center_tile_mapcanvas(ptile); break; case 2: pcity = tile_city(ptile); if (center_when_popup_city) { center_tile_mapca...
false
false
false
false
false
0
FormatLine( char* into, const char* dir, const char* type, unsigned int reliableMessageNumber, unsigned int frame, const char* idToPrint , const BitSize_t bitLen, unsigned long long time, const SystemAddress& local, const SystemAddress& remote, unsigned int splitPacketId, unsigned int splitPacketIndex, unsigned int ...
false
false
false
false
false
0
process(id_t ID, void*data) { if(!data){ // post("========================================= oops: %d", ID); return NULL; } InData*in=reinterpret_cast<InData*>(data); OutData*out=new OutData(*in); if(!out) { return NULL; } // DOIT out->img=n...
false
false
false
false
false
0
copyfile( const char *source, const char *target ) { pfs_name psource, ptarget; pfs_ssize_t result; if(!pfs_enable_small_file_optimizations) { errno = ENOSYS; return -1; } if(resolve_name(source,&psource)<0) return -1; if(resolve_name(target,&ptarget)<0) return -1; if(psource.service == ptarget.service) {...
false
false
false
false
false
0
elm_index_item_prepend(Evas_Object *obj, const char *letter, Evas_Smart_Cb func, const void *data) { Elm_Index_Item *it; ELM_INDEX_CHECK(obj) NULL; ELM_INDEX_DATA_GET(obj, sd); it = _item_new(obj, letter, func, data); if (!it) return ...
false
false
false
false
false
0
on_session_reauthentication_started (GdmSession *session, int pid_of_caller, const char *address, GdmSimpleSlave *slave) { GSimpleAsyncResult *result; gpointer ...
false
false
false
false
false
0
SelectFPToI(const Instruction *I, bool IsSigned) { MVT DstVT, SrcVT; Type *DstTy = I->getType(); if (!isTypeLegal(DstTy, DstVT)) return false; if (DstVT != MVT::i32 && DstVT != MVT::i64) return false; // If we don't have FCTIDUZ and we need it, punt to SelectionDAG. if (DstVT == MVT::i64 && !IsSig...
false
false
false
false
false
0
show_coll_version(const lam_ssi_t **coll_modules, const string& which, const string& scope, const string& ver_type) { int i; const lam_ssi_t *ls; bool want_all_modules = (which == type_all); for (i = 0; coll_modules[i] != NULL; ++i) { ls = coll_modules[i]; if (!want_all_modules && which != ls...
false
false
false
false
false
0
ndmda_count_invalid_fh_info (struct ndm_session *sess) { struct ndm_data_agent * da = &sess->data_acb; int i, count; struct ndmp9_name * nl; count = 0; for (i = 0; i < da->nlist_tab.n_nlist; i++) { nl = &da->nlist_tab.nlist[i]; if (nl->fh_info.valid != NDMP9_VALIDITY_VALID) count++; } return count; }
false
false
false
false
false
0
adap2type(struct adapter *adapter) { int type = 0; switch (adapter->params.rev) { case T3_REV_A: type = T3A; break; case T3_REV_B: case T3_REV_B2: type = T3B; break; case T3_REV_C: type = T3C; break; } return type; }
false
false
false
false
false
0
S_to_byte_substr(pTHX_ regexp *prog) { /* Converts substr fields in prog from UTF-8 to bytes, calling fbm_compile * on the converted value; returns FALSE if can't be converted. */ dVAR; int i = 1; PERL_ARGS_ASSERT_TO_BYTE_SUBSTR; do { if (prog->substrs->data[i].utf8_substr && !prog->su...
false
false
false
false
false
0
fat_readdir(File_t *Dir, struct dirent *de) { int res; DirEnt_t D; // fprintf(stderr,"fat_readdir: CurClus: %u, CurOff: %u\n",Dir->CurClus, Dir->CurOff); if ((res = fetch_next_direntry(Dir->V, &D, &(Dir->CurClus), &(Dir->CurOff))) <=0 ) { fprintf(stderr, "readdir: error in fetch_next_direntry\n"); return -1; }...
false
false
false
false
false
0
i810DrawRectangle( void *drv, void *dev, DFBRectangle *rect ) { I810DriverData *i810drv = (I810DriverData *) drv; I810DeviceData *i810dev = (I810DeviceData *) dev; u32 dest; if (rect->x < i810dev->clip_x1) rect->x = i810dev->clip_x1; if (i810dev->clip_x2 < rect->x + rect->w) rect->w = i810dev->clip_x2 - rect...
false
false
false
false
false
0
seqPhylipReadseq(const AjPStr rdline, const AjPTable phytable, const AjPStr token, ajuint len, ajuint* ilen, AjBool* done) { SeqPMsfItem phyitem; *done = ajFalse; if(!seqRegPhylipSeq2) seqRegPhylipSeq2 = ajRegCompC("[^ \t\n\r]"); i...
false
false
false
false
false
0
mkplan(planner *ego, const problem *p) { plan *pln; md5 m; unsigned slvndx; flags_t flags_of_solution; solution *sol; solver *s; ASSERT_ALIGNED_DOUBLE; A(LEQ(PLNR_L(ego), PLNR_U(ego))); if (ESTIMATEP(ego)) PLNR_TIMELIMIT_IMPATIENCE(ego) = 0; /* canonical form */ #ifde...
false
false
false
false
false
0
makeDaemon() { struct sigaction act, old; int pid, status; /* Ignore child death signals */ memset(&act, 0, sizeof(act)); act.sa_sigaction = (void (*)(int, siginfo_t*, void*)) SIG_DFL; sigemptyset(&act.sa_mask); act.sa_flags = SA_NOCLDSTOP | SA_RESTART | SA_S...
false
false
false
false
false
0
write_tag_11_packet(char *dest, size_t *remaining_bytes, char *contents, size_t contents_length, size_t *packet_length) { size_t packet_size_length; size_t max_packet_size; int rc = 0; (*packet_length) = 0; /* This format is inspired by OpenPGP; see RFC 2440 * packet tag 11 */ max_packet_size = (1 ...
false
true
false
false
false
1
check_match() { _from_pp_from.clear(); _from_pp_to.clear(); _to_pp_from.clear(); _to_pp_to.clear(); _defs.clear(); // check configurations //fprintf(stderr, "CONF\n"); for (int i = 0; i < _match.size(); i++) if (_match[i]) { if (!match_config(_pat->element(i)->configuration(), _match[i]->conf...
false
false
false
false
false
0
mm_response_cb (GtkDialog *dbox, int response, gpointer data) { switch (response) { case GTK_RESPONSE_ACCEPT: mm_save (); break; default: is_visible = FALSE; gtk_widget_hide (manage_dlg); } }
false
false
false
false
false
0
DebugPrint(ostream &out, const Vocab &vocab) const { Phrase::DebugPrint(out, vocab); for (size_t ind = 0; ind < m_align.size(); ++ind) { const AlignPair &alignPair = m_align[ind]; out << alignPair.first << "-" << alignPair.second << " "; } out << ", "; for (size_t ind = 0; ind < m_scores.size(); +...
false
false
false
false
false
0
is_yuv_planar(const PixFmtInfo *ps) { return (ps->color_type == FF_COLOR_YUV || ps->color_type == FF_COLOR_YUV_JPEG) && ps->pixel_type == FF_PIXEL_PLANAR; }
false
false
false
false
false
0
DSDPDSMatTest(DSDPDSMat A){ int info; DSDPFunctionBegin; if (A.dsdpops==0 || A.dsdpops==&dsdpmatops2){ } else if (A.dsdpops->mattest){ DSDPLogInfo(0,120,"Start to set DS Matrix\n"); info=(A.dsdpops->mattest)(A.matdata); DSDPChkMatError(A,info); DSDPLogInfo(0,120,"Done set DS Matrix\n"); } else { ...
false
false
false
false
false
0
sqlite3ExprListDelete(ExprList *pList){ int i; struct ExprList_item *pItem; if( pList==0 ) return; assert( pList->a!=0 || (pList->nExpr==0 && pList->nAlloc==0) ); assert( pList->nExpr<=pList->nAlloc ); for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){ sqlite3ExprDelete(pItem->pExpr); sqliteFre...
false
false
false
false
false
0
distance(const Vector &v, const Matrix &m, double bound) const { switch (type()) { case ESegment: return Segment(m * cp(0), m * cp(1)).distance(v, bound); case EBezier: case EQuad: return (m * bezier()).distance(v, bound); case EArc: return (m * arc()).distance(v, bound); case ESpline: ...
false
false
false
false
false
0
RemovePointer(table, index) PointerTable *table; I index; { if (table != NULL && index >= 0 && index < table->length) table->ptr[index] = (void *)(-1); }
false
false
false
false
false
0
findBaseGroup(const QString &_baseGroupName, bool deep) { if (!m_baseGroupDict) return KServiceGroup::Ptr(); // Error! // Warning : this assumes we're NOT building a database // But since findBaseGroup isn't called in that case... // [ see KServiceTypeFactory for how to do it if needed ] int offset = m...
false
false
false
false
false
0
do_debug( int set /* TRUE to set debugging */ ) /* * #pragma MCPP debug, #pragma MCPP end_debug, #debug, #end_debug * Return TRUE when diagnostic is issued else return FALSE. */ { struct Debug_arg { const char * arg_name; /* Name of option */ ...
false
false
false
false
false
0
nextToken (statementInfo *const st) { int c; tokenInfo *token = activeToken (st); do { c = skipToNonWhite(); switch (c) { case EOF: longjmp (Exception, (int) ExceptionEOF); break; case '(': analyzeParens (st); token = activeToken (st); break; case '*': setToken (st, TOKEN_STAR); break; case '...
false
false
false
false
false
0
dquot_resume(struct super_block *sb, int type) { struct quota_info *dqopt = sb_dqopt(sb); struct inode *inode; int ret = 0, cnt; unsigned int flags; for (cnt = 0; cnt < MAXQUOTAS; cnt++) { if (type != -1 && cnt != type) continue; mutex_lock(&dqopt->dqonoff_mutex); if (!sb_has_quota_suspended(sb, cnt)) {...
false
false
false
false
false
0
match (char *pat, char *s) { if (*pat==0) return *s==0; if (*pat=='*') { pat++; if (!*pat) return 1; while (*s) { if (match(pat,s)) return 1; s++; } return 0; } if (*s==0) return 0; if (*pat=='?') return match(pat+1,s+1); if (*pat!=*s) return 0; return match(pat+1,s+1); }
false
false
false
false
false
0
construct() { m_isa = m_sa; for (size_type i=0; i<m_sa.size(); ++i) { m_isa[m_sa[i]] = i; } m_psi = psi_type(this); m_bwt = bwt_type(this); }
false
false
false
false
false
0
cmd_compress_bitmap(stream_state * st, const byte * data, uint width_bits, uint raster, uint height, stream_cursor_write * pw) { uint width_bytes = bitmap_raster(width_bits); int status = 0; stream_cursor_read r; r.ptr = data - 1; if (raster == width_bytes) { r.limit = r...
false
false
false
false
false
0
add_symbol_value(ListNode * const symbol_map_head, const char * const symbol_names[], const size_t number_of_symbol_names, const void* value, const int refcount) { const char* symbol_name; ListNode *target_node; SymbolMapValue *ta...
false
false
false
false
false
0
os_banner_getinfo(void *banner_handle, os_banner_info_t *info) { osbanid_t banner = banner_handle; if (!banner || !banner->valid || !banner->win) return 1; winid_t win = banner->win; glui32 gwintype = banner->type; glui32 gwinmeth = banner->method; glui32 gstyletab = banner->st...
false
false
false
false
false
0
generate_objc_class_ext (tree property_list, tree context) { tree decl, expr, ltyp; tree weak_ivar_layout_tree; int size; location_t loc; vec<constructor_elt, va_gc> *v = NULL; char buf[BUFSIZE]; /* TODO: pass the loc in or find it from args. */ loc = UNKNOWN_LOCATION; /* const char *weak_ivar_layo...
false
false
false
false
false
0
cmd_sort_finalize (GObject *cmd) { CmdSort *me = CMD_SORT (cmd); if (me->data != NULL) gnm_sort_data_destroy (me->data); g_free (me->perm); if (me->old_contents != NULL) cellregion_unref (me->old_contents); gnm_command_finalize (cmd); }
false
false
false
false
false
0
finalize() { // color depth vigra_precondition( components == 1 || components == 3, "number of bands is not supported" ); header.depth = components << 3; // calculate the row stride and adjust the bands vector // row stride is rounded up to the n...
false
false
false
false
false
0
mud_log_open(MudLog *log) { gchar buf[1024]; gchar nameBuf[1024]; time_t t; g_snprintf(buf, 1024, "%s/.gnome-mud/logs/%s", g_get_home_dir(), log->priv->name); log->priv->dir = g_strdup(buf); if(!g_file_test(buf, G_FILE_TEST_IS_DIR)) if(mkdir(buf, 0777 ) == -1) return; ...
false
false
false
false
true
1
AcpiEvInstallSciHandler ( void) { UINT32 Status = AE_OK; ACPI_FUNCTION_TRACE (EvInstallSciHandler); Status = AcpiOsInstallInterruptHandler ((UINT32) AcpiGbl_FADT.SciInterrupt, AcpiEvSciXruptHandler, AcpiGbl_GpeXruptListHead); return_ACPI_STATUS (Status); }
false
false
false
false
false
0
ex_startinsert(eap) exarg_T *eap; { if (eap->forceit) { coladvance((colnr_T)MAXCOL); curwin->w_curswant = MAXCOL; curwin->w_set_curswant = FALSE; } /* Ignore the command when already in Insert mode. Inserting an * expression register that invokes a function can do this. */ if (State & ...
false
false
false
false
false
0
folders_for_fcc(char **errmsg) { char *rs = NULL; STRLIST_S *folders; FSTATE_S fs; dprint((1, "=== folders_for_fcc called ====\n")); /* Coming back from composer */ fix_windsize(ps_global); init_sigwinch(); /* Initialize folder state and dispatches */ memset(&fs, 0, sizeof(...
true
true
false
false
false
1
slapi_sdn_get_parent( const Slapi_DN *sdn, Slapi_DN *sdn_parent ) { struct berval parent_dn; if ( !(sdn->flag & FLAG_DN) ) { dnParent( (struct berval *)&sdn->ndn, &parent_dn ); slapi_sdn_set_ndn_byval( sdn_parent, parent_dn.bv_val ); } else { dnParent( (struct berval *)&sdn->dn, &parent_dn ); slapi_sdn_set_...
false
false
false
false
false
0
OnCreatureDeath(Creature* pCreature) { switch (pCreature->GetEntry()) { case NPC_KIRTONOS: SetData(TYPE_KIRTONOS, DONE); break; case NPC_RATTLEGORE: SetData(TYPE_RATTLEGORE, DONE); break; case NPC_RAS_FROSTWHISPER: SetData(TYPE_...
false
false
false
false
false
0
cdf_read(const cdf_info_t *info, off_t off, void *buf, size_t len) { size_t siz = (size_t)off + len; if ((off_t)(off + len) != (off_t)siz) { errno = EINVAL; return -1; } if (info->i_buf != NULL && info->i_len >= siz) { (void)memcpy(buf, &info->i_buf[off], len); return (ssize_t)len; } if (info->i_fd == ...
false
true
false
false
true
1
mthca_map_cmd(struct mthca_dev *dev, u16 op, struct mthca_icm *icm, u64 virt) { struct mthca_mailbox *mailbox; struct mthca_icm_iter iter; __be64 *pages; int lg; int nent = 0; int i; int err = 0; int ts = 0, tc = 0; mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); if (IS_ERR(mailbox)) return PTR_ERR(mai...
false
false
false
false
false
0
main( int argc, char* argv[] ) { qsrand( time(0) ); KAboutData aboutData( "klickety", 0, ki18n( "Klickety" ), "2.0", ki18n( "Klickety is an adaptation of the \"clickomania\" game" ), KAboutData::License_GPL, ki18n( "(c) 2002-2005, Nic...
false
false
false
false
false
0
esp_write_tgt_sync(struct esp *esp, int tgt) { u8 off = esp->target[tgt].esp_offset; u8 per = esp->target[tgt].esp_period; if (off != esp->prev_soff) { esp->prev_soff = off; esp_write8(off, ESP_SOFF); } if (per != esp->prev_stp) { esp->prev_stp = per; esp_write8(per, ESP_STP); } }
false
false
false
false
false
0
get_type_fun(hwloc_obj_type_t type) { switch (type) { case HWLOC_OBJ_SYSTEM: return system_draw; case HWLOC_OBJ_MACHINE: return machine_draw; case HWLOC_OBJ_NODE: return node_draw; case HWLOC_OBJ_SOCKET: return socket_draw; case HWLOC_OBJ_CACHE: return cache_draw; case HWLOC_OBJ_CORE: return c...
false
false
false
false
false
0
gdPngReadData (png_structp png_ptr, png_bytep data, png_size_t length) { int check; check = gdGetBuf (data, length, (gdIOCtx *) png_get_io_ptr (png_ptr)); if (check != (int)length) { png_error(png_ptr, "Read Error: truncated data"); } }
false
false
false
false
false
0
toString() const { if (addr.length() == 0) return name; string q=addr; // Only add < > if there's a name if (name.length() > 0) { q=" <" + q + ">"; // If name is all alphabetics, don't bother with quotes. string::const_iterator b=name.begin(), e=name.end(); while (b != e) { if (!strchr(" ABCDE...
false
false
false
false
false
0
databaseFileName() { return databasePath() + QDir::separator() + "zipcodes" + QDir::separator() + "zipcodes.db"; }
false
false
false
false
false
0
FuncTNUM_OBJ ( Obj self, Obj obj ) { Obj res; Obj str; Int len; const Char * cst; res = NEW_PLIST( T_PLIST, 2 ); SET_LEN_PLIST( res, 2 ); /* set the type ...
false
false
false
false
false
0
Probe() { if(!this->Probed) { this->Probed=true; this->Array=new vtkGPUInfoListArray; bool found=false; #ifdef VTK_USE_NVCONTROL // see sample code in nvidia-settings-1.0/samples/nv-control-info.c Display *dpy=XOpenDisplay(NULL); // we use the environment variable DISPLAY if(dpy!=NULL...
false
false
false
false
false
0
xmms_segment_read (xmms_xform_t *xform, xmms_sample_t *buf, gint len, xmms_error_t *error) { xmms_segment_data_t *data; gint res; data = xmms_xform_private_data_get (xform); if (data && (data->current_bytes + len >= data->stop_bytes)) { len = data->stop_b...
false
false
false
false
false
0
telem_get_unitconfig(enum telemetry_unit telem_unit, struct telemetry_unit_config **unit_config) { if (telem_unit == TELEM_PSS) *unit_config = &(telm_conf->pss_config); else if (telem_unit == TELEM_IOSS) *unit_config = &(telm_conf->ioss_config); else return -EINVAL; return 0; }
false
false
false
false
false
0
adaptive_coalesce_rx_interrupts(struct vxge_ring *ring) { ring->interrupt_count++; if (time_before(ring->jiffies + HZ / 100, jiffies)) { struct __vxge_hw_ring *hw_ring = ring->handle; ring->jiffies = jiffies; if (ring->interrupt_count > VXGE_T1A_MAX_INTERRUPT_COUNT && hw_ring->rtimer != VXGE_RTI_RTIMER_A...
false
false
false
false
false
0
a3c90x_internal_IssueCommand(int ioaddr, int cmd, int param) { unsigned int val = (cmd << 11) | param; int cnt = 0; DBGP("a3c90x_internal_IssueCommand\n"); /* Send the cmd to the cmd register */ outw(val, ioaddr + regCommandIntStatus_w); /* Wait for the cmd to complete */ for (cnt = 0; cnt < 100000; cnt++) { ...
false
false
false
false
false
0
LLVMSetDisasmOptions(LLVMDisasmContextRef DCR, uint64_t Options){ if (Options & LLVMDisassembler_Option_UseMarkup){ LLVMDisasmContext *DC = (LLVMDisasmContext *)DCR; MCInstPrinter *IP = DC->getIP(); IP->setUseMarkup(1); DC->addOptions(LLVMDisassembler_Option_UseMarkup); Options &= ~LLVMD...
false
false
false
false
false
0
g_mount_info_apply_prefix (GMountInfo *info, char **path) { GMountSpec *spec; spec = info->mount_spec; if (spec->mount_prefix != NULL && spec->mount_prefix[0] != 0) { char *path_with_prefix; path_with_prefix = g_build_path ("/", spec->mount_prefix, ...
false
false
false
false
false
0
run() { int status; // control commands from controller powerchannels = 0; Status = ANT_RUNNING; QString strBuf; #if defined GC_HAVE_LIBUSB usbMode = USBNone; #endif channels = 0; for (int i=0; i<ANT_MAX_CHANNELS; i++) antChannel[i]->init(); state = ST_WAIT_FOR_SYNC; length = byte...
false
false
false
false
false
0
migrateGetSocket(redisClient *c, robj *host, robj *port, long timeout) { int fd; sds name = sdsempty(); migrateCachedSocket *cs; /* Check if we have an already cached socket for this ip:port pair. */ name = sdscatlen(name,host->ptr,sdslen(host->ptr)); name = sdscatlen(name,":",1); name = sd...
false
false
false
false
false
0
virt_efi_set_wakeup_time(efi_bool_t enabled, efi_time_t *tm) { unsigned long flags; efi_status_t status; spin_lock_irqsave(&rtc_lock, flags); spin_lock(&efi_runtime_lock); status = efi_call_virt(set_wakeup_time, enabled, tm); spin_unlock(&efi_runtime_lock); spin_unlock_irqrestore(&rtc_lock, flags); return stat...
false
false
false
false
false
0
jas_strtoopenmode(const char *s) { int openmode = 0; while (*s != '\0') { switch (*s) { case 'r': openmode |= JAS_STREAM_READ; break; case 'w': openmode |= JAS_STREAM_WRITE | JAS_STREAM_CREATE; break; case 'b': openmode |= JAS_STREAM_BINARY; break; case 'a': openmode |= JAS_STREAM_APPEN...
false
false
false
false
false
0
pstrdup(pool p, const char *src) { char *dest; if (src == NULL) return NULL; dest = pmalloc(p, (strlen(src) + 1)); memcpy(dest, src, strlen(src)); return dest; }
false
false
false
false
false
0
_ibox_config_item_get(const char *id) { Config_Item *ci; GADCON_CLIENT_CONFIG_GET(Config_Item, ibox_config->items, _gadcon_class, id); ci = E_NEW(Config_Item, 1); ci->id = eina_stringshare_add(id); ci->show_label = 0; ci->show_zone = 1; ci->show_desk = 0; ci->icon_label = 0; ibox_config->it...
false
false
false
false
false
0
gfire_buddy_menu_add_as_friend_cb(PurpleBlistNode *p_node, gpointer *p_data) { PurpleBuddy *b = (PurpleBuddy*)p_node; if (!b || !b->account) return; purple_blist_request_add_buddy(b->account, purple_buddy_get_name(b), GFIRE_DEFAULT_GROUP_NAME, NULL); }
false
false
false
false
false
0
grl_source_store_impl (GrlSource *source, GrlMediaBox *parent, GrlMedia *media, GrlWriteFlags flags, GrlSourceStoreCb callback, gpointer user_data) { struct StoreRelayCb *src; GrlSourceStoreSpec *ss; ...
false
false
false
false
false
0
gnac_profiles_utils_add_values_combo(GtkWidget *combo, ComboValues *combo_values) { gint index = 0; GList *names = combo_values->names; GList *values = combo_values->values; while (names) { gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), names->data); i...
false
false
false
false
false
0
kb_cell_edited_cb(GtkCellRendererText *cellrenderertext, gchar *path, gchar *new_text, gpointer user_data) { if (path != NULL && new_text != NULL) { GtkTreeIter iter; gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(store), &iter, path); if (gtk_tree_model_iter_has_child(GTK_TREE_MODEL(store), &iter)) r...
false
false
false
false
false
0
gz_look(gz_statep state) { z_streamp strm = &(state->strm); /* allocate read buffers and inflate memory */ if (state->size == 0) { /* allocate buffers */ state->in = (unsigned char *)malloc(state->want); state->out = (unsigned char *)malloc(state->want << 1); if (state->in == NULL || s...
false
true
false
false
false
1
vlistAttPack(vlist_t *vlistptr, int varID, int attnum, void * buf, int size, int *position, void *context) { cdi_atts_t *attsp; cdi_att_t *attp; int tempbuf[vlist_att_nints]; xassert(attsp = get_attsp(vlistptr, varID)); xassert(attnum >= 0 && attnum < (int)attsp->nelems); attp = &(attsp->value...
false
false
false
false
false
0
seq_point_info_free (gpointer value) { int i = 0; MonoSeqPointInfo* info = (MonoSeqPointInfo*)value; for (i = 0; i < info->len; ++i) { SeqPoint *sp = &info->seq_points [i]; g_free (sp->next); } g_free (info); }
false
false
false
false
false
0
_bfd_elf_assign_file_position_for_section (Elf_Internal_Shdr *i_shdrp, file_ptr offset, bfd_boolean align) { if (align && i_shdrp->sh_addralign > 1) offset = BFD_ALIGN (offset, i_shdrp->sh_addralign); i_shdrp->sh_offset = offset; if (i_shdrp->bfd_section != NULL) i_shdrp->bfd_section->file...
false
false
false
false
false
0
diodon_plugins_indicator_plugin_real_deactivate (PeasActivatable* base) { DiodonPluginsIndicatorPlugin * self; AppIndicator* _tmp0_ = NULL; self = (DiodonPluginsIndicatorPlugin*) base; _tmp0_ = self->priv->indicator; if (_tmp0_ != NULL) { AppIndicator* _tmp1_ = NULL; _tmp1_ = self->priv->indicator; app_indic...
false
false
false
false
false
0
ut_finish_nofree () { if (!ut_session) return; int i; for(i=0; i<ut_session->nb_charsets; i++) { free(ut_session->charset[i].name); free(ut_session->charset[i].alias); free(ut_session->charset[i].common_name); free(ut_session->charset[i].comment); free(ut_session->charset[i].unicode); free(ut_session-...
false
false
false
false
false
0
addAtom(Literal atom, Solver& s) { act_.bumpAct(); uint32 pos = size_++; assert(isSentinel(lits_[pos])); lits_[pos] = atom; lits_[pos].watch(); s.addWatch( ~lits_[pos], this, (pos<<1)+0 ); if (isSentinel(lits_[end_-1])) { lits_[end_-1] = lits_[pos]; } }
false
false
false
false
false
0
ccss_universal_selector_create (unsigned int precedence, unsigned int stylesheet_descriptor, ccss_selector_importance_t importance) { ccss_universal_selector_t *self; self = g_new0 (ccss_universal_selector_t, 1); self->modality = CCSS_SELECTOR_MODALITY_UNIVERSAL; self->stylesheet_descriptor = styleshee...
false
false
false
false
false
0
toStringFromBinary(char * s, UT_uint32 len, const struct uuid &uu) { if(len < 37) return false; sprintf(s,"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", uu.time_low, uu.time_mid, uu.time_high_and_version, uu.clock_seq >> 8, uu.clock_seq & 0xFF, uu.node[0], uu.node[1], uu.node[2], ...
false
false
false
false
false
0
_GPSDraw_SetClip(GPSWindow ps) { if ( ps->ggc->clip.x!=ps->cur_clip.x || ps->ggc->clip.width!=ps->cur_clip.width || ps->ggc->clip.y!=ps->cur_clip.y || ps->ggc->clip.height!=ps->cur_clip.height ) { _GPSDraw_FlushPath(ps); if ( ps->ggc->clip.x<ps->cur_clip.x || ps->ggc->clip.x+ps->ggc->clip.width>...
false
false
false
false
false
0