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
liquidio_schedule_droq_pkt_handlers(struct octeon_device *oct) { struct octeon_device_priv *oct_priv = (struct octeon_device_priv *)oct->priv; u64 oq_no; struct octeon_droq *droq; if (oct->int_status & OCT_DEV_INTR_PKT_DATA) { for (oq_no = 0; oq_no < MAX_OCTEON_OUTPUT_QUEUES; oq_no++) { if (!(oct->droq_intr...
false
false
false
false
false
0
has_addr_references_p (struct cgraph_node *node, void *data ATTRIBUTE_UNUSED) { int i; struct ipa_ref *ref; for (i = 0; ipa_ref_list_refering_iterate (&node->ref_list, i, ref); i++) if (ref->use == IPA_REF_ADDR) return true; return false; }
false
false
false
false
false
0
parse_service_descriptor (const unsigned char *buf, struct service *s) { unsigned char len; unsigned char *src, *dest; char* dvbtext; // s->type = buf[2]; buf += 3; len = *buf; buf++; if (s->provider_name == NULL) free (s->provider_name); dvbtext = malloc (len + 1); memcpy (dvbtext, buf, len); dvbtext[...
false
false
false
false
false
0
append_expr_text_to_fragment(char *s) #else /* K&R style */ append_expr_text_to_fragment(s) char *s; #endif /* HAVE_STDC */ { int quote_char = ' ', inside_quote; inside_quote = FALSE; for (; *s; ++s) { if(! inside_quote) { if(*s == '\'' || *s == '"') { /* Start of a quote */ inside...
false
false
false
false
false
0
init_mesh (struct state *st) /* Setup the mesh of bubbles */ { int i; st->mesh = (Bubble **)xmalloc(st->mesh_cells * sizeof(Bubble *)); for (i = 0; i < st->mesh_cells; i++) st->mesh[i] = (Bubble *)NULL; }
false
false
false
false
false
0
draw_bitmapbutton( FL_OBJECT * obj ) { FL_BUTTON_STRUCT *sp = obj->spec; fli_draw_button( obj ); if ( sp->pixmap != None && sp->bits_w > 0 && sp->bits_h > 0 ) { int dest_x, dest_y, dest_w, dest_h, src_x, src_y; FL_COLOR col; ...
false
false
false
false
false
0
p_vex_apply_bluebox(gint32 layer_id ) { GapBlueboxGlobalParams *bbp; /* blubox parameters are not provided by the caller. * in this case we init with default values and try to fetch * values from previous bluebox filter runs */ bbp = gap_bluebox_bbp_new(layer_id);; if(bbp) { bb...
false
false
false
false
false
0
ExecuteQuery(const char* query) { bool success = this->SetQuery(query); if(success) { success = this->Execute(); } return success; }
false
false
false
false
false
0
remove_proc_entry(const char *name, struct proc_dir_entry *parent) { struct proc_dir_entry *de = NULL; const char *fn = name; unsigned int len; write_lock(&proc_subdir_lock); if (__xlate_proc_name(name, &parent, &fn) != 0) { write_unlock(&proc_subdir_lock); return; } len = strlen(fn); de = pde_subdir_find...
false
false
false
false
false
0
cstate_src_write_xml(const output::pointer &fp, const char *name, cstate_src_ty *this_thing) { if (!this_thing) return; trace(("cstate_src_write_xml(name = \"%s\", this_thing = %08lX)\n{\n", name, (long)this_thing)); assert(name); assert(((cstate_src_ty *)this_thing)->reference_count > 0); trace(("...
false
false
false
false
false
0
fm10k_dbg_desc_seq_start(struct seq_file *s, loff_t *pos) { struct fm10k_ring *ring = s->private; return (*pos < ring->count) ? pos : NULL; }
false
false
false
false
false
0
_copy_array(AV* tgt, AV* src) { U32 i = 0; U32 l = av_len(src); // last index av_fill(tgt, l); for (i = 0; i <= l; i++) { // TODO: optimize copying SV** el = av_fetch(src, i, 0); if (el) { SvREFCNT_inc(*el); av_store(tgt, i, *el); } } }
false
false
false
false
false
0
zcrd1_proc_params(const gs_memory_t *mem, os_ptr op, ref_cie_render_procs * pcprocs) { int code; ref *pRT; code = dict_proc3_param(mem, op, "EncodeLMN", &pcprocs->EncodeLMN); if (code < 0) return code; code = dict_proc3_param(mem, op, "EncodeABC", &pcprocs->EncodeABC); ...
false
false
false
false
false
0
free_smartphone_audio_manager_sync_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) { guint result; gpointer *data; data = g_new (gpointer, 3); data[0] = g_object_ref (object); data[1] = g_object_ref (connection); data[2] = g_strdup (path); result = g_dbus_connect...
false
false
false
false
false
0
cl_log_test_logd(void) { IPC_Channel* chan = logging_daemon_chan; if (chan && chan->ops->get_chan_status(chan) == IPC_CONNECT){ return TRUE; } if (chan ){ if (!logging_chan_in_main_loop){ chan->ops->destroy(chan); } logging_daemon_chan = chan = NULL; } logging_daemon_chan = chan = create_logging_ch...
false
false
false
false
false
0
gck_mock_C_SignInit (CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hKey) { Session *session; session = g_hash_table_lookup (the_sessions, GUINT_TO_POINTER (hSession)); g_return_val_if_fail (session != NULL, CKR_SESSION_HANDLE_INVALID); /* Starting an operation, can...
false
true
false
false
false
1
lirc_irctl_init(struct irctl *ir) { mutex_init(&ir->irctl_lock); ir->d.minor = NOPLUG; }
false
false
false
false
false
0
print_multi_line(FILE *fp, regex_t *re, char *q_str, char *qq_str, char *line, int append) { char *c; while ((c = strchr(line, '\n'))) { if (c > line && c[-1] == '\r') c[-1] = '\0'; *c++ = '\0'; if (!append) fputs(q_string(line, re, q_str, ...
false
false
false
false
false
0
watch_add(plugin_t *plugin, int fd, watch_type_t type, watcher_handler_func_t *handler, void *data) { watch_t *w = xmalloc(sizeof(watch_t)); w->plugin = plugin; w->fd = fd; w->type = type; if (w->type == WATCH_READ_LINE) { w->type = WATCH_READ; w->buf = string_init(NULL); } else if (w->type == WATCH_WRITE_...
false
false
false
false
false
0
vcc_checkref(struct vcc *tl, const struct symbol *sym) { if (sym->ndef == 0 && sym->nref != 0) { VSB_printf(tl->sb, "Undefined %s %.*s, first reference:\n", VCC_SymKind(tl, sym), PF(sym->def_b)); vcc_ErrWhere(tl, sym->def_b); } else if (sym->ndef != 0 && sym->nref == 0) { VSB_printf(tl->sb, "Unused %s %....
false
false
false
false
false
0
init(Bounds *b, const char *_text, ht_view *_connected) { ht_view::init(b, VO_POSTPROCESS, 0); text = ht_strdup(_text); magicchar = strchr(text, '~'); if (magicchar) { int l = strlen(text); memmove(magicchar, magicchar+1, l-(magicchar-text)); } connected = _connected; if (magicchar) { shortcut = keyb_metak...
false
false
false
false
false
0
poppler_page_find_text (PopplerPage *page, const char *text) { PopplerRectangle *match; GList *matches; double xMin, yMin, xMax, yMax; gunichar *ucs4; glong ucs4_len; double height; TextPage *text_dev; g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL); g_return_val_if_fail (text != NULL, NULL);...
false
false
false
false
false
0
stun_message_append_xor_addr (StunMessage *msg, StunAttribute type, const struct sockaddr *addr, socklen_t addrlen) { StunMessageReturn val; /* Must be big enough to hold any supported address: */ struct sockaddr_storage xor; if ((size_t) addrlen > sizeof (xor)) addrlen = sizeof (xor); memcpy (&xor, ...
false
true
false
false
false
1
GdipSetRenderingOrigin (GpGraphics *graphics, int x, int y) { if (!graphics) return InvalidParameter; graphics->render_origin_x = x; graphics->render_origin_y = y; switch (graphics->backend) { case GraphicsBackEndCairo: return Ok; case GraphicsBackEndMetafile: return metafile_SetRenderingOrigin (graphics,...
false
false
false
false
false
0
add_positive_restriction_element(expr_t value, string *variable, string *lag) { // if the expression is not on the left handside, change its sign if (!svar_left_handside) value = add_uminus(value); add_restriction_element(value, variable, lag); }
false
false
false
false
false
0
ttclsn(void) { int oleave; if (ttymode) ttymode = 0; else return; oleave = leave; leave = 1; ttflsh(); #ifdef HAVE_POSIX_TERMIOS tcsetattr(fileno(termin), TCSADRAIN, &oldterm); #else #ifdef HAVE_SYSV_TERMIO ioctl(fileno(termin), TCSETAW, &oldterm); #else ioctl(fileno(termin), TIOCSETN, &oarg); ioctl(f...
false
false
false
false
false
0
md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT sec, fragS *fragp) { static xtensa_insnbuf vbuf = NULL; xtensa_isa isa = xtensa_default_isa; int slot; int num_slots; xtensa_format fmt; char *file_name; unsigned line; as_where (&file_name, &line); new_logical_line (fragp->fr_file, fragp->fr_line); ...
false
false
false
false
false
0
_slurm_cred_ctx_alloc(void) { slurm_cred_ctx_t ctx = xmalloc(sizeof(*ctx)); /* Contents initialized to zero */ slurm_mutex_init(&ctx->mutex); slurm_mutex_lock(&ctx->mutex); ctx->expiry_window = DEFAULT_EXPIRATION_WINDOW; ctx->exkey_exp = (time_t) -1; xassert(ctx->magic = CRED_CTX_MAGIC); slurm_mutex_unl...
false
false
false
false
false
0
G_begin_cell_area_calculations(void) { double a, e2; double factor; G_get_set_window(&window); switch (projection = window.proj) { case PROJECTION_LL: G_get_ellipsoid_parameters(&a, &e2); if (e2) { G_begin_zone_area_on_ellipsoid(a, e2, window.ew_res / 360.0); darea0 = G_darea0_on_ellips...
false
false
false
false
false
0
aliasing_gtt_bind_vma(struct i915_vma *vma, enum i915_cache_level cache_level, u32 flags) { u32 pte_flags; int ret; ret = i915_get_ggtt_vma_pages(vma); if (ret) return ret; /* Currently applicable only to VLV */ pte_flags = 0; if (vma->obj->gt_ro) pte_flags |= PTE_READ_ONLY; if (flags & GLOBAL...
false
false
false
false
false
0
set_default_names( size_type n ) { // internal program used by the constructors std::ostringstream name; for ( size_type count = 0; count<n; ++count ) { name.str(std::string()); name << count; m_names[name.str()] = count; } }
false
false
false
false
false
0
skip_whitespace(char **string_line_ptr) { char *cur_char_ptr = *string_line_ptr; for (; *cur_char_ptr != 0; cur_char_ptr++) { if ((*cur_char_ptr != '\t') && (*cur_char_ptr != ' ')) { *string_line_ptr = cur_char_ptr; break; } } }
false
false
false
false
false
0
cindent_on() { return (!p_paste && (curbuf->b_p_cin # ifdef FEAT_EVAL || *curbuf->b_p_inde != NUL # endif )); }
false
false
false
false
false
0
getOption(int type) { TOptList::iterator opt; for (opt = Options.begin(); opt!=Options.end(); ++opt) if ( (*opt)->getOptType()==type) return *opt; return 0; }
false
false
false
false
false
0
feed_by_chunks (const char *s, int size) { int i = 0; while (i < size) { if (size - i > 1024) { vte_terminal_feed (VTE_TERMINAL (term), &(s[i]), 1024); i+= 1024; } else { vte_terminal_feed (VTE_TERMINAL (term), &(s[i]), size-i); break; } } }
false
false
false
false
false
0
output_pending_init_elements (int all) { struct init_node *elt = constructor_pending_elts; tree next; retry: /* Look through the whole pending tree. If we find an element that should be output now, output it. Otherwise, set NEXT to the element that comes first among those still pending. */ ...
false
false
false
false
false
0
hkl_axis_is_value_compatible_with_range(HklAxis const *self) { double value; int res = HKL_FALSE; HklInterval range; value = ((HklParameter *)self)->value; range = ((HklParameter *)self)->range; if(hkl_interval_length(&range) > 2*M_PI) res = HKL_TRUE; else{ hkl_interval_angle_restrict_symm(&range); value...
false
false
false
false
false
0
storeBytes(int bytes, GLEBYTE* source) { int wd = (int)m_Gif->getWidth(); int i = bytes - 1; while (i >= 0) { int j = i-wd+m_CrPos+1; if (j < 0) j = 0; while (i >= j) m_ScanLine[m_CrPos++] = source[i--]; if (m_CrPos >= wd) { m_CrPos = 0; if (isInterlaced()) { // reader->put(scanLine, Deinterlace(de...
false
false
false
false
false
0
GetTag() { if(finished == false ) return NULL; return current_xml_tag; }
false
false
false
false
false
0
operator()(transaction_t& xact) { entry_temps.push_back(*xact.entry); entry_t& entry = entry_temps.back(); entry._date = xact.date(); if (! xact.entry->code.empty()) entry.payee = xact.entry->code; else entry.payee = "<none>"; xact_temps.push_back(xact); transaction_t& temp = xact_temps.back(); ...
false
false
false
false
false
0
inc_notify_cmd(gint new_msgs, gboolean notify) { gchar *buf, *numpos, *ret_str; gssize by_read = 0, by_written = 0; if (!(new_msgs && notify && prefs_common.newmail_notify_cmd && *prefs_common.newmail_notify_cmd)) return; buf = g_strdup(prefs_common.newmail_notify_cmd); if ((numpos = strstr(buf, "%d"...
false
false
false
false
false
0
hawki_tec_filtchk( cpl_parameterlist * parlist, cpl_frameset * framelist) { cpl_frameset * frames ; cpl_table ** target_stats; cpl_propertylist ** stats_stats; int idet; char calpro[1024]; char protype[1024...
true
true
false
false
true
1
satip_close_device(adapter *ad) { satipc *sip = get_satip(ad->id); http_request(ad, NULL, "TEARDOWN"); sip->session[0] = 0; sip->sent_transport = 0; if (ad->fe_sock > 0) sockets_del(ad->fe_sock); if (sip->rtcp_sock > 0) sockets_del(sip->rtcp_sock); ad->fe_sock = -1; sip->rtcp_sock = -1; sip->enabled = 0; ...
false
false
false
false
false
0
assemble_start_function (tree decl, const char *fnname) { int align; char tmp_label[100]; bool hot_label_written = false; first_function_block_is_cold = false; if (flag_reorder_blocks_and_partition) { ASM_GENERATE_INTERNAL_LABEL (tmp_label, "LHOTB", const_labelno); crtl->subsections.hot_secti...
false
false
false
false
false
0
complete_get_exact_entry(const wcstring &cmd, bool cmd_is_path) { ASSERT_IS_LOCKED(completion_lock); completion_entry_t *c; c = complete_find_exact_entry(cmd, cmd_is_path); if (c == NULL) { c = new completion_entry_t(cmd, cmd_is_path, L"", false); completion_set.insert(c); } ...
false
false
false
false
false
0
fusion_ref_zero_trylock (FusionRef *ref) { DirectResult ret = DR_OK; D_ASSERT( ref != NULL ); pthread_mutex_lock (&ref->single.lock); if (ref->single.destroyed) ret = DR_DESTROYED; else if (ref->single.locked) ret = DR_LOCKED; else if (ref->single.refs) ret...
false
false
false
false
false
0
si514_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct clk_si514 *data; struct clk_init_data init; struct clk *clk; int err; data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); if (!data) return -ENOMEM; init.ops = &si514_clk_ops; init.flags = CLK_IS_ROOT; init.num_pare...
false
false
false
false
false
0
char_count(const gchar *text, gchar c) { gint i, n=0; for (i=strlen(text) ; i-- ; ) if (text[i] == c) n++; return(n); }
false
false
false
false
false
0
mvumi_init_fw(struct mvumi_hba *mhba) { int ret = 0; if (pci_request_regions(mhba->pdev, MV_DRIVER_NAME)) { dev_err(&mhba->pdev->dev, "IO memory region busy!\n"); return -EBUSY; } ret = mvumi_map_pci_addr(mhba->pdev, mhba->base_addr); if (ret) goto fail_ioremap; switch (mhba->pdev->device) { case PCI_DEV...
false
false
false
false
false
0
nfcmrvl_i2c_nci_open(struct nfcmrvl_private *priv) { struct nfcmrvl_i2c_drv_data *drv_data = priv->drv_data; if (!drv_data) return -ENODEV; return 0; }
false
false
false
false
false
0
gdb_find_register_function (const gchar *path) { GFile *file; gchar *function = NULL; gchar *content = NULL; file = g_file_new_for_path (path); if (g_file_load_contents (file, NULL, &content, NULL, NULL, NULL)) { GRegex *regex; GMatchInfo *match; regex = g_regex_new ("^def\\s+(register\\w*)\\s*\\(\\w+\\)...
false
false
false
false
false
0
handle_mpi_stop_probe() { FUNC_NAME; DECLARE_THREAD_ID_STR(thread_id, CUR_INDEX, CUR_THREAD_ID); char* probe_str = NULL; int src = GET_PARAM(CUR_EV, 1); uint32_t tag = GET_PARAM(CUR_EV, 2); int len = GET_PARAM(CUR_EV, 3); asprintf(&probe_str, "src=%d, tag=%x, length=%d", src, tag, len); MPI_CHANGE() a...
false
false
false
false
false
0
e_contact_date_equal (EContactDate *dt1, EContactDate *dt2) { if (dt1 && dt2) { return (dt1->year == dt2->year && dt1->month == dt2->month && dt1->day == dt2->day); } else return (!!dt1 == !!dt2); }
false
false
false
false
false
0
unescape_url_n(const char *from, char *to, size_t n) { char c; int x1, x2; while (n-- && (c = *from++) != 0) if (c == '%') { x1 = *from++; if (!isxdigit(x1)) return -1; x2 = *from++; if (!isxdigit(x2)) return -1; *to++ = (HEXDIGIT(x1) << 4) + HEXDIGIT(x2); } else *to++ = c; *to = 0; ...
false
false
false
false
false
0
nchashinsert(NChashmap* hm, nchashid hash, ncelem value) { int i,offset,len; NClist* seq; ncelem* list; offset = (hash % hm->alloc); seq = hm->table[offset]; if(seq == NULL) {seq = nclistnew(); hm->table[offset] = seq;} len = nclistlength(seq); list = nclistcontents(seq); for(i=...
false
false
false
true
false
1
exists(const QString &fullPath) { #ifdef Q_OS_WIN // access() and stat() give a stupid error message to the user // if the path is not accessible at all (e.g. no disk in A:/ and // we do stat("A:/.directory") if (fullPath.endsWith(QLatin1Char('/'))) return QDir(fullPath).exists(); return QFi...
false
false
false
false
false
0
sslReadClient(int fd, void *data) { SslStateData *sslState = data; int len; assert(fd == sslState->client.fd); debug(26, 3) ("sslReadClient: FD %d, reading %d bytes at offset %d\n", fd, SQUID_TCP_SO_RCVBUF - sslState->client.len, sslState->client.len); statCounter.syscalls.sock.reads++; len = ...
false
false
false
false
false
0
Xfread(buf, size, fp) char *buf; ALLOC_T size; XFILE *fp; { ALLOC_T ptr, len; int nl, total; if (checkfp(fp, XS_ERROR | XS_RDONLY) < 0) return(-1); if ((fp -> status & XS_WRITTEN) && flushbuf(fp) < 0) return(-1); if (!(fp -> status & XS_READ)) fp -> ptr = fp -> count = (ALLOC_T)0; nl = total = 0; while (size >...
false
false
false
false
false
0
luaBufferSeek(lua_State *pState) { if(!lua_isuserdata(pState, -2)){ return luaL_error(pState, "invalid argument:1"); } if(!lua_isnumber(pState, -1)){ return luaL_error(pState, "invalid argument:2"); } Buffer *pBuffer = (Buffer*)lua_touserdata(pState, -2); if(!pBuffer){ return luaL_error(pState, "invalid...
false
false
false
false
false
0
guess_file_type(const char *begin, size_t len, int *startpos) { const char * p, * end; p = begin; end = begin + len; while (p < end) { p = memchr(p, '%', end - p); if (!p) return UNKNOWN_FILE; *startpos = p - begin; if ((end - p) > 2 && !memcmp(p, "%!", 2)) return PS_FILE; els...
false
false
false
false
false
0
tree_optimize_tail_calls_1 (bool opt_tailcalls) { edge e; bool phis_constructed = false; struct tailcall *tailcalls = NULL, *act, *next; bool changed = false; basic_block first = single_succ (ENTRY_BLOCK_PTR); tree param; gimple stmt; edge_iterator ei; if (!suitable_for_tail_opt_p ()) return 0; ...
false
false
false
false
false
0
AM_loadPics(void) { int i; char namebuf[9]; for (i=0;i<10;i++) { DEH_snprintf(namebuf, 9, "AMMNUM%d", i); marknums[i] = W_CacheLumpName(namebuf, PU_STATIC); } }
true
true
false
false
false
1
cm_mx_Create(int M) { int status; CM_MX *mx = NULL; int v; int allocL = 1; int allocW = 1; /* level 1: the structure itself */ ESL_ALLOC(mx, sizeof(CM_MX)); mx->dp = NULL; mx->dp_mem = NULL; /* level 2: deck (state) pointers, 0.1..M, go all the way to M */ ESL_ALLOC(mx->dp, sizeo...
false
true
false
false
false
1
poly_weights (double *w, int T, double wmax, double midfrac, gretlopt opt) { double wt, a = 0, b = 0; int t, cut, T2 = T / 2; if (midfrac > 0) { cut = round(T * (1.0 - midfrac) / 2.0); } else { cut = T2; } if (opt == OPT_Q) { /* quadratic */ double z1, z2, det; if (mi...
false
false
false
false
false
0
camel_service_disconnect (CamelService *service, gboolean clean, gint io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { ConnectionOp *op; CamelSer...
false
false
false
true
false
1
parse_string(ESL_SQNCBI_DATA *ncbi, char **str, int *len) { int n; unsigned char x; unsigned char c; unsigned char *ptr; if (parse_expect(ncbi, "\x1a", 1) != eslOK) return eslEFORMAT; /* the next byte is the length of the string. if the length is * less than 128, then this is the true length; othe...
false
false
false
false
false
0
ipmi_acpi_gpe(acpi_handle gpe_device, u32 gpe_number, void *context) { struct smi_info *smi_info = context; unsigned long flags; spin_lock_irqsave(&(smi_info->si_lock), flags); smi_inc_stat(smi_info, interrupts); debug_timestamp("ACPI_GPE"); smi_event_handler(smi_info, 0); spin_unlock_irqrestore(&(smi_inf...
false
false
false
false
false
0
newTimer() { Timer* timer = new Timer(m_documents, this); addTimer(timer); }
false
false
false
false
false
0
set_nodepend_tag(int noTag) { IntSet resSet = NULL; construct_IntSet(resSet, MAX_USER_NODEPEND + MAX_AUTO_NODEPEND + 1); add1_IntSet(resSet, noTag); return(resSet); }
false
false
false
false
false
0
builder_path() { gchar *path; #ifdef WIN32 gchar *packagedir; packagedir = g_win32_get_package_installation_directory_utf8("glurp",NULL); debug("Got %s as package installation dir", packagedir); path = g_build_filename(packagedir,"data", "glurp.glade",NULL); #else if (g_file_test("./glurp.glade", G_FILE_...
false
false
false
false
false
0
read_datamark( wd_fdc *f ) { wd_fdc_drive *d = f->current_drive; int i; f->id_mark = WD_FDC_AM_NONE; if( f->dden ) { /* double density (MFM) */ for( i = 40; i > 0; i-- ) { fdd_read_write_data( &d->fdd, FDD_READ ); if( d->fdd.data == 0x4e ) /* read next */ continue; if( d->fdd.data == ...
false
false
false
false
false
0
restartLauncher( char* program, char* args[] ) { /* just restart in-place */ execvp( program != NULL ? program : args[0], args); }
false
false
false
false
false
0
totem_sidebar_remove_page (Totem *totem, const char *page_id) { GtkUIManager *uimanager; GtkAction *action; GtkActionGroup *action_group; GtkWidget *main_widget; int page_num; guint merge_id; gpointer data; page_num = get_page_num_for_name (totem, page_id); if (page_num == -1) { g_warning ("Tried to ...
false
false
false
false
false
0
tree_link_any(X509_POLICY_LEVEL *curr, const X509_POLICY_CACHE *cache, X509_POLICY_TREE *tree) { int i; /*X509_POLICY_DATA *data;*/ X509_POLICY_NODE *node; X509_POLICY_LEVEL *last = curr - 1; for (i = 0; i < sk_X509_POLICY_NODE_num(last->nodes); i++) { node = sk_X509_POLICY_NODE_value(last->nodes, i); ...
false
false
false
false
false
0
correctDropPosition(int pos) { PadCore *core = dynamic_cast<PadCore*>(q->padDocument()->padFragmentForOutputPosition(pos)); Q_ASSERT(core); if (!core) { LOG_ERROR_FOR("TokenOutputDocument", "No core ???"); return -1; } PadItem *item = dynamic_cast<PadI...
false
false
false
false
false
0
CleanupCommandsAndMacros() { this->InitializeProperties(); std::vector<cmCommand*> commands; for(RegisteredCommandsMap::iterator j = this->Commands.begin(); j != this->Commands.end(); ++j) { if ( !j->second->IsA("cmMacroHelperCommand") && !j->second->IsA("cmFunctionHelperCommand")) { ...
false
false
false
false
false
0
boxes_unattended_raw_file_construct (GType object_type, BoxesUnattendedInstaller* installer, const gchar* src_path, const gchar* dest_name) { BoxesUnattendedRawFile * self = NULL; BoxesUnattendedInstaller* _tmp0_ = NULL; const gchar* _tmp1_ = NULL; const gchar* _tmp2_ = NULL; #line 32 "/extra-data/checkout/gnome/gn...
false
false
false
false
false
0
thumb_loader_std_finish(ThumbLoaderStd *tl, GdkPixbuf *pixbuf, gboolean shrunk) { GdkPixbuf *pixbuf_thumb = NULL; GdkPixbuf *result; GdkPixbuf *rotated = NULL; gint sw, sh; if (!tl->cache_hit && options->image.exif_rotate_enable) { if (!tl->fd->exif_orientation) { tl->fd->exif_orientation = metadata_re...
false
false
false
false
false
0
asSyncedPlaylist( const PlaylistPtr playlist ) { DEBUG_BLOCK debug() << QString("UIDurl: %1").arg( playlist->uidUrl().url() ); SyncedPlaylistPtr syncedPlaylist; if( m_syncMasterMap.keys().contains( playlist->uidUrl() ) ) { syncedPlaylist = m_syncMasterMap.value( playlist->uidUrl() ); ...
false
false
false
false
false
0
paeth_predictor(int a, int b, int c) { /* The definitions of ac and bc are correct, not a typo. */ int ac = b - c, bc = a - c, abcc = ac + bc; int pa = (ac < 0 ? -ac : ac), pb = (bc < 0 ? -bc : bc), pc = (abcc < 0 ? -abcc : abcc); return (pa <= pb && pa <= pc ? a : pb <= pc ? b : c); }
false
false
false
false
false
0
str_printf(const char *fmt, ...) { /* Guess we need no more than 100 bytes. */ int len; va_list ap; int size = 100; char *tmp, *str = NULL; str = malloc(size); while (1) { /* Try to print in the allocated space. */ va_start(ap, fmt); len = vsnprintf(str, size, f...
false
false
false
false
true
1
_beginPaint() { UT_ASSERT(m_Painting == false); GR_CairoGraphics::_beginPaint(); if (m_cr == NULL) { UT_ASSERT(m_pWin); m_cr = gdk_cairo_create (m_pWin); m_CairoCreated = true; } #ifndef NDEBUG /* should only be called inside an expose event, messes up * double-buffering and all sorts of other GTK assum...
false
false
false
false
false
0
transcribe(Parser p, int back, int count) { ExpandBuf(p->pbuf, p->pbufnext + count); memcpy(p->pbuf + p->pbufnext, p->source->line + p->source->next - back, count * sizeof(Char)); p->pbufnext += count; return 0; }
false
false
false
false
true
1
__ecereMethod___ecereNameSpace__ecere__gui__controls__DataRow_GetPrevRow(struct __ecereNameSpace__ecere__com__Instance * this) { struct __ecereNameSpace__ecere__gui__controls__DataRow * __ecerePointer___ecereNameSpace__ecere__gui__controls__DataRow = (struct __ecereNameSpace__ecere__gui__controls__DataRow *)(this ? (((...
false
false
false
false
false
0
GetPropertyPostInterceptor( JSReceiver* receiver, String* name, PropertyAttributes* attributes) { // Check local property in holder, ignore interceptor. LookupResult result; LocalLookupRealNamedProperty(name, &result); if (result.IsProperty()) { return GetProperty(receiver, &result, name, attrib...
false
false
false
false
false
0
GB_BrowseProject(GB_BROWSE_CALLBACK func) { ARCHIVE *arch = NULL; ARCHIVE_get_current(&arch); if (!arch || (arch == ARCHIVE_main && !EXEC_arch)) { _browse_project_func = func; FILE_recursive_dir(PROJECT_path, project_file_found, NULL, 0, FALSE); } else ARCHIVE_browse(arch, func); }
false
false
false
false
false
0
show_fan(struct device *dev, struct device_attribute *devattr, char *buf) { struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); struct adm1029_data *data = adm1029_update_device(dev); u16 val; if (data->fan[attr->index] == 0 || (data->fan_div[attr->index] & 0xC0) == 0 || data->fan[attr->in...
false
true
false
false
false
1
rank_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button, GenericToolState *state) { data_analysis_output_t *dao; analysis_tools_data_ranking_t *data; GtkWidget *w; data = g_new0 (analysis_tools_data_ranking_t, 1); dao = parse_output (state, NULL); data->base.input = gnm_expr_entry_parse_as_list ( GNM...
false
false
false
false
false
0
poly_basis_dy(ssize_t n, double x, double y) { /* polynomial term for y derivative */ switch(n) { case 0: return( 0.0 ); /* constant */ case 1: return( 0.0 ); case 2: return( 1.0 ); /* affine order = 1 terms = 3 */ case 3: return( x ); /* bilinear order = 1.5 terms = 4 */ cas...
true
true
false
false
false
1
HandleData(const QSharedPointer<ISender> &from, const QByteArray &data) { _out << from->ToString() << data.data(); }
false
false
false
false
false
0
SCM_STRING_LIST_P(ScmObj x) { ScmObj p; if (SCM_LISTP(x)){ SCM_FOR_EACH(p, x){ if (! SCM_STRINGP(SCM_CAR(p))) return 0; } return 1; } else return 0; }
false
false
false
false
false
0
argMatch(const char *f1,const char *f2) { const char *p1,*p2; if (f1[0]!=f2[0] || f1[1]!=f2[1]) return 0; /* for -f args, strip off the '-f' and any 'no-' */ if (f1[1]=='f') { f1+=2; if (f1[0]=='n' && f1[1]=='o' && f1[2]=='-') f1+=3; f2+=2; if (f2[0]=='n' && f2[1]=='o' && f2[2]=='-') f2+=3; } ...
false
false
false
false
false
0
deactivate() { if (active_r()) { set_flag(INACTIVE); redraw(); redraw_label(); handle(FL_DEACTIVATE); fl_throw_focus(this); } else { set_flag(INACTIVE); } }
false
false
false
false
false
0
cp2112_raw_event(struct hid_device *hdev, struct hid_report *report, u8 *data, int size) { struct cp2112_device *dev = hid_get_drvdata(hdev); struct cp2112_xfer_status_report *xfer = (void *)data; switch (data[0]) { case CP2112_TRANSFER_STATUS_RESPONSE: hid_dbg(hdev, "xfer status: %02x %02x %04x %04x\n", ...
false
false
false
false
false
0
techs_init(void) { int i; for (i = 0; i < ARRAY_SIZE(advances); i++) { advances[i].item_number = i; } /* Initialize dummy tech A_NONE */ /* TRANS: "None" tech */ name_set(&advances[A_NONE].name, N_("None")); /* Initialize dummy tech A_UNSET */ name_set(&advances[A_UNSET].name, N_("None")); /* ...
false
false
false
false
false
0
module_register(void) { static gint types_initialized = 0; if (!types_initialized) { GwyResourceClass *klass; types_initialized += gwy_convolution_filter_preset_get_type(); gwy_convolution_filter_preset_class_setup_presets(); klass = g_type_class_peek(GWY_TYPE_CONVOLUTION_FILTE...
false
false
false
false
false
0
alps_process_trackstick_packet_v3(struct psmouse *psmouse) { struct alps_data *priv = psmouse->private; unsigned char *packet = psmouse->packet; struct input_dev *dev = priv->dev2; int x, y, z, left, right, middle; /* It should be a DualPoint when received trackstick packet */ if (!(priv->flags & ALPS_DUALPOINT)...
false
false
false
false
false
0
parseFirstCluster(MatroskaFile *mf,ulonglong toplen) { ulonglong end = filepos(mf) + toplen; mf->seen.Cluster = 1; mf->firstTimecode = 0; FOREACH(mf,toplen) case 0xe7: // Timecode mf->firstTimecode += readUInt(mf,(unsigned)len); break; case 0xa3: // BlockEx readVLUInt(mf); // track n...
false
false
false
false
false
0
gpk_modal_dialog_pulse_progress (GpkModalDialog *dialog) { GtkWidget *widget; static guint rate_limit = 0; g_return_val_if_fail (GPK_IS_CLIENT_DIALOG (dialog), FALSE); /* debug so we can catch polling */ if (rate_limit++ % 20 == 0) g_debug ("polling check"); widget = GTK_WIDGET (gtk_builder_get_object (dial...
false
false
false
false
false
0
ai_maybe_announce_shockwave_weapon(object *firing_objp, int weapon_index) { if ((firing_objp->type == OBJ_SHIP) && (Weapon_info[weapon_index].shockwave.speed > 0.0f)) { ship_obj *so; int firing_ship_team; firing_ship_team = Ships[firing_objp->instance].team; for ( so = GET_FIRST(&Ship_obj_list); so != END_O...
false
false
false
false
false
0