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
serial_loop(WORKER_INFO *info, struct cfg_s *cfg, const ESL_GETOPTS *go) { P7_BUILDER *bld = NULL; ESL_MSA *msa = NULL; ESL_SQ *sq = NULL; ESL_MSA *postmsa = NULL; ESL_MSA **postmsa_ptr = (cfg->postmsafile != NULL) ? &postmsa : NULL; P7_HMM *hmm = NULL; ...
true
true
false
false
false
1
cx18_s_input(struct file *file, void *fh, unsigned int inp) { struct cx18_open_id *id = fh2id(fh); struct cx18 *cx = id->cx; v4l2_std_id std = V4L2_STD_ALL; const struct cx18_card_video_input *card_input = cx->card->video_inputs + inp; if (inp >= cx->nof_inputs) return -EINVAL; if (inp == cx->active_input...
false
false
false
false
false
0
rb_obj_cmp(VALUE obj1, VALUE obj2) { if (obj1 == obj2 || rb_equal(obj1, obj2)) return INT2FIX(0); return Qnil; }
false
false
false
false
false
0
get_srch_cells(long grid1_add, long nbins, int *bin_addr1, int *bin_addr2, restr_t *grid1_bound_box, restr_t *grid2_bound_box, long grid2_size, int *srch_add) { long num_srch_cells; /* num cells in restricted search arrays */ long min_add; /* addresses for restricting search of */ long max_ad...
false
false
false
false
false
0
extract_relations (block_data_t *data, poly_group_t *pg, poly_t *p, nsieve_t *ns, int block_start){ /* The sieve now contains estimates of the size (in bits) of the unfactored portion of the * polynomial values. We scan the sieve for values less than this cutoff, and trial divide * the ones that pass the test. */ ...
false
false
false
false
false
0
bfa_lps_sm_loginwait(struct bfa_lps_s *lps, enum bfa_lps_event event) { bfa_trc(lps->bfa, lps->bfa_tag); bfa_trc(lps->bfa, event); switch (event) { case BFA_LPS_SM_RESUME: bfa_sm_set_state(lps, bfa_lps_sm_login); bfa_lps_send_login(lps); break; case BFA_LPS_SM_OFFLINE: case BFA_LPS_SM_DELETE: bfa_sm_set...
false
false
false
false
false
0
BSP_AddToVBOAccum (int first_vert, int last_vert) { vbobatch_t *batch = first_vbobatch->next, *prev = first_vbobatch; vbobatch_t *new; if (!batch) { batch = first_vbobatch->next = vbobatch_buffer; batch->first_vert = first_vert; batch->last_vert = last_vert; num_vbo_batches++; return; } ...
false
false
false
false
false
0
_e_mod_illume_config_policy_list_changed(void *data) { if (_e_illume_cfg->policy.name) eina_stringshare_del(_e_illume_cfg->policy.name); if (_policy_name) _e_illume_cfg->policy.name = eina_stringshare_add(_policy_name); if (_policy_change_timer) ecore_timer_del(_policy_change_timer); _policy_ch...
false
false
false
false
false
0
insert_sorted (signed char *array, int value) { for (int j=0; j<MAX_SPANS_PER_LINE; j++) { if (array[j] == EMPTY_SCAN_SLOT) { array[j] = value; return; } if (array[j] > value) { for (int k=MAX_SPANS_PER_LINE -1; k >= j+1; k--) array[k] ...
true
true
false
false
false
1
cleanup_data_fields(GwyDataField **dfields, gint no_of_channels) { gint i; for (i = 0; i < no_of_channels; i++) gwy_object_unref(dfields[i]); g_free(dfields); }
false
false
false
false
false
0
canvas_put_text(struct canvas *pcanvas, int canvas_x, int canvas_y, enum client_font font, struct color *pcolor, const char *text) { cairo_t *cr; if (!layout) { layout = pango_layout_new(gdk_pango_context_get_for_screen(gdk_screen_get_default())); } if (!pcanvas->drawable) { cr = ...
false
false
false
false
false
0
new_cmd(char **argv) { if ((matches(*argv, "change") == 0) || (matches(*argv, "replace") == 0)|| (matches(*argv, "delete") == 0)|| (matches(*argv, "add") == 0)) return 1; return 0; }
false
false
false
false
false
0
jbg_enc_free(struct jbg_enc_state *s) { unsigned long stripe; int layer, plane; #ifdef DEBUG fprintf(stderr, "jbg_enc_free(%p)\n", (void *) s); #endif /* clear buffers for SDEs */ if (s->sde) { for (stripe = 0; stripe < s->stripes; stripe++) { for (layer = 0; layer < s->d + 1; layer++) { for (pla...
false
false
false
false
false
0
set_max(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct lm95241_data *data = dev_get_drvdata(dev); long val; if (kstrtol(buf, 10, &val) < 0) return -EINVAL; if (val >= 256000) return -EINVAL; mutex_lock(&data->update_lock); if (val <= 127000) data->conf...
false
false
false
false
false
0
pixaAddTextline(PIXA *pixas, L_BMF *bmf, SARRAY *sa, l_uint32 val, l_int32 location) { char *textstr; l_int32 i, n, nstr; PIX *pix1, *pix2; PIXA *pixad; PROCNAME("pixaAddTextline"); if (!pixas) return (PIXA *)ERROR_...
false
false
false
false
false
0
is_rename_target( git_diff *diff, const git_diff_find_options *opts, size_t delta_idx, void **cache) { git_diff_delta *delta = GIT_VECTOR_GET(&diff->deltas, delta_idx); /* skip things that aren't plain blobs */ if (!GIT_MODE_ISBLOB(delta->new_file.mode)) return false; /* only consider ADDED, RENAMED, COPIED...
false
false
false
true
false
1
check_sel_direction(char *dir, char *label, char *sel, int len) { int db = 0, ok = 1; if (debug_sel) { db = 1; } if (sel_direction) { if (strstr(sel_direction, "debug")) { db = 1; } if (strcmp(sel_direction, "debug")) { if (strstr(sel_direction, dir) == NULL) { ok = 0; } } } if (db) { cha...
false
false
false
false
false
0
cb_param(const char *name, const char *value, void *void_arg) { mail::Header::mime *a=(mail::Header::mime *)void_arg; string n=name; mail::upper(n); if (!a->parameters.exists(name)) a->parameters.set_simple(name, value); }
false
false
false
false
false
0
H5FD_locate_signature(H5FD_t *file, const H5P_genplist_t *dxpl, haddr_t *sig_addr) { haddr_t addr, eoa; uint8_t buf[H5F_SIGNATURE_LEN]; unsigned n, maxpow; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT /* Find the least N such that 2^N i...
false
false
false
false
false
0
se_PauseGameTimer(bool p){ if (se_mainGameTimer && sn_GetNetState()!=nCLIENT) se_mainGameTimer->pause(p); }
false
false
false
false
false
0
unity_tester_series_preview_renderer_update_child_preview (UnityTesterSeriesPreviewRenderer* self, UnityProtocolPreview* child_preview) { UnityProtocolPreview* _tmp0_ = NULL; UnityProtocolPreview* _tmp1_ = NULL; UnityProtocolPreview* _tmp2_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (child_preview !...
false
false
false
false
false
0
del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) { PRINT_D(HOSTAPD_DBG, "Deleting virtual interface\n"); return 0; }
false
false
false
false
false
0
readConfFile(char *conffile, struct arguments *parser) { char *data; char *key; FILE *conf; size_t size; int c, n, u, l, d, e; n = u = l = d = e = -2; c = 1; data = malloc(MAXLINE + 1); size = MAXLINE - 1; conf = fopen(conffile, "r"); if (!conf) { fprintf(stderr, "Un...
false
false
false
false
false
0
degrees_to_dms_pr(char *lb, double deg, int prec) { int d1, d2, d3, d4; char fbuf[32]; if (prec > 9) prec = 9; if (prec < 0) prec = 0; if (deg > 0) deg += precs[prec] / 7200; else deg -= precs[prec] / 7200; // d3_printf("format is %s\n", fbuf); if (deg >= 0.0) { d1 = floor (deg); deg = (deg - d1)...
false
false
false
false
false
0
test_authenticate_compat (Test *test, gconstpointer unused) { GckUriData *uri_data; GError *error = NULL; GckEnumerator *en; GckObject *obj; gulong sig; sig = g_signal_connect (test->modules->data, "authenticate-slot", G_CALLBACK (on_authenticate_token), GUINT_T...
false
false
false
false
false
0
getframebits(const lame_global_flags * gfp) { lame_internal_flags const *const gfc = gfp->internal_flags; int bit_rate; /* get bitrate in kbps [?] */ if (gfc->bitrate_index) bit_rate = bitrate_table[gfp->version][gfc->bitrate_index]; else bit_rate = gfp->brate; /*assert(bit_...
false
false
false
false
false
0
_match_list(const char *exec, const char *const *argv, const char *pidfile) { RC_STRINGLIST *match = rc_stringlist_new(); int i = 0; size_t l; char *m; if (exec) { l = strlen(exec) + 6; m = xmalloc(sizeof(char) * l); snprintf(m, l, "exec=%s", exec); rc_stringlist_add(match, m); free(m); } while (argv...
false
false
false
false
false
0
from_n_nary(C_char *str, int base, double *r) { double n = 0; C_char *ptr = str; while(*ptr != '\0') { int c = C_tolower((int)(*(ptr++))); if(c < '0') return 0; else if(c >= '0' + base) { if(base < 10) return 0; else if(c < 'a') return 0; else if(c >= 'a' + base - 10) return 0; ...
false
false
false
false
false
0
protect( const Functor &functor, const ProtectorContext &context ) { try { return functor(); } catch ( Exception &failure ) { reportFailure( context, failure ); } catch ( std::exception &e ) { std::string shortDescription( "uncaught exception of type " ); #if CPPUN...
false
false
false
false
false
0
Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) { if ((lenMixed == 1) && (sizeFolded > 0)) { folded[0] = mapping[static_cast<unsigned char>(mixed[0])]; return 1; } else { gchar *mapped = g_utf8_casefold(mixed, lenMixed); size_t lenMapped = strlen(mapped); if (lenMapped < siz...
false
false
false
false
false
0
printBetting( const Game *game, const State *state, const int maxLen, char *string ) { int i, a, c, r; c = 0; for( i = 0; i <= state->round; ++i ) { /* print state separator */ if( i != 0 ) { if( c >= maxLen ) { return -1; } string[ c ] = '/'; ++c; } /* print betti...
false
false
false
false
false
0
_clear_cover_transitions(GList *covers) { GList *iter = covers; while (iter) { ClarityCover *ccover = iter->data; clutter_actor_remove_all_transitions(CLUTTER_ACTOR(ccover)); iter = iter->next; } }
false
false
false
false
false
0
abort_conflicting_lock_requests(void) { MDL_ticket *ticket; MDL_lock::Ticket_iterator it; mysql_prlock_wrlock(&m_rwlock); it.init(m_granted); while ((ticket= it++)) if (ticket->get_abort_conflicting_lock_requests()) break; if (ticket) { it.init(m_waiting); while ((ticket= it++)) ...
false
false
false
false
false
0
add_frame(uint32_t pc_, uint16_t *sp_, uint8_t nlocals, uint8_t nargs, uint16_t where) { ZASSERT(fp != TOP_OF_FRAMES, "call stack too deep: %ld", NFRAMES + 1); fp->pc = pc_; fp->sp = sp_; fp->nlocals = nlocals; fp->nargs = nargs; fp->where = where; fp++; }
false
false
false
false
false
0
elm_segment_control_item_label_get(const Evas_Object *obj, int idx) { Elm_Segment_Item *it; ELM_SEGMENT_CONTROL_CHECK(obj) NULL; it = _item_find(obj, idx); if (it) return it->label; return NULL; }
false
false
false
false
false
0
pack_if(action* a,buffer *b) { grib_int_t val1 = a->reference->value; grib_int_t val2 = atol(a->ksec1); if(a->test(val1,val2)) encode(a->next,b); return a->end->next; }
false
false
false
false
false
0
do_slotempty(void) { int n; struct doslot *pdos; /* * Find a slot that is empty and not reserved (due to frecvfront()). */ for (n = DOSLOTCNT, pdos = doslots; (n > 0) && ((pdos->dos_link != NOTLINKID) || (pdos->dos_flags & DORESERVED)); --n, ++pdos); if (n <= 0) return(0); pdos->dos_flags = DORESERVED; ...
false
false
false
false
false
0
direct_gettid( void ) { pid_t tid = -1; #if DIRECT_BUILD_GETTID && defined(__NR_gettid) /* present on linux >= 2.4.20 */ tid = syscall(__NR_gettid); #endif if (tid < 0) tid = getpid(); return tid; }
false
false
false
false
false
0
gst_ogg_mux_make_fisbone (GstOggMux * mux, ogg_stream_state * os, GstOggPadData * pad) { GstByteWriter bw; gboolean handled = TRUE; GST_DEBUG_OBJECT (mux, "Creating %s fisbone for serial %08x", gst_ogg_stream_get_media_type (&pad->map), pad->map.serialno); gst_byte_writer_init (&bw); handled...
false
false
false
false
false
0
on_whole_project_toggled(GtkToggleButton* project, CVSPlugin *plugin) { GtkEntry* fileentry = g_object_get_data (G_OBJECT (project), "fileentry"); if (gtk_toggle_button_get_active(project) && plugin->project_root_dir) { gtk_entry_set_text (fileentry, plugin->project_root_dir); gtk_widget_set_sensitive(GTK_WIDGET...
false
false
false
false
false
0
lm_loopLog(void* param) { CALastMix* pLastMix=(CALastMix*)param; pLastMix->m_bRunLog=true; UINT32 countLog=0; UINT8 buff[256]; while(pLastMix->m_bRunLog) { if((countLog%10)==0) { logMemoryUsage(); } if(countLog==0) { CAMsg::printMsg(LOG_DEBUG,"Uploaded Packets: %u\n",pL...
false
false
false
false
false
0
select_info( const CORE::DATA_INFO_LIST& list_info ) { get_selection()->unselect_all(); CORE::DATA_INFO_LIST::const_iterator it = list_info.begin(); for( ; it != list_info.end(); ++it ){ Gtk::TreePath path( ( *it ).path ); get_selection()->select( path ); } }
false
false
false
false
false
0
make_node_dirty(struct ubifs_info *c, int node_type, int node_num, int lnum, int offs) { switch (node_type) { case UBIFS_LPT_NNODE: return make_nnode_dirty(c, node_num, lnum, offs); case UBIFS_LPT_PNODE: return make_pnode_dirty(c, node_num, lnum, offs); case UBIFS_LPT_LTAB: return make_ltab_dirty(c, lnu...
false
false
false
false
false
0
isl_args_set_defaults(struct isl_args *args, void *opt) { int i; for (i = 0; args->args[i].type != isl_arg_end; ++i) { switch (args->args[i].type) { case isl_arg_choice: set_default_choice(&args->args[i], opt); break; case isl_arg_flags: set_default_flags(&args->args[i], opt); break; case isl_arg...
false
false
false
false
false
0
dbdatlen(DBPROCESS * dbproc, int column) { DBINT len; TDSCOLUMN *colinfo; tdsdump_log(TDS_DBG_FUNC, "dbdatlen(%p, %d)\n", dbproc, column); CHECK_PARAMETER(dbproc, SYBENULL, -1); colinfo = dbcolptr(dbproc, column); if (!colinfo) return -1; len = (colinfo->column_cur_size < 0)? 0 : colinfo->column_cur_size; ...
false
false
false
false
false
0
log_done(void) { /* * Handle possible recursion: * log_*() -> ... -> pexit() -> ... -> log_done() */ if (in_logger) return; in_logger = 1; log_file_done(&log, !options.fork); log_file_done(&pot, 1); in_logger = 0; }
false
false
false
false
false
0
preen(char *s) { char buffer[128]; char *suffixes[] = {"n", "v", "a", "t"}; int i; for (i=0; i<4; i++) { strcpy(buffer, s); strcat(buffer, suffixes[i]); add_deletion(buffer); } }
true
true
false
false
false
1
gt215_hda_eld(NV50_DISP_MTHD_V1) { struct nvkm_device *device = disp->base.engine.subdev.device; union { struct nv50_disp_sor_hda_eld_v0 v0; } *args = data; const u32 soff = outp->or * 0x800; int ret, i; nvif_ioctl(object, "disp sor hda eld size %d\n", size); if (nvif_unpack(args->v0, 0, 0, true)) { nvif_io...
false
false
false
false
false
0
rt5631_hifi_pcm_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct snd_soc_codec *codec = dai->codec; struct rt5631_priv *rt5631 = snd_soc_codec_get_drvdata(codec); int timesofbclk = 32, coeff; unsigned int iface = 0; dev_dbg(codec->dev, "enter %s\n",...
false
false
false
false
false
0
EnvisatFile_SetKeyValueAsDouble( EnvisatFile *self, EnvisatFile_HeaderFlag mph_or_sph, const char *key, double value ) { char format[32], string_value[128]; const char *prototype_value; int leng...
true
true
false
false
true
1
getNumPoints(uint64_t max_id) const { size_t retval = 0; for (ScanGraph::const_iterator it = this->begin(); it != this->end(); it++) { retval += (*it)->scan->size(); if ((max_id > 0) && ((*it)->id == max_id)) break; } return retval; }
false
false
false
false
false
0
eval_trap_action(interp,sig,trap,oldcode) Tcl_Interp *interp; int sig; struct trap *trap; int oldcode; { int code_flag; int newcode; Tcl_Obj *eip; /* errorInfo */ Tcl_Obj *ecp; /* errorCode */ Tcl_Obj *irp; /* interp's result */ expDiagLogU("async event handler: Tcl_Eval("); expDiagLogU(trap->action); expDia...
false
false
false
false
false
0
cc_generic_agent_stop_offer_timer(struct ast_cc_agent *agent) { struct cc_generic_agent_pvt *generic_pvt = agent->private_data; if (generic_pvt->offer_timer_id != -1) { if (!ast_sched_del(cc_sched_context, generic_pvt->offer_timer_id)) { cc_unref(agent, "Remove scheduler's reference to the agent"); } generi...
false
false
false
false
false
0
map_set_region(map_t *map, int x, int y) { int new_tile_region = REGION_NONE; tile_t *tile = MAP_TILE(map, x, y); for (int d = 0; d < 4; d++) { tile_t *ntile = tile + map->dir[d]; if (ntile->region == REGION_NONE) continue; if (new_tile_region != REGION_NONE && new_ti...
false
false
false
false
false
0
happen_line_conflict(int assign_dlg, int pre_dlg, int dlg_num, int cuff) { if (pre_dlg == 1) if (assign_dlg == dlg_num || assign_dlg == pre_dlg + 1) return TRUE; if (pre_dlg == dlg_num) if (assign_dlg == 1 || assign_dlg...
false
false
false
false
false
0
isAtEnd() const { return m_currentItem >= 0 && m_history.size() - 1; }
false
false
false
false
false
0
mymunmap (MMAP *m) { if (munmap(m->addr,m->len)==-1) { perror("munmap 1:"); } close(m->fd); return 0; }
false
false
false
false
false
0
main(int argc, char *argv[]) { GOptionContext *context; GError *error = NULL; struct sigaction sa; int index = 0; context = g_option_context_new(NULL); g_option_context_add_main_entries(context, options, NULL); if (g_option_context_parse(context, &argc, &argv, &error) == FALSE) { if (error != NULL) { g_pr...
false
false
false
false
false
0
partno(struct mail_bodystruct *body, struct mail_bodystruct *end_body) { PART *part; int num = 0; char tmp[64], *p = NULL; if(body && body->type == TYPEMULTIPART) { part = body->nested.part; /* first body part */ do { /* for each part */ num++; if(&part->body == end_body || (p = part...
true
true
false
false
false
1
gst_flac_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame) { GstFlacParse *flacparse = GST_FLAC_PARSE (parse); /* Push tags */ if (flacparse->tags) { gst_element_found_tags (GST_ELEMENT (flacparse), flacparse->tags); flacparse->tags = NULL; } frame->flags |= GST_BASE_PARSE_FRAME...
false
false
false
false
false
0
extractItems(const char *filesPath, const Package &listPkg, char outType) { const Item *pItem; int32_t i; for(pItem=listPkg.items, i=0; i<listPkg.itemCount; ++pItem, ++i) { extractItems(filesPath, pItem->name, outType); } }
false
false
false
false
false
0
_gth_image_free_data (GthImage *self) { switch (self->priv->format) { case GTH_IMAGE_FORMAT_CAIRO_SURFACE: cairo_surface_destroy (self->priv->data.surface); self->priv->data.surface = NULL; break; case GTH_IMAGE_FORMAT_GDK_PIXBUF: _g_object_unref (self->priv->data.pixbuf); self->priv->data.pixbuf = NULL; ...
false
false
false
false
false
0
SECU_StripTagAndLength(SECItem *i) { unsigned int start; if (!i || !i->data || i->len < 2) { /* must be at least tag and length */ return SECFailure; } start = ((i->data[1] & 0x80) ? (i->data[1] & 0x7f) + 2 : 2); if (i->len < start) { return SECFailure; } i->data += start; ...
false
false
false
false
false
0
add_ipoint1(struct seg_intersection_list *il, int with, double dist, int ip) { struct seg_intersection *s; if (il->count == il->allocated) { il->allocated += 4; il->a = G_realloc(il->a, (il->allocated) * sizeof(struct seg_intersection)); } s = &(il->a[il->count]); s->with = with; ...
false
false
false
false
false
0
InSubTree() { if (this->PassSelf || this->IsDoneWithTraversal()) { return false; } if (!this->ChildIterator) { return false; } if (this->ChildIterator->PassSelf) { return false; } return true; }
false
false
false
false
false
0
BO_AddrToCodeObjTag (Word_t pc) { bigobj_region_t *region; aid_t aid; aid = ADDR_TO_PAGEID(BIBOP, pc); if (IS_BIGOBJ_AID(aid)) { int indx = BIBOP_ADDR_TO_INDEX(pc); while (!BO_IS_HDR(aid)) aid = BIBOP[--indx]; region = (bigobj_region_t *)BIBOP_INDEX_TO_ADDR(indx); return BO_GetCodeObjTag (A...
false
false
false
false
false
0
get_highest_rate_idx(u32 mask) { int i; unsigned char rate_idx = 0; for (i = 27; i >= 0; i--) { if (mask & BIT(i)) { rate_idx = i; break; } } return rate_idx; }
false
false
false
false
false
0
gst_video_encoder_get_oldest_frame (GstVideoEncoder * encoder) { GstVideoCodecFrame *frame = NULL; GST_VIDEO_ENCODER_STREAM_LOCK (encoder); if (encoder->priv->frames) frame = gst_video_codec_frame_ref (encoder->priv->frames->data); GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder); return (GstVideoCodecFrame *)...
false
false
false
false
false
0
vcpu_mmio_read(struct kvm_vcpu *vcpu, gpa_t addr, int len, void *v) { int handled = 0; int n; do { n = min(len, 8); if (!(vcpu->arch.apic && !kvm_iodevice_read(vcpu, &vcpu->arch.apic->dev, addr, n, v)) && kvm_io_bus_read(vcpu, KVM_MMIO_BUS, addr, n, v)) break; trace_kvm_mmio(KVM_TRACE_M...
false
false
false
false
false
0
icg_show_gui (GnmIOContextGtk *icg) { GtkBox *box; GtkWidget *frame; box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 0)); if (icg->show_splash) { GdkPixbuf *pixbuf = go_gdk_pixbuf_load_from_file ("res:gnm:pixmaps/gnumeric_splash_1.4.png"); gtk_box_pack_start (box, gtk_image_new_from_pixbuf (pixbuf), ...
false
false
false
false
false
0
xputs(str) const char *str; { int len; len=xfputs(str, stdout); if (len<0) return EOF; putchar('\n'); return len+1; }
false
false
false
false
false
0
__indirect_glDeleteLists(GLuint list, GLsizei range) { struct glx_context * const gc = __glXGetCurrentContext(); Display * const dpy = gc->currentDpy; #ifndef USE_XCB const GLuint cmdlen = 8; #endif if (__builtin_expect(dpy != NULL, 1)) { #ifdef USE_XCB xcb_connection_t *c = XGetXCBConnection(dp...
false
true
false
false
false
1
del_ipv6_address ( struct net_device *netdev ) { struct ipv6_miniroute *miniroute; list_for_each_entry ( miniroute, &miniroutes, list ) { if ( miniroute->netdev == netdev ) { del_ipv6_miniroute ( miniroute ); break; } } }
false
false
false
false
false
0
apds990x_prox_threshold_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) { struct apds990x_chip *chip = dev_get_drvdata(dev); unsigned long value; int ret; ret = kstrtoul(buf, 0, &value); if (ret) return ret; if ((value > APDS_RANGE) || (value == 0) || (valu...
false
false
false
false
false
0
on_shell_value_changed (TextEditor *te, const char *name) { g_return_if_fail (name != NULL); if ((strcmp (name, TEXT_EDITOR_PROJECT_TYPE_LIST) == 0) || (strcmp (name, TEXT_EDITOR_SYSTEM_TYPE_LIST) == 0)) { /* Type names list has changed, so refresh highlight */ text_editor_hilite (te, te->force_pref); } ...
false
false
false
false
false
0
zremove_obj(void) { check_zero(0, 0); remove_obj(zargs[0]); }
false
false
false
false
false
0
cmp_member (Sym *left, Sym *right) { double left_time = left->cg.prop.self + left->cg.prop.child; double right_time = right->cg.prop.self + right->cg.prop.child; unsigned long left_calls = left->ncalls + left->cg.self_calls; unsigned long right_calls = right->ncalls + right->cg.self_calls; if (left_time > ri...
false
false
false
false
false
0
netio_bridge_handle_cfg_line(netio_bridge_t *t,char *str) { char *tokens[NETIO_BRIDGE_MAX_TOKENS]; int count; if ((count = m_strsplit(str,':',tokens,NETIO_BRIDGE_MAX_TOKENS)) <= 2) return(-1); return(netio_bridge_cfg_create_if(t,tokens,count)); }
false
false
false
false
false
0
hidinput_input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) { struct hid_device *hid = input_get_drvdata(dev); struct hid_field *field; int offset; if (type == EV_FF) return input_ff_event(dev, type, code, value); if (type != EV_LED) return -1; if ((offset = hidinput_fi...
false
false
false
false
false
0
cond_bubble (FttCell * cell, gpointer data) { CondData * p = data; FttVector pos; ftt_cell_pos (cell, &pos); gdouble radeq; gdouble size = ftt_cell_size (cell)/2.; #if FTT_2D radeq = size*sqrt(2.); #else radeq = size*sqrt(3.); #endif /* 3D */ if (ftt_vector_distance (&pos, p->pos) - radeq <= p->distan...
false
false
false
false
false
0
compressSubDir(QuaZip* zip, QString dir, QString origDir, bool recursive) { // zip: oggetto dove aggiungere il file // dir: cartella reale corrente // origDir: cartella reale originale // (path(dir)-path(origDir)) = path interno all'oggetto zip // Controllo l'apertura dello zip if(!zip) { ...
false
false
false
false
false
0
isAbsPath(MprFileSystem *fs, cchar *path) { char *cp, *endDrive; mprAssert(fs); mprAssert(path); if (path == NULL || *path == '\0') { return 0; } if (fs->hasDriveSpecs) { if ((cp = firstSep(fs, path)) != 0) { if ((endDrive = strchr(path, ':')) != 0) { ...
false
false
false
true
false
1
ftltime(u_int32 sys, u_int32 secs, u_int32 nsecs, u_int32 t) { u_int32 sys_s, sys_m; struct fttime ftt; /* sysUpTime is in milliseconds, convert to seconds/milliseconds */ sys_s = sys / 1000; sys_m = sys % 1000; /* unix seconds/nanoseconds to seconds/milliseconds */ ftt.secs = secs; ftt.msecs = nsecs...
false
false
false
false
false
0
unlock_activate_stack (GnlComposition * comp, GNode * node, gboolean change_state, GstState state) { GNode *child; GST_LOG_OBJECT (comp, "object:%s", GST_ELEMENT_NAME ((GstElement *) (node->data))); gst_element_set_locked_state ((GstElement *) (node->data), FALSE); if (change_state) gst_element...
false
false
false
false
false
0
HBF_GetBitmapBoundingBox(HBF_Handle handle, unsigned int *width, unsigned int *height, int *xDisplacement, int *yDisplacement) { if (width != NULL) *width = hbfBitmapBBox(handle)->hbf_width; if (height != NULL) *height = hbfBitmapBBox(handle)->hbf_height; if (xDisplacement != NULL) *xDisplacement = hbf...
false
false
false
false
false
0
gupnp_dlna_value_new_ranged (GUPnPDLNAValueType *type, const gchar *min, const gchar *max) { GUPnPDLNAValueRange *range; g_return_val_if_fail (type != NULL, NULL); g_return_val_if_fail (min != NULL, NULL); g_return_...
false
false
false
false
false
0
socache_shmcb_store(ap_socache_instance_t *ctx, server_rec *s, const unsigned char *id, unsigned int idlen, apr_time_t expiry, unsigned char *encoded, unsigned ...
false
false
false
false
false
0
sisfb_setupvbblankflags(struct sis_video_info *ivideo, u32 *vcount, u32 *hcount) { u8 idx, reg1, reg2, reg3, reg4; u32 ret = 0; (*vcount) = (*hcount) = 0; if((ivideo->currentvbflags & VB_DISPTYPE_DISP2) && (!(sisfb_bridgeisslave(ivideo)))) { ret |= (FB_VBLANK_HAVE_VSYNC | FB_VBLANK_HAVE_HBLANK | FB_VBLA...
false
false
false
false
false
0
gs_list_free(GS_LIST **list) { size_t list_size=(*list)->size,i; //free tous les pointeurs dans la liste i=0; while(i<list_size) { FREE((*list)->ptr[i]); i++; } //free la liste FREE((*list)->ptr); //mets null *list=NULL; }
false
true
false
false
true
1
qla24xx_unprotect_flash(scsi_qla_host_t *vha) { struct qla_hw_data *ha = vha->hw; struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; if (ha->flags.fac_supported) return qla81xx_fac_do_write_enable(vha, 1); /* Enable flash write. */ WRT_REG_DWORD(&reg->ctrl_status, RD_REG_DWORD(&reg->ctrl_status) | ...
false
false
false
false
false
0
m_jupe(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { if (parc < 2) return jupe_list(sptr, 0); return jupe_list(sptr, parv[1]); }
false
false
false
false
false
0
ekg_user_init(ekg_userObj *self, PyObject *args, PyObject *kwds) { PyObject * name; PyObject * session; static char *kwlist[] = {"name", "session", NULL}; if (! PyArg_ParseTupleAndKeywords(args, kwds, "ss", kwlist, &name, &session)) return -1; self->name = PyString_AsString(name); self->session = PyString...
false
false
false
false
false
0
status_request(struct view *view, enum request request, struct line *line) { struct status *status = line->data; switch (request) { case REQ_STATUS_UPDATE: if (!status_update(view)) return REQ_NONE; break; case REQ_STATUS_MERGE: if (!status || status->status != 'U') { report("Merging only possible for...
false
false
false
false
false
0
transmit_window_size(void) { Sock *sock; for (sock = hsock; sock; sock = sock->next) if (TELOPT(sock, us, TN_NAWS)) do_naws(sock); }
false
false
false
false
false
0
min(float a, float b, float c) { float ret_val; if(a < b) { ret_val = a; } else { ret_val = b; } if (ret_val < c) { return ret_val; } return c; }
false
false
false
false
false
0
GetAppendBuffer(int32_t min_capacity, int32_t desired_capacity_hint, char *scratch, int32_t scratch_capacity, int32_t *result_capacity) { if (min_capacity < 1 || scratch_capacity < min...
false
false
false
false
false
0
_gth_file_list_get_visibles (GthFileList *file_list) { if (file_list->priv->visibility_changed) { _g_object_list_unref (file_list->priv->visibles); file_list->priv->visibles = gth_file_store_get_visibles ((GthFileStore *) gth_file_view_get_model (GTH_FILE_VIEW (file_list->priv->view))); file_list->priv->visibili...
false
false
false
false
false
0
Cudd_BiasedUnderApprox( DdManager *dd /* manager */, DdNode *f /* function to be subset */, DdNode *b /* bias function */, int numVars /* number of variables in the support of f */, int threshold /* when to stop approximation */, double quality1 /* minimum improvement for accepted changes when b=1 */, dou...
false
false
false
false
false
0
dev_c3600_nm_4t_unset_nio(vm_instance_t *vm,struct cisco_card *card, u_int port_id) { struct mueslix_data *d = card->drv_info; if (!d || (port_id >= MUESLIX_NR_CHANNELS)) return(-1); return(dev_mueslix_unset_nio(d,port_id)); }
false
false
false
false
false
0
PyVTKTemplate_HasKey(PyObject *ob, PyObject *args) { PyObject *key = NULL; if (PyArg_ParseTuple(args, (char *)"O:has_key", &key)) { ob = ((PyVTKTemplate *)ob)->dict; return PyObject_CallMethod(ob, (char *)"has_key", (char *)"(O)", key); } return NULL; }
false
false
false
false
false
0