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
list_tests_construct (GType object_type, const gchar* name) { ListTests * self = NULL; const gchar* _tmp0_ = NULL; g_return_val_if_fail (name != NULL, NULL); _tmp0_ = name; self = (ListTests*) collection_tests_construct (object_type, _tmp0_); gee_test_case_add_test ((GeeTestCase*) self, "[List] iterator is ordere...
false
false
false
false
false
0
bmc150_accel_buffer_predisable(struct iio_dev *indio_dev) { struct bmc150_accel_data *data = iio_priv(indio_dev); if (indio_dev->currentmode == INDIO_BUFFER_TRIGGERED) return iio_triggered_buffer_predisable(indio_dev); mutex_lock(&data->mutex); if (!data->fifo_mode) goto out; bmc150_accel_set_interrupt(dat...
false
false
false
false
false
0
ldns_soa_serial_unixtime(uint32_t s, void *data) { int32_t new_s = data ? (int32_t) (intptr_t) data : (int32_t) ldns_time(NULL); return new_s - ((int32_t) s) <= 0 ? s+1 : ((uint32_t) new_s); }
false
false
false
false
false
0
init_aux_patterns(Macro *spec, int mflag, AuxPat *aux) { init_pattern_str(&aux->name, spec->name); init_pattern_str(&aux->body, spec->body ? spec->body->data : NULL); init_pattern_str(&aux->expr, spec->expr ? spec->expr->data : NULL); init_pattern_str(&aux->bind, spec->bind); init_pattern_str(&aux->...
false
false
false
false
false
0
_pack_update_partition_msg(update_part_msg_t * msg, Buf buffer, uint16_t protocol_version) { xassert(msg != NULL); if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { packstr(msg->allow_groups, buffer); packstr(msg->alternate, buffer); pack32(msg-> grace_time, buffer); pack32(msg-> max_time, ...
false
false
false
false
false
0
devzone_draw_grid(struct mame_bitmap *bitmap) { UINT8 y; data8_t *horz_PROM = memory_region(REGION_USER2); data8_t *vert_PROM = memory_region(REGION_USER3); offs_t horz_addr = 0; UINT8 count = 0; UINT8 horz_data = 0; UINT8 vert_data; for (y = 32; y < 224; y++) { UINT8 x = 0; while (1)...
false
false
false
false
false
0
callback_long_format(struct output *o) { struct long_format_parameter *param = o->closure; char *if_hostname = param->if_hostname; struct gfarm_host_info *info = &param->info; /* sizeof(struct sockaddr_in) == sizeof(struct sockaddr) */ struct sockaddr_in *addr_in = (struct sockaddr_in *)&o->peer_addr; int i, prin...
false
false
false
false
false
0
parport_mos7715_write_compat(struct parport *pp, const void *buffer, size_t len, int flags) { int retval; struct mos7715_parport *mos_parport = pp->private_data; int actual_len; if (parport_prologue(pp) < 0) return 0; mos7715_change_mode(mos_parport, PPF); retval = usb_bulk_msg(mos_parport->ser...
false
false
false
false
false
0
bAddDataBlocks(ULONG ulDataPosFirst, ULONG ulTotalLength, ULONG ulStartBlock, const ULONG *aulBBD, size_t tBBDLen) { data_block_type tDataBlock; ULONG ulDataPos, ulOffset, ulIndex; long lToGo; BOOL bSuccess; fail(ulTotalLength > (ULONG)LONG_MAX); fail(ulStartBlock > MAX_BLOCKNUMBER && ulStartBlock != END_OF_CHA...
false
false
false
false
false
0
ktest_destroy_last_req(krb5_last_req_entry ***lr) { int i; if (*lr) { for (i=0; (*lr)[i] != NULL; i++) free((*lr)[i]); free(*lr); } }
false
false
false
false
false
0
parse() { tchar c; pos = 0; while(pos < pattern.length()) { c = pattern[pos++]; switch (state) { case LITERAL_STATE : // In literal state, the last char is always a literal. if(pos == pattern.length()) { currentLiteral += c; co...
false
false
false
false
false
0
slotPsiDebug ( const QString & _msg ) { QString msg = _msg; msg = msg.replace( QRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" ); msg = msg.replace( QRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" ); emit debugMessage ( "Psi: " + msg ); }
false
false
false
false
false
0
impexiterate(real_t z[], real_t y[], real_t **a, real_t h, real_t t, real_t weights[], int ps[], int n, real_t eps, void (*deriv)(real_t, real_t [], real_t [], int), int (*available)(real_t, real_t [], real_t **, int)) { /* this function is internally used by IMPEXLARGESTEP (IMPEX) */ int i,it,lit,fai...
false
false
false
false
false
0
stsd_read_common(bgav_input_context_t * input, qt_sample_description_t * ret) { return (bgav_input_read_fourcc(input, &ret->fourcc) && (bgav_input_read_data(input, ret->reserved, 6) == 6) && bgav_input_read_16_be(input, &ret->data_reference_index) && bgav_in...
false
false
false
false
false
0
xmms_playlist_remove_unlocked (xmms_playlist_t *playlist, const gchar *plname, xmmsv_coll_t *plcoll, guint pos, xmms_error_t *err) { gint currpos; GTree *dict; g_return_val_if_fail (playlist, FALSE); currpos = xmms_playlist_coll_get_currpos (plcoll); if (!xmmsv_coll_idlist_remove ...
false
false
false
false
false
0
l3dss1_release(struct l3_process *pc, u_char pr, void *arg) { struct sk_buff *skb = arg; u_char *p; int ret, cause = 0; StopAllL3Timer(pc); if ((ret = l3dss1_get_cause(pc, skb)) > 0) { if (pc->debug & L3_DEB_WARN) l3_debug(pc->st, "REL get_cause ret(%d)", ret); } else if (ret < 0) pc->para.cause = NO_CAUS...
false
false
false
false
false
0
talloc_pool_cache(const void *context, size_t size, size_t objsize) { void *result; struct talloc_chunk *tc; unsigned int count; unsigned int hdrsize; if (unlikely(size <= 0) || unlikely(objsize <= 0) ) { return NULL; } if ( unlikely(objsize > size) ) { return NULL; } ...
false
false
false
false
true
1
socksetup(char *listen_addr, int listen_port, int **socklist_p) { int socknum = 0, *socklist = NULL; int maxfd = -1; char pbuf[NI_MAXSERV]; struct addrinfo hints, *ai0, *ai; int gai; long flags; sprintf(pbuf, "%d", listen_port); memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype...
true
true
false
false
false
1
mpi_sche_write_main_function(fsbe_context *cx) { const char *or_name; char name[256]; int i; int total_pe; Module_table *module_main = module_head; total_pe = module_main->super_hmdf->pe_num; or_name = !strcmp(module_main->name, "*MAIN*") ? "ORG_MAIN" : module_main->name; for( i = 0; or...
true
true
false
false
false
1
monitor_on_interface_proxy_properties_changed (GDBusObjectManagerClient *manager, GDBusObjectProxy *object_proxy, GDBusProxy *interface_proxy, GVariant ...
false
false
false
false
false
0
fm_dnd_dest_dispose(GObject *object) { FmDndDest *dd; g_return_if_fail(object != NULL); g_return_if_fail(FM_IS_DND_DEST(object)); dd = (FmDndDest*)object; fm_dnd_dest_set_widget(dd, NULL); clear_src_cache(dd); G_OBJECT_CLASS(fm_dnd_dest_parent_class)->dispose(object); }
false
false
false
false
false
0
caml_float_of_substring(value vs, value idx, value l) { char parse_buffer[64]; char * buf, * src, * dst, * end; mlsize_t len, lenvs; double d; intnat flen = Long_val(l); intnat fidx = Long_val(idx); lenvs = caml_string_length(vs); len = fidx >= 0 && fidx < lenvs && flen > 0 && flen <= lenvs - fidx ...
false
false
false
false
false
0
fli_free_colormap( int vmode ) { int i; for( i = 0; i < 3; i++ ) if ( fli_gray_pattern[ i ] ) { XFreePixmap( flx->display, fli_gray_pattern[ i ] ); fli_gray_pattern[ i ] = None; } if ( fli_visual( vmode ) != DefaultVisual( flx->display, fl_screen ) ) ...
false
false
false
false
false
0
print_trace(int level, char *label, char *format, ...) { va_list args; /* arguments */ FILE *fp; register int i; /* general purpose index */ trc_spec_t *trc; int sav_errno = errno; int sav_serrno = serrno; va_start(args, format); Cglobals_get(&trc_key...
true
true
false
false
true
1
enableMembers(bool enable) { foreach(ParameterDefinition *parameterDefinition, members()) parameterDefinition->parentWidget()->setEnabled(enable); }
false
false
false
false
false
0
InjectCoverage(Function &F, ArrayRef<BasicBlock *> AllBlocks) { switch (Options.CoverageType) { case SanitizerCoverageOptions::SCK_None: return false; case SanitizerCoverageOptions::SCK_Function: InjectCoverageAtBlock(F, F.getEntryBlock(), false); return tr...
false
false
false
false
false
0
krb5_get_init_creds_opt_get_pa(krb5_context context, krb5_get_init_creds_opt *opt, int *num_preauth_data, krb5_gic_opt_pa_data **preauth_data) { krb5_error_code retval; krb5_gic_opt_ext *opte; krb5_gic_opt_pa_data *...
false
false
false
false
false
0
__lpss_ssp_read_priv(struct driver_data *drv_data, unsigned offset) { WARN_ON(!drv_data->lpss_base); return readl(drv_data->lpss_base + offset); }
false
false
false
false
false
0
blogc_template_parse_from_file(const char *f, blogc_error_t **err) { if (err == NULL || *err != NULL) return NULL; size_t len; char *s = blogc_file_get_contents(f, &len, err); if (s == NULL) return NULL; b_slist_t *rv = blogc_template_parse(s, len, err); free(s); return rv; }
false
false
false
false
false
0
__ecereMethod_CodeEditor_ListEnumValues(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Class * _class) { struct CodeEditor * __ecerePointer_CodeEditor = (struct CodeEditor *)(this ? (((char *)this) + __ecereClass_CodeEditor->offset) : 0); struct __ecereNameSpace__ecere__com__...
false
false
false
true
false
1
startTable(int border, TableWidth interpretWAs, int width, TableWidth interpretHAs, int height, TableFrame frame, ASCString cssClass, const IntVec* cols) { *buildingInfStream << "<table "; if(cssClass!="") { *buildingInfStream << "class=\"" + cssClass + "\" "; } if(interpretWAs != NONE) { *buildingInfSt...
false
false
false
false
false
0
CellRendererList() : Glib::ObjectBase(0) //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations. //TODO: This should not be necessary - our gtkmm callbacks are somehow preventing the popup from appearing. { m_refModel = Gtk::ListStore::create(m_model_columns); set_pro...
false
false
false
false
false
0
e_cal_component_get_categories_list (ECalComponent *comp, GSList **categ_list) { ECalComponentPrivate *priv; icalproperty *prop; const gchar *categories; const gchar *p; const gchar *cat_start; gchar *str; g_return_if_fail (comp != NULL); g_return_if_fail (E_IS_CAL_COMPONEN...
false
false
false
false
false
0
get_cairo_surface() { if (!gtk_widget_get_realized(drawingArea)) { return 0; } return gdk_cairo_create(GDK_DRAWABLE(gtk_widget_get_window(drawingArea))); }
false
false
false
false
false
0
set_trace(int trace_flag) { if (trace_flag < 0) { return; } else if (trace_flag > 0) { trace = true; } else { trace = false; } if (!trace && trace_fd) { FILE *ltrace_fd = trace_fd; trace_fd = NULL; bmicrosleep(0, 100000); /* yield to prevent seg faults */ ...
false
false
false
false
false
0
options_init_names(const struct copt_val_name *(*acc)(int), struct strvec **support, struct strvec **pretty) { int val; const struct copt_val_name *name; fc_assert_ret(NULL != acc); *support = strvec_new(); *pretty = strvec_new(); for (val=0; (name = acc(val)); val++) { st...
false
false
false
false
false
0
gps_bb_apply_until_no_change(gm_gps_basic_block* entry, gps_apply_bb* apply) { std::set<gm_gps_basic_block*> set; bool b = false; do { apply->set_changed(false); set.clear(); bb_apply_recurse(set, entry, apply); if (apply->has_changed()) b = true; } while (apply->has_chan...
false
false
false
false
false
0
mlx4_en_set_rxfh(struct net_device *dev, const u32 *ring_index, const u8 *key, const u8 hfunc) { struct mlx4_en_priv *priv = netdev_priv(dev); struct mlx4_en_dev *mdev = priv->mdev; int port_up = 0; int err = 0; int i; int rss_rings = 0; /* Calculate RSS table size and make sure flows are spread evenly ...
false
false
false
false
false
0
trace_entrylk (call_frame_t *frame, xlator_t *this, const char *volume, loc_t *loc, const char *basename, entrylk_cmd cmd, entrylk_type type, dict_t *xdata) { if (trace_fop_names[GF_FOP_ENTRYLK].enabled) { gf_log (this->name, GF_LOG_INFO, "%"...
false
false
false
false
false
0
iuu_port_probe(struct usb_serial_port *port) { struct iuu_private *priv; int ret; priv = kzalloc(sizeof(struct iuu_private), GFP_KERNEL); if (!priv) return -ENOMEM; priv->buf = kzalloc(256, GFP_KERNEL); if (!priv->buf) { kfree(priv); return -ENOMEM; } priv->writebuf = kzalloc(256, GFP_KERNEL); if (!pr...
false
false
false
false
false
0
usage(int argc, char **argv) { const struct cmd *section, *cmd; bool full = argc >= 0; const char *sect_filt = NULL; const char *cmd_filt = NULL; if (argc > 0) sect_filt = argv[0]; if (argc > 1) cmd_filt = argv[1]; printf("Usage:\t%s [options] command\n", argv0); usage_options(); printf("\t--version\tsh...
false
false
false
false
false
0
soldier_attack2_refire1 (edict_t *self) { if (self->s.skinnum > 1) return; if (self->enemy->health <= 0) return; if ( ((skill->value == 3) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE) ) self->monsterinfo.nextframe = FRAME_attak204; else self->monsterinfo.nextframe = FRAME_attak216; }
false
false
false
false
true
1
e_repos_delete_shift (gint pos, gpointer data) { EReposDeleteShift *info = (EReposDeleteShift *) data; g_return_val_if_fail (data, -1); if (pos > info->pos + info->len) pos -= info->len; else if (pos > info->pos) pos = info->pos; return e_text_model_validate_position (info->model, pos);...
false
false
false
false
false
0
gtkaspell_change_dict(GtkAspell *gtkaspell, const gchar *dictionary, gboolean always_set_alt_dict) { Dictionary *dict; GtkAspeller *gtkaspeller; cm_return_val_if_fail(gtkaspell, FALSE); cm_return_val_if_fail(dictionary, FALSE); dict = g_new0(Dictionary, 1); if (strrchr(dictionary, '/')) { ...
false
false
false
false
false
0
Java_java_nio_Bits_copyToByteArray(JNIEnv *env, jobject this, jlong srcAddr, jobject dst, jlong dstPos, jlong length) { jbyte *bytes; size_t size; while (length > 0) { size = (length > MBYTE ? MBYTE : length); GETCRITICAL(bytes, env, dst); memcpy(...
false
false
false
false
false
0
make(ELObj *obj, const Location &, Interpreter &interp) const { return new IgnoredC(identifier(), index(), obj, interp); }
false
false
false
false
false
0
button_release_event_cb (ClutterActor *stage, ClutterButtonEvent *event, MxKineticScrollView *scroll) { MxKineticScrollViewPrivate *priv = scroll->priv; if ((event->type != CLUTTER_BUTTON_RELEASE) || (event->button != priv->button)) return FALSE; ...
false
false
false
false
false
0
gretl_coeff_vector_from_model (const MODEL *pmod, const char *select, int *err) { gretl_vector *b; int i, j, nc; int k = pmod->ncoeff; if (select == NULL) { nc = k; } else { nc = count_selection(select, k); } if (nc == 0) { *err = E_DATA; return NULL; } b = gretl_column_ve...
false
false
false
false
false
0
sv_byname(struct irs_sv *this, const char *name, const char *proto) { #ifdef IRS_LCL_SV_DB struct pvt *pvt = (struct pvt *)this->private; #endif struct servent *p; char **cp; sv_rewind(this); #ifdef IRS_LCL_SV_DB if (pvt->dbh != NULL) { DBT key, data; /* Note that (sizeof "/") == 2. */ if ((strlen(name) + ...
false
false
false
false
false
0
init_table(struct nvkm_bios *bios, u16 *len) { struct bit_entry bit_I; if (!bit_entry(bios, 'I', &bit_I)) { *len = bit_I.length; return bit_I.offset; } if (bmp_version(bios) >= 0x0510) { *len = 14; return bios->bmp_offset + 75; } return 0x0000; }
false
false
false
false
false
0
char2score(const char *score) { int score_f = 0; if (score == NULL) { } else if (safe_str_eq(score, MINUS_INFINITY_S)) { score_f = -node_score_infinity; } else if (safe_str_eq(score, INFINITY_S)) { score_f = node_score_infinity; } else if (safe_str_eq(score, "+" INFINITY_S)) { ...
false
false
false
false
false
0
uerror(char *s) { if (s != NULL) eprint("%s: %s\n", s, esstrerror(errno)); else eprint("%s\n", esstrerror(errno)); }
false
false
false
false
false
0
convert_block_to_byte( void *in, unsigned char *out, int npts, int in_type, double *dispmin, double *dispmax ) { if( (lastLookupMin==0.0 && lastLookupMax==0.0) || (*dispmin==0.0 && *dispmax==0.0) ) { return convert_block( in, npts, in_type, dispmin, dispmax, out, NULL ); } ...
false
false
false
false
false
0
log(int level, const char* fmt, ...) { (void) level; if (level > logLevel ) return -1; int ret; va_list arglist; va_start(arglist, fmt); ret = vfprintf(stream, fmt, arglist); va_end(arglist); return ret; }
false
false
false
false
false
0
vect_grouped_store_supported (tree vectype, unsigned HOST_WIDE_INT count) { enum machine_mode mode = TYPE_MODE (vectype); /* vect_permute_store_chain requires the group size to be a power of two. */ if (exact_log2 (count) == -1) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_...
false
false
false
false
true
1
__log_newfh(dblp, create) DB_LOG *dblp; int create; { ENV *env; LOG *lp; u_int32_t flags; int ret; logfile_validity status; env = dblp->env; lp = dblp->reginfo.primary; /* Close any previous file descriptor. */ if (dblp->lfhp != NULL) { (void)__os_closehandle(env, dblp->lfhp); dblp->lfhp = NULL; } f...
false
false
false
false
false
0
nfs4_check_open_reclaim(clientid_t *clid, struct nfsd4_compound_state *cstate, struct nfsd_net *nn) { __be32 status; /* find clientid in conf_id_hashtbl */ status = lookup_clientid(clid, cstate, nn); if (status) return nfserr_reclaim_bad; if (test_bit(NFSD4_CLIENT_RECLAIM_COMPLETE, &cstate->clp->cl_flags))...
false
false
false
false
false
0
getMACcount(pMAC_t pMAC) { pMAC_t cur = pMAC; int count=0; if(pMAC == NULL) return -1; while(cur->next != NULL) { cur = cur->next; count++; } return count; }
false
false
false
false
false
0
readHeader() { // We now rely on zlib to read the full header (see the MAX_WBITS + 32 in init). // We just use this method to check if the data is actually compressed. #ifdef DEBUG_GZIP qDebug() << "avail=" << d->zStream.avail_in; #endif // Assume not compressed until we see a gzip header d->compre...
false
false
false
false
false
0
elf_xtensa_do_asm_simplify (bfd_byte *contents, bfd_vma address, bfd_vma content_length, char **error_message) { static xtensa_insnbuf insnbuf = NULL; static xtensa_insnbuf slotbuf = NULL; xtensa_format core_format = XTENSA_UNDEFINED; xtensa_opcode opcode; xtensa_opcode direct_call_opcode...
false
false
false
false
false
0
parse_expire_cfg_value(const char *var, const char *value, unsigned long *expire) { if (!value) return config_error_nonbool(var); if (!strcmp(value, "never") || !strcmp(value, "false")) { *expire = 0; return 0; } *expire = approxidate(value); return 0; }
false
false
false
false
false
0
commit() { if(m_dirty) //current player was changed { m_pendingUpdates.insert(m_currentPlayerName, m_currentPlayer); } m_mapfile.seek(m_nplayers_offset); m_mapds << m_nplayers; // write non-committed changes m_dataFileCurrentPosition = m_datafile.size(); m_datafile.seek(m_data...
false
false
false
false
false
0
set_user_limits(stepd_step_rec_t *job) { #ifdef RLIMIT_AS #define SLURM_RLIMIT_VSIZE RLIMIT_AS #define SLURM_RLIMIT_VNAME "RLIMIT_AS" #elif defined(RLIMIT_DATA) /* RLIMIT_DATA is useless on many systems which provide anonymous * mmap()'s in addition to brk(), use it here only as a fallback for * oddball systems lacki...
false
false
false
false
false
0
tsAddPlotLabels(splotd *sp, GdkDrawable *drawable, ggobid *gg) { displayd *display = sp->displayptr; GList *l = display->splots; PangoLayout *layout = gtk_widget_create_pango_layout(sp->da, NULL); PangoRectangle rect; if (l->data == sp) { layout_text(layout, ggobi_data_get_transformed_col_name(display->...
false
false
false
false
false
0
LZ4_compress_continue (void* LZ4_Data, const char* source, char* dest, int inputSize) { return LZ4_compress_generic(LZ4_Data, source, dest, inputSize, 0, notLimited, byU32, withPrefix); }
false
false
false
false
false
0
efi_snp_poll ( struct efi_snp_device *snpdev ) { struct io_buffer *iobuf; unsigned int before = 0; unsigned int after = 0; unsigned int arrived; /* We have to report packet arrivals, and this is the easiest * way to fake it. */ list_for_each_entry ( iobuf, &snpdev->netdev->rx_queue, list ) before++; netde...
false
false
false
false
false
0
ensure_all(Code c) const { if (c >= 0 && (c >> 5) >= _all_sentinel.size()) _all_sentinel.resize((c >> 5) + 1, 0xFFFFFFFFU); }
false
false
false
false
false
0
iptux_get_hex64_number(const char *msg, char ch, uint8_t times) { const char *ptr; int64_t number; if (!(ptr = iptux_skip_section(msg, ch, times))) return 0; if (sscanf(ptr, "%" SCNx64, &number) == 1) return number; return 0; }
false
false
false
false
false
0
setOldCryptedPassword(const QString &crypted) { m_OldCryptedPass = crypted; // Set title m_ui->label->setText(tkTr(Trans::Constants::CHANGE_PASSWORD)); setWindowTitle(tkTr(Trans::Constants::CHANGE_PASSWORD)); // Manage ui m_ui->oldLabel->show(); m_ui->labelNewPassword->show(); m_ui->labe...
false
false
false
false
false
0
asn1PE_H245RequestChannelClose_reason (OOCTXT* pctxt, H245RequestChannelClose_reason* pvalue) { int stat = ASN_OK; ASN1BOOL extbit; /* extension bit */ extbit = (ASN1BOOL)(pvalue->t > 4); encodeBit (pctxt, extbit); if (!extbit) { /* Encode choice index value */ stat = encodeConsUnsig...
false
false
false
false
false
0
doHiddenPlacement() { MSNodeItem *hp=childListHead(); MSNodeItem *np; np = hp; MSCollapsibleEntry* entry; int xDisplacement =0; int yDisplacement_ =height() - _handleSize; while ((np=np->next())!=hp) { entry = (MSCollapsibleEntry*)np->data(); if(entry->state()==MSCollapsibleEntry::CLOSED...
false
false
false
false
false
0
file_browser_node_free_children (GeditFileBrowserStore *model, FileBrowserNode *node) { GSList *item; if (node == NULL || !NODE_IS_DIR (node)) return; for (item = FILE_BROWSER_NODE_DIR (node)->children; item; item = item->next) { file_browser_node_free (model, (FileBrowserNode *) (item->data)); } ...
false
false
false
false
false
0
t4_edc_err_read(struct adapter *adap, int idx) { u32 edc_ecc_err_addr_reg; u32 rdata_reg; if (is_t4(adap->params.chip)) { CH_WARN(adap, "%s: T4 NOT supported.\n", __func__); return 0; } if (idx != 0 && idx != 1) { CH_WARN(adap, "%s: idx %d NOT supported.\n", __func__, idx); return 0; } edc_ecc_err_addr...
false
false
false
false
false
0
bLoadSchemFiles( void ) { wxString os1, os2; size_t sz1; // Don't clear the current list of schematic file names // m_ofnaSchemFiles.Empty( ); // Scan circuit description for schematic file name/s for( sz1=0; sz1<m_osaNetLst.GetCount( ); sz1++ ) { os1 = m_osaNetLst.Item( sz1 ); if( os1.IsEm...
false
false
false
false
false
0
glob_create(const char *zPatternList){ int nList; /* Size of zPatternList in bytes */ int i; /* Loop counters */ Glob *p; /* The glob being created */ char *z; /* Copy of the pattern list */ char delimiter; /* '\'' or '\"' or 0 */ if( zPatternList==0 || zPatternLi...
false
false
false
false
false
0
trace_magic_trampoline(struct compilation_unit *cu) { if (!cu_matches_regex(cu)) return; trace_printf("jit_magic_trampoline: ret0=%p, ret1=%p: %s.%s #%d\n", __builtin_return_address(1), __builtin_return_address(2), cu->method->class->name, cu->method->name, cu->method->metho...
false
false
false
false
false
0
gst_rtsp_connection_write (GstRTSPConnection * conn, const guint8 * data, guint size, GTimeVal * timeout) { guint offset; gint retval; GstClockTime to; GstRTSPResult res; g_return_val_if_fail (conn != NULL, GST_RTSP_EINVAL); g_return_val_if_fail (data != NULL || size == 0, GST_RTSP_EINVAL); g_return_...
false
false
false
false
false
0
get_vision_status(const struct player *me, const struct player *them) { if (me && them && gives_shared_vision(me, them)) { if (gives_shared_vision(them, me)) { return Q_("?vision:Both"); } else { return Q_("?vision:To Them"); } } else if (me && them && gives_shared_vision(them, me))...
false
false
false
false
false
0
AddSrcBandDescription( GDALDataType eDataType, int nBlockXSize, int nBlockYSize) { SetBand(nBands + 1, new GDALProxyPoolRasterBand(this, nBands + 1, eDataType, nBlockXSize, nBlockYSize)); }
false
false
false
false
false
0
__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; char warning[200]; py_module = __Pyx_ImportModule(module_name); if (!py_module) goto bad; #if PY_MAJOR_VERSION < 3 ...
false
false
false
false
false
0
output_stored_text() { register int c; register FILE *in, *out; register int state; /* 0=middle of line, 1=start of line, 2=seen '#' */ state = 1; fclose(text_file); text_file = fopen(text_file_name, "r"); if (text_file == NULL) open_error(text_file_name); in = text_file; if ((c = ...
false
false
false
false
true
1
sanitize_dlt_linux_sll(const Packet& pkt) { if ( pkt.header.caplen < 16 ) return -1; uint16_t p = ntohs(*reinterpret_cast<uint16_t*>(pkt.data + 14)); if ( p != 0x0800 /* && p != 0x86dd */ ) // Not IP. return -2; // Zero out link-layer address-length and address. memset(pkt.data + 4, 0, 10); return 16; ...
false
false
false
false
false
0
resize_z_stack(int32_t added_capacity) { int index_position; size_t offset; if (added_capacity == 0) return; TRACE_LOG("Enlarging stack capacity by %d entries.\n", (int)added_capacity); // We'll have to remember the count of elements currently on the stack. // This is required since a call to realloc...
false
false
false
false
false
0
isGuaranteedToExecuteForEveryIteration(const Instruction *I, const Loop *L) { // The loop header is guaranteed to be executed for every iteration. // // FIXME: Relax this constraint to cover all basic blocks that are // guaranteed to be executed at every iterati...
false
false
false
false
false
0
dynv_set(struct dynvSystem* dynv_system, const char* handler_name, const char* variable_path, const void* value){ string path(variable_path); size_t found; struct dynvSystem* dlevel = dynv_system_ref(dynv_system); for (;;){ found = path.find('.'); if (found != string::npos){ struct dynvSystem* dlevel_new; ...
false
false
false
false
false
0
rb_big2dbl(x) VALUE x; { double d = 0.0; long i = RBIGNUM(x)->len; BDIGIT *ds = BDIGITS(x); while (i--) { d = ds[i] + BIGRAD*d; } if (isinf(d)) { rb_warn("Bignum out of Float range"); d = HUGE_VAL; } if (!RBIGNUM(x)->sign) d = -d; return d; }
false
false
false
false
false
0
jbig2_decode_pattern_dict(Jbig2Ctx *ctx, Jbig2Segment *segment, const Jbig2PatternDictParams *params, const byte *data, const size_t size, Jbig2ArithCx *GB_stats) { Jbig2PatternDict *hd = NULL; Jbig2Image *image = NULL; Jbig2GenericRegionParams rpa...
false
false
false
false
false
0
afp_getfiledirparms(struct afp_volume *volume, unsigned int did, unsigned int filebitmap, unsigned int dirbitmap, const char * pathname, struct afp_file_info *fpp) { struct { struct dsi_header dsi_header __attribute__((__packed__)); uint8_t command; uint8_t pad; uint16_t volid; uint32_t did; uint16_t file...
false
false
false
false
false
0
checkcondition_str(void *checkval, QueryOperand *val) { CHKVAL *chkval = (CHKVAL *) checkval; WordEntry *StopLow = chkval->arrb; WordEntry *StopHigh = chkval->arre; WordEntry *StopMiddle = StopHigh; int difference = -1; bool res = false; /* Loop invariant: StopLow <= val < StopHigh */ while (StopLow <...
false
false
false
false
false
0
cmd_codesinfo() { coderec *code; int num_cols = 4; int col, row, num_rows, tot; char line[160]; context; line[0] = 0; say("%d server codes.",Codes->num_codes); say(""); say("Hit Code Hit Code Hit Code Hit Code"); say("------ ------- ------ ------- ------ ------- ------ -----...
true
true
false
false
false
1
clipPoly(const float* in, int n, float* out, float pnx, float pnz, float pd) { float d[12]; for (int i = 0; i < n; ++i) d[i] = pnx*in[i*3+0] + pnz*in[i*3+2] + pd; int m = 0; for (int i = 0, j = n-1; i < n; j=i, ++i) { bool ina = d[j] >= 0; bool inb = d[i] >= 0; i...
false
false
false
false
false
0
fail_request(struct mrpc_event *event, mrpc_status_t err) { struct mrpc_message *request=event->msg; _mrpc_release_event(event); if (request->hdr.cmd >= 0) { if (mrpc_send_reply_error(request->conn->set->protocol, request->hdr.cmd, request, err)) mrpc_free_message(request); } else { mrpc_free_message(r...
false
false
false
false
false
0
ubuntu_online_accounts_config_sources (EUbuntuOnlineAccounts *extension, ESource *source, AgAccount *ag_account) { ESourceRegistryServer *server; ECollectionBackend *backend; GHashTable *account_services; GList *list, *link; account_ser...
false
false
false
false
false
0
__db_dump_pp(dbp, subname, callback, handle, pflag, keyflag) DB *dbp; const char *subname; int (*callback) __P((void *, const void *)); void *handle; int pflag, keyflag; { DB_THREAD_INFO *ip; ENV *env; int handle_check, ret, t_ret; env = dbp->env; DB_ILLEGAL_BEFORE_OPEN(dbp, "DB->dump"); ENV_ENTER(env, ip...
false
false
false
true
false
1
print_error() const { Struct * s = (Struct *) p; if(s->theStatus != OK) { std::cerr << error_name() << std::endl; } return; }
false
false
false
false
false
0
ciintf_read_attribute_mem(struct dvb_ca_en50221 *ca, int slot, int address) { struct budget_ci *budget_ci = (struct budget_ci *) ca->data; if (slot != 0) return -EINVAL; return ttpci_budget_debiread(&budget_ci->budget, DEBICICAM, DEBIADDR_ATTR | (address & 0xfff), 1, 1, 0); }
false
false
false
false
false
0
spot_oversized_zone(zone_t *zone) { g_assert(uint_is_positive(zone->zn_refcnt)); g_assert(zone->zn_cnt <= zone->zn_blocks); if (!zlock_try(zone)) return; /* * It's not possible to create this object at zn_create() time because * there is a danger of deadlocking from walloc() when the size of * the objects...
false
false
false
false
false
0
gammq(double a, double x) { double gamser, gammcf, gln; if (x < 0.0 || a <= 0.0) { printf("*** error %s: invalid arguments\n",__func__); exit(1); } if (x < (a+1.0)) { gser(&gamser,a,x,&gln); return 1.0-gamser; } else { gcf(&gammcf,a,x,&gln); return gammcf; } }
false
false
false
false
false
0
do_stat(int argc, char **argv, char **result) { char *filename, *fmt; struct stat statbuf; fmt = argv[1]; filename = argv[2]; if (stat(filename, &statbuf) == -1) { *result = strdup(strerror(errno)); return(-1); } return(stat_to_text(filename, fmt, &statbuf, result)); }
false
false
false
false
false
0
Rewind() { if ( ! this->InputStream ) //need to already have an open file { vtkGenericWarningMacro(<<"No input file opened to rewind..."); } this->InputStream->clear(); this->InputStream->seekg(0); }
false
false
false
true
false
1