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
yy_References(yycontext *ctx) { int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos; yyDo(ctx, yyPush, 2, 0); yyprintf((stderr, "%s\n", "References")); if (!yy_StartList(ctx)) goto l106; yyDo(ctx, yySet, -2, 0); l107:; { int yypos108= ctx->pos, yythunkpos108= ctx->thunkpos; { int yypos109= ctx->pos, yythunk...
false
false
false
false
false
0
snd_write_aiffheader( void ) { libspectrum_byte buff[10]; if( force_aifc || snd_enc != TYPE_PCM ) aifc = 1; /* AIFF or AIFC */ if( aifc ) fwrite( "FORM\377\377\377\377AIFCCOMM\000\000\000\046", 20, 1, snd ); else fwrite( "FORM\377\377\377\377AIFFCOMM\000\000\000\022", 20, 1, snd ); if( snd_chn == ...
false
false
false
false
true
1
put_all_defines(Context *ctx) { size_t i; for (i = 0; i < STATICARRAYLEN(ctx->define_hashtable); i++) { hlmojo_Define *bucket = ctx->define_hashtable[i]; ctx->define_hashtable[i] = NULL; while (bucket) { hlmojo_Define *next = bucket->next; free_define(...
false
false
false
false
false
0
nis_ping (const_nis_name dirname, unsigned int utime, const nis_object *dirobj) { nis_result *res = NULL; nis_object *obj; ping_args args; unsigned int i; if (dirname == NULL && dirobj == NULL) abort (); if (dirobj == NULL) { res = nis_lookup (dirname, MASTER_ONLY); if (res == NULL ...
false
false
false
false
false
0
toNative(const EscapeMode escape) const { GP<GStringRep> retval; if(data[0]) { const size_t length=strlen(data); const unsigned char * const eptr=(const unsigned char *)(data+length); unsigned char *buf; GPBuffer<unsigned char> gbuf(buf,12*length+12); unsigned char *r=buf; mbstate_t ps; ...
false
false
false
false
false
0
btree_delete(btree_t bt, const void *key) { const struct btree_def *def = bt->def; const int halfsize = def->branches / 2; struct btree_page *path[MAX_HEIGHT] = {0}; int slot[MAX_HEIGHT] = {0}; int h; check_btree(bt); /* Trace a path to the item to be deleted */ if (!key) { if (bt->slot[0] < 0) return 1;...
false
true
false
false
false
1
scan_cdata(char* buf, int len) { char* p = buf; len--; while (1) { int c = f->_getc(); if (!c || c == EOF) return XML_PARSE_EOF; if (len) { *p++ = c; len--; } if (c == '>') { *p = 0; char* q = strstr(buf, "]]>"); ...
false
false
false
false
false
0
bifcstr(bifcxdef *ctx, char *buf, size_t bufsiz, uchar *str) { size_t srcrem; size_t dstrem; uchar *src; char *dst; /* get the length and text portion of the string */ srcrem = osrp2(str) - 2; str += 2; /* scan the string, and convert escapes */ for (src = str, dst...
false
false
false
false
false
0
gst_wavenc_class_init (GstWavEncClass * klass) { GstElementClass *element_class; element_class = (GstElementClass *) klass; element_class->change_state = GST_DEBUG_FUNCPTR (gst_wavenc_change_state); gst_element_class_set_static_metadata (element_class, "WAV audio muxer", "Codec/Muxer/Audio", "Enc...
false
false
false
false
false
0
close_detect_launch(int fd, short what, void *arg) { struct evhttp_connection *evcon = arg; struct evhttp_request *req; req = evhttp_request_new(close_detect_done, NULL); /* Add the information that we care about */ evhttp_add_header(req->output_headers, "Host", "somehost"); /* We give ownership of the request...
false
false
false
false
false
0
show_func_ptr_type(t1, t2) struct token *t1; struct token *t2; { register struct token *s; /* * Rewrite (list1) (list2) to (list1) (). Account for the rare case that * (list1) is a comma-separated list. That should be an error, but we do * not want to waste any information. */ for (s =...
false
false
false
false
false
0
setCurrentVictim(HostileReference* pHostileReference) { // including NULL==NULL case if (pHostileReference == iCurrentVictim) return; if (pHostileReference) iOwner->SendHighestThreatUpdate(pHostileReference); iCurrentVictim = pHostileReference; iUpdateNeed = true; }
false
false
false
false
false
0
sig_ps2_clkrunning(struct sig_ps2_main *b, void *s, unsigned int val) { unsigned int nr; for (nr = 0; ; nr++) { if (nr == sizeof(b->member) / sizeof(b->member[0])) { return 1; } if (b->member[nr].s == s) { /* Don't send to myself. */ continue; } (b->member[nr].f->clkrunning)(b->member[nr].s, val);...
false
false
false
false
false
0
Cmd_Unpartner_f (edict_t * ent) { edict_t *target; if (!teamplay->value) { if (!((int) (dmflags->value) & (DF_MODELTEAMS | DF_SKINTEAMS))) return; // don't allow in a non-team setup... } if (ent->client->resp.radio_partner && !ent->client->resp.radio_partner->inuse) { // just in case RadioThink hasn't ca...
false
false
false
false
false
0
cryptui_key_store_get_count (CryptUIKeyStore *ckstore) { g_return_val_if_fail (CRYPTUI_KEY_STORE (ckstore), 0); return cryptui_keyset_get_count (ckstore->ckset); }
false
false
false
false
false
0
onPlayerReady() { ChessPlayer* sender = qobject_cast<ChessPlayer*>(QObject::sender()); Q_ASSERT(sender != 0); disconnect(sender, SIGNAL(ready()), this, SLOT(onPlayerReady())); disconnect(sender, SIGNAL(disconnected()), this, SLOT(onPlayerReady())); for (int i = 0; i < 2; i++) { if (!m_player[i]->isR...
false
false
false
false
false
0
hlparsetext(Oid cfgId, HeadlineParsedText *prs, TSQuery query, char *buf, int buflen) { int type, lenlemm; char *lemm = NULL; LexizeData ldata; TSLexeme *norms; ParsedLex *lexs; TSConfigCacheEntry *cfg; TSParserCacheEntry *prsobj; void *prsdata; cfg = lookup_ts_config_cache(cfgId); prsobj = lo...
false
false
false
false
false
0
GetDPRegRHS (ARMul_State * state, ARMword instr) { ARMword shamt, base; base = RHSReg; if (BIT (4)) { /* Shift amount in a register. */ UNDEF_Shift; INCPC; #ifndef MODE32 if (base == 15) base = ECC | ER15INT | R15PC | EMODE; else #endif base = state->Reg[base]; ARMul_Ic...
false
false
false
false
false
0
_dessert_agentx_init_subagent() { /************************************************************************** * setup snmp handling.... *************************************************************************/ pthread_t snmp_worker; snmp_enable_calllog(); //debug_register_tokens("trace"); //debug_register_t...
false
false
false
false
false
0
ausb_bulk_read(ausb_dev_handle *ah, int ep, char *bytes, int size, int timeout) { if (ah->bulkReadFn) { int rv; DEBUGP(ah, "Reading up to %d bytes", size); rv=ah->bulkReadFn(ah, ep, bytes, size, timeout); if (rv>=0) { DEBUGL(ah, "Read:", bytes, rv); } return rv; } return -...
false
false
false
false
false
0
CenterPrint(int fg, int bg, const char *string, int y) { int length = strlen(string); Print(fg, bg, string, (length < 38) ? (40 - length) >> 1 : 1, y, 38); }
false
false
false
false
false
0
ReadMolecule(OBBase* pOb, OBConversion* pConv) { OBMol* pmol = pOb->CastAndClear<OBMol>(); if(pmol==NULL) return false; //Define some references so we can use the old parameter names istream &ifs = *pConv->GetInStream(); OBMol &mol = *pmol; const char* title = pConv->GetTitle(); ch...
false
false
false
false
false
0
get_line_in_mode(struct cmipci *cm) { unsigned int val; if (cm->chip_version >= 39) { val = snd_cmipci_read(cm, CM_REG_LEGACY_CTRL); if (val & (CM_CENTR2LIN | CM_BASE2LIN)) return 2; } val = snd_cmipci_read_b(cm, CM_REG_MIXER1); if (val & CM_REAR2LIN) return 1; return 0; }
false
false
false
false
false
0
gvc_mixer_ui_device_get_matching_profile (GvcMixerUIDevice *device, const gchar *profile) { gchar *skip_prefix = device->priv->type == UIDeviceInput ? "output:" : "input:"; gchar *target_cname = get_profile_canonical_name (profile, skip_prefix); GList *l; gchar *result = NULL; f...
false
false
false
false
false
0
oxygen_read_uart(struct oxygen *chip) { if (unlikely(!oxygen_uart_input_ready(chip))) { /* no data, but read it anyway to clear the interrupt */ oxygen_read8(chip, OXYGEN_MPU401); return; } do { u8 data = oxygen_read8(chip, OXYGEN_MPU401); if (data == MPU401_ACK) continue; if (chip->uart_input_count >...
false
false
false
false
false
0
clarity_util_get_track_image(Track *track) { GdkPixbuf *pixbuf = NULL; ExtraTrackData *etd; etd = track->userdata; g_return_val_if_fail(etd, NULL); if (itdb_track_has_thumbnails(track)) { pixbuf = itdb_track_get_thumbnail(track, DEFAULT_IMG_SIZE, DEFAULT_IMG_SIZE); } if (!pixbuf) ...
false
false
false
false
false
0
_vacm_parse_access_common(const char *token, char *param, char **st, char **name, char **context, int *imodel, int *ilevel, int *iprefix) { char *model, *level, *prefix; *name = strtok_r(param, " \t\n", st); if (!*name) { config_perror("missing NA...
false
false
false
false
false
0
Ins_EVEN( INS_ARG ) { if ( (CUR_Func_round( args[0], 0L ) & 127) == 0 ) args[0] = 1; else args[0] = 0; }
false
false
false
false
false
0
_DelHelper(DatabaseType& db, const char* fields, const char* table, const char* queryTail, ...) { Tokens fieldTokens = StrSplit(fields, ", "); MANGOS_ASSERT(fieldTokens.size() != 0); va_list ap; char szQueryTail [MAX_QUERY_LEN]; va_start(ap, queryTail); vsnprintf(szQueryTail, MAX_QUERY_LEN, que...
false
false
false
false
false
0
release_hash_table(struct hashtable * ht){ int i; if (ht == NULL) return; for (i = 0; i < ht->tablesize; i++) if (ht->table[i]) destroy_password(ht->table[i]); if (ht->table) { free(ht->table); ht->table = NULL; } if (ht->fp) { fclose(ht->fp); ht->fp = NULL; } ht->tablesize = 0; }
false
false
false
false
false
0
ptaScale(PTA *ptas, l_float32 scalex, l_float32 scaley) { l_int32 i, npts; l_float32 x, y; PTA *ptad; PROCNAME("ptaScale"); if (!ptas) return (PTA *)ERROR_PTR("ptas not defined", procName, NULL); npts = ptaGetCount(ptas); if ((ptad = ptaCreate(npts)) == NUL...
false
false
false
false
false
0
gst_clock_finalize (GObject * object) { GstClock *clock = GST_CLOCK (object); GST_CLOCK_SLAVE_LOCK (clock); if (clock->priv->clockid) { gst_clock_id_unschedule (clock->priv->clockid); gst_clock_id_unref (clock->priv->clockid); clock->priv->clockid = NULL; } g_free (clock->priv->times); clock->p...
false
false
false
false
false
0
get_field_type() const { Field::glom_field_type result = Field::TYPE_INVALID; //Get the active row: Gtk::TreeModel::iterator active_row = get_active(); if(active_row) { Gtk::TreeModel::Row row = *active_row; result = row[m_Columns.m_col_type]; Glib::ustring temp = row[m_Columns.m_col_name]; }...
false
false
false
false
false
0
phisub(float phi0, float phi1, float arcphi){ float phid = phi1-phi0; if(arcphi<0){ if(phid>0) phid -= M_PI*2.f; }else{ if(phid<0) phid += M_PI*2.f; } return phid; }
false
false
false
false
false
0
table_D2DT2 (struct GMTMATH_INFO *info, double **stack[], GMT_LONG *constant, double *factor, GMT_LONG last, GMT_LONG col, GMT_LONG n_row) /*OPERATOR: D2DT2 1 1 d^2(A)/dt^2 2nd derivative. */ { GMT_LONG i; double c, left, next_left; /* Central 2nd difference in t */ if (info->irregular) fprintf (stderr, "%s: War...
false
false
false
false
false
0
time_thread(void *nothing) { PRIntervalTime interval; interval = PR_SecondsToInterval(1); while(!time_shutdown) { poll_current_time(); csngen_update_time (); DS_Sleep(interval); } /*NOTREACHED*/ return(NULL); }
false
false
false
false
false
0
_e_mod_comp_screensaver_on(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__) { Eina_List *l, *ll; E_Comp_Zone *cz; E_Comp *c; // fixme: use hash if compositors list > 4 EINA_LIST_FOREACH(compositors, l, c) { if (!c->s...
false
false
false
false
false
0
_pw_digest(const char *password, const unsigned char *salt, unsigned int salt_len, unsigned char *hash, unsigned int *hash_len) { const EVP_MD *digest; EVP_MD_CTX context; digest = EVP_get_digestbyname("sha512"); if(!digest){ // FIXME fprintf(stderr, "Error: Unable to create openssl digest.\n"); return 1; } ...
false
false
false
false
false
0
gk104_fifo_gpfifo_init(struct nvkm_fifo_chan *base) { struct gk104_fifo_chan *chan = gk104_fifo_chan(base); struct gk104_fifo *fifo = chan->fifo; struct nvkm_device *device = fifo->base.engine.subdev.device; u32 addr = chan->base.inst->addr >> 12; u32 coff = chan->base.chid * 8; nvkm_mask(device, 0x800004 + coff...
false
false
false
false
false
0
HashMultifield( struct multifield *theSegment, unsigned theRange) { unsigned long length, i; unsigned int tvalue; unsigned int count; struct field *fieldPtr; union { double fv; unsigned int liv; } fis; /*================================================*/ /* Initialize v...
false
false
false
false
false
0
attribute2mods(tattribute *attribute) { GPtrArray *values = attribute_values(attribute); LDAPMod *m = xalloc(sizeof(LDAPMod)); int j; m->mod_op = LDAP_MOD_BVALUES; m->mod_type = xdup(attribute_ad(attribute)); m->mod_bvalues = xalloc( (1 + values->len) * sizeof(struct berval *)); for (j = 0; j < values->len; ...
false
false
false
false
false
0
readtup_datum(Tuplesortstate *state, SortTuple *stup, int tapenum, unsigned int len) { unsigned int tuplen = len - sizeof(unsigned int); if (tuplen == 0) { /* it's NULL */ stup->datum1 = (Datum) 0; stup->isnull1 = true; stup->tuple = NULL; } else if (state->datumTypeByVal) { Assert(tuplen == sizeo...
false
false
false
false
false
0
RemoveStates(int num) { for (int i = 0; i < num; i++) { RemoveStateAt(0); current -= 1; saved -= 1; } }
false
false
false
false
false
0
unpack_SIGNED_RGBA8888(const void *src, GLfloat dst[][4], GLuint n) { const GLuint *s = ((const GLuint *) src); GLuint i; for (i = 0; i < n; i++) { dst[i][RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 24) ); dst[i][GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 16) ); dst[i][BCOMP] = BYTE_TO_F...
false
false
false
false
false
0
ocfs2_iop_set_acl(struct inode *inode, struct posix_acl *acl, int type) { struct buffer_head *bh = NULL; int status = 0; status = ocfs2_inode_lock(inode, &bh, 1); if (status < 0) { if (status != -ENOENT) mlog_errno(status); return status; } status = ocfs2_set_acl(NULL, inode, bh, type, acl, NULL, NULL); ...
false
false
false
false
false
0
iscsit_set_dataout_timeout_values( struct iscsi_cmd *cmd, u32 *offset, u32 *length) { struct iscsi_conn *conn = cmd->conn; struct iscsi_r2t *r2t; if (cmd->unsolicited_data) { *offset = 0; *length = (conn->sess->sess_ops->FirstBurstLength > cmd->se_cmd.data_length) ? cmd->se_cmd.data_length : ...
false
false
false
false
false
0
skip_next_lf(HSCPRC * hp) { INFILE *inpf = hp->inpf; int nc = infgetc(inpf); /* handle "\r\n", single "\r" and single "\n" */ if (nc == '\r') { nc = infgetc(inpf); } if (nc != '\n') { inungetc(nc, inpf); } return ((BOOL) (nc == EOF)); }
false
false
false
false
false
0
g2_create_physical_device(int pid, void *pdp, g2_coor ct, const g2_funix_fun *ff, double a11, double a22, double b1, double b2) { g2_physical_device *rd; int i, j; rd=g2_malloc(sizeof(g2_physical_device)); rd->pid=pid; /* physical device id...
false
false
false
false
false
0
kmo_check_frame_setup_md5(cpl_frameset *frameset) { cpl_error_code ret_error = CPL_ERROR_NONE; cpl_frame *tmpFrame = NULL; int matchError = FALSE, ind = 1; cpl_propertylist *mainLcal = NULL, ...
false
false
false
false
false
0
gnac_playlist_is_mime_playlist(const gchar *mime) { if (!mime) return FALSE; guint i; for (i = 0; mime_playlist[i].mime; i++) { if (g_ascii_strcasecmp(mime, mime_playlist[i].mime) == 0) { return TRUE; } } return FALSE; }
false
false
false
false
false
0
vcc_mode_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct usb_serial_port *port = to_usb_serial_port(dev); struct iuu_private *priv = usb_get_serial_port_data(port); unsigned long v; if (kstrtoul(buf, 10, &v)) { dev_err(dev, "%s - vcc_mode: %s is not a unsigned lo...
false
false
false
false
false
0
fix_length_and_dec() { agg_arg_charsets_for_string_result(collation, args, 1); DBUG_ASSERT(collation.collation != NULL); if (args[1]->const_item()) { /* must be longlong to avoid truncation */ longlong count= args[1]->val_int(); /* Assumes that the maximum length of a String is < INT_MAX32. */ ...
false
false
false
false
false
0
psx_hw_read(offs_t offset, uint32_t mem_mask) { if (offset >= 0x00000000 && offset <= 0x007fffff) { offset &= 0x1fffff; return LE32(psx_ram[offset>>2]); } if (offset >= 0x80000000 && offset <= 0x807fffff) { offset &= 0x1fffff; return LE32(psx_ram[offset>>2]); } if (offset == 0xbfc00180 || offset == 0xb...
false
false
false
false
false
0
add_handlers() { add_read_handler("data", read_param, (void *)0); add_write_handler("data", change_param, (void *)0); set_handler_flags("data", Handler::RAW); add_read_handler("limit", read_param, (void *)1); add_write_handler("limit", change_param, (void *)1); add_read_handler("burstsize", read_param, (voi...
false
false
false
false
false
0
RewriteInstruction(MachineInstr *MI, int OldFI, int NewFI, MachineFunction &MF) { // Update the operands. for (unsigned i = 0, ee = MI->getNumOperands(); i != ee; ++i) { MachineOperand &MO = MI->getOperand(i); if (!MO.isFI()) continue; int FI = MO.getInde...
false
false
false
false
false
0
namecmp(string1, string2) ZCONST char *string1, *string2; /* Compare the two strings ignoring case, and correctly taking into * account national language characters. For operating systems with * case sensitive file names, this function is equivalent to strcmp. */ { int d; for (;;) { d = (int) (uch) case...
false
false
false
false
false
0
FillList() { wxChoice* cmb = XRCCTRL(*this, "cmbProject", wxChoice); wxCheckListBox* lst = XRCCTRL(*this, "lstDeps", wxCheckListBox); int idx = cmb->GetSelection(); if (m_LastSel != idx && m_LastSel != -1) { // save old list SaveList(); } m_LastSel = idx; if (idx == -1) ...
false
false
false
false
false
0
get_rspace(size_t len) { if (!good() || rpos + len > buf + sz) { iostate = State(iostate | FAILBIT | EOFBIT); return 0; } char* ret = rpos; rpos += len; return ret; }
false
false
false
false
false
0
UpdateMapCodeCache(String* name, Code* code) { if (map()->is_shared()) { // Fast case maps are never marked as shared. ASSERT(!HasFastProperties()); // Replace the map with an identical copy that can be safely modified. Object* obj; { MaybeObject* maybe_obj = map()->CopyNormalized(KEEP_INOBJECT_PR...
false
false
false
false
false
0
getPassInfo(StringRef Arg) const { sys::SmartScopedReader<true> Guard(Lock); StringMapType::const_iterator I = PassInfoStringMap.find(Arg); return I != PassInfoStringMap.end() ? I->second : nullptr; }
false
false
false
false
false
0
YuvToRgbRowSSE2(const uint8_t* y, const uint8_t* u, const uint8_t* v, uint8_t* dst, int len) { int n; for (n = 0; n + 2 < len; ++n) { // we directly stomp the *dst memory YuvToRgbSSE2(y[0], u[0], v[0], dst); // stomps 8 bytes dst += 3; ++y; ...
false
false
false
false
false
0
write_selected_lines(char *text, char start_char) { char *p; if (!text) return; while (1) { p = strchr(text, '\n'); if (p) *p = 0; if (*text == start_char) printf("%s\n", text); if (p) { *p = '\n'; text = p+1; } else break; } }
false
false
false
false
false
0
cw1200_queue_register_post_gc(struct list_head *gc_list, struct cw1200_queue_item *item) { struct cw1200_queue_item *gc_item; gc_item = kmalloc(sizeof(struct cw1200_queue_item), GFP_ATOMIC); BUG_ON(!gc_item); memcpy(gc_item, item, sizeof(struct cw1200_queue_item)); list_add_tail(&gc_item->head, gc_list);...
false
false
false
false
false
0
player_outfit(void) { int i; const start_item *e_ptr; object_type *i_ptr; object_type object_type_body; /* Hack -- Give the player his equipment */ for (i = 0; i < MAX_START_ITEMS; i++) { /* Access the item */ e_ptr = &(cp_ptr->start_items[i]); /* Get local object */ i_ptr = &object_type_body; /* H...
false
false
false
false
false
0
meetPullVolCopy(const meetPullVol *mpv) { static const char me[]="meetPullVolCopy"; meetPullVol *ret; unsigned int si; airArray *mop; mop = airMopNew(); ret = meetPullVolNew(); airMopAdd(mop, ret, (airMopper)meetPullVolNix, airMopOnError); /* HEY: hope this is okay for dynamic kinds */ ret->kind = mp...
false
false
false
false
false
0
read_next_line(FILE *fp, GString *s){ register gint ch; g_string_truncate(s, 0); while((ch = getc(fp)) != EOF){ if(ch == '\n'){ return TRUE; } else { g_string_append_c(s, ch); } } return s->len?TRUE:FALSE; }
false
true
false
false
true
1
reference_levdist(const char *s1, int l1, const char *s2, int l2, int cost_ins, int cost_rep, int cost_del ) { int *p1, *p2, *tmp; int i1, i2, c0, c1, c2; if (l1 == 0) { return l2 * cost_ins; } if (l2 == 0) { return l1 * cost_del; } if ((l1 > LEVENSHTEIN_MAX_LENGTH) || (l2 > LEVENSHTEIN_MAX_LENGTH)) { re...
false
false
false
false
false
0
gf_codec_get_capability(GF_Codec *codec, GF_CodecCapability *cap) { cap->cap.valueInt = 0; if (codec->decio) return codec->decio->GetCapabilities(codec->decio, cap); if (codec->flags & GF_ESM_CODEC_IS_RAW_MEDIA) { GF_BitStream *bs; u32 pf, w, h, stride=0, out_size, sr, nb_ch, bpp, ch_cfg; GF_Channel *ch = ...
false
false
false
false
false
0
get( const char *key, char *&text, const char *defaultValue ) { const char *v = node->get( key ); if ( v && strchr( v, '\\' ) ) { text = decodeText( v ); return 1; } if ( !v ) v = defaultValue; if ( v ) text = strdup( v ); else text = 0; return ( v != defaultValue ); }
false
false
false
false
false
0
gt_cstr_table_get_all(const GtCstrTable *table) { GT_UNUSED int had_err; GtStrArray *cstrs; gt_assert(table); cstrs = gt_str_array_new(); had_err = gt_hashtable_foreach_ordered(table->strings, store_type, cstrs, gt_strcmpptr, NULL); gt_assert(!had_err); return cstr...
false
false
false
false
false
0
processPacks() { // Apply pack model changes if (!d->m_PackModel->isDirty()) return; // Run Pack Dialog PackWizard dlg; dlg.setPackToProcess(d->m_PackModel->packageToInstall(), d->m_PackModel->packageToUpdate(), d->m_PackModel->packageToRemove()); if (dlg.exec()==QDialog::Rejected) { ...
false
false
false
false
false
0
CreateGlobalTarget( const char* name, const char* message, const cmCustomCommandLines* commandLines, std::vector<std::string> depends, const char* workingDirectory) { // Package cmTarget target; target.GetProperties().SetCMakeInstance(this->CMakeInstance); target.SetType(cmTarget::GLOBAL_TARGET, name); ...
false
false
false
false
false
0
pfa_get_ts(Analyzer *self, char *field, char *text) { Analyzer *a = h_get(PFA(self)->dict, field); if (a == NULL) { a = PFA(self)->default_a; } return a_get_ts(a, field, text); }
false
false
false
false
false
0
acb_project_set_default_code_path (AcbProject *project, const gchar *path) { AcbProjectPrivate *priv = project->priv; g_return_if_fail (ACB_IS_PROJECT (project)); g_return_if_fail (path != NULL); g_free (priv->default_code_path); priv->default_code_path = g_strdup (path); }
false
false
false
false
false
0
get_rats_db_data (const char *fname, SERIESINFO *sinfo, double **Z) { FILE *fp; int err = 0; fp = gretl_fopen(fname, "rb"); if (fp == NULL) { err = E_FOPEN; } else { err = get_rats_series(sinfo->offset, sinfo, fp, Z); fclose(fp); } return err; }
false
false
false
false
false
0
start_writing_to_stdio_file(const char *fname, int open_flags, int mode, open_file_t **data_out) { FILE *res; if (start_writing_to_file(fname, open_flags, mode, data_out)<0) return NULL; if (!(res = fdopen_file(*data_out))) { abort_writing_to_file(*data_out); *data_out = NU...
false
false
false
false
false
0
operator==(const COMMON_COMPONENT& x)const { const EVAL_BM_SEMI_BASE* p = dynamic_cast<const EVAL_BM_SEMI_BASE*>(&x); bool rv = p && _length == p->_length && _width == p->_width && EVAL_BM_ACTION_BASE::operator==(x); if (rv) { untested(); }else{ } return rv; }
false
false
false
false
false
0
clean_temporary_directory(const char *tmpdir) { DIR *d; /* If in adjunct mode, do not delete any temporary files */ if (adjunct) return; /* If tmpdir_specified is true, the user specified a particular temporary * directory. We presume that the user doesn't want the directory removed * a...
false
true
false
false
true
1
explain_buffer_errno_fstatvfs_explanation(explain_string_buffer_t *sb, int errnum, const char *syscall_name, int fildes, struct statvfs *data) { /* * http://www.opengroup.org/onlinepubs/009695399/functions/fstatvfs.html */ (void)data; switch (errnum) { case EBADF: explain_buffe...
false
false
false
false
false
0
tp_heap_remove (TpHeap *heap, gpointer element) { guint i; g_return_if_fail (heap != NULL); for (i = 1; i <= heap->data->len; i++) { if (element == HEAP_INDEX (heap, i)) { extract_element (heap, i); break; } } }
false
false
false
false
false
0
InfpAddKeyToLine(PINFCACHELINE Line, PCWSTR Key) { if (Line == NULL) { DPRINT1("Invalid Line\n"); return NULL; } if (Line->Key != NULL) { DPRINT1("Line already has a key\n"); return NULL; } Line->Key = (PWCHAR)MALLOC((strlenW(Key) + 1) * sizeof(WCHAR)); ...
false
false
false
false
false
0
edac_device_workq_teardown(struct edac_device_ctl_info *edac_dev) { if (!edac_dev->edac_check) return; edac_dev->op_state = OP_OFFLINE; cancel_delayed_work_sync(&edac_dev->work); flush_workqueue(edac_workqueue); }
false
false
false
false
false
0
_g_uri_get_relative_path (const char *uri, const char *base) { char *uri_host; char *base_host; gboolean same_host; char *source_dir; char **source_dir_v; char **base_v; GString *relative_path; int i, j; if ((uri == NULL) || (base == NULL)) return NULL; if (strcmp (u...
false
false
false
false
false
0
default_function_value_regno_p (const unsigned int regno ATTRIBUTE_UNUSED) { #ifdef FUNCTION_VALUE_REGNO_P return FUNCTION_VALUE_REGNO_P (regno); #else gcc_unreachable (); #endif }
false
false
false
false
false
0
find_next_from_corpus(struct iterator *it) { int idx = it->idx; it->limit--; if (it->limit < 1) { it->idx = -1; return -1; } it->idx = ntohl(corpus_info.array[it->idx * 2 + 1]); if (it->idx < 0 || it->idx >= corpus_info.array_size || it->idx < idx) { it->idx = -1; } return it->idx; }
false
false
false
false
false
0
gdome_di_createDocFromURI (GdomeDOMImplementation *self, const char *uri, unsigned int mode, GdomeException *exc) { if (self == NULL) { *exc = GDOME_NULL_POINTER_ERR; return NULL; } *exc = 0; return ((Gdome_xml_DOMImplementation *)self)->vtab->createDocFromURI (self, uri, mode, exc); }
false
false
false
false
false
0
unqlite_kv_fetch(unqlite *pDb,const void *pKey,int nKeyLen,void *pBuf,unqlite_int64 *pBufLen) { unqlite_kv_methods *pMethods; unqlite_kv_engine *pEngine; unqlite_kv_cursor *pCur; int rc; if( UNQLITE_DB_MISUSE(pDb) ){ return UNQLITE_CORRUPT; } #if defined(UNQLITE_ENABLE_THREADS) /* Acquire DB mutex */ SyMute...
false
false
false
false
false
0
taitoz_core_vh_start (int x_offs) { if (has_TC0480SCP()) /* it's Dblaxle, a tc0480scp game */ { if (TC0480SCP_vh_start(TC0480SCP_GFX_NUM,x_offs,0x21,0x08,4,0,0,0,0)) return 1; } else /* it's a tc0100scn game */ { if (TC0100SCN_vh_start(1,TC0100SCN_GFX_NUM,x_offs,0,0,0,0,0,0)) return 1; } ...
false
false
false
false
false
0
usArrayToRLEString(const uint16_t* src,int32_t srcLen,uint16_t* buffer, int32_t bufLen,UErrorCode* status) { uint16_t* bufLimit = buffer+bufLen; uint16_t* saveBuffer = buffer; if(buffer < bufLimit){ *buffer++ = (uint16_t)(srcLen>>16); if(buffer<bufLimit){ uint16_t runValue = sr...
false
false
false
false
false
0
collect_bb2reg (struct tm_region *region, void *data) { struct bb2reg_stuff *stuff = (struct bb2reg_stuff *)data; vec<tm_region_p> *bb2reg = stuff->bb2reg; vec<basic_block> queue; unsigned int i; basic_block bb; queue = get_tm_region_blocks (region->entry_block, region->exit_blocks, region->irr_blo...
false
false
false
false
false
0
sci_transmit_chars(struct uart_port *port) { struct circ_buf *xmit = &port->state->xmit; unsigned int stopped = uart_tx_stopped(port); unsigned short status; unsigned short ctrl; int count; status = serial_port_in(port, SCxSR); if (!(status & SCxSR_TDxE(port))) { ctrl = serial_port_in(port, SCSCR); if (uart...
false
false
false
false
false
0
context_dump_uris(jk_context_t *c, char *cbase, FILE * f) { jk_context_item_t *ci; int i; ci = context_find_base(c, cbase); if (!ci) return; for (i = 0; i < ci->size; i++) fprintf(f, "/%s/%s\n", ci->cbase, ci->uris[i]); fflush(f); }
false
false
false
false
false
0
acpi_pss_perf_init(struct acpi_processor *pr, struct acpi_device *device) { int result = 0; acpi_processor_ppc_has_changed(pr, 0); acpi_processor_get_throttling_info(pr); if (pr->flags.throttling) pr->flags.limit = 1; pr->cdev = thermal_cooling_device_register("Processor", device, &processor_cooli...
false
false
false
false
false
0
gd_tagged_entry_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natural) { GdTaggedEntry *self = GD_TAGGED_ENTRY (widget); gint tag_panel_width; GTK_WIDGET_CLASS (gd_tagged_entry_parent_class)->get_preferred_width (widget, min...
false
false
false
false
false
0
write_attr(hid_t loc_id, int rank, hsize_t *dims, const char *name, hid_t tid, void *buf) { hid_t aid=-1; hid_t sid=-1; /* create a space */ if((sid = H5Screate_simple(rank, dims, NULL)) < 0) goto out; /* creat...
false
false
false
false
false
0
gst_list_iterator_copy (const GstListIterator * it, GstListIterator * copy) { if (copy->owner) g_object_ref (copy->owner); }
false
false
false
false
false
0
read_bytes(FILE *inptr,unsigned long nbytes,unsigned long offset) { static unsigned char rbuf[MAXBUFLEN]; unsigned long curoffset; unsigned char *value = (unsigned char *)NULLSTRING; int chpr = 0; memset(rbuf,0,MAXBUFLEN); if(inptr) { if(nbytes > MAXBUFLEN) { chp...
false
false
false
false
false
0
vattr_add_attrval(objAttrValue **attrval, char *val) { int ret = 0; objAttrValue *theVal; LDAPDebug( LDAP_DEBUG_TRACE, "--> vattr_add_attrval\n",0,0,0); /* create the attrvalue */ theVal = (objAttrValue*) slapi_ch_malloc(sizeof(objAttrValue)); if(theVal) { theVal->val = slapi_value_new_string(val); if(theV...
true
true
false
false
false
1
neon_struct_mem_operand (rtx op) { rtx ind; /* Reject eliminable registers. */ if (! (reload_in_progress || reload_completed) && ( reg_mentioned_p (frame_pointer_rtx, op) || reg_mentioned_p (arg_pointer_rtx, op) || reg_mentioned_p (virtual_incoming_args_rtx, op) || reg_mentioned_p (virtual_outg...
false
false
false
false
false
0
getreg (HP4200_Scanner * s, unsigned char reg) { unsigned char reg_value; if ((reg > 0x08) && (reg < 0x5b)) return (unsigned char) LOBYTE (s->regs[reg]); else { lm9830_read_register (s->fd, reg, &reg_value); return reg_value; } }
false
false
false
false
false
0