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
generate_join_implied_equalities_broken(PlannerInfo *root, EquivalenceClass *ec, RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptInfo *inner_rel) { List *result = NIL; ListCell *lc; foreach(lc, ec->ec_sources) { RestrictInfo *restrictinfo = (RestrictInfo *) lfirst(l...
false
false
false
false
false
0
rad_req_alloc2(struct radius_pd_t *rpd, int code, const char *username, in_addr_t addr, int port) { struct rad_req_t *req = __rad_req_alloc(rpd, code, username, addr, port); if (!req) return NULL; if (code == CODE_ACCOUNTING_REQUEST) req->server_port = req->serv->acct_port; if (make_socket(req)) { rad_req_...
false
false
false
false
false
0
_battery_dbus_stop(void) { Ac_Adapter *ac; Battery *bat; if (!e_dbus_conn) return; if (battery_config->dbus.have) { dbus_pending_call_cancel(battery_config->dbus.have); battery_config->dbus.have = NULL; } if (battery_config->dbus.dev_add) { e_dbus_signal_handler_d...
false
false
false
false
false
0
df_readable (bool negative, uintmax_t n, char *buf, uintmax_t input_units, uintmax_t output_units) { if (! known_value (n) && !negative) return "-"; else { char *p = human_readable (negative ? -n : n, buf + negative, human_output_opts, input_units, output_u...
false
false
false
false
false
0
catalanconst (void) { floatformatcase(default_float_format , return cl_SF_catalanconst(); , return cl_FF_catalanconst(); , return cl_DF_catalanconst(); , return catalanconst(len); ); } }
false
false
false
false
false
0
print(int type, double value) const { if (!type) { double meanDown = 0.0; double devDown = 0.0; if (numberTimesDown_) { meanDown = sumDownCost_ / static_cast<double> (numberTimesDown_); devDown = meanDown * meanDown - 2.0 * meanDown * sumDownCost_; if (dev...
false
false
false
false
false
0
parse_key_usage(PKT_signature *sig) { int key_usage=0; const byte *p; size_t n; byte flags; p=parse_sig_subpkt(sig->hashed,SIGSUBPKT_KEY_FLAGS,&n); if(p && n) { /* first octet of the keyflags */ flags=*p; if(flags & 1) { key_usage |= PUBKEY_USAGE_CERT; flags&=~1; } if(...
false
false
false
false
false
0
my_refresh_contact_info (TpSvcConnectionInterfaceContactInfo *obj, const GArray *contacts, DBusGMethodInvocation *context) { TpTestsContactsConnection *self = TP_TESTS_CONTACTS_CONNECTION (obj); TpBaseConnection *base = TP_BASE_CONNECTION (obj); TpHandleRepoIface *contact_repo = tp_base_connection_get_han...
false
false
false
false
false
0
loadMovie(const std::string& urlstr, const std::string& target, const std::string& data, MovieClip::VariablesMethod method, as_object* handler) { /// URL security is checked in StreamProvider...
false
false
false
false
false
0
prodCapability (Capability *cap, Task *task) { ACQUIRE_LOCK(&cap->lock); if (!cap->running_task) { cap->running_task = task; releaseCapability_(cap,rtsTrue); } RELEASE_LOCK(&cap->lock); }
false
false
false
false
false
0
_readBitmapset(void) { Bitmapset *result = NULL; READ_TEMP_LOCALS(); token = pg_strtok(&length); if (token == NULL) elog(ERROR, "incomplete Bitmapset structure"); if (length != 1 || token[0] != '(') elog(ERROR, "unrecognized token: \"%.*s\"", length, token); token = pg_strtok(&length); if (token == NULL)...
false
false
false
true
false
1
sisfb_post_300_rwtest(struct sis_video_info *ivideo, int iteration, int buswidth, int PseudoRankCapacity, int PseudoAdrPinCount, unsigned int mapsize) { void __iomem *FBAddr = ivideo->video_vbase; unsigned short sr14; unsigned int k, RankCapacity, PageCapacity, BankNumHigh, BankNumMid; unsigned int Physic...
false
false
false
false
false
0
get_pat(pat, quote) VALUE pat; int quote; { VALUE val; switch (TYPE(pat)) { case T_REGEXP: return pat; case T_STRING: break; default: val = rb_check_string_type(pat); if (NIL_P(val)) { Check_Type(pat, T_REGEXP); } pat = val; } if (quote) { pat = rb_reg_quote(pat...
false
false
false
false
false
0
pixbuf_fallback(FileData *fd, gint requested_width, gint requested_height) { GdkPixbuf *pixbuf = pixbuf_inline(PIXBUF_INLINE_BROKEN); /* FIXME use different images according to FORMAT_CLASS */ if (requested_width && requested_height) { gint w = gdk_pixbuf_get_width(pixbuf); gint h = gdk_pixbuf_get_height(pixb...
false
false
false
false
false
0
iter_copy2(ip1,ip2) ITER *ip1, *ip2; { VEC *x, *b; int shx, shb; if (ip1 == (ITER *)NULL) error(E_NULL,"iter_copy2"); if (ip2 == (ITER *)NULL) { if ((ip2 = NEW(ITER)) == (ITER *) NULL) error(E_MEM,"iter_copy2"); else if (mem_info_is_on()) { mem_bytes(TYPE_ITER,0,sizeof(ITER)); mem_n...
false
false
false
true
false
1
handle_pdu(ESME *esme, SMPP_PDU *pdu) { SMPP_PDU *resp; Octstr *os; int i; debug("test.smpp", 0, "Handling SMPP PDU of type %s", pdu->type_name); for (i = 0; i < num_handlers; ++i) { if (handlers[i].type == pdu->type) { resp = handlers[i].handler(esme, pdu); if (resp != NULL) { ...
false
false
false
false
false
0
copy_loopdat(LoopDat *src) { LoopDat *new; new = (LoopDat *)malloc(sizeof(LoopDat)); if (new == NULL) fatal("alloc failed.\n"); new->bpt = copy_block(src->bpt); new->loopno = src->loopno; if (src->orgrng.lb != NULL) new->orgrng.lb = semtree_dup(src->orgrng.lb); else ...
false
false
false
false
false
0
wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai, int div_id, int div) { struct snd_soc_codec *codec = codec_dai->codec; u16 reg; int ret = 0; switch (div_id) { case WM8940_BCLKDIV: reg = snd_soc_read(codec, WM8940_CLOCK) & 0xFFE3; ret = snd_soc_write(codec, WM8940_CLOCK, reg | (div << 2)); break; ...
false
false
false
false
false
0
nonneg_clauses(Plist clauses) { Plist nonneg = NULL; Plist p; for (p = clauses; p; p = p->next) { Topform c = p->v; if (!negative_clause(c->literals)) nonneg = plist_append(nonneg, c); } return nonneg; }
false
false
false
false
false
0
bc_add_class_interface(JVM_CLASS *class, char *interface) { int *copy; int c; char *t; if(!class || !interface) { BAD_ARG(); return -1; } t = char_substitute(interface, '.', '/'); if(!t) return -1; c = cp_find_or_insert(class, CONSTANT_Class, t); free(t); if(c < 0) { free(t); ...
false
false
false
false
true
1
invalidate(const String& materialName, const String& groupName) { SGTechniqueIterator itTech; // Find the desired technique. bool doAutoDetect = groupName == ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME; for (itTech = mTechniqueEntries.begin(); itTech != mTechniqueEntries.end(); ++itTech) {...
false
false
false
false
false
0
calculate_direct_bases (tree type) { vec<tree, va_gc> *vector = make_tree_vector(); tree bases_vec = NULL_TREE; vec<tree, va_gc> *base_binfos; tree binfo; unsigned i; complete_type (type); if (!NON_UNION_CLASS_TYPE_P (type)) return make_tree_vec (0); base_binfos = BINFO_BASE_BINFOS (TYPE_BINFO (t...
false
false
false
false
false
0
sheet_get_nominal_printarea (Sheet const *sheet) { GnmNamedExpr *nexpr; GnmValue *val; GnmParsePos pos; GnmRange *r; GnmRangeRef const *r_ref; gint max_rows; gint max_cols; g_return_val_if_fail (IS_SHEET (sheet), NULL); parse_pos_init_sheet (&pos, sheet); nexpr = expr_name_lookup (&pos, "Print_Area"); if (...
false
false
false
false
false
0
remove_duplicates (cpp_reader *pfile, struct cpp_dir *head, struct cpp_dir *system, struct cpp_dir *join, int verbose) { struct cpp_dir **pcur, *tmp, *cur; struct stat st; for (pcur = &head; *pcur; ) { int reason = REASON_QUIET; cur = *pcur; if (stat (cur->name, &st)) { /* D...
false
false
false
false
false
0
fdf_species_index(gchar *atom_label, GSList *species_list) { gint i; struct species_pak *species; GSList *list; /* find corresponding number of this element in the species block */ i=1; for (list=species_list ; list ; list=g_slist_next(list)) { species = list->data; if (g_ascii_strcasecmp(atom_label, species->l...
false
false
false
false
false
0
build_va_arg_indirect_ref (tree addr) { addr = build_simple_mem_ref_loc (EXPR_LOCATION (addr), addr); if (flag_mudflap) /* Don't instrument va_arg INDIRECT_REF. */ mf_mark (addr); return addr; }
false
false
false
false
false
0
panel_unit_first_obs (int t, const DATASET *dset) { char *p, obs[OBSLEN]; int ret = 0; ntodate(obs, t, dset); p = strchr(obs, ':'); if (p != NULL && atoi(p + 1) == 1) { ret = 1; } return ret; }
true
true
false
false
true
1
cst_and_fits_in_hwi (const_tree x) { if (TREE_CODE (x) != INTEGER_CST) return false; if (TYPE_PRECISION (TREE_TYPE (x)) > HOST_BITS_PER_WIDE_INT) return false; return (TREE_INT_CST_HIGH (x) == 0 || TREE_INT_CST_HIGH (x) == -1); }
false
false
false
false
false
0
umc_device_unregister(struct umc_dev *umc) { struct device *dev; if (!umc) return; dev = get_device(&umc->dev); device_unregister(&umc->dev); release_resource(&umc->resource); put_device(dev); }
false
false
false
false
false
0
cray_npolylist_UseVColor(int sel, Geom *geom, va_list *args) { NPolyList *p = (NPolyList *)geom; ColorA *def; int i, j; def = va_arg(*args, ColorA *); if (!p->vcol) { p->vcol = OOGLNewNE(ColorA, p->n_verts, "NPolyList vertex colors"); } for (i = 0; i < p->n_verts; i++) { p->vcol[i] = *def; } ...
false
false
false
false
false
0
unregister_devmajorminor_attributes(struct visor_device *dev) { if (!dev->kobjdevmajorminor.parent) return; /* already unregistered */ devmajorminor_remove_all_files(dev); kobject_del(&dev->kobjdevmajorminor); kobject_put(&dev->kobjdevmajorminor); dev->kobjdevmajorminor.parent = NULL; }
false
false
false
false
false
0
construct_column( struct isl_basic_set *bset1, struct isl_basic_set *bset2, unsigned row, unsigned col) { int r; isl_int a; isl_int b; unsigned total; isl_int_init(a); isl_int_init(b); total = 1 + isl_basic_set_n_dim(bset1); for (r = 0; r < row; ++r) { if (isl_int_is_zero(bset2->eq[r][col])) continue; ...
false
false
false
false
false
0
display_AMD_info(struct cpudata *cpu) { printf("Family: %u Model: %u Stepping: %u\n", cpu->family, cpu->model, cpu->stepping); printf ("CPU Model : %s\n", cpu->name); get_model_name(cpu); decode_feature_flags(cpu); if (show_msr) { if (cpu->family == 5) dump_k6_MSR(cpu); if (cpu->family == 6) du...
false
false
false
false
false
0
decode_init_vlc(void){ static int done = 0; if (!done) { int i; int offset; done = 1; chroma_dc_coeff_token_vlc.table = chroma_dc_coeff_token_vlc_table; chroma_dc_coeff_token_vlc.table_allocated = chroma_dc_coeff_token_vlc_table_size; init_vlc(&chroma_dc_coeff_t...
false
false
false
false
false
0
CreateConnection(const Candidate& address, CandidateOrigin origin) { // We only create conns to non-udp sockets if they are incoming on this port if ((address.protocol() != "udp") && (origin != ORIGIN_THIS_PORT)) { return 0; } // We don't support loopback on relays ...
false
false
false
false
false
0
ksend_ping(uint64_t transport_handle, uint32_t host_no, struct sockaddr *addr, uint32_t iface_num, uint32_t iface_type, uint32_t pid, uint32_t size) { int rc, addrlen; struct iscsi_uevent *ev; struct iovec iov[2]; log_debug(8, "in %s", __FUNCTION__); memset(setparam_buf, 0, NLM_SETPARAM_DEFAULT_MAX); ev = (...
false
false
false
false
false
0
matroxfb_set_gpio(struct matrox_fb_info* minfo, int mask, int val) { unsigned long flags; int v; matroxfb_DAC_lock_irqsave(flags); v = (matroxfb_DAC_in(minfo, DAC_XGENIOCTRL) & mask) | val; matroxfb_DAC_out(minfo, DAC_XGENIOCTRL, v); /* We must reset GENIODATA very often... XFree plays with this register */ mat...
false
false
false
false
false
0
process_post_data(URL *U, char *datap) { for(; isspace((unsigned int)*datap); datap++){ /* Advance past white space */ } if(*datap == '<'){ datap++; load_file(U, datap); return; } else { U->postdata = xstrdup(datap); U->postlen = strlen(U->postdata); U->conttype = xstrdup("applicati...
false
false
false
false
false
0
LoadFunction ( Obj func ) { UInt i; for (i = 0; i <= 7; i++) HDLR_FUNC(func,i) = LoadHandler(); NAME_FUNC(func) = LoadSubObj(); NARG_FUNC(func) = LoadUInt(); NAMS_FUNC(func) = LoadSubObj(); PROF_FUNC(func) = LoadSubObj(); NLOC_FUNC(func) = LoadUInt(); BODY_FUNC(func) = LoadSubObj(); ENVI_FUNC(func...
false
false
false
false
false
0
abst_Size(GF_Box *s) { GF_Err e; int i; GF_AdobeBootstrapInfoBox *ptr = (GF_AdobeBootstrapInfoBox *)s; e = gf_isom_full_box_get_size(s); if (e) return e; s->size += 25 + (ptr->movie_identifier ? (strlen(ptr->movie_identifier) + 1) : 1) + 1; for (i=0; i<ptr->server_entry_count; i++) s->...
false
false
false
false
false
0
GTextFieldSelForeword(unichar_t *text,int end) { unichar_t ch = text[end]; if ( ch=='\0' ) /* Nothing */; else if ( isalnum(ch) || ch=='_' ) { int i; for ( i=end; (text[i]<0x10000 && isalnum(text[i])) || text[i]=='_' ; ++i ); end = i; } else { int i; for ( i=end; !(text[i]<0x10000 && isalnum(text...
false
false
false
false
false
0
on_drag_drop (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, gpointer user_data) { gboolean ret = TRUE; /* If a target is offerred */ if (context->targets) { /* Request the data from the source. */ gtk_drag_get_data (widget, context, TARGET_STRING, tim...
false
false
false
false
false
0
amdlibSplitOiStructures(amdlibWAVELENGTH *wave, amdlibWAVELENGTH *imdWave, amdlibPHOTOMETRY *phot, amdlibPHOTOMETRY *imdPhot, amdlibVIS *vis, ...
false
false
false
false
false
0
Java_org_gdal_ogr_ogrJNI_Layer_1Identity_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { jint jresult = 0 ; OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ; OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ; OGRLayerShadow *arg3 = (OGRLayerS...
false
false
false
false
false
0
singleCompactStage2(MBCSData *mbcsData) { /* this array maps the ordinal number of a stage 2 block to its new stage 1 index */ uint16_t map[MBCS_STAGE_2_MAX_BLOCKS]; uint16_t i, start, prevEnd, newStart; /* enter the all-unassigned first stage 2 block into the map */ map[0]=MBCS_STAGE_2_ALL_UNASSIG...
false
false
false
false
false
0
collection_ref(CollectionData *cd) { cd->ref++; DEBUG_1("collection \"%s\" ref count = %d", cd->name, cd->ref); }
false
false
false
false
false
0
branch_before_loop_end (fragS *base_fragP) { fragS *fragP; for (fragP = base_fragP; fragP && !fragP->tc_frag_data.is_loop_target; fragP = fragP->fr_next) { if (unrelaxed_frag_has_b_j (fragP)) return TRUE; } return FALSE; }
false
false
false
false
false
0
enclosure_remove_device(struct enclosure_device *edev, struct device *dev) { struct enclosure_component *cdev; int i; if (!edev || !dev) return -EINVAL; for (i = 0; i < edev->components; i++) { cdev = &edev->component[i]; if (cdev->dev == dev) { enclosure_remove_links(cdev); device_del(&cdev->cdev); ...
false
false
false
false
false
0
__repmgr_setup_gmdb_op(env, ip, txnp, flags) ENV *env; DB_THREAD_INFO *ip; DB_TXN **txnp; u_int32_t flags; { DB_REP *db_rep; DB_TXN *txn; DB *dbp; int ret, was_open; db_rep = env->rep_handle; dbp = NULL; txn = NULL; /* * If the caller provided a place to return a txn handle, create it and * perform a...
false
false
false
false
false
0
validate_change (rtx object, rtx *loc, rtx new, int in_group) { rtx old = *loc; if (old == new || rtx_equal_p (old, new)) return 1; if (in_group == 0 && num_changes != 0) abort (); *loc = new; /* Save the information describing this change. */ if (num_changes >= changes_allocated) { i...
false
false
false
false
false
0
psys_init_mon(psys sys){ if ((Mon_curr(sys)=(Sys_Mon_New(sys)))!=0) return TRUE; else return FALSE; }
false
false
false
false
false
0
gst_value_subtract_fraction_range_fraction_range (GValue * dest, const GValue * minuend, const GValue * subtrahend) { /* since we don't have open ranges, we have to approximate */ /* done like with ints and doubles. Creates a list of 2 fraction ranges */ const GValue *min1 = gst_value_get_fraction_range_min (...
false
false
false
false
false
0
ibmasm_get_next_event(struct service_processor *sp, struct event_reader *reader) { struct event_buffer *buffer = sp->event_buffer; struct ibmasm_event *event; unsigned int index; unsigned long flags; reader->cancelled = 0; if (wait_event_interruptible(reader->wait, event_available(buffer, reader) || reader->...
false
false
false
false
false
0
tree_call_cdce (void) { basic_block bb; gimple_stmt_iterator i; bool something_changed = false; vec<gimple> cond_dead_built_in_calls = vNULL; FOR_EACH_BB (bb) { /* Collect dead call candidates. */ for (i = gsi_start_bb (bb); !gsi_end_p (i); gsi_next (&i)) { gimple stmt = gsi_stmt (...
false
false
false
false
false
0
object_done() { #ifdef BJAM_NEWSTR_NO_ALLOCATE unsigned i; for ( i = 0; i < strhash.num; ++i ) { while ( strhash.data[ i ] ) { struct hash_item * item = strhash.data[ i ]; strhash.data[ i ] = item->header.next; BJAM_FREE( item ); } } #else ...
false
false
false
false
false
0
__ecereInstMeth_GenericOptionTools_OptionCheck__00000000(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * options, int option) { struct GenericOptionTools * __ecerePointer_GenericOptionTools = (struct GenericOptionTools *)(this ? (((char *)this) + __ecereClass_Generi...
false
false
false
false
false
0
Copy () { Command* copy = new ScaleCmd(CopyControlInfo(), _sx, _sy, _align); InitCopy(copy); return copy; }
false
false
false
false
false
0
init() { #if MULTITHREADED gInitMutex(&mutex); #endif ok = gTrue; errCode = errNone; entries = NULL; capacity = 0; size = 0; streamEnds = NULL; streamEndsLen = 0; objStrs = new PopplerCache(5); mainXRefEntriesOffset = 0; xRefStream = gFalse; scannedSpecialFlags = gFalse; encrypted = gFalse; ...
false
false
false
false
false
0
init_history() { int newlen; /* new length of history table */ histentry_T *temp; int i; int j; int type; /* * If size of history table changed, reallocate it */ newlen = (int)p_hi; if (newlen != hislen) /* history length changed */ { for (type = 0; type < HIST_...
false
false
false
true
false
1
flGetFontInfo(FLfontNumber fn) { FLcontext ctx = current_context; return (ctx && fn > 0 && fn <= ctx->numFont) ? ctx->fontTable[fn] : NULL; }
false
false
false
false
false
0
markConsCharTable() { int i, j, k; for (i=0; i<NUM_LEVEL1; i++) if (consCharTable[i]!=NULL) for (j=0; j<NUM_LEVEL2; j++) if (consCharTable[i][j]!=NULL) for (k=0; k<NUM_LEVEL3; k++) mark(consCharTable[i][j][k]); }
false
false
false
false
false
0
IOReady() { if(seek_pos==0) return true; if(seek_pos==FILE_END && size==NO_SIZE_YET) return false; return session->IOReady(); }
false
false
false
false
false
0
free_if_empty(char *s) { if ((s != NULL) && (strlen(s) == 0)) { talloc_free(s); s = NULL; } return s; }
false
false
false
false
false
0
packPADMULT(action* a,buffer *b) { /* // Pad buffer with zeroes upto a multiple of 'count' bytes */ grib_int_t count, loop; grib_int_t multiple = atol(a->count); grib_int_t startOctet = atol(a->octet); count = (int)((b->packed)-(b->startOctets)) -(startOctet-OCTETSTART); count = ((count + multiple - 1)/multiple)*m...
false
false
false
false
false
0
set_allowed_ports(cmd_parms *parms, void *dummy, const char *arg) { server_rec *s = parms->server; int first, last; connect_conf *conf = ap_get_module_config(s->module_config, &proxy_connect_module); port_range *New; char *endptr; const char *p = arg; if (!apr_isdigit(arg[0])) ...
false
false
false
false
false
0
find_in_xlisp_path(const char *fname) { const char *paths = return_xlisp_path(); if (!paths) return NULL; while (paths && *paths) { FILE *fp; const char *start; int len; /* skip over separator */ while (*paths == os_sepchar || *paths == ';') paths++; ...
false
false
false
false
false
0
get_next() { while(1) { if(!current_dir) { // // Get next object! // if(!current_obj) return NULL; //All done. switch(probe(current_obj->path)) { case FM_FILE: { const char *res = current_obj->path; current_obj = current_obj->next; // log_printf(DLOG, "get_next() found ...
false
false
false
false
false
0
ion_system_contig_heap_free(struct ion_buffer *buffer) { struct sg_table *table = buffer->priv_virt; struct page *page = sg_page(table->sgl); unsigned long pages = PAGE_ALIGN(buffer->size) >> PAGE_SHIFT; unsigned long i; for (i = 0; i < pages; i++) __free_page(page + i); sg_free_table(table); kfree(table); }
false
false
false
false
false
0
gsb_data_report_get_report_number ( gpointer report_pointer ) { struct_report *report; report = report_pointer; if ( !report ) return 0; /* if we want the report number, usually it's to make other stuff after that * so we will save the adr of the report to increase the speed after */ repor...
false
false
false
false
false
0
reinit_vdir(struct au_vdir *vdir) { int err; union au_vdir_deblk_p p, deblk_end; while (vdir->vd_nblk > 1) { kfree(vdir->vd_deblk[vdir->vd_nblk - 1]); /* vdir->vd_deblk[vdir->vd_nblk - 1] = NULL; */ vdir->vd_nblk--; } p.deblk = vdir->vd_deblk[0]; deblk_end.deblk = p.deblk + vdir->vd_deblk_sz; err = set_de...
false
false
false
false
false
0
WriteFile(const char *filename) { // Parse input filename extension const char *extension; if (!(extension = strrchr(filename, '.'))) { printf("Filename %s has no extension (e.g., .ply)", filename); return 0; } // Write file of appropriate type if (!strncmp(extension, ".ray", 4)) return WriteR...
false
false
false
false
false
0
_set_label(Evas_Object *obj, const char *str) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd || !str) return; eina_stringshare_replace(&wd->labeltxt, str); if (wd->label) { Evas_Coord width, height, sum_width = 0; evas_object_size_hint_min_set(wd->label, 0, 0); evas_obje...
false
false
false
false
false
0
print_snippet (const gchar *snippet) { if (disable_snippets) { return; } if (!snippet || *snippet == '\0') { return; } else { gchar *compressed; gchar *p; compressed = g_strdup (snippet); for (p = compressed; p && *p != '\0'; p = g_utf8_next_char (p)) { if (*p == '\r' || *p == '\n') ...
false
false
false
false
false
0
ews_message_add_set_item_field_extended_distinguished_tag (ESoapMessage *msg, const gchar *elem_prefix, const gchar *elem_name, const gchar *set_id, guint32 prop_id, EEwsMessageDataType data_type, gconstpointer value) { const gchar *prop_type = e_ews_message_...
false
false
false
false
false
0
index_lookup(char *word, int dbase) { IndexPtr idx = NULL; FILE *fp; char *line; if ((fp = indexfps[dbase]) == NULL) { sprintf(msgbuf, "WordNet library error: %s indexfile not open\n", partnames[dbase]); display_message(msgbuf); return(NULL); } if ((line = bin_search(word, fp)) != NULL) {...
false
true
false
false
false
1
create(int fd) { m_iFd = fd; AVM_WRITE(__MODULE__, 1, "Creating cache for file descriptor: %d\n", m_iFd); if (m_streams.size() > 0) { if (m_bThreaded) { Locker locker(mutex); thread = new PthreadTask(0, &startThreadfunc, this); if (!thread) return -1; cond.Wait(mute...
false
false
false
false
false
0
lineStart(FXint pos) const { FXASSERT(0<=pos && pos<=length); while(0<pos){ if(getByte(pos-1)=='\n') return pos; pos--; } return 0; }
false
false
false
false
false
0
cmp_structure(Py_buffer *dest, Py_buffer *src) { const char *dfmt, *sfmt; int i; assert(dest->format && src->format); dfmt = dest->format[0] == '@' ? dest->format+1 : dest->format; sfmt = src->format[0] == '@' ? src->format+1 : src->format; if (strcmp(dfmt, sfmt) != 0 || dest->itemsize...
false
false
false
false
false
0
EmitCOFFSymbolStorageClass(int StorageClass) { if (!CurSymbol) FatalError("storage class specified outside of symbol definition"); if (StorageClass & ~COFF::SSC_Invalid) FatalError("storage class value '" + Twine(StorageClass) + "' out of range"); getAssembler().registerSymbol(*CurSymbol)...
false
false
false
false
false
0
cd_icc_store_remove_icc (CdIccStore *store, const gchar *filename) { CdIcc *icc = NULL; gboolean ret = FALSE; /* find exact pointer */ icc = cd_icc_store_find_by_filename (store, filename); if (icc == NULL) goto out; /* we have a ref so we can emit the signal */ ret = g_ptr_array_remove (store->priv->icc_arr...
false
false
false
false
false
0
__int_encodeFloat (I_ j, I_ e) { StgFloat r; r = (StgFloat)__abs(j); /* Now raise to the exponent */ if ( r != 0.0 ) /* Lennart suggests this avoids a bug in MIPS's ldexp */ r = ldexp(r, e); /* sign is encoded in the size */ if (j < 0) r = -r; return r; }
false
false
false
false
false
0
soap_in_wsrm__CreateSequenceResponseType(struct soap *soap, const char *tag, struct wsrm__CreateSequenceResponseType *a, const char *type) { size_t soap_flag_Identifier = 1; size_t soap_flag_Expires = 1; size_t soap_flag_IncompleteSequenceBehavior = 1; size_t soap_flag_Accept = 1; if (soap_element_begin_in(soap, t...
false
false
false
false
false
0
slapi_log_error_ext(int severity, char *subsystem, char *fmt, va_list varg1, va_list varg2) { int rc = 0; if ( severity < SLAPI_LOG_MIN || severity > SLAPI_LOG_MAX ) { (void)slapd_log_error_proc( subsystem, "slapi_log_error: invalid severity %d (message %s)\n", severity, fmt ); ...
false
false
false
false
false
0
stk600_xprog_chip_erase(PROGRAMMER * pgm, AVRPART * p) { unsigned char b[6]; AVRMEM *mem; unsigned int addr = 0; if (p->flags & AVRPART_HAS_TPI) { if ((mem = avr_locate_mem(p, "flash")) == NULL) { fprintf(stderr, "%s: stk600_xprog_chip_erase(): no FLASH definition found ...
false
false
false
false
false
0
git_free(git_transport *transport) { transport_git *t = (transport_git *) transport; git_vector *refs = &t->refs; unsigned int i; for (i = 0; i < refs->length; ++i) { git_pkt *p = git_vector_get(refs, i); git_pkt_free(p); } git_vector_free(refs); git__free(t->heads); git_buf_free(&t->proto.buf); git__fre...
false
false
false
false
false
0
getInteger(FXint& result,FXApp* app,const FXString& caption,const FXString& label,FXIcon* icon,FXint lo,FXint hi){ FXInputDialog inputdialog(app,caption,label,icon,INPUTDIALOG_INTEGER,0,0,0,0); inputdialog.setLimits(lo,hi); inputdialog.setText(FXStringVal(FXCLAMP(lo,result,hi))); if(inputdialog.execute()){ ...
false
false
false
false
false
0
kvm_free_all_assigned_devices(struct kvm *kvm) { struct list_head *ptr, *ptr2; struct kvm_assigned_dev_kernel *assigned_dev; list_for_each_safe(ptr, ptr2, &kvm->arch.assigned_dev_head) { assigned_dev = list_entry(ptr, struct kvm_assigned_dev_kernel, list); kvm_free_assigned_device(kvm, assigned_d...
false
false
false
false
false
0
rc_decrement_cs(gs_color_space *pcs, const char *cname) { if (pcs) { rc_decrement(pcs, cname); } }
false
false
false
false
false
0
make_argname (const char *pname, const char *vname) { char *name; name = malloc (strlen (pname) + strlen (vname) + strlen (ARGEXT) + 3); if (!name) { fprintf (stderr, "failed in malloc"); exit (1); } sprintf (name, "%s_%s_%s", locase (pname), vname, ARGEXT); return name; }
false
false
false
false
false
0
gnumeric_effect (GnmFuncEvalInfo *ei, GnmValue const * const *argv) { gnm_float rate = value_get_as_float (argv[0]); gnm_float nper = gnm_floor (value_get_as_float (argv[1])); /* I don't know why Excel disallows 0% for rate. */ if (rate <= 0 || nper < 1) return value_new_error_NUM (ei->pos); ...
false
false
false
false
false
0
f_eval(argvars, rettv) typval_T *argvars; typval_T *rettv; { char_u *s; s = get_tv_string_chk(&argvars[0]); if (s != NULL) s = skipwhite(s); if (s == NULL || eval1(&s, rettv, TRUE) == FAIL) { rettv->v_type = VAR_NUMBER; rettv->vval.v_number = 0; } else if (*s != NUL) EMSG(_(e_t...
false
false
false
false
false
0
sata_fixstring(unsigned char *s, int bytecount) { unsigned char *p; unsigned char *end; p = s; end = &s[bytecount & ~1]; /* bytecount must be even */ /* convert from big-endian to string order */ for (p = end ; p != s;) { unsigned short *pp = (unsigned short *) (p -= 2); *pp = bswap_16(*pp); } ...
false
false
false
false
false
0
skipwhite(ifstream *f) { if (f->eof()) return; int ch = f->peek(); while((ch == ' ') || (ch == '\n') || (ch == '\t') || (ch == '\r') || (ch == '\0')) { f->get(); if (f->eof()) return; ch = f->peek(); } }
false
false
false
false
false
0
writeInputParameters(std::ostream& os, Function* function, GpuProgramType gpuType) { const ShaderParameterList& inParams = function->getInputParameters(); ShaderParameterConstIterator itParam = inParams.begin(); ShaderParameterConstIterator itParamEnd = inParams.end(); for ( ; itParam != itParamEnd; +...
false
false
false
false
false
0
cdio_read_mode1_sector (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, bool b_form2) { uint32_t size = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE ; check_lsn(i_lsn); if (p_cdio->op.read_mode1_sector) { return p_cdio->op.read_mode1_sector(p_cdio->env, p_buf, i_lsn, b_form2); }...
false
false
false
false
false
0
IoNumber_clip(IoNumber *self, IoObject *locals, IoMessage *m) { /*doc Number clip(aNumber1, aNumber2) Returns self if the receiver is between aNumber1 and aNumber2. Returns aNumber1 if it is less than aNumber1. Returns aNumber2 if it is greater than aNumber2. */ double a = IoMessage_locals_doubleArgAt_(m, locals,...
false
false
false
false
false
0
dce_v8_0_pick_pll(struct drm_crtc *crtc) { struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); struct drm_device *dev = crtc->dev; struct amdgpu_device *adev = dev->dev_private; u32 pll_in_use; int pll; if (ENCODER_MODE_IS_DP(amdgpu_atombios_encoder_get_encoder_mode(amdgpu_crtc->encoder))) { if (adev->cloc...
false
false
false
false
false
0
replaceGraphics(GR_Graphics * pG) { DELETEP(m_pG); setGraphics(pG); m_pLayout->setGraphics(pG); XAP_Frame * pFrame = static_cast<XAP_Frame*>(getParentData()); if (pFrame && pFrame->getFrameData()) reinterpret_cast<AP_FrameData*>(pFrame->getFrameData())->m_pG = pG; m_pLayout->rebuildFromHere(static_cast<fl_DocSe...
false
false
false
false
false
0
insert_dname_into_table(hattrie_t *table, knot_dname_t *d, dummy_node_t **n) { int d_size = knot_dname_size(d); if (d_size < 0) { return KNOT_EINVAL; } value_t *val = hattrie_tryget(table, (char *)d, d_size); if (val == NULL) { // Create new dummy node to use for this dname ...
false
false
false
false
false
0
adapter_changed (GDBusProxy *adapter, const char *property, GVariant *value, BluetoothClient *client) { BluetoothClientPrivate *priv = BLUETOOTH_CLIENT_GET_PRIVATE(client); GtkTreeIter iter; gboolean notify = FALSE; if (get_iter_from_proxy(priv->store, &iter, adapter) == FALSE) return; ...
false
false
false
false
false
0