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
ensGeneTransform(EnsPGene gene, const AjPStr csname, const AjPStr csversion) { ajint failures = 0; ajint minstart = INT_MAX; ajint maxend = INT_MIN; ajuint psslength = 0U; AjIList iter = NULL; AjPList pss = NULL; const AjPList transcr...
false
false
false
false
false
0
ntru_leading(NtruBitStr *a, uint8_t num_bits) { uint16_t start_bit = (a->num_bytes-1)*8 + a->last_byte_bits - num_bits; uint16_t start_byte = start_bit / 8; uint8_t start_bit_in_byte = start_bit % 8; uint16_t sum = a->buf[start_byte] >> start_bit_in_byte; uint8_t shift = 8 - start_bit_in_byte; ...
false
false
false
false
false
0
vfs_open (const gchar *path, struct fuse_file_info *fi) { GFile *file; gint result = 0; debug_print ("vfs_open: %s\n", path); if (path_is_mount_list (path)) result = -EISDIR; else if ((file = file_from_full_path (path))) { GFileInfo *file_info; GError *error = NULL; file_info...
false
false
false
false
false
0
cdxml_color (GsfXMLIn *xin, xmlChar const **attrs) { CDXMLReadState *state = (CDXMLReadState *) xin->user_state; string red, green, blue; while (*attrs) { if (!strcmp ((char const *) *attrs, "r")) red = (char const *) attrs[1]; else if (!strcmp ((char const *) *attrs, "g")) green = (char const *) attrs[1];...
false
false
false
false
false
0
handle_client_initial_response_external_mech (DBusAuth *auth, DBusString *response) { /* We always append our UID as an initial response, so the server * doesn't have to send back an empty challenge to check whether we * want to specify an identity. i....
false
false
false
false
false
0
Mask_mask6(int width, const unsigned char *s, unsigned char *d) { MASKMAKER((((x*y)&1)+(x*y)%3)&1) }
false
false
false
false
false
0
L12() {register object *base=vs_base; register object *sup=base+VM12; VC12 vs_check; {object V31; V31=(base[0]); vs_top=sup; goto TTL; TTL:; if((CMPcar((V31)))==Cnil){ goto T73;} {frame_ptr fr; fr=frs_sch_catch(((object)VV[0])); if(fr==NULL) FEerror("The tag ~s is undefined.",1,((object)VV[0])); base[1]= ((...
false
false
false
false
false
0
mems_conflict_for_gcse_p (rtx dest, rtx setter ATTRIBUTE_UNUSED, void *data ATTRIBUTE_UNUSED) { while (GET_CODE (dest) == SUBREG || GET_CODE (dest) == ZERO_EXTRACT || GET_CODE (dest) == SIGN_EXTRACT || GET_CODE (dest) == STRICT_LOW_PART) dest = XEXP (dest, 0); /* If DEST is not a MEM, then it will n...
false
false
false
false
false
0
detailed_elements() const { return new MakeEnumeration<ElementsParms> (word_lookup->begin(),ElementsParms(word_lookup->end())); }
false
false
false
false
false
0
XGINew_SetDRAMSize20Reg( unsigned short dram_size, struct vb_device_info *pVBInfo) { unsigned short data = 0, memsize = 0; int RankSize; unsigned char ChannelNo; RankSize = dram_size * pVBInfo->ram_bus / 8; data = xgifb_reg_get(pVBInfo->P3c4, 0x13); data &= 0x80; if (data == 0x80) RankSize *= 2; data =...
false
false
false
false
false
0
mxl301rf_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct mxl301rf_state *state; struct mxl301rf_config *cfg; struct dvb_frontend *fe; state = kzalloc(sizeof(*state), GFP_KERNEL); if (!state) return -ENOMEM; state->i2c = client; cfg = client->dev.platform_data; memcpy(&state->...
false
false
false
false
false
0
gauss_medium (const double x) { unsigned int i; double temp = 0.0; double result = 0.0; double xnum; double xden; double absx; const double c[9] = { 0.39894151208813466764, 8.8831497943883759412, 93.506656132177855979, 597.27027639480026226, 2494.5375852903726711, 6848.19045053628...
false
false
false
false
false
0
writeAsMAX() { // get max data double max_data=(m_save_map.begin())->second; for(map<int,double>::iterator iter=m_save_map.begin(); iter!=m_save_map.end(); iter++){ max_data=(iter->second > max_data) ? iter->second : max_data; } // open file for appending ofstream out_file(m_file_name.c_str(...
false
false
false
false
false
0
if_mib_container_init(void) { static int done = 0; if (done) return; DEBUGMSGTL(("internal:ifTable:ifTable_container_init", "called\n")); done = 1; /* * set up the container. This is outside the rewrite ifdef, because * the container is used by the ifXTable too.. */ ...
false
false
false
false
false
0
size_of_type(symbol_type type){ int size; switch(type){ case TYPE_INT: case TYPE_REAL: size = 1; break; case TYPE_DOUBLE: case TYPE_COMPLEX: size = 2; break; case TYPE_DCOMPLEX: size = 4; break; default: fputs("ERROR illegal reduct...
false
false
false
false
false
0
git_diff__oid_for_entry( git_oid *out, git_diff *diff, const git_index_entry *src, const git_oid *update_match) { int error = 0; git_buf full_path = GIT_BUF_INIT; git_index_entry entry = *src; git_filter_list *fl = NULL; memset(out, 0, sizeof(*out)); if (git_buf_joinpath( &full_path, git_repository_workdi...
false
false
false
false
false
0
mailstream_flush(mailstream * s) { char * cur_buf; size_t left; ssize_t written; if (s == NULL) return -1; cur_buf = s->write_buffer; left = s->write_buffer_len; while (left > 0) { written = mailstream_low_write(s->low, cur_buf, left); if (written < 0) goto move_buffer; cur_buf +=...
false
false
false
false
false
0
p_paste_sensitive (GapStbMainGlobalParams *sgpp ,GapStoryBoard *stb ) { if(stb) { /* check if there is at least one elem in the paste buffer */ if(sgpp->curr_selection) { GapStorySection *curr_selection_main_section; curr_selection_main_section = gap_st...
false
false
false
false
false
0
gst_atomic_queue_new (guint initial_size) { GstAtomicQueue *queue; queue = g_new (GstAtomicQueue, 1); queue->refcount = 1; #ifdef LOW_MEM queue->num_readers = 0; #endif queue->head_mem = queue->tail_mem = new_queue_mem (initial_size, 0); queue->free_list = NULL; return queue; }
false
false
false
false
false
0
snp_annotator_stream_process_current_gene(GtSNPAnnotatorStream *sas, GtError *err) { int had_err = 0; unsigned long i; unsigned long nof_genes = gt_array_size(sas->cur_gene_set); gt_error_check(err); if (gt_queue_size(sas->snps) > 0) { /* we need to pr...
false
false
false
false
false
0
RsaSSL_Sign(const byte* in, word32 inLen, byte* out, word32 outLen, RsaKey* key, RNG* rng) { int sz = mp_unsigned_bin_size(&key->n), ret; if (sz > (int)outLen) return RSA_BUFFER_E; if (inLen > (word32)(sz - RSA_MIN_PAD_SZ)) return RSA_BUFFER_E; RsaPad(in, inLen, ...
false
false
false
false
false
0
has_item (Item *items, Item item) { guint i; for (i = 0; i < 3; i++) { if (items[i] == ITEM_NONE) return FALSE; if (items[i] == item) return TRUE; } return FALSE; }
false
false
false
false
false
0
Capture_Debug _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])) { // Check the number of arguments if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "flag"); return TCL_ERROR; } return Tcl_GetIntFromObj(interp, objv[1], &ng_debug); }
false
false
false
false
false
0
qos_match_con_cmd(cmd_parms *cmd, void *dcfg, const char *match, const char *limit) { qos_srv_config *sconf = (qos_srv_config*)ap_get_module_config(cmd->server->module_config, &qos_module); qs_rule_ctx_t *rule = (qs_rule_ctx_t *)apr_table_get(sconf->lo...
false
false
false
false
false
0
btree_split_sibling(struct shadow_spine *s, unsigned parent_index, uint64_t key) { int r; size_t size; unsigned nr_left, nr_right; struct dm_block *left, *right, *parent; struct btree_node *ln, *rn, *pn; __le64 location; left = shadow_current(s); r = new_block(s->info, &right); if (r < 0) return ...
false
true
false
false
false
1
_synctex_free_leaf(synctex_node_t node) { if (node) { SYNCTEX_FREE(SYNCTEX_SIBLING(node)); free(node); } return; }
false
false
false
true
false
1
printf_main(int argc UNUSED_PARAM, char **argv) { int conv_err; char *format; char **argv2; /* We must check that stdout is not closed. * The reason for this is highly non-obvious. * printf_main is used from shell. * Shell must correctly handle 'printf "%s" foo' * if stdout is closed. With stdio, output ge...
false
false
false
false
false
0
GetDialogStatus(Player* pPlayer, GameObject* pGameObject) { // Used by Eluna if (uint32 dialogId = sEluna->GetDialogStatus(pPlayer, pGameObject)) return dialogId; if (!m_pGetGODialogStatus) { return DIALOG_STATUS_UNDEFINED; } return m_pGetGODialogStatus(pPlayer, pGameObject); }
false
false
false
false
false
0
addSelfIntersectionNodes(int argIndex) { for (vector<Edge*>::iterator i=edges->begin(), endIt=edges->end(); i!=endIt; ++i) { Edge *e=*i; int eLoc = e->getLabel().getLocation(argIndex); EdgeIntersectionList &eiL = e->eiList; for (EdgeIntersectionList::iterator eiIt=eiL.begin(), eiEnd=eiL.end(); eiIt!=e...
false
false
false
false
false
0
zoran_streamoff(struct file *file, void *__fh, enum v4l2_buf_type type) { struct zoran_fh *fh = __fh; struct zoran *zr = fh->zr; int i, res = 0; unsigned long flags; switch (fh->map_mode) { case ZORAN_MAP_MODE_RAW: /* raw capture */ if (fh->buffers.active == ZORAN_FREE && zr->v4l_buffers.active != ZORAN_...
false
false
false
false
false
0
shmem_xattr_validate(const char *name) { struct { const char *prefix; size_t len; } arr[] = { { XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN }, { XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN } }; int i; for (i = 0; i < ARRAY_SIZE(arr); i++) { size_t preflen = arr[i].len; if (strncmp(name, arr[i].pref...
false
false
false
false
false
0
AddTrack( const QString &url, bool playImmediately ) { Meta::TrackPtr track = CollectionManager::instance()->trackForUrl( url ); if( track ) { Playlist::AddOptions options = playImmediately ? Playlist::OnPlayMediaAction : Playlist::OnAppendToPlaylistAction; ...
false
false
false
false
false
0
IDirectFBImageProvider_PNG_GetSurfaceDescription( IDirectFBImageProvider *thiz, DFBSurfaceDescription *dsc ) { DFBSurfacePixelFormat primary_format = dfb_primary_layer_pixelformat(); DIRECT_INTERFACE_GET_DATA (IDirectFBImageProvider_PNG) dsc->flags = D...
false
false
false
false
false
0
e_cal_backend_http_dispose (GObject *object) { ECalBackendHttp *cbhttp; ECalBackendHttpPrivate *priv; cbhttp = E_CAL_BACKEND_HTTP (object); priv = cbhttp->priv; if (priv->reload_timeout_id) { ESource *source = e_backend_get_source (E_BACKEND (cbhttp)); e_source_refresh_remove_timeout (source, priv->reload_ti...
false
false
false
false
false
0
OnFileSaveProjectAs(cb_unused wxCommandEvent& event) { ProjectManager *prjManager = Manager::Get()->GetProjectManager(); if (prjManager->SaveActiveProjectAs()) m_projectsHistory.AddToHistory(prjManager->GetActiveProject()->GetFilename()); DoUpdateStatusBar(); DoUpdateAppTitle(); }
false
false
false
false
false
0
goo_canvas_item_model_simple_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GooCanvasItemModelSimple *smodel = (GooCanvasItemModelSimple*) object; GooCanvasItemSimpleData *simple_data = &smodel->simple_da...
false
false
false
false
false
0
cavan_calculate_line_cross_point(int x1, int x2, double a1, double b1, double a2, double b2, cavan_display_point_t *point) { if (a1 == a2) { return -EINVAL; } if (a1 == 0 && b1 == 0) { point->x = x1; point->y = a2 * x1 + b2; } else if (a2 == 0 && b2 == 0) { point->x = x2; point->y = a1 * x2 + b1; } ...
false
false
false
false
false
0
builtin_changed_cb(GtkWidget *combo, RawFileControls *controls) { gint builtin; GtkAdjustment *adj; rawfile_warn_clear(controls); builtin = gwy_enum_combo_box_get_active(GTK_COMBO_BOX(combo)); if (!controls->in_update) update_dialog_values(controls); if (builtin) { ...
false
false
false
false
false
0
p54u_write(struct p54u_priv *priv, struct net2280_reg_write *buf, enum net2280_op_type type, __le32 addr, __le32 val) { unsigned int ep; int alen; if (type & 0x0800) ep = usb_sndbulkpipe(priv->udev, P54U_PIPE_DEV); else ep = usb_sndbulkpipe(priv->udev, P54U_PIPE_BRG); buf->port = cpu_...
false
false
false
false
false
0
loop(void) { struct timeval now, stop_loop, stop_delta; fd_set xfds; XEvent e; int pending; Gt_Viewer *v; Display *display = viewers->display; int x_socket = ConnectionNumber(display); stop_delta.tv_sec = 0; stop_delta.tv_usec = 200000; xwGETTIME(now); FD_ZERO(&xfds); while (viewers) { /*...
false
false
false
false
false
0
gnucash_color_argb_to_gdk (guint32 argb) { GdkColor *color; const guint32 key = argb; guint32 *newkey; color = g_hash_table_lookup (color_hash_table, &key); if (color) return color; color = g_new0(GdkColor, 1); newkey = g_new0(guint32, 1); *newkey = key; color->red = (ar...
false
false
false
false
false
0
verify_absent(struct cache_entry *ce, enum unpack_trees_error_types error_type, struct unpack_trees_options *o) { if (!o->skip_sparse_checkout && (ce->ce_flags & CE_NEW_SKIP_WORKTREE)) return 0; return verify_absent_1(ce, error_type, o); }
false
false
false
true
false
1
getnufork(node **nufork, node **grbg, pointarray treenode, long *zeros, unsigned char *zeros2) { /* find a fork not used currently */ long i; i = spp; while (treenode[i] && treenode[i]->numdesc > 0) i++; if (!treenode[i]) gnudisctreenode(grbg, &treenode[i], i, endsite, zeros, zero...
false
false
false
false
false
0
createAddress() { if (macho_shared->header.cputype == MACHO_CPU_TYPE_I386) { return new AddressX86Flat32(); } else { if (macho_shared->_64) { return new AddressFlat64(); } else { return new AddressFlat32(); } } }
false
false
false
false
false
0
f1_asm(float **P, int Ng) /* Angular Second Moment */ { int i, j; float sum = 0; for (i = 0; i < Ng; ++i) for (j = 0; j < Ng; ++j) sum += P[i][j] * P[i][j]; return sum; /* * The angular second-moment feature (ASM) f1 is a measure of homogeneity * of the image. In a homogeneous im...
false
false
false
false
false
0
st_clipboard_provider (GdkXEvent *xevent_p, GdkEvent *gev, void *user_data) { StClipboard *clipboard = user_data; XEvent *xev = (XEvent *) xevent_p; XSelectionEvent notify_event; XSelectionRequestEvent *req_event; GdkDisplay *display = gdk_display_get_defaul...
false
false
false
false
false
0
usbatm_atm_init(struct usbatm_data *instance) { struct atm_dev *atm_dev; int ret, i; /* ATM init. The ATM initialization scheme suffers from an intrinsic race * condition: callbacks we register can be executed at once, before we have * initialized the struct atm_dev. To protect against this, all callbacks *...
false
false
false
false
false
0
test_core_sortedcache__name_only(void) { git_sortedcache *sc; void *item; size_t pos; cl_git_pass(git_sortedcache_new( &sc, 0, NULL, NULL, name_only_cmp, NULL)); cl_git_pass(git_sortedcache_wlock(sc)); cl_git_pass(git_sortedcache_upsert(&item, sc, "aaa")); cl_git_pass(git_sortedcache_upsert(&item, sc, "bbb")...
true
true
false
false
false
1
MakeBoundarySet(Externals e0, Externals e1) { Boundary b; ExVert xv0, xv1; if (NULL == (b = NewBoundary())) return NULL; InitGetNextExternalVertex(e0); while (NULL != (xv0 = GetNextExternalVertex(e0))) if (NULL != (xv1 = QueryExternals(e1, xv0->point))) if (! AddBoundary(b, xv0->vInde...
false
false
false
false
false
0
EatsAtLeast(int still_to_find, int recursion_depth, bool not_at_start) { int answer = Length(); if (answer >= still_to_find) return answer; if (recursion_depth > RegExpCompiler::kMaxRecursion) return answer; // We are not at start after this node so we set the...
false
false
false
false
false
0
visitGlobalVariable(GlobalVariable &GV){ if (!GV.hasDefinitiveInitializer()) return unknown(); APInt Size(IntTyBits, DL.getTypeAllocSize(GV.getType()->getElementType())); return std::make_pair(align(Size, GV.getAlignment()), Zero); }
false
false
false
false
false
0
stringcharlen (bufp, canonical) unsigned char * bufp; int canonical; /* NZ if input is in canonical form */ { #ifdef SLOWMULTIPLY static unsigned char * sp[MAXSTRINGCHARS]; static int inited = 0; #endif /* SLOWMULTIPLY */ register unsigned char * bufcur; register unsigned char * ...
false
false
false
false
true
1
dhcp_failover_state_match_by_name(state, name) dhcp_failover_state_t *state; failover_option_t *name; { if ((strlen(state->name) == name->count) && (memcmp(state->name, name->data, name->count) == 0)) return 1; return 0; }
false
false
false
false
false
0
processFunctionKey(const XEvent *,KeySym keysym_,unsigned int,const char *) { static MSSymbol syms[12]={MSWidgetCallback::f1,MSWidgetCallback::f2, MSWidgetCallback::f3,MSWidgetCallback::f4, MSWidgetCallback::f5,MSWidgetCallback::f6, MSWidgetCallback::f7,MSWidgetCallback::f8, ...
false
false
false
false
false
0
update_queue(RLI *rli, UPDATE *u) { UPDATE_LIST *ul; if (loglevel > 2) logit(LOG_DEBUG, "update_queue: %s", rli->url); if (freelist_updatelist) { globus_mutex_lock(&update_mtx); ul = freelist_updatelist; freelist_updatelist = freelist_updatelist->nxt; globus_mutex_unlock(&update_mtx); } e...
false
false
false
false
false
0
dll_iteratorGetIdxWithPtr(list_t list, dllnodeptr node) { int idx; for (idx = 0; idx < list->iteratorsCount; idx++) { if ((list->iteratorsArray[idx]).node == node) return idx; } return -1; }
false
false
false
false
false
0
gimme_tree(PlannerInfo *root, Gene *tour, int num_gene) { GeqoPrivateData *private = (GeqoPrivateData *) root->join_search_private; List *clumps; int rel_count; /* * Sometimes, a relation can't yet be joined to others due to heuristics * or actual semantic restrictions. We maintain a list of "clumps" of ...
false
false
false
false
false
0
yylex (YYSTYPE *lvalp, parser_control *pc) { unsigned char c; int count; for (;;) { while (c = *pc->input, ISSPACE (c)) pc->input++; if (ISDIGIT (c) || c == '-' || c == '+') { char const *p; int sign; int value; if (c == '-' || c == '+') { sign = c == '-' ? -1 : 1; ...
true
true
false
false
false
1
handler_ExposeEvent(GtkWidget * widget, GdkEventExpose * event, gpointer data) { gtk_progress_dialog * ref = (gtk_progress_dialog *) data; //cout << "handler_ExposeEvent() : ref = " << ref << endl; // update the graphs... // ^^^^^^^^^^^^^^^^^^^^ // what about thread safety issues here? // it appears that the gd...
false
false
false
false
false
0
setid3v1title(FILE *file, mp3entry *entry) { char buffer[31]; int offsets[3] = {-95,-65,-125}; int i; char *result; result = (char *)malloc(3*30 + 2*3 + 1); *result = '\0'; for(i=0;i<3;i++) { if(fseek(file, offsets[i], SEEK_END) != 0) { free(result); return FALSE; } fgets(buffer, 31, file);...
false
false
false
false
false
0
gt_reads2twobit_write_encseq(GtReads2Twobit *r2t, GtError *err) { int had_err = 0; gt_error_check(err); gt_assert(r2t != NULL); if (r2t->nofseqs == 0) { gt_log_log("read set is empty, no encseq was written"); return had_err; } gt_assert(r2t->twobitencoding != NULL); gt_log_log("write encseq %s",...
false
false
false
false
false
0
end_of_line (struct a2ps_job * job) { if (!job->status->face_declared) { output (jdiv, ") %s n\n", face_eo_ps (job->status->face)); job->status->face_declared = true; } else output (jdiv, ") N\n"); job->status->line++; job->status->column = 0; job->status->wx = 0; }
false
false
false
false
false
0
HandleSetWatchedFactionOpcode(WorldPacket& recv_data) { DEBUG_LOG("WORLD: Received opcode CMSG_SET_WATCHED_FACTION"); int32 repId; recv_data >> repId; GetPlayer()->SetInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, repId); }
false
false
false
false
false
0
add_skiplength (List_T pairs, int skiplength) { List_T p; Pair_T pair; for (p = pairs; p != NULL; p = p->rest) { pair = (Pair_T) p->first; if (pair->gapp == true) { /* Skip */ } else if (pair->querypos >= HALFLEN) { pair->querypos += skiplength; } } return; }
false
false
false
false
false
0
GetOrCreateSourceID(StringRef FileName, StringRef DirName) { // If FE did not provide a file name, then assume stdin. if (FileName.empty()) return GetOrCreateSourceID("<stdin>", StringRef()); unsigned SrcId = SourceIdMap.size()+1; std::pair<std::string, std::string...
false
false
false
false
false
0
MakeJSObject(Vector<const char> constructor_name, int argc, Object*** argv, bool* caught_exception) { ASSERT(isolate_->context() == *isolate_->debug()->debug_context()); // Create the execution state object. Handle<String> constructor_st...
false
false
false
false
false
0
resolve_initial_references(const char* id) { CHECK_NOT_NIL_SHUTDOWN_OR_DESTROYED(); return omniInitialReferences::resolve(id); }
false
false
false
false
false
0
atom_op_compare(atom_exec_context *ctx, int *ptr, int arg) { uint8_t attr = U8((*ptr)++); uint32_t dst, src; SDEBUG(" src1: "); dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1); SDEBUG(" src2: "); src = atom_get_src(ctx, attr, ptr); ctx->ctx->cs_equal = (dst == src); ctx->ctx->cs_above = (dst > src); SDEBU...
false
false
false
false
false
0
gimple_set_modified (gimple s, bool modifiedp) { if (gimple_has_ops (s)) { s->gsbase.modified = (unsigned) modifiedp; if (modifiedp && cfun->gimple_df && is_gimple_call (s) && gimple_call_noreturn_p (s)) VEC_safe_push (gimple, gc, MODIFIED_NORETURN_CALLS (cfun), s); } }
false
false
false
false
false
0
cplx_sqrt(z) complex z; { double mod, arg; complex result; mod = sqrt(modulus(z)); if (mod == 0.0) return(zero); arg = 0.5 * atan2(z.imag, z.real); result.real = mod * cos(arg); result.imag = mod * sin(arg); return(result); }
false
false
false
false
false
0
toLvalue(Scope *sc, Expression *e) { //printf("SliceExp::toLvalue(%s) type = %s\n", toChars(), type ? type->toChars() : NULL); return (type && type->toBasetype()->ty == Tsarray) ? this : Expression::toLvalue(sc, e); }
false
false
false
false
false
0
path_power_down_sync(struct hda_codec *codec, struct nid_path *path) { struct hda_gen_spec *spec = codec->spec; if (!(spec->power_down_unused || codec->power_save_node) || path->active) return; sync_power_state_change(codec, path_power_update(codec, path, true)); }
false
false
false
false
false
0
InternalRemove(int k) { // Shift entries down one notch if (k < (nentries-1)) Shift(k+1, 0, -1); // Decrement number of entries nentries--; }
false
false
false
false
false
0
i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count) { struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; int new_rss_size; if (!(pf->flags & I40E_FLAG_RSS_ENABLED)) return 0; new_rss_size = min_t(int, queue_count, pf->rss_size_max); if (queue_count != vsi->num_queue_pairs) { vsi->req_queue_pairs = queue...
false
false
false
false
false
0
static_initialize() { if (xvalue['A']) return; // rely on static data being initialized to 0 xvalue['0'] = 0; xvalue['1'] = 1; xvalue['2'] = 2; xvalue['3'] = 3; xvalue['4'] = 4; xvalue['5'] = 5; xvalue['6'] = 6; xvalue['7'] = 7; xvalue['8'] = 8; xvalue['9'] = 9; xvalue['A'] = 10; xvalue[...
false
false
false
false
false
0
gtkhash_hash_func_deinit(struct hash_func_s *func) { g_assert(func); gtkhash_digest_free(func->digest); func->digest = NULL; }
false
false
false
false
false
0
block_scalar_dependence_entry_for_use_use(IntSet fd, Block *base_block, Block *search_block) { Block *bpt; IntSet id, consumption; int d = search_block->no; construct_IntSet(id, range_IntSet(fd)); for (bpt = base_b...
false
false
false
false
false
0
xsh_grid_sort(xsh_grid* grid) { /* check input parameters */ XSH_ASSURE_NOT_NULL(grid); /* sort by Y and by X after */ qsort(grid->list,grid->idx, sizeof(xs...
false
false
false
false
false
0
moveWords(int32_t nwords, /* number of 4-byte words to move */ int32_t *target, /* address of target (begin address) */ int32_t *buf, /* index in buffer pool of curr page */ int32_t *offset) { /* initial offset in buffer pool page */ int n, j, words, pno; int *ptr; j = (*offset - LOGPHDRSIZE) / 4 - ...
false
false
false
false
false
0
ima_store_template(struct ima_template_entry *entry, int violation, struct inode *inode, const unsigned char *filename) { static const char op[] = "add_template_measure"; static const char audit_cause[] = "hashing_error"; char *template_name = entry->template_desc->name; int result; struct { st...
false
false
false
false
false
0
encode_ChangePasswdDataMS(unsigned char *p HEIMDAL_UNUSED_ATTRIBUTE, size_t len HEIMDAL_UNUSED_ATTRIBUTE, const ChangePasswdDataMS *data, size_t *size) { size_t ret HEIMDAL_UNUSED_ATTRIBUTE = 0; size_t l HEIMDAL_UNUSED_ATTRIBUTE; int i HEIMDAL_UNUSED_ATTRIBUTE, e HEIMDAL_UNUSED_ATTRIBUTE; /* targrealm */ if((data)->ta...
false
false
false
false
false
0
gdm_wimax_ioctl_set_data(struct data_s *dst, struct data_s *src) { if (!src->size) { dst->size = 0; return 0; } if (!src->buf) return -EINVAL; if (!(dst->buf && dst->size == src->size)) { kdelete(&dst->buf); dst->buf = kmalloc(src->size, GFP_KERNEL); if (!dst->buf) return -ENOMEM; } if (copy_fro...
false
false
false
false
false
0
iwl_mvm_phy_ctxt_changed(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt, struct cfg80211_chan_def *chandef, u8 chains_static, u8 chains_dynamic) { lockdep_assert_held(&mvm->mutex); ctxt->channel = chandef->chan; return iwl_mvm_phy_ctxt_apply(mvm, ctxt, chandef, chains_static, chains_dy...
false
false
false
false
false
0
rb_str_modify_expand(VALUE str, long expand) { if (expand < 0) { rb_raise(rb_eArgError, "negative expanding string size"); } if (!str_independent(str)) { str_make_independent_expand(str, expand); } else if (expand > 0) { long len = RSTRING_LEN(str); long capa = len + expand; if (!STR_EMBED_P(st...
false
false
false
false
false
0
find_query_mode_by_name(const char *name) { int i; for (i = 0; i < sizeof(query_modes) / sizeof(*query_modes); i++) { const struct query_mode *mode = &query_modes[i]; if (strcmp(mode->name, name) == 0) return mode; } return NULL; }
false
false
false
false
false
0
ov_pcm_total(OggVorbis_File *vf,int i){ if(vf->ready_state<OPENED)return(-131); if(!vf->seekable || i>=vf->links)return(-131); if(i<0){ ogg_int64_t acc=0; int i; for(i=0;i<vf->links;i++) acc+=ov_pcm_total(vf,i); return(acc); }else{ return(vf->pcmlengths[i]); } }
false
false
false
false
false
0
internalCouple(MSModel *model_) { if (model_!=model()) { couple(model_); internalModel(MSTrue); } }
false
false
false
false
false
0
_matewnck_get_fallback_icons (GdkPixbuf **iconp, int ideal_width, int ideal_height, GdkPixbuf **mini_iconp, int ideal_mini_width, int ideal_mini_height) { i...
false
false
false
false
false
0
print_rsa_pkey (gnutls_datum_t * m, gnutls_datum_t * e, gnutls_datum_t * d, gnutls_datum_t * p, gnutls_datum_t * q, gnutls_datum_t * u, gnutls_datum_t * exp1, gnutls_datum_t * exp2) { fprintf (outfile, "modulus:"); print_hex_datum (m); fprintf (outfile, "public exponent:"); print...
false
false
false
false
false
0
load_file_data_task_completed_cb (GthTask *task, GError *error, gpointer user_data) { UpdateData *update_data = user_data; DialogData *data = update_data->data; gtk_widget_hide (GET_WIDGET ("task_box")); gtk_widget_set_sensitive (GET_WIDGET ("options_table"), TRUE); gtk_widget_set_sensitive (GET_W...
false
false
false
false
false
0
_gth_grid_view_set_item_selected (GthGridView *self, gboolean selected, int pos) { if (selected) _gth_grid_view_select_item (self, pos); else _gth_grid_view_unselect_item (self, pos); }
false
false
false
false
false
0
airSingleSscanf(const char *str, const char *fmt, void *ptr) { char *tmp; double val; int ret; if (!strcmp(fmt, "%e") || !strcmp(fmt, "%f") || !strcmp(fmt, "%g") || !strcmp(fmt, "%le") || !strcmp(fmt, "%lf") || !strcmp(fmt, "%lg")) { tmp = airStrdup(str); if (!tmp) { return 0; } air...
false
false
false
false
false
0
file_list_ready_data_new (GList *file_list, NautilusFileListCallback callback, gpointer callback_data) { FileListReadyData *data; data = g_new0 (FileListReadyData, 1); data->file_list = nautilus_file_list_copy (file_list); data->remaining_files = g_list_copy (file_list); data->callback = callback; data...
false
false
false
false
false
0
catalogCompare(BTKey* vLeft, BTKey* vRight) { HFSPlusCatalogKey* left; HFSPlusCatalogKey* right; uint16_t i; uint16_t cLeft; uint16_t cRight; left = (HFSPlusCatalogKey*) vLeft; right =(HFSPlusCatalogKey*) vRight; if(left->parentID < right->parentID) { return -1; } else if(left->parentID > ...
false
false
false
false
false
0
brasero_video_tree_model_get_column_type (GtkTreeModel *model, gint index) { switch (index) { case BRASERO_VIDEO_TREE_MODEL_NAME: return G_TYPE_STRING; case BRASERO_VIDEO_TREE_MODEL_ARTIST: return G_TYPE_STRING; case BRASERO_VIDEO_TREE_MODEL_THUMBNAIL: return GDK_TYPE_PIXBUF; case BRASERO_VIDEO_TREE...
false
false
false
false
false
0
ensureJNILrefCapacity(int cap) { ExecEnv *ee = getExecEnv(); JNIFrame *frame = (JNIFrame*)ee->last_frame; int size = (Object**)frame - frame->lrefs - frame->mb->args_count; if(size < cap) { int incr = cap-size; if(incr < sizeof(JNIFrame)/sizeof(Object*)) incr = sizeof(JNIFra...
false
false
false
false
false
0
GMT_scanf_ISO_calendar (char *s, GMT_cal_rd *rd) { /* On failure, return -1. On success, set rd and return 0. Assumes that year, week of year, day of week appear in that order only, and that the format string can handle the W. Assumes also that it is always OK to fill in missing bits. */ GMT_LONG k, n, ival[3]...
false
true
true
false
true
1
scc_move(krb5_context context, krb5_ccache from, krb5_ccache to) { krb5_scache *sfrom = SCACHE(from); krb5_scache *sto = SCACHE(to); krb5_error_code ret; if (strcmp(sfrom->file, sto->file) != 0) { krb5_set_error_message(context, KRB5_CC_BADNAME, N_("Can't handle cross database " "crede...
false
false
false
false
false
0
operator() (double x) const { if (x>0) return 0; return exp(x/_decayConstant.getValue())/_decayConstant.getValue(); }
false
false
false
false
false
0
zip_fzofft( val, pre, post) zoff_t val; char *pre; char *post; { /* Storage cylinder. */ static char fzofft_buf[ FZOFFT_NUM][ FZOFFT_LEN]; static int fzofft_index = 0; /* Temporary format string storage. */ static char fmt[ 16] = "%"; /* Assemble the format string. */ fmt[ 1] = '\0';...
false
false
false
false
false
0