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
sha256_init(sha256_ctx *ctx) { #ifndef UNROLL_LOOPS int i; for (i = 0; i < 8; i++) { ctx->h[i] = sha256_h0[i]; } #else ctx->h[0] = sha256_h0[0]; ctx->h[1] = sha256_h0[1]; ctx->h[2] = sha256_h0[2]; ctx->h[3] = sha256_h0[3]; ctx->h[4] = sha256_h0[4]; ctx->h[5] = sha256_h0[5]; ctx->h[6]...
false
false
false
false
false
0
snippets_editor_set_snippet_new (SnippetsEditor *snippets_editor) { SnippetsEditorPrivate *priv = NULL; /* Assertions */ g_return_if_fail (ANJUTA_IS_SNIPPETS_EDITOR (snippets_editor)); priv = ANJUTA_SNIPPETS_EDITOR_GET_PRIVATE (snippets_editor); /* Delete the old snippet */ if (ANJUTA_IS_SNIPPET (priv->snippet...
false
false
false
false
false
0
solve (CoinWorkDouble * region) { if (!whichDense_) { solve(region, 3); } else { // dense columns int i; solve(region, 1); // do change; int numberDense = dense_->numberRows(); CoinWorkDouble * change = new CoinWorkDouble[numberDense]; ...
false
false
false
false
false
0
ext_xml_parse(const char **retp, int len, extvec_t *exv, int exvcnt) { const char *p = *retp; const char *end = &p[len]; const char *lastp = p; /* Last parsed point */ extdesc_t *d; g_assert(exvcnt > 0); g_assert(exv->opaque == NULL); for (/* NOTHING */; p != end; p++) { uchar c = *p; if (c == '\0' || c...
false
false
false
false
false
0
cycleColors(const MSUnsignedLongVector& colors_) { MSBoolean redrawNecessary=MSFalse; if (cycle()!=0&&cycle()->count()<cycle()->numCycles()) { redrawNecessary=MSTrue; } removeCycle(); _cycleColors=colors_; if (redrawNecessary==MSTrue) drawFieldValue(); }
false
false
false
false
false
0
ompi_rb_tree_traverse(ompi_rb_tree_t *tree, ompi_rb_tree_condition_fn_t cond, ompi_rb_tree_action_fn_t action) { if ((cond == NULL) || (action == NULL)) { return(OMPI_ERROR); } inorder_traversal(tree, cond, action, tree->root_ptr->left); retu...
false
false
false
false
false
0
gth_file_store_get_prev_visible (GthFileStore *file_store, GtkTreeIter *iter) { GthFileRow *row; if ((iter == NULL) || (iter->user_data == NULL)) return FALSE; g_return_val_if_fail (VALID_ITER (iter, file_store), FALSE); row = (GthFileRow*) iter->user_data; if (row->pos == 0) return FALSE; if (ite...
false
false
false
false
false
0
cp_parser_objc_declaration (cp_parser* parser, tree attributes) { /* Try to figure out what kind of declaration is present. */ cp_token *kwd = cp_lexer_peek_token (parser->lexer); if (attributes) switch (kwd->keyword) { case RID_AT_ALIAS: case RID_AT_CLASS: case RID_AT_END: error_at (kwd->locati...
false
false
false
false
false
0
ffs_embed (int *start_sector, int needed_sectors) { /* XXX: I don't know if this is really correct. Someone who is familiar with BSD should check for this. */ if (needed_sectors > 14) return 0; *start_sector = 1; #if 1 /* FIXME: Disable the embedding in FFS until someone checks if the code abo...
false
false
false
false
false
0
evalvargs(parms,argptr,n) truc parms; truc *argptr; int n; { int i, flg; unsigned depth; truc *ptr; depth = basePtr - ArgStack; WORKpush(parms); for(i=0; i<n; i++) { ptr = VECTORPTR(workStkPtr) + i; if(*FLAGPTR(ptr) == fSPECIAL1) { /* es handelt sich um einen Variabl...
false
false
false
false
false
0
ide_acpi_exec_tfs(ide_drive_t *drive) { int ret; unsigned int gtf_length; unsigned long gtf_address; unsigned long obj_loc; DEBPRINT("call get_GTF, drive=%s port=%d\n", drive->name, drive->dn); ret = do_drive_get_GTF(drive, &gtf_length, &gtf_address, &obj_loc); if (ret < 0) { DEBPRINT("get_GTF error (%d)\n"...
false
false
false
false
false
0
tab_completion_get_text(TabCompData *td) { gchar *text; text = g_strdup(gtk_entry_get_text(GTK_ENTRY(td->entry))); if (text[0] == '~') { gchar *t = text; text = expand_tilde(text); g_free(t); } return text; }
false
false
false
false
false
0
camel_lock_helper_unlock (gint lockid) { struct _CamelLockHelperMsg *msg; gint res = -1; gint retry = 3; gint len; d (printf ("unlocking lock id %d\n", lockid)); LOCK (); /* impossible to unlock if we haven't locked yet */ if (lock_helper_pid == -1) { UNLOCK (); return -1; } msg = alloca (sizeof (*msg...
false
false
false
false
false
0
contour (double x[], int i, int j, int rows, int cols, double v[], int nv) /***** contour x1 is lower left edge, x2 upper left, x3 upper right, x4 lower right value at a square. does contour plot of the nv values in v. r and c is needed to compute the position of the square. *****/ { int k,n,m; double sr[5],sc[...
false
false
false
false
false
0
emboss_initprobcat(AjPFloat arrayvals, long categs, double *probcat) { /* input probabilities of rate categories for HMM rates */ long i; long maxi; double probsum = 0.0; if (!categs) return probsum; maxi = ajFloatLen(arrayvals); if (maxi != categs) ajWarn("Category probabilities read %d value...
false
false
false
false
false
0
ast_security_event_get_required_ies( const enum ast_security_event_type event_type) { if (check_event_type(event_type)) { return NULL; } return sec_events[event_type].required_ies; }
false
false
false
false
false
0
icompare(const std::string& str, std::string::size_type pos, std::string::size_type n, const std::string::value_type* ptr) { poco_check_ptr (ptr); std::string::size_type sz = str.size(); if (pos > sz) pos = sz; if (pos + n > sz) n = sz - pos; TextIterator uit(str.begin() + pos, str.begin() + pos + n, utf8); Text...
false
false
false
false
false
0
get_chip_type(struct pci_dev *pdev, u32 pl_rev) { u16 device_id; /* Retrieve adapter's device ID */ pci_read_config_word(pdev, PCI_DEVICE_ID, &device_id); switch (device_id >> 12) { case CHELSIO_T4: return CHELSIO_CHIP_CODE(CHELSIO_T4, pl_rev); case CHELSIO_T5: return CHELSIO_CHIP_CODE(CHELSIO_T5, pl_rev); ...
false
false
false
false
false
0
PyInit__lsprof(void) { PyObject *module, *d; module = PyModule_Create(&_lsprofmodule); if (module == NULL) return NULL; d = PyModule_GetDict(module); if (PyType_Ready(&PyProfiler_Type) < 0) return NULL; PyDict_SetItemString(d, "Profiler", (PyObject *)&PyProfiler_Type); if (!...
false
false
false
false
false
0
meh_update_cipher(MehCipher cipher, const unsigned char* in, unsigned char* out, size_t len, size_t* got) { meh_error_t error; switch (cipher->id) { case MEH_RC4: error = meh_update_rc4(cipher->state.rc4, in, out, len, got); break; ...
false
false
false
false
false
0
InitTextDisplay (const char* sample, int samplen) { _display = new TextDisplay(true); _display->LineHeight(_lineHt); _display->TabWidth(_tabWidth); if (samplen > 0) { int beg, end, lineSize, nextBeg, line = 0; for (beg = 0; beg < samplen; beg = nextBeg) { GetLine(sample, sa...
false
false
false
false
false
0
mpfr_divhigh_n_basecase (mpfr_limb_ptr qp, mpfr_limb_ptr np, mpfr_limb_srcptr dp, mp_size_t n) { mp_limb_t qh, d1, d0, dinv, q2, q1, q0; mpfr_pi1_t dinv2; np += n; if ((qh = (mpn_cmp (np, dp, n) >= 0))) mpn_sub_n (np, np, dp, n); /* now {np, n} is less than D={dp, n}, which imp...
false
false
false
false
false
0
Irun (int argc, lvar_t *argv) { Psrc_t src; char *s; Tobj co; if ((s = Tgetstring (argv[0].o))) { src.flag = CHARSRC, src.s = s, src.fp = NULL; src.tok = -1, src.lnum = 1; while ((co = Punit (&src))) Eoktorun = TRUE, Eunit (co); } return L_SUCCESS; }
false
false
false
false
false
0
cd_client_get_devices_by_kind (CdClient *client, CdDeviceKind kind, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GSimpleAsyncResult *res; g_return_if_fail (CD_IS_CLIENT (client)); g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (can...
false
false
false
false
false
0
acl_create_entry(acl_t *acl_p, acl_entry_t *entry_p) { acl_obj *acl_obj_p; acl_entry_obj *entry_obj_p; if (!acl_p || !entry_p) { if (entry_p) *entry_p = NULL; errno = EINVAL; return -1; } acl_obj_p = ext2int(acl, *acl_p); if (!acl_obj_p) return -1; entry_obj_p = __acl_create_entry_obj(acl_obj_p); if ...
false
false
false
false
false
0
createGraph() { if (!_item) return; if (_graphCreated) return; _graphCreated = true; if ((_item->type() == ProfileContext::Function) ||(_item->type() == ProfileContext::FunctionCycle)) { TraceFunction* f = (TraceFunction*) _item; double incl = f->inclusive()->subCost(_eventType); _realFuncLimit...
false
false
false
false
false
0
maybe_duplicate_eh_stmt_fn (struct function *new_fun, gimple new_stmt, struct function *old_fun, gimple old_stmt, struct pointer_map_t *map, int default_lp_nr) { int old_lp_nr, new_lp_nr; void **slot; if (!stmt_could_throw_p (new_stmt)) return false; old_lp_nr = lookup_stmt_eh_lp_fn (old_fun...
false
false
false
false
false
0
ReflectSimPointer(G_Synset ss, G_Synset tss, short wdnum, int fanss) { Pointer p; Synonym syn; /* 'fanss' is used to make sure we've found a pointer to the right synset. In a cluster structure, head synsets have similar pointers to all fan synsets, and all fan synsets have a simi...
false
false
false
false
false
0
click_static_initialize() { String::static_initialize(); cp_va_static_initialize(); ErrorHandler::static_initialize(new FileErrorHandler(stderr, "")); }
false
false
false
false
false
0
min (const cl_SF& x, const cl_SF& y) { return (x <= y ? x : y); } }
false
false
false
false
false
0
utf8_to_ucs4_oneatatime(int c, CBUF_S *cb, UCS *obuf, int *obufwidth) { int width = 0, outchars = 0; if(!(cb && cb->cbufp)) return(0); if(cb->cbufp < cb->cbuf+sizeof(cb->cbuf)){ unsigned char *inputp; unsigned long remaining_octets; UCS ucs; *cb->cbufp++ = (unsigned char) c; inputp = cb->...
false
false
false
false
false
0
lgl_template_dup (const lglTemplate *orig_template) { lglTemplate *template; GList *p; lglTemplateFrame *frame; g_return_val_if_fail (orig_template, NULL); template = lgl_template_new (orig_template->brand, orig_temp...
false
false
false
false
false
0
setUsefulStuff (CbcModel * model, int deterministic, CbcModel * baseModel, CbcThread * master, void *& masterMutex) { baseModel_ = baseModel; thisModel_ = model; deterministic_ = deterministic; threadStuff_.setUsefulStuff(&master->threadStuff_, maste...
false
false
false
false
false
0
cmd_erase(char **arg) { const char *type_text = get_arg(arg); const char *seg_text = get_arg(arg); device_erase_type_t type = DEVICE_ERASE_MAIN; address_t segment = 0; if (seg_text && expr_eval(stab_default, seg_text, &segment) < 0) { printc_err("erase: invalid expression: %s\n", seg_text); return -1; } if...
false
false
false
false
false
0
get_plain_pw(request_rec *r, char *user, char *auth_pwfile) { ap_configfile_t *f; char l[MAX_STRING_LEN]; const char *rpw, *w; apr_status_t status; if ((status = ap_pcfg_openfile(&f, r->pool, auth_pwfile)) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, ...
false
false
false
false
false
0
sh_eth_dev_exit(struct net_device *ndev) { struct sh_eth_private *mdp = netdev_priv(ndev); int i; /* Deactivate all TX descriptors, so DMA should stop at next * packet boundary if it's currently running */ for (i = 0; i < mdp->num_tx_ring; i++) mdp->tx_ring[i].status &= ~cpu_to_edmac(mdp, TD_TACT); /* Disa...
false
false
false
false
false
0
glade_widget_dup_properties (GladeWidget * dest_widget, GList * template_props, gboolean as_load, gboolean copy_parentless, gboolean exact) { GList *list, *properties = NULL; for (list = template_props; list && list->data; list = list->next) { Gla...
false
false
false
false
false
0
print_version( int die ) { const char **p = fd_version; for ( ; *p; p++ ) fprintf( stderr, "%s\n", rm_rcs_kw( *p ) ); if ( die ) exit( 0 ); }
false
false
false
false
false
0
elm_6node_triangle_shape_functions() { double u,v; int i,j; for( i=0; i<6; i++ ) { u = NodeU[i]; v = NodeV[i]; A[i][0] = 1; A[i][1] = u; A[i][2] = v; A[i][3] = u*v; A[i][4] = u*u; A[i][5] = v*v; } lu_mtrinv( ...
false
false
false
false
false
0
bmg160_read_event(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, enum iio_event_info info, int *val, int *val2) { struct bmg160_data *data = iio_priv(indio_dev); *val2 = 0; switch (info) { case IIO_EV_INFO...
false
false
false
false
false
0
qtrle_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size, void *data) { QtrleEncContext * const s = avctx->priv_data; AVFrame *pict = data; AVFrame * const p = &s->frame; int chunksize; *p = *pict; if (buf_size < s->max_buf_size) { /* Upper bound check for compressed data *...
false
false
false
false
false
0
brasero_file_chooser_set_context (BraseroLayoutObject *object, BraseroLayoutType type) { BraseroFileChooser *self; self = BRASERO_FILE_CHOOSER (object); if (type == self->priv->type) return; if (type == BRASERO_LAYOUT_AUDIO) gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (self->priv->chooser), ...
false
false
false
false
false
0
RequestUpdateExtent ( vtkInformation * vtkNotUsed(request), vtkInformationVector **inputVector, vtkInformationVector *outputVector) { // get the info objects vtkInformation* outInfo = outputVector->GetInformationObject(0); vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); int idx; int w...
false
false
false
false
false
0
strtrim(char *str, char *trim_chars, int limit) { int n; char *p; p = str + strlen(str) - 1; n = 0; #ifdef NOTDEF while ((!limit || n < limit) && p >= str && strchr(trim_chars, (int) *p) != NULL) p--, n++; #else while ((!limit || n < limit) && p >= str && strtr_char((int) *p, trim_chars, 0)) p--, n...
false
false
false
false
false
0
_rtl92d_phy_patha_fill_iqk_matrix(struct ieee80211_hw *hw, bool iqk_ok, long result[][8], u8 final_candidate, bool txonly) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); u32 oldval_0, val_x, tx0_a, reg; long val_y, tx0_c; bool is2t = IS_92D_SINGLEPHY(r...
false
false
false
false
false
0
via_driver_load(struct drm_device *dev, unsigned long chipset) { drm_via_private_t *dev_priv; int ret = 0; dev_priv = kzalloc(sizeof(drm_via_private_t), GFP_KERNEL); if (dev_priv == NULL) return -ENOMEM; idr_init(&dev_priv->object_idr); dev->dev_private = (void *)dev_priv; dev_priv->chipset = chipset; pci...
false
false
false
false
false
0
restoreDialogSize() { Plasma::Dialog *dialog = dialogPtr.data(); if (!dialog) { return; } Corona *corona = qobject_cast<Corona *>(q->scene()); if (!corona) { return; } KConfigGroup sizeGroup = popupConfigGroup(); int preferredWidth = 0; int preferredHeight = 0; ...
false
false
false
false
false
0
activate_lvs(struct cmd_context *cmd, struct dm_list *lvs, unsigned exclusive) { struct dm_list *lvh; struct lv_list *lvl; dm_list_iterate_items(lvl, lvs) { if (!exclusive && !lv_is_active_exclusive(lvl->lv)) { if (!activate_lv(cmd, lvl->lv)) { log_error("Failed to activate %s", lvl->lv->name); return ...
false
false
false
false
false
0
codetestset (CompileState *compst, Charset *cs, int e) { if (e) return NOINST; /* no test */ else { int c = 0; Opcode op = charsettype(cs->cs, &c); switch (op) { case IFail: return addoffsetinst(compst, IJmp); /* always jump */ case IAny: return addoffsetinst(compst, ITestAny); case ...
false
false
false
false
false
0
spoil_artifact(const char *fname) { int i, j; object_type *i_ptr; object_type object_type_body; char buf[1024]; /* Build the filename */ path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname); fh = file_open(buf, MODE_WRITE, FTYPE_TEXT); /* Oops */ if (!fh) { msg("Cannot create spoiler file."); return...
false
false
false
false
false
0
setup_waterlevel() { register int x, y; register int xskip, yskip; register int water_glyph = cmap_to_glyph(S_water); /* ouch, hardcoded... */ xmin = 3; ymin = 1; xmax = 78; ymax = 20; /* set hero's memory to water */ for (x = xmin; x <= xmax; x++) for (y = ymin; y <= ymax; y++) levl[x][y].glyph = wa...
false
false
false
false
false
0
compute_nucleotides_values(GT_UNUSED void *key, void *value, void *data, GT_UNUSED GtError *err) { GtStreamEvaluator *se = (GtStreamEvaluator*) data; Slot *slot = (Slot*) value; GtBittab *tmp; gt_error_check(err); gt_assert(key && value && data); /* add ``out of range''...
false
false
false
false
false
0
skeleton_open ( struct net_device *netdev ) { struct skeleton_nic *skel = netdev->priv; DBGC ( skel, "SKELETON %p does not yet support open\n", skel ); return -ENOTSUP; }
false
false
false
false
false
0
regrename_init (bool insn_info) { gcc_obstack_init (&rename_obstack); insn_rr.create (0); if (insn_info) insn_rr.safe_grow_cleared (get_max_uid ()); }
false
false
false
false
false
0
ab_account_longname(const AB_ACCOUNT *ab_acc) { gchar *bankname; gchar *result; const char *ab_bankname, *bankcode; g_return_val_if_fail(ab_acc, NULL); ab_bankname = AB_Account_GetBankName(ab_acc); bankname = ab_bankname ? gnc_utf8_strip_invalid_strdup(ab_bankname) : NULL; bankcode = AB_Ac...
false
false
false
false
false
0
LogCheckpointStart(int flags, bool restartpoint) { elog(LOG, "%s starting:%s%s%s%s%s%s%s%s", restartpoint ? "restartpoint" : "checkpoint", (flags & CHECKPOINT_IS_SHUTDOWN) ? " shutdown" : "", (flags & CHECKPOINT_END_OF_RECOVERY) ? " end-of-recovery" : "", (flags & CHECKPOINT_IMMEDIATE) ? " immediate" : "",...
false
false
false
false
false
0
genie_file_mode (NODE_T * p) { A68_REF name; char *buffer; RESET_ERRNO; POP_REF (p, &name); CHECK_INIT (p, INITIALISED (&name), MODE (STRING)); buffer = (char *) malloc ((size_t) (1 + a68_string_size (p, name))); if (buffer == NO_TEXT) { diagnostic_node (A68_RUNTIME_ERROR, p, ERROR_OUT_OF_CORE); e...
false
false
false
false
false
0
no_bus_new_connection_callback (DBusServer *server, DBusConnection *new_connection, void *user_data) { ServerData *sd = user_data; dbus_connection_ref (new_connection); dbus_connection_setup_with_g_main (new_connection, NULL); ...
false
false
false
false
false
0
_dxfCopySearchGrid(Grid src) { int i; Grid dst; dst = (Grid)DXAllocate(sizeof(struct grid)); if (! dst) return NULL; memcpy((char *)dst, (char *)src, sizeof(struct grid)); for (i = 0; i < MAXGRID; i++) if (dst->gridlevels[i].bucketArray) DXReference((Object)dst->gridlevels[i].bucketAr...
false
true
false
false
false
1
build_x_arrow (location_t loc, tree expr, tsubst_flags_t complain) { tree orig_expr = expr; tree type = TREE_TYPE (expr); tree last_rval = NULL_TREE; vec<tree, va_gc> *types_memoized = NULL; if (type == error_mark_node) return error_mark_node; if (processing_template_decl) { if (type_depende...
false
false
false
false
false
0
translate_tiling(bool old_tiled_w, bool new_tiled_w) { if (old_tiled_w == new_tiled_w) return; /* In the code that follows, we can safely assume that S = 0, because W * tiling formats always use IMS layout. */ assert(s_is_zero); if (new_tiled_w) { /* Given X and Y coordinates that desc...
false
false
false
false
false
0
initio_sync_done(struct initio_host * host) { int i; host->active_tc->flags |= TCF_SYNC_DONE; if (host->msg[3]) { host->active_tc->js_period |= host->msg[3]; for (i = 0; i < 8; i++) { if (initio_rate_tbl[i] >= host->msg[2]) /* pick the big one */ break; } host->active_tc->js_period |= (i << 4); ho...
false
false
false
false
false
0
Java_ncsa_hdf_hdf5lib_H5_H5Pmodify_1filter (JNIEnv *env, jclass clss, jint plist, jint filter, jint flags, jlong cd_nelmts, jintArray cd_values) { herr_t status; jint *cd_valuesP; jboolean isCopy; if (cd_values == NULL) { h5nullArgument(env, "H5Pmodify_filter: cd_values is NULL"); ...
false
false
false
false
false
0
vx_query_hbuffer_size(struct vx_core *chip, struct vx_pipe *pipe) { int result; struct vx_rmh rmh; vx_init_rmh(&rmh, CMD_SIZE_HBUFFER); vx_set_pipe_cmd_params(&rmh, pipe->is_capture, pipe->number, 0); if (pipe->is_capture) rmh.Cmd[0] |= 0x00000001; result = vx_send_msg(chip, &rmh); if (! result) result = rm...
false
false
false
false
false
0
SubnMgtAssignLids (IBPort *p_smNodePort, unsigned int lmc = 0) { list<IBPort *> thisStepPorts; list<IBPort *> nextStepNodePorts; set<IBNode *, less<IBNode *> > visited; unsigned int i; IBFabric *p_fabric = p_smNodePort->p_node->p_fabric; IBPort *p_port; IBNode *p_node; IBPort *p_remPort;...
false
false
false
false
false
0
add_chains(const std::vector<string>& new_chains) { // -------- DBC_REQUIRE(is_selected() == true); DBC_REQUIRE(connected_chainsetup() != selected_chainsetup()); // -------- selected_chainsetup_repp->add_new_chains(new_chains); selected_chainsetup_repp->select_chains(new_chains); ECA_LOG_MSG(ECA_LOGGER:...
false
false
false
false
false
0
virtio_pci_remove(struct pci_dev *pci_dev) { struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); struct device *dev = get_device(&vp_dev->vdev.dev); unregister_virtio_device(&vp_dev->vdev); if (vp_dev->ioaddr) virtio_pci_legacy_remove(vp_dev); else virtio_pci_modern_remove(vp_dev); pci_disable_dev...
false
false
false
false
false
0
PushRootPath(const fstring& path) { fstring absolutePath = GetCurrentUri().MakeAbsolute(path); if (absolutePath.length() > 0 && absolutePath.back() != '\\' && absolutePath.back() != '/') absolutePath.append((fchar) '/'); pathStack.push_back(FUUri(absolutePath)); }
false
false
false
false
false
0
ApiNamedPropertyAccess(const char* tag, JSObject* holder, Object* name) { ASSERT(name->IsString()); if (!log_->IsEnabled() || !FLAG_log_api) return; String* class_name_obj = holder->class_name(); SmartArrayPointer<char> class_name = c...
false
false
false
false
false
0
pool_valid (void* item) { Pool *pool; char *ptr, *beg, *end; ptr = item; /* Find which block this one belongs to */ for (pool = EGG_SECURE_GLOBALS.pool_data; pool; pool = pool->next) { beg = (char*)pool->items; end = (char*)pool + pool->length - sizeof (Item); if (ptr >= beg && ptr <= end) return (pool-...
false
false
false
false
false
0
do_checkpoint(MFILE& mf, int nchars) { int retval; string resolved_name; FILE* f = fopen("temp", "w"); if (!f) return 1; fprintf(f, "%d", nchars); fclose(f); retval = mf.flush(); if (retval) return retval; boinc_resolve_filename_s(CHECKPOINT_FILE, resolved_name); retval = boinc...
false
false
false
false
false
0
eni_send(struct atm_vcc *vcc,struct sk_buff *skb) { enum enq_res res; DPRINTK(">eni_send\n"); if (!ENI_VCC(vcc)->tx) { if (vcc->pop) vcc->pop(vcc,skb); else dev_kfree_skb(skb); return -EINVAL; } if (!skb) { printk(KERN_CRIT "!skb in eni_send ?\n"); if (vcc->pop) vcc->pop(vcc,skb); return -EINVAL; } ...
false
false
false
false
false
0
stoi (unsigned char* s, int len) { unsigned long val = 0; unsigned long Cnt = 0; if (len > 4) return 0; while (Cnt < len) val = (val << 8) + s[Cnt++]; return val; }
true
true
false
false
false
1
load_debug_section (enum dwarf_section_display_enum debug, void *file) { struct dwarf_section *section = &debug_displays [debug].section; bfd *abfd = (bfd *) file; asection *sec; /* If it is already loaded, do nothing. */ if (section->start != NULL) return 1; /* Locate the debug section. */ sec = ...
false
false
false
false
false
0
RecoverPreparedTransactions(void) { char dir[MAXPGPATH]; DIR *cldir; struct dirent *clde; snprintf(dir, MAXPGPATH, "%s", TWOPHASE_DIR); cldir = AllocateDir(dir); while ((clde = ReadDir(cldir, dir)) != NULL) { if (strlen(clde->d_name) == 8 && strspn(clde->d_name, "0123456789ABCDEF") == 8) { Trans...
false
false
false
false
false
0
array_get_isnull(const bits8 *nullbitmap, int offset) { if (nullbitmap == NULL) return false; /* assume not null */ if (nullbitmap[offset / 8] & (1 << (offset % 8))) return false; /* not null */ return true; }
false
false
false
false
false
0
bpmnode_compare(const void* a, const void* b) { int wa = ((const BPMNode*)a)->weight; int wb = ((const BPMNode*)b)->weight; if(wa < wb) return -1; if(wa > wb) return 1; /*make the qsort a stable sort*/ return ((const BPMNode*)a)->index < ((const BPMNode*)b)->index ? 1 : -1; }
false
false
false
false
false
0
entry_in_cache(H5C_t * cache_ptr, int32_t type, int32_t idx) { hbool_t in_cache = FALSE; /* will set to TRUE if necessary */ test_entry_t * base_addr; test_entry_t * entry_ptr; H5C_cache_entry_t * test_ptr = NULL; HDassert( cache_ptr ); HDassert( ( 0 <= type ) && (...
false
false
false
true
false
1
calc_hist(const float4 *hist, int nhist, int n) { float *hist_part; int k, i = 0; float prev_interval = 0, next_interval; float frac; hist_part = (float *) palloc((n + 1) * sizeof(float)); /* * frac is a probability contribution for each interval between histogram * values. We have nhist - 1...
false
false
false
false
false
0
brcmf_flowring_delete_peer(struct brcmf_flowring *flow, int ifidx, u8 peer[ETH_ALEN]) { struct brcmf_bus *bus_if = dev_get_drvdata(flow->dev); struct brcmf_pub *drvr = bus_if->drvr; struct brcmf_flowring_hash *hash; struct brcmf_flowring_tdls_entry *prev; struct brcmf_flowring_tdls_entry *search; u32 i; u8 f...
false
false
false
false
false
0
build_addr(struct ipv6db_addr_t *a, uint64_t intf_id, struct in6_addr *addr) { memcpy(addr, &a->addr, sizeof(*addr)); if (a->prefix_len <= 64) *(uint64_t *)(addr->s6_addr + 8) = intf_id; else *(uint64_t *)(addr->s6_addr + 8) |= intf_id & ((1 << (128 - a->prefix_len)) - 1); }
false
false
false
false
false
0
rsi_usb_rx_thread(struct rsi_common *common) { struct rsi_hw *adapter = common->priv; struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev; int status; do { rsi_wait_event(&dev->rx_thread.event, EVENT_WAIT_FOREVER); if (atomic_read(&dev->rx_thread.thread_done)) goto out; mutex_lock(&co...
false
false
false
false
false
0
BilinearInterpFloat(const cmsFloat32Number Input[], cmsFloat32Number Output[], const cmsInterpParams* p) { # define LERP(a,l,h) (cmsFloat32Number) ((l)+(((h)-(l))*(a))) # define DENS(i,j) (LutTable[(i)+(j)+OutChan]) const cms...
false
false
false
false
false
0
DumpAddressMap(string* result) { *result += "\nMAPPED_LIBRARIES:\n"; // We keep doubling until we get a fit const size_t old_resultlen = result->size(); for (int amap_size = 10240; amap_size < 10000000; amap_size *= 2) { result->resize(old_resultlen + amap_size); bool wrote_all = false; const int by...
false
false
false
false
false
0
isValidCV(ConSeq c, VowelSeq v) { if (c == cs_nil || v == vs_nil) return true; VowelSeqInfo & vInfo = VSeqList[v]; if ((c == cs_gi && vInfo.v[0] == vnl_i) || (c == cs_qu && vInfo.v[0] == vnl_u)) return false; // gi doesn't go with i, qu doesn't go with u if (c == cs_k) { ...
false
false
false
false
false
0
tracker_ontologies_get_uri_by_id (gint id) { g_return_val_if_fail (id != -1, NULL); return g_hash_table_lookup (id_uri_pairs, GINT_TO_POINTER (id)); }
false
false
false
false
false
0
__alloc_1instdce_prevval(struct dcevnt_t *dcep) { int32 dcewid, totchars; struct net_t *np; struct mod_t *ref_mdp; /* SJM 05/08/03 - dce expr can never be 1 inst - always var and never XMR */ /* DBG remove -- */ if (dcep->dce_expr != NULL) __misc_terr(__FILE__, __LINE__); /* --- */ np = dcep->dce_np; /* al...
false
false
false
false
false
0
afr_sh_set_timestamps (call_frame_t *frame, xlator_t *this) { afr_local_t *local = NULL; afr_private_t *priv = NULL; afr_self_heal_t *sh = NULL; local = frame->local; sh = &local->self_heal; priv = this->private; STACK_WIND_COOKIE (f...
false
false
false
false
false
0
H5Iget_name(hid_t id, char *name/*out*/, size_t size) { H5G_loc_t loc; /* Object location */ ssize_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE3("Zs", "ixz", id, name, size); /* Get object location */ if(H5G_loc(id, &loc) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CA...
false
false
false
false
false
0
ikt_object_end(void) { if (track) { track->rte_name = name; track_add_head(track); name = NULL; } else if (waypt) { waypt->shortname = name; waypt->description = text; waypt_add(waypt); name = NULL; text = NULL; } if (name) { xfree(name); name = NULL; } if (text) { ...
false
false
false
false
false
0
nfs3_fill_readdirp3res (readdirp3res *res, nfsstat3 stat, struct nfs3_fh *dirfh, uint64_t cverf, struct iatt *dirstat, gf_dirent_t *entries, count3 dircount, count3 maxcount, int is_eof, uint64_t deviceid) { post_op_...
false
false
false
false
false
0
system_get_full_string (const equation_system *sys, int tex) { static char sysstr[128]; const char *lstr = gretl_system_long_strings[sys->method]; if (sys->flags & SYSTEM_ITERATE) { if (tex) { sprintf(sysstr, A_("iterated %s"), A_(lstr)); } else { sprintf(sysstr, _("iterated %s"), _...
false
false
false
false
false
0
_tor_memdup(const void *mem, size_t len DMALLOC_PARAMS) { char *dup; tor_assert(len < SIZE_T_CEILING); tor_assert(mem); dup = _tor_malloc(len DMALLOC_FN_ARGS); memcpy(dup, mem, len); return dup; }
false
true
false
false
false
1
on_content_read (GObject *obj, GAsyncResult *result, gpointer user_data) { GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data); EvdHttpConnection *conn = EVD_HTTP_CONNECTION (obj); GError *error = NULL; gchar *content; gssize size; CallData *data; data ...
false
false
false
false
false
0
color_map_load_from_uri (char const *uri) { struct color_map_load_state state; GsfInput *input = go_file_open (uri, NULL); if (input == NULL) { g_warning ("[GogAxisColorMap]: Could not open %s", uri); return; } state.map = NULL; state.name = NULL; state.lang = NULL; state.langs = g_get_language_names (); ...
false
false
false
false
false
0
allocate() { allocated = 1; int n = atom->ntypes; memory->create(setflag,n+1,n+1,"pair:setflag"); for (int i = 1; i <= n; i++) for (int j = i; j <= n; j++) setflag[i][j] = 0; memory->create(cutsq,n+1,n+1,"pair:cutsq"); memory->create(cut_lj_read,n+1,n+1,"pair:cut_lj_read"); memory->create(cut...
false
false
false
false
false
0
_dbus_string_insert_byte (DBusString *str, int i, unsigned char byte) { DBUS_STRING_PREAMBLE (str); _dbus_assert (i <= real->len); _dbus_assert (i >= 0); if (!open_gap (1, real, i)) return FALSE; real->str[i] = byte; return TRUE; }
false
false
false
true
false
1
drop_privileges() { struct passwd *userp = 0; string user = option(OPT_USER); if (!user.empty()) { userp = getpwnam(user.c_str()); if (!userp) { Log::get(Log::ERROR) << "Unknown user \"" << user << "\"" << endl; return false; } } struct group *groupp ...
false
false
false
false
false
0
LoadFrom (Storage & storage) { unsigned int N=GetNFlags(); for (unsigned int i=0; i<N; i++) { SetFlag(i,false); } do { std::string flagName; XMLAdapter<std::string> adapter(flagName); if (!storage.Load(adapter)) break; unsigned int i = GetFlagPosition(flagName); SetFlag(i,true); } while (true); }
false
false
false
false
false
0
gfs2_qd_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) { LIST_HEAD(dispose); unsigned long freed; if (!(sc->gfp_mask & __GFP_FS)) return SHRINK_STOP; freed = list_lru_shrink_walk(&gfs2_qd_lru, sc, gfs2_qd_isolate, &dispose); gfs2_qd_dispose(&dispose); return freed; }
false
false
false
false
false
0