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
bet_data_future_modify_lines ( struct_futur_data *scheduled ) { gchar *key; key = bet_data_get_key ( scheduled -> account_number, scheduled -> number ); g_hash_table_replace ( bet_future_list, key, scheduled ); if ( etat.modification_fichier == 0 ) modification_fichier ( TRUE ); return T...
false
false
false
false
false
0
writeImageDef(DL_WriterA& dw, int handle, const DL_ImageData& data) { /*if (data.file.empty()) { std::cerr << "DL_Dxf::writeImage: " << "Image file must not be empty\n"; return; }*/ dw.dxfString(0, "IMAGEDEF"); if (version==DL_V...
false
false
false
false
false
0
findline(char *buffer, int count) { int ctr; char *p = buffer - 1; if (count < 1) return buffer; for (ctr = 0; ctr < count; ctr++) { p = strchr(p + 1, '\n'); if (p == NULL) return NULL; } return p; }
false
false
false
false
false
0
generate_call_graph (struct profdata *profdata) { size_t cnt; puts ("\nindex % time self children called name\n"); for (cnt = 0; cnt < symidx; ++cnt) if (sortsym[cnt]->froms != NULL || sortsym[cnt]->tos != NULL) { struct arc_list *runp; size_t n; /* First print the from-information. */...
false
false
false
false
false
0
da9150_fg_read_attr(struct da9150_fg *fg, u8 code, u8 size) { u8 buf[size]; u8 read_addr; u32 res = 0; int i; /* Set QIF code (READ mode) */ read_addr = (code & DA9150_QIF_CODE_MASK) | DA9150_QIF_READ; da9150_read_qif(fg->da9150, read_addr, size, buf); for (i = 0; i < size; ++i) res |= (buf[i] << (i * DA91...
false
false
false
false
false
0
get_bg_tile_info(int tile_index) { unsigned char attr = ddrible_bg_videoram[tile_index]; int num = ddrible_bg_videoram[tile_index + 0x400] + ((attr & 0xc0) << 2) + ((attr & 0x20) << 5) + (charbank[1] << 11); SET_TILE_INFO( 1, num, 0, TILE_FLIPYX((attr & 0x30) >> 4)) }
false
false
false
false
false
0
ffgtrm(fitsfile *gfptr, /* FITS file pointer to group */ int rmopt, /* code specifying if member elements are to be deleted: OPT_RM_GPT ==> remove only group table OPT_RM_ALL ==> recursively remove members and their members (if groups) */ int *status...
false
false
false
false
false
0
bitsetv_ones (bitsetv bsetv) { bitset_bindex i; for (i = 0; bsetv[i]; i++) bitset_ones (bsetv[i]); }
false
false
false
false
false
0
pdf_write_spot_function(gx_device_pdf *pdev, const gx_ht_order *porder, long *pid) { /****** DOESN'T HANDLE STRIP HALFTONES ******/ int w = porder->width, h = porder->height; uint num_bits = porder->num_bits; gs_function_Sd_params_t params; static const float domain_spot[4] =...
false
false
false
false
false
0
gst_dccp_client_src_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstDCCPClientSrc *src = GST_DCCP_CLIENT_SRC (object); switch (prop_id) { case PROP_PORT: g_value_set_int (value, src->port); break; case PROP_HOST: g_value_set_string (value, src->...
false
false
false
false
false
0
save_weblist() { char filename[512]; xmlDoc *doc; xmlNode *xsearchengine; xmlNode *xgroup; xmlNode *xengine; gint type; gchar *title=NULL; gchar *home=NULL; gchar *pre=NULL; gchar *post=NULL; gchar *glue=NULL; gchar *code=NULL; GtkTreeIter parent_iter; GtkTreeIter child_iter; LOG(LOG_DEBUG, "IN ...
true
true
true
false
false
1
AddBlock(HBasicBlock* block) { if (block == loop_header()) return; if (block->parent_loop_header() == loop_header()) return; if (block->parent_loop_header() != NULL) { AddBlock(block->parent_loop_header()); } else { block->set_parent_loop_header(loop_header()); blocks_.Add(block); for (int i = 0...
false
false
false
false
false
0
RewriteUsesOfClonedInstructions(BasicBlock *OrigHeader, BasicBlock *OrigPreheader, ValueToValueMapTy &ValueMap) { // Remove PHI node entries that are no longer live. BasicBlock::iterator I, E = OrigHeader->end(); for (I = Orig...
false
false
false
false
false
0
SendFeatureData(PalInfo *pal) { Command cmd; char path[MAX_PATHLEN]; const gchar *env; int sock; if (*progdt.sign != '\0') cmd.SendMySign(cthrd.udpsock, pal); env = g_get_user_config_dir(); snprintf(path, MAX_PATHLEN, "%s" ICON_PATH "/%s", env, pr...
false
false
false
false
false
0
gnash_view_display(GnashView *view) { gnash::InvalidatedRanges changed_ranges; changed_ranges.setWorld(); boost::shared_ptr<gnash::Renderer> renderer = gnash_canvas_get_renderer(view->canvas); renderer->set_invalidated_regions(changed_ranges); gdk_window_invalidate_rect(GTK_WIDGET(view->canvas)->wi...
false
false
false
false
false
0
delete_char(void){ int i; int input_ptr; if(input_len){ // Only delete if there is something already input_ptr = (cursor_pos + cursor_offset); if(input_ptr < input_len){ // Only if the cursor isn't at the end for(i=input_ptr;i<input_len;i++){ // Shift items in the buffer input_buffer[i] = ...
false
false
false
false
false
0
pcmcia_register_driver(struct pcmcia_driver *driver) { int error; if (!driver) return -EINVAL; pcmcia_check_driver(driver); /* initialize common fields */ driver->drv.bus = &pcmcia_bus_type; driver->drv.owner = driver->owner; driver->drv.name = driver->name; mutex_init(&driver->dynids.lock); INIT_LIST_HEA...
false
false
false
false
false
0
airEndsWith(const char *s, const char *suff) { if (!(s && suff)) return 0; if (!(strlen(s) >= strlen(suff))) return 0; if (!strncmp(s + strlen(s) - strlen(suff), suff, strlen(suff))) return 1; else return 0; }
false
false
false
false
false
0
ldns_verify_time( ldns_rr_list *rrset, ldns_rr_list *rrsig, const ldns_rr_list *keys, time_t check_time, ldns_rr_list *good_keys ) { uint16_t i; ldns_status verify_result = LDNS_STATUS_ERR; if (!rrset || !rrsig || !keys) { return LDNS_STATUS_ERR; } if (ldns_rr_list_rr_count(rrset) < 1) { return...
false
false
false
false
false
0
reset_generation(CELL i) { F_ZONE *z = (i == NURSERY ? &nursery : &data_heap->generations[i]); z->here = z->start; if(secure_gc) memset((void*)z->start,69,z->size); }
false
false
false
false
false
0
memory_ass_sub(PyMemoryViewObject *self, PyObject *key, PyObject *value) { Py_ssize_t start, len, bytelen; Py_buffer srcview; Py_buffer *view = &(self->view); char *srcbuf, *destbuf; if (view->readonly) { PyErr_SetString(PyExc_TypeError, "cannot modify read-only memory"); ...
false
true
false
false
false
1
create_check_texture (void) { int i, j; Texture * tex; unsigned char * pixmap; pixmap = (unsigned char *) malloc (TEXTURE_SIZE*TEXTURE_SIZE*3*sizeof (unsigned char)); for (i=0; i< TEXTURE_SIZE; i++) { for (j=0; j< TEXTURE_SIZE; j++) { pixmap [3*TEXTURE_SIZE*i + 3*j] = 255 * ( (((i)/...
false
false
false
false
false
0
run_startup_cmd(void) { gchar **argv = NULL; GError *e = NULL; gboolean ok; if (!g_shell_parse_argv(startup_cmd, NULL, &argv, &e)) { g_message("Error parsing startup command: %s", e->message); g_error_free(e); e = NULL; } ok = g_spawn_async(NULL, argv, ...
false
false
false
false
false
0
ompi_group_difference(ompi_group_t* group1, ompi_group_t* group2, ompi_group_t **new_group) { /* local varibles */ int new_group_size, proc1, proc2, found_in_group2, cnt; int my_group_rank; ompi_group_t *group1_pointer, *group2_pointer, *new_group_pointer; ompi_proc_t *pro...
false
false
false
false
false
0
gst_clock_get_master (GstClock * clock) { GstClock *result = NULL; GstClockPrivate *priv; g_return_val_if_fail (GST_IS_CLOCK (clock), NULL); priv = clock->priv; GST_OBJECT_LOCK (clock); if (priv->master) result = gst_object_ref (priv->master); GST_OBJECT_UNLOCK (clock); return result; }
false
false
false
false
false
0
inPoly(Point vertex[], int n, Point q) { int i, i1; /* point index; i1 = i-1 mod n */ double x; /* x intersection of e with ray */ double crossings = 0; /* number of edge/ray crossings */ if (tp3 == NULL) tp3 = N_GNEW(maxcnt, Point); /* Shift so that q is the origin. */ for (i = 0; i < n;...
false
false
false
false
false
0
RecordCodeGeneration(Code* code, MacroAssembler* masm) { code->set_major_key(MajorKey()); OPROFILE(CreateNativeCodeRegion(GetName(), code->instruction_start(), code->instruction_size())); LOG(CodeCreateEvent(Logger::STUB_TAG, code, GetName())); ...
false
false
false
false
false
0
find_neighbors_LL(EW * ewptr, NEIGHBOR * nbr_head, SHORT row, SHORT col, int npoints, SHORT * neighbors) { MELEMENT **Mptr; /* double indirection !! */ int westward = 1; /* 1 if west of interpolation point */ double distance; short *active; /* TRUE if active search in this direction */ a...
false
false
false
false
false
0
rep_hist_record_mtbf_data(time_t now, int missing_means_down) { char time_buf[ISO_TIME_LEN+1]; digestmap_iter_t *orhist_it; const char *digest; void *or_history_p; or_history_t *hist; open_file_t *open_file = NULL; FILE *f; { char *filename = get_datadir_fname("router-stability"); f = start_wr...
false
false
false
false
false
0
str_to_uppercase(string& output) { int len = output.length(); for (int i = 0; i < len; i++) { output[i] = toupper(output[i]); } }
false
false
false
false
false
0
check_response(usb_handle *usb, unsigned int size, char *response) { unsigned char status[65]; int r; for(;;) { r = usb_read(usb, status, 64); if(r < 0) { sprintf(ERROR, "status read failed (%s)", strerror(errno)); usb_close(usb); return -1; } ...
false
false
false
false
false
0
factor_using_division (GArray *fact, mpz_t t, unsigned int limit) { mpz_t q, r; unsigned long int f; int ai; unsigned *addv = add; unsigned int failures; mpz_init (q); mpz_init (r); f = mpz_scan1 (t, 0); mpz_div_2exp (t, t, f); while (f) { append_factor_uint (fact, 2); --f; } ...
false
false
false
false
false
0
lfsr(unsigned short v, unsigned int bits) { unsigned short bit; if (v >= (1 << bits)) { fprintf(stderr, "lfsr: internal error\n"); exit(-1); } if (v == (((1 << bits) - 1) & 0xace1)) return 0; if (v == 0) v = ((1 << bits) - 1) & 0xace1; switch (bits) { case 8: /* x^8 + x^6 + x^5 + x^4 + 1 */ bit = (...
false
false
false
false
false
0
window2_button_callback(GtkWidget *w, gpointer data) { GtkWidget * x, *apply_button,*add_new_button; gchar * c, *c2; int i; long select = (long)data; gchar * clist_item[3]; // printf("point2 data = %d\n",select); apply_button = (GtkWidget*)gtk_object_get_data(GTK_OBJECT(window2),"button2"); add_new_button = (Gt...
false
false
false
false
false
0
_fm_folder_model_add_file(FmFolderModel* model, FmFileInfo* file) { if(!file_can_show(model, file)) g_sequence_append( model->hidden, fm_folder_item_new(file) ); else fm_folder_model_file_created(model, file); }
false
false
false
false
false
0
putFIFO(BUF_POS * b, int totalnum){ if(Findex2 >= totalnum){ printf(" out of FIFO range error 1 !\n"); exit(1); } (FIFO2+Findex2)->altitude = b ->altitude ; (FIFO2+Findex2)->x = b ->x; (FIFO2+Findex2)->y = b ->y; (FIFO2+Findex2)->prev = b ->prev; (FIFO2+Findex2)->next = b ->next; (FIFO2+Findex...
false
false
false
false
false
0
alc5632_set_bias_level(struct snd_soc_codec *codec, enum snd_soc_bias_level level) { switch (level) { case SND_SOC_BIAS_ON: enable_power_depop(codec); break; case SND_SOC_BIAS_PREPARE: break; case SND_SOC_BIAS_STANDBY: /* everything off except vref/vmid, */ snd_soc_update_bits(codec, ALC5632_PWR...
false
false
false
false
false
0
test_ctzv_to_timezone (void) { gint tz1 = 0; gint _tmp0_ = 0; gint tz2 = 0; gint _tmp1_ = 0; gint tz3 = 0; gint _tmp2_ = 0; #line 26 "/tmp/buildd/fso-gsmd-0.12.0/tests/testconst.vala" _tmp0_ = fso_gsm_constants_ctzvToTimeZone (0x19); #line 26 "/tmp/buildd/fso-gsmd-0.12.0/tests/testconst.vala" tz1 = _tmp0_; #lin...
false
false
false
false
false
0
check_batch_flags(void) { int i; if (protocol_version < 29) flag_ptr[7] = NULL; else if (protocol_version < 30) flag_ptr[9] = NULL; tweaked_append = append_mode == 1; tweaked_append_verify = append_mode == 2; #ifdef ICONV_OPTION tweaked_iconv = iconv_opt != NULL; #endif for (i = 0; flag_ptr[i]; i++) { int...
false
false
false
false
false
0
handle_char_store (gimple_stmt_iterator *gsi) { int idx = -1; strinfo si = NULL; gimple stmt = gsi_stmt (*gsi); tree ssaname = NULL_TREE, lhs = gimple_assign_lhs (stmt); if (TREE_CODE (lhs) == MEM_REF && TREE_CODE (TREE_OPERAND (lhs, 0)) == SSA_NAME) { if (integer_zerop (TREE_OPERAND (lhs, 1)...
false
false
false
false
false
0
free_pdp(struct drm_device *dev, struct i915_page_directory_pointer *pdp) { __pdp_fini(pdp); if (USES_FULL_48BIT_PPGTT(dev)) { cleanup_px(dev, pdp); kfree(pdp); } }
false
false
false
false
false
0
GetLength() { double result, l=0.0; int i; this->ComputeBounds(); for (i=0; i<3; i++) { result = this->Bounds[2*i+1] - this->Bounds[2*i]; l += result * result; } result = sqrt(l); assert("post: positive_result" && result>=0); return result; }
false
false
false
false
false
0
glp_ios_node_bound(glp_tree *tree, int p) { IOSNPD *node; /* obtain pointer to the specified subproblem */ if (!(1 <= p && p <= tree->nslots)) err: xerror("glp_ios_node_bound: p = %d; invalid subproblem referen" "ce number\n", p); node = tree->slot[p].node; if (node == NULL) ...
false
false
false
false
false
0
regmatchrepeat(regex_t *preg, int scan, int matchmin) { int *scanpt = preg->program + scan; int max = scanpt[2]; int min = scanpt[3]; if (scanpt[4] < min) { scanpt[4]++; if (regmatch(preg, scan + 5)) { return 1; } scanpt[4]--; return 0; } if (scanpt[4] > max) { return 0; } if (matchmin) {...
false
false
false
false
false
0
mtd_point(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, void **virt, resource_size_t *phys) { *retlen = 0; *virt = NULL; if (phys) *phys = 0; if (!mtd->_point) return -EOPNOTSUPP; if (from < 0 || from >= mtd->size || len > mtd->size - from) return -EINVAL; if (!len) return 0; retu...
false
false
false
false
false
0
removeSubscription( Podcasts::SqlPodcastChannelPtr sqlChannel ) { debug() << "Deleting channel " << sqlChannel->title(); sqlChannel->deleteFromDb(); m_channels.removeOne( sqlChannel ); //HACK: because of a database "leak" in the past we have orphan data in the tables. //Remove it when we know it's...
false
false
false
false
false
0
update(btDbvtNode* leaf,btDbvtVolume& volume,const btVector3& velocity) { if(leaf->volume.Contain(volume)) return(false); volume.SignedExpand(velocity); update(leaf,volume); return(true); }
false
false
false
false
false
0
alg_fromtext(const char *name) { const char *p = name; if (strncasecmp(p, "hmac-", 5) == 0) p = &name[5]; if (strcasecmp(p, "md5") == 0) return DST_ALG_HMACMD5; if (strcasecmp(p, "sha1") == 0) return DST_ALG_HMACSHA1; if (strcasecmp(p, "sha224") == 0) return DST_ALG_HMACSHA224; if (strcasecmp(p, "sha256"...
false
false
false
false
false
0
eb_finalize_appendix_subbooks(EB_Appendix *appendix) { EB_Appendix_Subbook *subbook; int i; LOG(("in: eb_finalize_appendix_subbooks(appendix=%d)", (int)appendix->code)); for (i = 0, subbook = appendix->subbooks; i < appendix->subbook_count; i++, subbook++) { zio_finalize(&appendix->subbooks[i].zio...
false
false
false
false
false
0
cacheId(const QString &elementId) { if (size.isValid() && size != naturalSize) { return CACHE_ID_WITH_SIZE(size, elementId); } else { return CACHE_ID_NATURAL_SIZE(elementId); } }
false
false
false
false
false
0
outPendingInlineStatements() { if( linkStack.size() > 1 && linkStack[linkStack.size()-2].openedInMif && !linkStack[linkStack.size()-2].forcesNoLink() ) { LinkInfo::pendingMifClosings++; linkStack[linkStack.size()-2].openedInMif = false; } for( ; LinkInfo::pendingMifClosi...
false
false
false
false
false
0
multi_sync_start_countdown() { // don't allow repeat button presses if(Multi_sync_launch_pressed){ return; } Multi_sync_launch_pressed = 1; // if I'm the server, begin the countdown if(Net_player->flags & NETINFO_FLAG_AM_MASTER){ gamesnd_play_iface(SND_COMMIT_PRESSED); Multi_sync_countdown_timer = 0.0f; ...
false
false
false
false
false
0
bnx2i_setup_host_queue_size(struct bnx2i_hba *hba, struct Scsi_Host *shost) { if (test_bit(BNX2I_NX2_DEV_5708, &hba->cnic_dev_type)) shost->can_queue = ISCSI_MAX_CMDS_PER_HBA_5708; else if (test_bit(BNX2I_NX2_DEV_5709, &hba->cnic_dev_type)) shost->can_queue = ISCSI_MAX_CMDS_PER_HBA_5709; else if (test_bit(B...
false
false
false
false
false
0
loc_compare_locale_signatures (const char *signature, const sc_locale_t *locale) { sc_int index_; sc_bool is_matched; /* Compare signatures, stopping on the first match found. */ is_matched = FALSE; for (index_ = 0; index_ < SIGNATURE_COUNT; index_++) { if (memcmp (locale->signature[index_], ...
false
false
false
false
false
0
netsnmp_iterator_create_table( Netsnmp_First_Data_Point *firstDP, Netsnmp_Next_Data_Point *nextDP, Netsnmp_First_Data_Point *getidx, netsnmp_variable_list *indexes) { netsnmp_iterator_info *iinfo = SNMP_MALLOC_T...
false
false
false
false
false
0
LongestAxisLength (void) const { // Return longest axis length RNLength dx = this->XLength(); RNLength dy = this->YLength(); return (dx > dy) ? dx : dy; }
false
false
false
false
false
0
write_metadata_block_data_streaminfo_cb_(FLAC__IOHandle handle, FLAC__IOCallback_Write write_cb, const FLAC__StreamMetadata_StreamInfo *block) { FLAC__byte buffer[FLAC__STREAM_METADATA_STREAMINFO_LENGTH]; const unsigned channels1 = block->channels - 1; const unsigned bps1 = block->bits_per_sample - 1; /* we are us...
false
true
false
false
false
1
gwy_app_menu_setup_accels(GNode *node, gpointer prefix) { MenuNodeData *data = (MenuNodeData*)node->data; gchar *accel_path; if (GTK_IS_MENU_ITEM(data->widget)) { accel_path = g_strconcat((gchar*)prefix, data->path, NULL); gwy_app_menu_canonicalize_label(accel_path...
false
false
false
false
false
0
set_member_ringinuse_help_members(struct call_queue *q, const char *interface, int ringinuse) { struct member *mem; int foundinterface = 0; char rtringinuse[80]; ao2_lock(q); if ((mem = interface_exists(q, interface))) { foundinterface++; if (!mem->realtime) { mem->ringinuse = ringinuse; } else { spri...
true
true
false
false
false
1
Drop(UFName name) { _UFGroupMap::iterator iter = ufgroup->Map.find(name); if (iter == ufgroup->Map.end()) Throw("index '%s' does not exists", name); UFObject *dropObject = (*iter).second; ufgroup->Map.erase(name); for (UFGroupList::iterator iter = ufgroup->List.begin(); iter != u...
false
false
false
false
false
0
process_fpdus(struct nes_vnic *nesvnic, struct nes_qp *nesqp) { int again = 1; unsigned long flags; do { /* Ignore rc - if it failed, tcp retries will cause it to try again */ forward_fpdus(nesvnic, nesqp); spin_lock_irqsave(&nesqp->pau_lock, flags); if (nesqp->pau_pending) { nesqp->pau_pending = 0; }...
false
false
false
false
false
0
insert(timeval futureTime, IOHandler* handler) { if (isEmpty() || futureTime < earliestTime()) { _first = new Timer(futureTime, handler, _first); } else { Timer* before = _first; Timer* after = _first->next; while (after != NULL && futureTime > after->timerValue) { before = after; after = after->n...
false
false
false
false
false
0
tenEMBimodalParmNix(tenEMBimodalParm *biparm) { if (biparm) { biparm->histo = (double *)airFree(biparm->histo); biparm->pp1 = (double *)airFree(biparm->pp1); biparm->pp2 = (double *)airFree(biparm->pp2); } airFree(biparm); return NULL; }
false
false
false
false
false
0
P_SetMessage(player_t * player, char *message, boolean ultmsg) { extern boolean messageson; if ((ultimatemsg || !messageson) && !ultmsg) { return; } player->message = message; player->messageTics = MESSAGETICS; BorderTopRefresh = true; if (ultmsg) { ultimatemsg = tru...
false
false
false
false
false
0
cx_fw_version(struct ipmi_intf *intf, char *version) { struct ipmi_rs *rsp; struct ipmi_rq req; uint8_t msg_data[64]; int i; memset(&req, 0, sizeof(req)); memset(msg_data, 0, sizeof(msg_data)); req.msg.netfn = IPMI_NETFN_OEM_SS; req.msg.cmd = IPMI_CMD_OEM_FW_SET_STATUS; msg_data[0] = 0; // resvd msg_data[1] ...
false
true
false
false
false
1
guid_add_banned(const struct guid *guid) { struct guiddata *gd; struct guiddata new_gd; gd = get_guiddata(guid); if (NULL == gd) { gd = &new_gd; gd->create_time = gd->last_time = tm_time(); gnet_stats_inc_general(GNR_BANNED_GUID_HELD); if (GNET_PROPERTY(guid_debug)) { g_debug("GUID banning %s", guid_h...
false
false
false
false
false
0
GetVMTypeFromLength(unsigned int length, unsigned int size) { // Check first of length is a indeed a multiple of size and that length is != 0 if ( !length || length % size ) return VM::VM0; const unsigned int ratio = length / size; //std::cerr << "RATIO=" << ratio << std::endl; switch( ratio ) { case 1:...
false
false
false
false
false
0
select_namelist(char *new) { struct stat stat1, stat2; if (pc->server_namelist) { pc->namelist_debug = new; return TRUE; } if (!file_exists(pc->namelist, &stat1) || !file_exists(new, &stat2)) { return FALSE; } if (stat1.st_size > stat2.st_size) { pc->namelist_debug = pc->namelist; pc->nam...
false
false
false
false
false
0
PrintDataObject( void *theEnv, char *fileid, DATA_OBJECT_PTR argPtr) { switch(argPtr->type) { case RVOID: case SYMBOL: case STRING: case INTEGER: case FLOAT: case EXTERNAL_ADDRESS: case FACT_ADDRESS: #if OBJECT_SYSTEM case INSTANCE_NAME: case INSTANC...
false
false
false
false
false
0
blkid_parse_line(blkid_cache cache, blkid_dev *dev_p, char *cp) { blkid_dev dev; int ret; if (!cache || !dev_p) return -BLKID_ERR_PARAM; *dev_p = NULL; DBG(DEBUG_READ, printf("line: %s\n", cp)); if ((ret = parse_dev(cache, dev_p, &cp)) <= 0) return ret; dev = *dev_p; while ((ret = parse_tag(cache, dev...
false
false
false
false
false
0
zmq_msg_init_data (zmq_msg_t *msg_, void *data_, size_t size_, zmq_free_fn *ffn_) { msg_->shared = 0; msg_->content = (zmq::msg_content_t*) malloc (sizeof (zmq::msg_content_t)); zmq_assert (msg_->content); zmq::msg_content_t *content = (zmq::msg_content_t*) msg_->content; content->data = data_; ...
false
false
false
false
false
0
dcc_request(DCC_REC *dcc) { char *service; g_return_if_fail(dcc != NULL); if (dcc->port < 1024) { /* warn about connecting to lowports */ service = net_getservbyport(dcc->port); printformat(dcc->server, NULL, MSGLEVEL_DCC, IRCTXT_DCC_LOWPORT, dcc->port, service != NULL ? service ...
false
false
false
false
false
0
tns_render_hash_pair_list(tns_outbuf *outbuf, bstring key, struct bstrList *value) { int i = 0; tns_value_t val = {.type = tns_tag_string}; tns_outbuf_putc(outbuf, ']'); int orig_size = outbuf->used_size; for(i = value->qty - 1; i >= 0 ; i--) { val.value.string = value->entry[i]; tn...
false
false
false
false
false
0
rpcsvc_program_actor (rpcsvc_request_t *req) { rpcsvc_program_t *program = NULL; int err = SYSTEM_ERR; rpcsvc_actor_t *actor = NULL; rpcsvc_t *svc = NULL; char found = 0; if (!req) ...
false
false
false
false
false
0
radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) { double x0, y0, r0, x1, y1, r1; double dx, dy, dr; shading->getCoords(&x0, &y0, &r0, &x1, &y1, &r1); dx = x1 - x0; dy = y1 - y0; dr = r1 - r0; cairo_pattern_destroy(fill_pattern); fill_pattern = cairo_pattern_create...
false
false
false
false
false
0
instantiate_pending_templates (int retries) { int reconsider; location_t saved_loc = input_location; /* Instantiating templates may trigger vtable generation. This in turn may require further template instantiations. We place a limit here to avoid infinite loop. */ if (pending_templates && retries...
false
false
false
false
false
0
w_e_end_csum_rs_req(struct drbd_work *w, int cancel) { struct drbd_peer_request *peer_req = container_of(w, struct drbd_peer_request, w); struct drbd_peer_device *peer_device = peer_req->peer_device; struct drbd_device *device = peer_device->device; struct digest_info *di; int digest_size; void *digest = NULL; i...
false
false
false
false
false
0
wcinc(const FXchar* string,FXint pos){ return (string[pos++]==0 || FXISUTF(string[pos]) || string[pos++]==0 || FXISUTF(string[pos]) || string[pos++]==0 || FXISUTF(string[pos]) || string[pos++]==0 || FXISUTF(string[pos]) || string[pos++]==0 || FXISUTF(string[pos]) || ++pos), pos; }
false
false
false
false
false
0
der_put_general_string (unsigned char *p, size_t len, const general_string *str, size_t *size) { size_t slen = strlen(*str); if (len < slen) return ASN1_OVERFLOW; p -= slen; len -= slen; memcpy (p+1, *str, slen); *size = slen; return 0; }
false
false
false
false
false
0
init_nodemask_of_mempolicy(nodemask_t *mask) { struct mempolicy *mempolicy; int nid; if (!(mask && current->mempolicy)) return false; task_lock(current); mempolicy = current->mempolicy; switch (mempolicy->mode) { case MPOL_PREFERRED: if (mempolicy->flags & MPOL_F_LOCAL) nid = numa_node_id(); else n...
false
false
false
false
false
0
attach(Solver& s, bool setOwner) { MinimizeConstraint* ret = new MinimizeConstraint(this, setOwner); ret->attach(s); return ret; }
false
false
false
false
false
0
getorder(const char *restrict script, const char mode) { dir_t * dir = findscript(script); int order = 0; if (dir) { handle_t * peg = (mode == 'K') ? &dir->stopp : &dir->start; order = peg->deep; } return order; }
false
false
false
false
false
0
__hypotl(long double x, long double y) { long double z; z = __ieee754_hypotl(x,y); if(__builtin_expect(!__finitel(z), 0) && __finitel(x) && __finitel(y) && _LIB_VERSION != _IEEE_) return __kernel_standard_l(x, y, 204); /* hypot overflow */ return z; }
false
false
false
false
false
0
output_tagged_type_instantiation (type) tree type; { if (type == 0 || type == error_mark_node) return; /* We are going to output a DIE to represent the unqualified version of this type (i.e. without any const or volatile qualifiers) so make sure that we have the main variant (i.e. the unqualifie...
false
false
false
false
false
0
ExecEvalParam(ExprState *exprstate, ExprContext *econtext, bool *isNull, ExprDoneCond *isDone) { Param *expression = (Param *) exprstate->expr; int thisParamId = expression->paramid; if (isDone) *isDone = ExprSingleResult; if (expression->paramkind == PARAM_EXEC) { /* * PARAM_EXEC params (intern...
false
false
false
false
false
0
znotify(i_ctx_t *i_ctx_p) { os_ptr op = osp; gs_context_t *current = (gs_context_t *)i_ctx_p; gs_condition_t *pcond; check_stype(*op, st_condition); pcond = r_ptr(op, gs_condition_t); if_debug1('"', "[\"]notify 0x%lx\n", (ulong) pcond); pop(1); op--; if (pcond->waiting.head_index ==...
false
false
false
false
false
0
write_infokey_file (FILE *fp, struct sect *sections) { /* Get rid of sections with no effect. */ if (sections[info].cur == 1 && sections[info].data[0] == 0) sections[info].cur = 0; if (sections[ea].cur == 1 && sections[ea].data[0] == 0) sections[ea].cur = 0; /* Write all parts of the file out in order ...
false
false
false
false
false
0
reset() { if (m_threaded) { m_threadSetMutex.lock(); for (set<ProcessThread *>::iterator i = m_threadSet.begin(); i != m_threadSet.end(); ++i) { if (m_debugLevel > 0) { cerr << "RubberBandStretcher::~RubberBandStretcher: joining (channel " << *i << ")" << end...
false
false
false
false
false
0
rapl_init_domains(struct rapl_package *rp) { int i; struct rapl_domain *rd = rp->domains; for (i = 0; i < RAPL_DOMAIN_MAX; i++) { unsigned int mask = rp->domain_map & (1 << i); switch (mask) { case BIT(RAPL_DOMAIN_PACKAGE): rd->name = rapl_domain_names[RAPL_DOMAIN_PACKAGE]; rd->id = RAPL_DOMAIN_PACKAGE;...
false
false
false
false
false
0
closeout() { char *saveoutptr; if (outstage == 3) { saveoutptr = outbufptr; flushout(); /* buffer from last stage */ outbufptr = saveoutptr; } outstage = 0; /* flush from top to current ptr */ flushout(); close(output); }
true
true
false
false
false
1
ResolveTimeout() { double timeout = this->TestProperties->Timeout; if(this->CTest->GetStopTime() == "") { return timeout; } struct tm* lctime; time_t current_time = time(0); lctime = gmtime(&current_time); int gm_hour = lctime->tm_hour; time_t gm_time = mktime(lctime); lctime = localtime(&c...
false
false
false
false
false
0
StartNamespaceDeclHandler ( void * userData, XMP_StringPtr prefix, XMP_StringPtr uri ) { IgnoreParam(userData); // As a bug fix hack, change a URI of "http://purl.org/dc/1.1/" to ""http://purl.org/dc/elements/1.1/. // Early versions of Flash that put XMP in SWF used a bad URI for the dc: namespace. ExpatAdapter...
false
false
false
false
false
0
lookup_name(const char *s, const char * const names[], int max) { int i; if (names && *s > '9') { for (i = 0; names[i]; i++) { if (!strcasecmp(s, names[i])) { return i; } } } /* Allow months and weekdays to be specified as numbers, as well */ if (sscanf(s, "%2d", &i) == 1 && i >= 1 && i <= max) { ...
false
false
false
false
false
0
evg_surface_set_clipper(GF_SURFACE _this , GF_IRect *rc) { EVGSurface *surf = (EVGSurface *)_this; if (!surf) return GF_BAD_PARAM; if (rc) { surf->clipper = *rc; surf->useClipper = 1; /*clipper was given in BIFS like coords, we work with bottom-min for rect, (0,0) top-left of surface*/ if (surf->center_coord...
false
false
false
false
false
0
sys_waitid(struct tcb *tcp) { siginfo_t si; if (entering(tcp)) { printxval(waitid_types, tcp->u_arg[0], "P_???"); tprintf(", %ld, ", tcp->u_arg[1]); } else { /* siginfo */ if (!tcp->u_arg[2]) tprintf("NULL"); else if (syserror(tcp)) tprintf("%#lx", tcp->u_arg[2]); else if (umove(tcp, tcp->u_arg[2...
false
false
false
false
false
0
ima_mok_init(void) { pr_notice("Allocating IMA MOK and blacklist keyrings.\n"); ima_mok_keyring = keyring_alloc(".ima_mok", KUIDT_INIT(0), KGIDT_INIT(0), current_cred(), (KEY_POS_ALL & ~KEY_POS_SETATTR) | KEY_USR_VIEW | KEY_USR_READ | KEY_USR_WRITE | KEY_USR_SEARCH, KEY_A...
false
false
false
false
false
0
samsung_sysfs_is_visible(struct kobject *kobj, struct attribute *attr, int idx) { struct device *dev = container_of(kobj, struct device, kobj); struct platform_device *pdev = to_platform_device(dev); struct samsung_laptop *samsung = platform_get_drvdata(pdev); bool ok = true; if (attr == &dev_attr_performanc...
false
false
false
false
false
0
aname_get_selstring(krb5_context context, krb5_const_principal aname, const char **contextp, char **selstring_out) { const char *current; char *end, *str; long num_comps, ind; const krb5_data *datap; struct k5buf selstring; size_t nlit; *selstring_out = NULL; if (**c...
false
false
false
false
false
0
decode_block_refinement(MJpegDecodeContext *s, DCTELEM *block, uint8_t *last_nnz, int ac_index, int16_t *quant_matrix, int ss, int se, int Al, int *EOBRUN) { int code, i=ss, j, sign, val, run; int last = FFMIN(se, *last_nnz); OPEN_READER(re, &s->gb); if(*...
false
false
false
false
false
0
absolute_path(const char *path) { static char buf[PATH_MAX + 1]; if (is_absolute_path(path)) { if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX) die("Too long path: %.*s", 60, path); } else { size_t len; const char *fmt; const char *cwd = get_pwd_cwd(); if (!cwd) die_errno("Cannot determine the current ...
false
false
false
false
false
0