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
hb_script_from_iso15924_tag (hb_tag_t tag) { if (unlikely (tag == HB_TAG_NONE)) return HB_SCRIPT_INVALID; /* Be lenient, adjust case (one capital letter followed by three small letters) */ tag = (tag & 0xDFDFDFDF) | 0x00202020; switch (tag) { /* These graduated from the 'Q' private-area codes, but ...
false
false
false
false
false
0
gnm_datetime_allow_negative (void) { static int allow = -1; if (allow == -1) { GOFormat *fmt = go_format_new_from_XL ("yyyy-mm-dd"); GnmValue *v = value_new_int (-42); GODateConventions const *conv = go_date_conv_from_str ("Lotus:1900"); char *text = format_value (fmt, v, -1, conv); allow = (strcmp (te...
false
false
false
false
false
0
int_to_binary (int x) { char *local_str, *tmp_str; register int y = x, mem = 2; local_str = (char *) g_malloc (mem); while (y) { if (!(y % 2)) { local_str[mem - 2] = '0'; } else { local_str[mem - 2] = '1'; } local_str = (char *) reallo...
false
false
false
false
true
1
addColor(const char *color_) { if (color_!=0) { XColor hardware_def; Status s=XParseColor(display(),colormap(),color_,&hardware_def); if (s!=0) s=XAllocColor(display(),colormap(),&hardware_def); else { MSMessageLog::warningMessage("Error: Bad Color Specification '%s'.\n",color_); return...
false
false
false
false
false
0
bnx2x_free_tpa_pool(struct bnx2x *bp, struct bnx2x_fastpath *fp, int last) { int i; for (i = 0; i < last; i++) { struct bnx2x_agg_info *tpa_info = &fp->tpa_info[i]; struct sw_rx_bd *first_buf = &tpa_info->first_buf; u8 *data = first_buf->data; if (data == NULL) { DP(NETIF_MSG_IFDOWN, "tpa bin %d empt...
false
false
false
false
false
0
expand_compare_and_swap_loop (rtx mem, rtx old_reg, rtx new_reg, rtx seq) { enum machine_mode mode = GET_MODE (mem); enum insn_code icode; rtx label, cmp_reg, subtarget, cc_reg; /* The loop we want to generate looks like cmp_reg = mem; label: old_reg = cmp_reg; seq; cmp_reg = compare-and-swap...
false
false
false
false
false
0
e_zone_edge_disable(void) { Eina_List *l, *ll, *lll; E_Manager *man; E_Container *con; E_Zone *zone; EINA_LIST_FOREACH(e_manager_list(), l, man) { EINA_LIST_FOREACH(man->containers, ll, con) { EINA_LIST_FOREACH(con->zones, lll, zone) { ...
false
false
false
false
false
0
hashtab_compare_extens(const void *ah_a, const void *ah_b) { const struct ast_exten *ac = ah_a; const struct ast_exten *bc = ah_b; int x = strcmp(ac->exten, bc->exten); if (x) { /* if exten names are diff, then return */ return x; } /* but if they are the same, do the cidmatch values match? */ /* not sure whi...
false
false
false
false
false
0
send_response( httpd_conn* hc, int status, char* title, char* extraheads, char* form, char* arg ) { char defanged_arg[1000], buf[2000]; send_mime( hc, status, title, "", extraheads, "text/html; charset=%s", (off_t) -1, (time_t) 0 ); (void) my_snprintf( buf, sizeof(buf), "\ <HTML>\n\ <HEAD><TITLE>%d %...
true
true
false
false
false
1
snd_cs4281_midi_output_trigger(struct snd_rawmidi_substream *substream, int up) { unsigned long flags; struct cs4281 *chip = substream->rmidi->private_data; unsigned char byte; spin_lock_irqsave(&chip->reg_lock, flags); if (up) { if ((chip->midcr & BA0_MIDCR_TIE) == 0) { chip->midcr |= BA0_MIDCR_TIE; /* f...
false
false
false
false
false
0
gfs2_free_block(struct gfs2_sbd *sdp, uint64_t block) { struct rgrp_tree *rgd; /* Adjust the free space count for the freed block */ rgd = gfs2_blk2rgrpd(sdp, block); /* find the rg for indir block */ if (rgd) { gfs2_set_bitmap(sdp, block, GFS2_BLKST_FREE); rgd->rg.rg_free++; /* adjust the free count */ if (...
false
false
false
false
false
0
transfer_nested_calls(int pos, int length, Subr *new_caller) const { int right = pos + length; for (int i = 0; i < _calls.size(); i++) { Subr *cs = _calls[i]; // 11.Jul.2006 - remember not to shift the new caller's records! (Michael Zedler) if (cs != new_caller) for (int j = 0; j < cs->_callers.size();...
false
false
false
false
false
0
chk_ops( void) /* * Check the operator. * If it can't be used in #if expression return OP_FAIL * else return openum. */ { switch (openum) { case OP_STR: case OP_CAT: case OP_ELL: case OP_1: case OP_2: case OP_3: cerror( "Can't use the operator \"%s\"" /* _E_ */ ...
false
false
false
false
false
0
igbvf_write_mbx_vf(struct e1000_hw *hw, u32 *msg, u16 size, u16 mbx_id __unused) { s32 ret_val; u16 i; DEBUGFUNC("igbvf_write_mbx_vf"); /* lock the mailbox to prevent pf/vf race condition */ ret_val = igbvf_obtain_mbx_lock_vf(hw); if (ret_val) goto out_no_write; /* flush msg a...
false
false
false
false
false
0
get_default_privtype(size_t * len) { if (defaultPrivType == NULL) { #ifndef NETSNMP_DISABLE_DES defaultPrivType = usmDESPrivProtocol; #else defaultPrivType = usmAESPrivProtocol; #endif defaultPrivTypeLen = USM_LENGTH_OID_TRANSFORM; } if (len) *len = defaultPrivTypeLen; re...
false
false
false
false
false
0
nic_w5100_free( nic_w5100_t *self ) { int i; if( self ) { self->stop_io_thread = 1; compat_socket_selfpipe_wake( self->selfpipe ); pthread_join( self->thread, NULL ); for( i = 0; i < 4; i++ ) nic_w5100_socket_end( &self->socket[i] ); compat_socket_selfpipe_free( self->selfpipe ); ...
false
false
false
false
false
0
destroy() { /* we might have two mappings for the same Item (e.g., "low boots" and "walking shoes" are the same item). * only free the assigned memore once */ set<const Item*> unique_pointers; for (map<const string, const Item*>::iterator i = _items.begin(); i != _items.end(); ++i) unique_pointers.insert(i->seco...
false
false
false
false
false
0
actionForBookmark(const KBookmark &bm) { if ( bm.isGroup() ) { //kDebug(7043) << "Creating bookmark submenu named " << bm.text(); KActionMenu * actionMenu = new KBookmarkActionMenu( bm, this ); m_actions.append( actionMenu ); KBookmarkMenu *subMenu = new KBookmarkMenu( m_pManager, m_pOwner, actionMe...
false
false
false
false
false
0
add_to_queue(u8* fname, u32 len, u8 passed_det) { struct queue_entry* q = ck_alloc(sizeof(struct queue_entry)); q->fname = fname; q->len = len; q->depth = cur_depth + 1; q->passed_det = passed_det; if (q->depth > max_depth) max_depth = q->depth; if (queue_top) { queue_top...
false
false
false
false
false
0
istgt_free_conn(CONN_Ptr conn) { if (conn == NULL) return; if (conn->task_pipe[0] != -1) close(conn->task_pipe[0]); if (conn->task_pipe[1] != -1) close(conn->task_pipe[1]); (void) pthread_mutex_destroy(&conn->task_queue_mutex); (void) pthread_mutex_destroy(&conn->result_queue_mutex); (void) pthread_cond_des...
false
false
false
false
false
0
cogl_angle_tan (CoglAngle angle) { int sign = 1; CoglFixed result; /* reduce negative angle to positive + sign */ if (angle < 0) { sign = -sign; angle = -angle; } /* reduce to <0, pi) */ angle &= 0x1ff; /* reduce to first quadrant and sign */ if (angle > 256) { sign = ...
false
false
false
false
false
0
setEditorData(QWidget* editor, const QModelIndex& index) const { Q_ASSERT(qobject_cast<QComboBox*>(editor)); QComboBox* box = static_cast<QComboBox*>(editor); box->clear(); const QString& current = index.data().toString(); int currentIndex = -1; int i = 0; foreach(const Item& item, m_items) ...
false
false
false
false
false
0
Cbc_getVectorStarts(Cbc_Model * model) { const CoinPackedMatrix * matrix = NULL; matrix = model->model_->solver()->getMatrixByCol(); return (matrix == NULL) ? NULL : matrix->getVectorStarts(); }
false
false
false
false
false
0
create_hash(int n) { struct hash *h; int i; /* allocate storage for struct hash */ h = (struct hash *) malloc (sizeof(struct hash)); if (NULL == h) return NULL; h->size = n; /* allocate storage for n pointers to llist */ h->bins = (struct llist **) malloc (n * sizeof(struct llist *)); if (NULL == h->bins) re...
false
true
false
false
true
1
defLaeaGrid(int nx, int ny, double xmin, double xmax, double ymin, double ymax, double dx, double dy, double a, double lon0, double lat0) { int gridID; int i; double *xvals, *yvals; xvals = (double *) malloc(nx*sizeof(double)); yvals = (double *) malloc(ny*sizeof(double)); for ( i = 0; i < nx; ++i ) ...
false
false
false
false
false
0
rtw_joinbss_update_network(struct adapter *padapter, struct wlan_network *ptarget_wlan, struct wlan_network *pnetwork) { struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct wlan_network *cur_network = &(pmlmepriv->cur_network); DBG_88E("%s\n", __func__); RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ...
false
false
false
false
false
0
build_instanceof (tree value, tree type) { tree expr; tree itype = TREE_TYPE (TREE_TYPE (soft_instanceof_node)); tree valtype = TREE_TYPE (TREE_TYPE (value)); tree valclass = TYPE_NAME (valtype); tree klass; /* When compiling from bytecode, we need to ensure that TYPE has been loaded. */ if (CLASS_...
false
false
false
false
false
0
mc_check_shield() { int i; if ( Mc_pm->shield.ntris < 1 ) return; if (Mc_pm->shield_collision_tree) { mc_check_sldc(0); // see if we hit the SLDC } else { int o; for (o=0; o<8; o++ ) { model_octant * poct1 = &Mc_pm->octants[o]; if (!mc_ray_boundingbox( &poct1->min, &poct1->max, &Mc_p0, &Mc_direc...
false
false
false
false
false
0
boot_sdi(void *ptr, size_t len) { const struct SDIHeader *hdr = ptr; struct syslinux_memmap *mmap = NULL, *amap = NULL; struct syslinux_rm_regs regs; struct syslinux_movelist *ml = NULL; /* **** Basic sanity checking **** */ if (hdr->Signature != SDI_SIGNATURE) { fputs("No $SDI signature in fi...
false
false
false
false
false
0
Sacc_Sto_Aop_lut8( GenefxState *gfxs ) { int w = gfxs->length; int i = gfxs->Xphase; GenefxAccumulator *Sacc = gfxs->Sacc; u8 *D = gfxs->Aop[0]; int SperD = gfxs->SperD; while (w--) { GenefxAccumulator *S =...
false
false
false
false
false
0
getIsaVersion(const FeatureBitset &Features) { if (Features.test(FeatureISAVersion7_0_0)) return {7, 0, 0}; if (Features.test(FeatureISAVersion7_0_1)) return {7, 0, 1}; if (Features.test(FeatureISAVersion8_0_0)) return {8, 0, 0}; if (Features.test(FeatureISAVersion8_0_1)) return {8, 0, 1}; ...
false
false
false
false
false
0
f_cmp_fkind(const void *a, const void *b) { const feature_type *fa = &f_info[*(const int *)a]; const feature_type *fb = &f_info[*(const int *)b]; /* group by */ int c = feat_order(*(const int *)a) - feat_order(*(const int *)b); if (c) return c; /* order by feature name */ return strcmp(fa->name, fb->name); }
false
false
false
false
false
0
set_pwm(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count) { struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); struct max31790_data *data = dev_get_drvdata(dev); struct i2c_client *client = data->client; unsigned long pwm; int err; err = kstrt...
false
false
false
false
false
0
ipcp_update_callgraph (void) { struct cgraph_node *node; for (node = cgraph_nodes; node; node = node->next) if (node->analyzed && ipcp_node_is_clone (node)) { bitmap args_to_skip = NULL; struct cgraph_node *orig_node = ipcp_get_orig_node (node); struct ipa_node_params *info = IPA_NODE_REF (orig...
false
false
false
false
false
0
err(int error, const char *format, ...) { DB *db = unwrap(this); DB_REAL_ERR(db->dbenv, error, DB_ERROR_SET, 1, format); }
false
false
false
false
false
0
sftk_pruneSearch(CK_ATTRIBUTE *pTemplate, CK_ULONG ulCount, PRBool *searchCertDB, PRBool *searchKeyDB) { CK_ULONG i; *searchCertDB = PR_TRUE; *searchKeyDB = PR_TRUE; for (i = 0; i < ulCount; i++) { if (pTemplate[i].type == CKA_CLASS && pTemplate[i].pValue != NULL) { CK_OBJECT_CLASS class = *((...
false
false
false
false
false
0
queue_setup(struct vb2_queue *vq, const void *parg, unsigned int *nbuffers, unsigned int *nplanes, unsigned int sizes[], void *alloc_ctxs[]) { struct stk1160 *dev = vb2_get_drv_priv(vq); unsigned long size; size = dev->width * dev->height * 2; /* * Here we can change the number of buffers being requeste...
false
false
false
false
false
0
ipN_print(register const u_char *bp, register u_int length) { struct ip *ip, hdr; ip = (struct ip *)bp; if (length < 4) { (void)printf("truncated-ip %d", length); return; } memcpy (&hdr, (char *)ip, 4); switch (IP_V(&hdr)) { case 4: ip_print (gndo, bp, length); return; #ifdef INET6 case 6: ip6_print ...
false
false
false
false
false
0
compress(int n) { if (state==SEG1) postProcess(); assert(state==SEG2); const int BUFSIZE=1<<14; char buf[BUFSIZE]; // input buffer while (n) { int nbuf=BUFSIZE; // bytes read into buf if (n>=0 && n<nbuf) nbuf=n; int nr=in->read(buf, nbuf); if (nr<0 || nr>BUFSIZE || nr>nbuf) error("inval...
false
false
false
false
false
0
hopper_down (struct scanner * s) { struct cmd c = { {0}, 10, NULL, 0, CMD_NONE }; c.cmd[0] = HOPPER_DOWN; c.cmd[2] = 5; if (s->id == KV_S7075C) return SANE_STATUS_GOOD; return send_command (s, &c); }
false
false
false
false
false
0
recheck_lang_sections(void) { lang_sec *ls; char *langfile; for (ls = langsection; ls && ls->section; ls = ls->next) { langfile = get_langfile(ls); /* Found a language with a more preferred language? */ if (langfile) { read_lang(langfile); nfree(langfile); } } }
false
false
false
false
false
0
netdef_parse (char *str) { in_addr_t ipaddr, netmask; netdef_t *netdef; char ipbuf[DOTTED_QUAD_LEN + 1]; if (strcmp (str, "any") == 0) { ipaddr = 0; netmask = 0; } else { read_address (&str, ipbuf); ipaddr = inet_addr (ipbuf); if (ipaddr == INADDR_NONE) return NULL;...
false
false
false
false
false
0
align_context_divs(struct isl_basic_map *bmap, struct isl_basic_set *dom) { int i; int common = 0; int other; for (i = 0; i < dom->n_div; ++i) if (find_context_div(bmap, dom, i) != -1) common++; other = bmap->n_div - common; if (dom->n_div - common > 0) { bmap = isl_basic_map_extend_space(bmap, isl_space...
false
false
false
false
false
0
align(char sep, const string &str, size_t width, size_t column) { if (column + str.size() + 1 >= width) { return right(sep, str, width); } else { string res; res.resize(width - 1, sep); res.replace(column, str.size(), str); return res; ...
false
false
false
false
false
0
h5repack(const char* infile, const char* outfile, pack_opt_t *options) { /* check input */ if (check_options(options)<0) return -1; /* check for objects in input that are in the file */ if (check_objects(infile,options) < 0) return -1; /* copy the objects ...
false
false
false
false
false
0
CL_AllocExplosion (void) { explosion_t *ex; if ( cl_free_expl ) { // take a free explosion if possible ex = cl_free_expl; cl_free_expl = ex->next; } else { // grab the oldest one otherwise ex = cl_explosions_headnode.prev; ex->prev->next = ex->next; ex->next->prev = ex->prev; } memset ( ex, 0, siz...
false
false
false
false
false
0
cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last) { struct slot *slot; struct hotplug_slot *hotplug_slot; struct hotplug_slot_info *info; char name[SLOT_NAME_SIZE]; int status; int i; if (!(controller && bus)) return -ENODEV; /* * Create a structure for each slot, and register that slot * wit...
false
false
false
false
false
0
xen_mce_chrdev_read(struct file *filp, char __user *ubuf, size_t usize, loff_t *off) { char __user *buf = ubuf; unsigned num; int i, err; mutex_lock(&mcelog_lock); num = xen_mcelog.next; /* Only supports full reads right now */ err = -EINVAL; if (*off != 0 || usize < XEN_MCE_LOG_LEN*sizeof(struct xen_mce...
false
false
false
false
false
0
gth_folder_tree_new (const char *uri) { GthFolderTree *folder_tree; folder_tree = g_object_new (GTH_TYPE_FOLDER_TREE, NULL); if (uri != NULL) folder_tree->priv->root = g_file_new_for_uri (uri); return (GtkWidget *) folder_tree; }
false
false
false
false
false
0
user_prompter_prompt_invoke (EDBusUserPrompter *dbus_prompter, struct _PrompterAsyncData *async_data, GCancellable *cancellable, GError **error) { GPtrArray *captions; GList *list, *link; GError *local_error = NULL; g_return_val...
false
false
false
false
false
0
treat_gitlinks(const char **pathspec) { int i; if (!pathspec || !*pathspec) return; for (i = 0; i < active_nr; i++) { struct cache_entry *ce = active_cache[i]; if (S_ISGITLINK(ce->ce_mode)) { int len = ce_namelen(ce), j; for (j = 0; pathspec[j]; j++) { int len2 = strlen(pathspec[j]); if (len2 <...
false
false
false
false
false
0
syck_hdlr_add_node( SyckParser *p, SyckNode *n ) { SYMID id; if ( ! n->id ) { n->id = (p->handler)( p, n ); } id = n->id; if ( n->anchor == NULL ) { syck_free_node( n ); } return id; }
false
false
false
false
false
0
getGrub2(char ***opts, int *def, int *cur) { struct stat buff; grubConfig = "/boot/grub2/grub.cfg"; if (!stat(grubConfig, &buff)) return getGrub2OrBurg(opts, def, cur, "grub2-reboot"); grubConfig = "/boot/grub/grub.cfg"; return getGrub2OrBurg(opts, def, cur, "grub-reboot"); }
false
false
false
false
false
0
match_str_list(char *str, char **list) { int i = 0, matched = 0; if (! str || ! list) { return 0; } while (list[i] != NULL) { if (!strcmp(list[i], "*")) { matched = 1; break; } else if (strstr(str, list[i])) { matched = 1; break; } i++; } return matched; }
false
false
false
false
false
0
pk_backend_job_set_speed (PkBackendJob *job, guint speed) { g_return_if_fail (PK_IS_BACKEND_JOB (job)); /* have we already set an error? */ if (job->priv->set_error) { g_warning ("already set error, cannot process: speed %i", speed); return; } /* set the same twice? */ if (job->priv->speed == speed) { g_d...
false
false
false
false
false
0
ConsumeLineComment() { while (current_char_ != '\0' && current_char_ != '\n') { NextChar(); } TryConsume('\n'); }
false
false
false
false
false
0
bypass_conditional_jumps (void) { basic_block bb; int changed; rtx setcc; rtx insn; rtx dest; /* Note we start at block 1. */ if (ENTRY_BLOCK_PTR->next_bb == EXIT_BLOCK_PTR) return 0; bypass_last_basic_block = last_basic_block; mark_dfs_back_edges (); changed = 0; FOR_BB_BETWEEN (bb, ENTRY...
false
false
false
false
false
0
ber_read_integer(STREAM* s, uint32* value) { int length; ber_read_universal_tag(s, BER_TAG_INTEGER, False); ber_read_length(s, &length); if (value == NULL) { stream_seek(s, length); return True; } if (length == 1) stream_read_uint8(s, *value); else if (length == 2) stream_read_uint16_be(s, *value); ...
false
false
false
false
true
1
plugin_discover_type(gchar *filename) { GString *command_line; gint type = GPHPEDIT_PLUGIN_TYPE_UNKNOWN; gchar *result; command_line = g_string_new(filename); command_line = g_string_prepend(command_line, "'"); command_line = g_string_append(command_line, "' -type"); result= command_spawn(command_line->...
false
false
false
false
false
0
fz_read_tiff_bytes(unsigned char *p, struct tiff *tiff, unsigned ofs, unsigned n) { tiff->rp = tiff->bp + ofs; if (tiff->rp > tiff->ep) tiff->rp = tiff->bp; while (n--) *p++ = readbyte(tiff); }
false
false
false
false
false
0
do_border_gtia10(void) { int kk; UWORD *ptr = &scrn_ptr[LBORDER_START]; const UBYTE *pm_scanline_ptr = &GTIA_pm_scanline[LBORDER_START]; ULONG background = ANTIC_cl[C_PM0] | (ANTIC_cl[C_PM0] << 16); /* left border */ for (kk = left_border_chars; kk; kk--) DO_GTIA10_BORDER WRITE_VIDEO(ptr, COLOUR(pm_lookup_ptr[...
false
false
false
false
false
0
photo_ht_remove_all (EPhotoCache *photo_cache) { GHashTable *photo_ht; GQueue *photo_ht_keys; photo_ht = photo_cache->priv->photo_ht; photo_ht_keys = &photo_cache->priv->photo_ht_keys; g_mutex_lock (&photo_cache->priv->photo_ht_lock); g_hash_table_remove_all (photo_ht); while (!g_queue_is_empty (photo_ht_key...
false
false
false
false
false
0
_statechange_unregister_all(char *caller_id, caller_data_free_callback callback) { SCNotify *notify = head; SCNotify *start_notify = head; if(buffer_lock == 0) return; slapi_lock_mutex(buffer_lock); if(notify) { do { SCNotify *notify_next = notify->next; if( slapi_utf8casecmp((unsigned char *)ca...
false
false
false
false
false
0
gpt_write_partitions(struct fdisk_context *cxt, struct gpt_header *header, struct gpt_entry *ents) { off_t offset = le64_to_cpu(header->partition_entry_lba) * cxt->sector_size; uint32_t nparts = le32_to_cpu(header->npartition_entries); uint32_t totwrite = nparts * le32_to_cpu(header->sizeof_partition_entry); ss...
false
false
false
false
false
0
filter_bell(const double x1) { const double x = x1 < 0.0 ? -x1 : x1; if (x < 0.5) return (0.75 - x*x); if (x < 1.5) return (0.5 * pow(x - 1.5, 2.0)); return 0.0; }
false
false
false
false
false
0
asStateFree(void *data) { ASState *asState = data; debug(53, 3) ("asStateFree: %s\n", storeUrl(asState->entry)); storeClientUnregister(asState->sc, asState->entry, asState); storeUnlockObject(asState->entry); requestUnlink(asState->request); cbdataFree(asState); }
false
false
false
false
false
0
sd_stop0(struct gspca_dev *gspca_dev) { if (!gspca_dev->present) return; /* This maybe reset or power control */ reg_write(gspca_dev, 0x03, 0x03, 0x20); reg_write(gspca_dev, 0x03, 0x01, 0x00); reg_write(gspca_dev, 0x03, 0x00, 0x01); reg_write(gspca_dev, 0x05, 0x10, 0x01); reg_write(gspca_dev, 0x05, 0x11, 0x0f...
false
false
false
false
false
0
reg_count_callback(void * userdata, struct rc_instruction * inst, rc_register_file file, unsigned int index, unsigned int mask) { struct rc_program_stats *s = userdata; if (file == RC_FILE_TEMPORARY) (int)index > s->num_temp_regs ? s->num_temp_regs = index : 0; if (file == RC_FILE_INLINE) s->num_inline_literal...
false
false
false
false
false
0
crypto_init_shash_ops_async(struct crypto_tfm *tfm) { struct crypto_alg *calg = tfm->__crt_alg; struct shash_alg *alg = __crypto_shash_alg(calg); struct crypto_ahash *crt = __crypto_ahash_cast(tfm); struct crypto_shash **ctx = crypto_tfm_ctx(tfm); struct crypto_shash *shash; if (!crypto_mod_get(calg)) return -...
false
false
false
false
false
0
ims_pcu_probe(struct usb_interface *intf, const struct usb_device_id *id) { struct usb_device *udev = interface_to_usbdev(intf); struct ims_pcu *pcu; int error; pcu = kzalloc(sizeof(struct ims_pcu), GFP_KERNEL); if (!pcu) return -ENOMEM; pcu->dev = &intf->dev; pcu->udev = udev; pcu->bootloader_mode = id...
false
false
false
false
false
0
pk_probe(struct hid_device *hdev, const struct hid_device_id *id) { int ret; struct usb_interface *intf = to_usb_interface(hdev->dev.parent); unsigned short ifnum = intf->cur_altsetting->desc.bInterfaceNumber; unsigned long quirks = id->driver_data; struct pk_device *pk; struct pcmidi_snd *pm = NULL; pk = kzall...
false
false
false
false
false
0
validate_context_version(__DRIscreen *screen, int mesa_api, unsigned major_version, unsigned minor_version, unsigned *dri_ctx_error) { unsigned req_version = 10 * major_version + minor_version; unsigned max_version...
false
false
false
false
false
0
jpake_enforceKeyType(SFTKObject * key, CK_KEY_TYPE keyType) { CK_RV crv; SFTKAttribute * keyTypeAttr = sftk_FindAttribute(key, CKA_KEY_TYPE); if (keyTypeAttr != NULL) { crv = *(CK_KEY_TYPE *)keyTypeAttr->attrib.pValue == keyType ? CKR_OK : CKR_TEMPLATE_INCONSISTENT; s...
false
false
false
false
false
0
stabilize_save_expr_r (tree *expr_p, int *walk_subtrees, void *data) { struct pointer_set_t *pset = (struct pointer_set_t *)data; tree expr = *expr_p; if (TREE_CODE (expr) == SAVE_EXPR) { tree op = TREE_OPERAND (expr, 0); cp_walk_tree (&op, stabilize_save_expr_r, data, pset); if (TREE_SIDE_E...
false
false
false
false
false
0
udf_get_pblock_spar15(struct super_block *sb, uint32_t block, uint16_t partition, uint32_t offset) { int i; struct sparingTable *st = NULL; struct udf_sb_info *sbi = UDF_SB(sb); struct udf_part_map *map; uint32_t packet; struct udf_sparing_data *sdata; map = &sbi->s_partmaps[partition]; sdata = &map-...
false
false
false
false
false
0
AllocThread() { Thread* t = free_threads_; if (t == NULL) { t = new Thread; t->capture = new const char*[ncapture_]; return t; } free_threads_ = t->next; return t; }
false
false
false
false
false
0
update_feed_list() { unsigned int i; for (i=0; i<feeds.size(); i++) { RSS_FEED& rf = feeds[i]; rf.found = false; } if (!gstate.acct_mgr_info.get_no_project_notices()) { for (i=0; i<gstate.projects.size(); i++) { PROJECT* p = gstate.projects[i]; update_proj...
false
false
false
false
false
0
WriteData(CheatAction * action, UINT32 data) { UINT8 parameter = EXTRACT_FIELD(action->type, LocationParameter); UINT8 bytes = EXTRACT_FIELD(action->type, BytesUsed) + 1; UINT8 swapBytes = EXTRACT_FIELD(action->type, Endianness); switch(EXTRACT_FIELD(action->type, LocationType)) { case kLocation_Standar...
false
false
false
false
false
0
Create(OtherOps Op, unsigned short predicate, Value *S1, Value *S2, const Twine &Name, Instruction *InsertBefore) { if (Op == Instruction::ICmp) { if (InsertBefore) return new ICmpInst(InsertBefore, CmpInst::Predicate(predicate), S1, S2, Name); ...
false
false
false
false
false
0
cb_host_to_target_errno (cb, host_val) host_callback *cb; int host_val; { CB_TARGET_DEFS_MAP *m; for (m = &cb->errno_map[0]; m->host_val; ++m) if (m->host_val == host_val) return m->target_val; /* ??? Which error to return in this case is up for grabs. Note that some missing values may ...
false
false
false
false
false
0
scale_active_circuits(or_connection_t *conn, unsigned cur_tick) { double factor = get_scale_factor( conn->active_circuit_pqueue_last_recalibrated, cur_tick); /** Ordinarily it isn't okay to change the value of an element in a heap, * but it's okay here, since we are preserving the or...
false
false
false
false
false
0
updateBackground() { m_background = background_loader.pixmap(); if ((m_background.isNull() || m_background.size() != size()) && isVisible()) { m_background = QPixmap(); background_loader.create(m_background_position, m_background_path, this); setAttribute(Qt::WA_NoSystemBackground, false); setAutoFillBackgrou...
false
false
false
false
false
0
on_mw__spinbutton_audiotrack_changed (GtkEditable *editable, GapVexMainGlobalParams *gpp) { GtkAdjustment *adj; if(gap_debug) printf("CB: on_mw__spinbutton_audiotrack_changed\n"); if(gpp == NULL) return; if(gpp->mw__spinbutton_audiotrack_adj) { adj = GTK_ADJUSTME...
false
false
false
false
false
0
indexVideoTag(const FLVTag& tag, const FLVVideoTag& videotag, boost::uint32_t thisTagPos) { if ( videotag.frametype != FLV_VIDEO_KEYFRAME ) { return; } //log_debug("Added cue point at timestamp %d and position %d " //"(key video frame)", tag.timestamp, thisTagPos); _cuePoints[tag.timestamp] = thisTagPos; }
false
false
false
false
false
0
addseq(char *s, struct ReadSeqVars *V) { char *s0; char *sq; int rpl; /* valid residues per line */ int bpl; /* characters per line */ if (V->ssimode == -1) { /* Normal mode: keeping the seq */ /* Make sure we have enough room. We know that s is <= buflen, * so just make sure ...
false
false
false
false
false
0
printlong (DISPLAY *dp) { struct stat *sp; FTSENT *p; NAMES *np; char buf[20]; if (dp->list->fts_level != FTS_ROOTLEVEL && (f_longform || f_size)) printf ("total %lu\n", howmany (dp->btotal, blocksize)); for (p = dp->list; p; p = p->fts_link) { if (IS_NOPRINT (p)) continue; sp = p->ft...
true
true
false
false
false
1
bfa_trunk_scn(struct bfa_fcport_s *fcport, struct bfi_fcport_trunk_scn_s *scn) { struct bfa_fcport_trunk_s *trunk = &fcport->trunk; struct bfi_fcport_trunk_link_s *tlink; struct bfa_trunk_link_attr_s *lattr; enum bfa_trunk_state state_prev; int i; int link_bm = 0; bfa_trc(fcport->bfa, fcport->cfg.trunked); WAR...
false
false
false
false
false
0
statByteHitRatio(int minutes) { size_t s; size_t c; #if USE_CACHE_DIGESTS size_t cd; #endif /* size_t might be unsigned */ assert(minutes < N_COUNT_HIST); c = CountHist[0].client_http.kbytes_out.kb - CountHist[minutes].client_http.kbytes_out.kb; s = CountHist[0].server.all.kbytes_in.kb - Cou...
false
false
false
false
false
0
process_file (char *infile, char *outfile, int crypttype) { FILE *input; FILE *output; char *line; int i; if ((input = fopen (infile, "r")) == NULL) { perrorf ("Can't open the file `%s' for input", infile); return 1; } if (outfile == NULL) { output = stdout; } else if ...
false
false
true
false
true
1
profile_get_boolean(profile_t profile, const char *name, const char *subname, const char *subsubname, int def_val, int *ret_boolean) { const char *value; long retval; if (profile == 0) { *ret_boolean = def_val; return 0; } retval = profile_get_value(profile, name, subname, subsubname, &value); if (ret...
false
false
false
false
false
0
hasTag(int tag ,int mask) const { int tag1=m_p1->getTag(); int tag2=m_p2->getTag(); return (((tag1 & mask)==(tag & mask))||((tag2 & mask)==(tag & mask))); }
false
false
false
false
false
0
bnx2x_dcbnl_set_dcbx(struct net_device *netdev, u8 state) { struct bnx2x *bp = netdev_priv(netdev); DP(BNX2X_MSG_DCB, "state = %02x\n", state); /* set dcbx mode */ if ((state & BNX2X_DCBX_CAPS) != state) { BNX2X_ERR("Requested DCBX mode %x is beyond advertised capabilities\n", state); return 1; } if (...
false
false
false
false
false
0
mono_vtable_build_imt_slot (MonoVTable* vtable, int imt_slot) { MONO_REQ_GC_NEUTRAL_MODE; gpointer *imt = (gpointer*)vtable; imt -= MONO_IMT_SIZE; g_assert (imt_slot >= 0 && imt_slot < MONO_IMT_SIZE); /* no support for extra interfaces: the proxy objects will need * to build the complete IMT * Update and hec...
false
false
false
false
false
0
adt7316_spi_probe(struct spi_device *spi_dev) { struct adt7316_bus bus = { .client = spi_dev, .irq = spi_dev->irq, .irq_flags = IRQF_TRIGGER_LOW, .read = adt7316_spi_read, .write = adt7316_spi_write, .multi_read = adt7316_spi_multi_read, .multi_write = adt7316_spi_multi_write, }; /* don't exceed max s...
false
false
false
false
false
0
case_when_optimizable_literal(NODE * node) { switch (nd_type(node)) { case NODE_LIT: { VALUE v = node->nd_lit; double ival; if (TYPE(v) == T_FLOAT && modf(RFLOAT_VALUE(v), &ival) == 0.0) { return FIXABLE(ival) ? LONG2FIX((long)ival) : rb_dbl2big(ival); } if (SYMBOL_P(v) || rb_obj_is_kind_of(v, ...
false
false
false
false
false
0
s3_put_file(const char* localname, char* remotename, char* bucketname, enum amz_base_perm perms, const char* access_key_id, const char* access_key) { struct link* server; struct s3_header_object *head; time_t stoptime = time(0)+s3_timeout; struct s3_message mesg; struct stat st; FILE* infile; char response[HEADE...
true
true
true
false
true
1
_mpd_real_size(mpd_uint_t *data, mpd_ssize_t size) { while (size > 1 && data[size-1] == 0) { size--; } return size; }
false
false
false
false
false
0
guid_query_muid_is_gtkg(const struct guid *guid, bool oob, uint8 *majp, uint8 *minp, bool *relp) { /* * We used to encode the query MUID differently depending on whether OOB * queries were used or just plain ones, but we are now always using * an encoding and a tagging that ignores the bytes which can be supers...
false
false
false
false
false
0
atfirst_exceptspace(void) { const char *start = sp; const char *end = cp ? cp - 1 : lp; while (start < end && *start && isspace(*start)) start++; return (start == end) ? 1 : 0; }
false
false
false
false
false
0
repack_missing (const MODEL *pmod, DATASET *dset, const char *missvec, int misscount) { int i, v, t, m, g; double *tmpmiss, *tmpgood; int modn = pmod->t2 - pmod->t1 + 1; tmpmiss = malloc(modn * sizeof *tmpmiss); if (tmpmiss == NULL) { return E_ALLOC; } tmpgood = tmpmiss + misscount; ...
false
false
false
false
true
1