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
setSticky() { QList<QGraphicsItem *> items = m_currentGraphicsView->scene()->selectedItems(); if (items.count() < 1) return; ItemBase * itemBase = dynamic_cast<ItemBase *>(items.at(0)); if (itemBase == NULL) return; if (!itemBase->isBaseSticky()) return; itemBase->setLocalSticky(!itemBase->is...
false
false
false
false
false
0
set_visual(char *str) { #if NO_X11 RAWFB_RET_VOID if (!str) {} return; #else int vis, vdepth, defdepth; XVisualInfo vinfo; char *p, *vstring = strdup(str); RAWFB_RET_VOID defdepth = DefaultDepth(dpy, scr); visual_id = (VisualID) 0; visual_depth = 0; if (!strcmp(vstring, "ignore") || !strcmp(vstring, "defa...
false
false
false
false
false
0
DSAU_ConvertSignedToFixedUnsigned(SECItem *dest, SECItem *src) { unsigned char *pSrc = src->data; unsigned char *pDst = dest->data; unsigned int cntSrc = src->len; unsigned int cntDst = dest->len; int zCount = cntDst - cntSrc; if (zCount > 0) { PORT_Memset(pDst, 0, zCount); ...
false
false
false
false
false
0
anjuta_docman_reload_file (AnjutaDocman *docman, GFile* file) { IAnjutaDocument *doc; g_return_if_fail (file != NULL); doc = anjuta_docman_get_document_for_file (docman, file); if (doc && IANJUTA_IS_EDITOR (doc)) { IAnjutaEditor *te; te = IANJUTA_EDITOR (doc); glong nNowPos = ianjuta_editor_get_lineno (te,...
false
false
false
false
false
0
path_parts_parse(path_parts, path) Path_Parts *path_parts; const char *path; { char *buffer_p; size_t buffer_length; const char *first_segment; int i; /* * Test whether `path' is absolute or relative path. */ if (*path == '/') { path_parts->is_absolute = 1; first_segment = p...
false
true
false
false
true
1
re_Inc(int parm) { unsigned char val = patch_edit_get_edit_parameter(reParm[parm].Offset), max; max = re_parm_type_max[reParm[parm].Type]; if (!max) return; if (++val > max) val = 0; re_set_edit_parameter(reParm[parm].Offset, val); re_printParm(parm); }
false
false
false
false
false
0
UPD7759_slave_tick(int chip) { struct UPD7759_chip *ch = &UPD7759_chips.chip[chip]; if(ch->drq) { if(ch->suspend) stream_update(ch->channel, 0); else if(UPD7759_chips.intf->irqcallback[chip]) UPD7759_chips.intf->irqcallback[chip](chip); } }
false
false
false
false
false
0
rbt_memtype_check_insert(struct memtype *new, enum page_cache_mode *ret_type) { int err = 0; err = memtype_rb_check_conflict(&memtype_rbroot, new->start, new->end, new->type, ret_type); if (!err) { if (ret_type) new->type = *ret_type; new->subtree_max_end = new->end; memtype_rb_insert(&memt...
false
false
false
false
false
0
can_make_bones() { register struct trap *ttmp; if (ledger_no(&u.uz) <= 0 || ledger_no(&u.uz) > maxledgerno()) return FALSE; if (no_bones_level(&u.uz)) return FALSE; /* no bones for specific levels */ if (u.uswallow) { return FALSE; /* no bones when swallowed */ } if (!Is_branchlev(&u.uz)) { ...
true
true
false
false
false
1
pciehp_green_led_on(struct slot *slot) { struct controller *ctrl = slot->ctrl; if (!PWR_LED(ctrl)) return; pcie_write_cmd_nowait(ctrl, PCI_EXP_SLTCTL_PWR_IND_ON, PCI_EXP_SLTCTL_PIC); ctrl_dbg(ctrl, "%s: SLOTCTRL %x write cmd %x\n", __func__, pci_pcie_cap(ctrl->pcie->port) + PCI_EXP_SLTCTL, PCI_EX...
false
false
false
false
false
0
clustfree(devp, clust) devstat *devp; long clust; { long next; if (clust) for (;;) { next = getfatent(devp, clust); if (next < 0L || putfatent(devp, clust, 0) < 0) return(-1); if (next == ENDCLUST || next == ERRCLUST) break; clust = next; } return(0); }
false
false
false
false
false
0
CompileScriptForTracker(Isolate* isolate, Handle<Script> script) { // TODO(635): support extensions. PostponeInterruptsScope postpone(isolate); // Build AST. CompilationInfo info(script); info.MarkAsGlobal(); if (ParserApi::Parse(&info)) { // Compile the code. LiveEditFunctionTracker tracker(info.i...
false
false
false
false
false
0
Swrblock() { FILE *fil; byte *bpt; size_t anz; unsigned n; int ret; ret = Gblockaux(wrblksym,&fil,&anz,&bpt); if(ret == aERROR) return(brkerr()); n = fwrite(bpt,1,anz,fil); return(mkfixnum(n)); }
false
false
false
false
false
0
ess_speed (sb_devc *devc, int audionum) { int speed; int div, div2; ess_common_speed (devc, &(devc->speed), &div); #ifdef FKS_REG_LOGGING printk (KERN_INFO "FKS: ess_speed (%d) b speed = %d, div=%x\n", audionum, devc->speed, div); #endif /* Set filter roll-off to 90% of speed/2 */ speed = (devc->speed * 9) / 20...
false
false
false
false
false
0
on_shell_window_destroy (GtkObject *object, GapPlayerMainGlobalParams *gpp) { if(gpp) { p_stop_playback(gpp); } gpp->shell_window = NULL; p_close_videofile(gpp); p_close_composite_storyboard(gpp); if(gpp->standalone_mode) { gtk_main_...
false
false
false
false
false
0
is_package_new(int package) { struct rapl_package *rp; /* caller prevents cpu hotplug, there will be no new packages added * or deleted while traversing the package list, no need for locking. */ list_for_each_entry(rp, &rapl_packages, plist) if (package == rp->id) return false; return true; }
false
false
false
false
false
0
closeDerivedGraph(graph_t * g) { node_t *n; edge_t *e; for (n = agfstnode(g); n; n = agnxtnode(g, n)) { for (e = agfstout(g, n); e; e = agnxtout(g, e)) { free(ED_alg(e)); } free(ND_alg(n)); free(ND_pos(n)); } agclose(g); }
false
false
false
false
false
0
udf_new_dirent(udf_file_entry_t *p_udf_fe, udf_t *p_udf, const char *psz_name, bool b_dir, bool b_parent) { const unsigned int i_alloc_size = p_udf_fe->i_alloc_descs + p_udf_fe->i_extended_attr; udf_dirent_t *p_udf_dirent = (udf_dirent_t *) calloc(1, sizeof(udf_dirent_t) + i_alloc_size); if (...
false
false
false
false
false
0
get_static_methodid(JNIEnv *env, jclass cls, const char* methodName, const char* signature, lList **alpp) { jmethodID mid = NULL; DENTER(BASIS_LAYER, "get_static_methodid"); mid = (*env)->GetStaticMethodID(env, cls, methodName, signature); /* error occured */ if (mid ...
false
false
false
false
false
0
gst_videomixer2_pad_sink_acceptcaps (GstPad * pad, GstCaps * caps) { gboolean ret; GstVideoMixer2 *mix; GstCaps *accepted_caps; gint i, n; GstStructure *s; mix = GST_VIDEO_MIXER2 (gst_pad_get_parent (pad)); GST_DEBUG_OBJECT (pad, "%" GST_PTR_FORMAT, caps); accepted_caps = gst_pad_get_fixed_caps_func (...
false
false
false
false
false
0
GetComboboxStringSelection(const wxString& name) { wxWizardPage* page = m_pWizard->GetCurrentPage(); if (page) { wxComboBox* win = dynamic_cast<wxComboBox*>(page->FindWindowByName(name, page)); if (win) return win->GetStringSelection(); } return wxEmptyString; }
false
false
false
false
false
0
do_gen (insn_table *isa, decode_table *decode_rules) { gen_table *gen; if (decode_rules == NULL) error (NULL, "Must specify a decode table\n"); if (isa == NULL) error (NULL, "Must specify an instruction table\n"); if (decode_table_max_word_nr (decode_rules) > 0) options.gen.multi_word = decode_table...
false
false
false
false
false
0
addrect(int x, int y, int w, int h) { rects[num_rects].x = x; rects[num_rects].y = y; rects[num_rects].w = w; rects[num_rects].h = h; if (num_rects < MAX_RECTS - 1) num_rects++; }
false
false
false
false
false
0
mbfl_filt_ident_sjis(int c, mbfl_identify_filter *filter) { if (filter->status) { /* kanji second char */ if (c < 0x40 || c > 0xfc || c == 0x7f) { /* bad */ filter->flag = 1; } filter->status = 0; } else if (c >= 0 && c < 0x80) { /* latin ok */ ; } else if (c > 0xa0 && c < 0xe0) { /* kana ok */ ; ...
false
false
false
false
false
0
repl_prompt_cc(ScmObj result, void **data) { ScmObj *closure = (ScmObj*)data; ScmObj reader = closure[0]; if (SCM_PROCEDUREP(reader)) { Scm_VMPushCC(repl_read_cc, data, 4); return Scm_VMApply0(reader); } else { ScmObj exp = Scm_Read(SCM_OBJ(SCM_CURIN)); return repl_read_...
false
false
false
false
false
0
stat_find_stat(struct stat_sdb_t *sdb, /* stat database */ char *stat_name) /* stat name */ { struct stat_stat_t *stat; for (stat = sdb->stats; stat != NULL; stat = stat->next) { if (!strcmp(stat->name, stat_name)) break; } return stat; }
false
false
false
false
false
0
test_select_none(void) { hid_t fid1; /* HDF5 File IDs */ hid_t dataset; /* Dataset ID */ hid_t sid1,sid2; /* Dataspace ID */ hsize_t dims1[] = {SPACE7_DIM1, SPACE7_DIM2}; hsize_t dims2[] = {SPACE7_DIM1, SPACE7_DIM2}; uint8_t *wbuf, /* buffer to write to disk */ ...
false
false
false
true
false
1
secret_tool_action_lookup (int argc, char *argv[]) { GError *error = NULL; GOptionContext *context; SecretService *service; GHashTable *attributes; SecretValue *value = NULL; context = g_option_context_new ("attribute value ..."); g_option_context_add_main_entries (context, LOOKUP_OPT...
false
true
false
false
true
1
NK6510_GetMMS_S40_30(gn_data *data, struct gn_statemachine *state) { gn_error error; gn_data private_data; gn_file_list fl; gn_file fi; dprintf("Using GetMMS for Series40 3rd Ed\n"); if (!data->raw_mms) return GN_ERR_INTERNALERROR; if (data->raw_mms->number < 1) return GN_ERR_INVALIDLOCATION; gn_data_cl...
false
false
false
false
false
0
snd_ali_get_spdif_in_rate(struct snd_ali *codec) { u32 dwRate; u8 bval; bval = inb(ALI_REG(codec, ALI_SPDIF_CTRL)); bval &= 0x7f; bval |= 0x40; outb(bval, ALI_REG(codec, ALI_SPDIF_CTRL)); snd_ali_detect_spdif_rate(codec); bval = inb(ALI_REG(codec, ALI_SPDIF_CS + 3)); bval &= 0x0f; switch (bval) { case ...
false
false
false
false
false
0
infinity_factory() { ChanCount ret; for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { ret.set(*t, UINT32_MAX); } return ret; }
false
false
false
false
false
0
create_link(struct config_item *parent_item, struct config_item *item, struct dentry *dentry) { struct configfs_dirent *target_sd = item->ci_dentry->d_fsdata; struct configfs_symlink *sl; int ret; ret = -ENOENT; if (!configfs_dirent_is_ready(target_sd)) goto out; ret = -ENOMEM; sl = kmalloc(...
false
false
false
false
false
0
dump(orbOptions::sequenceString& result) { omniObjAdapter::Options::EndpointURIList::iterator last, i; i = omniObjAdapter::options.endpoints.begin(); last = omniObjAdapter::options.endpoints.end(); for (; i != last; i++) { if ( (*i)->no_publish ) { orbOptions::addKVString(key(),(*i)->uri,result)...
false
false
false
false
false
0
execwrap_execl_valist_to_argv(va_list ap, const char* last, const char* argv[EXECWRAP_EXECL_MAX_ARGS]) { const char* tmp; uint32_t i = 0; argv[i++] = last; while((tmp = va_arg(ap, const char*))) { vt_libassert(i < EXECWRAP_EXECL_MAX_ARGS-1); argv[i++] = tmp; } argv[i] = NULL; }
false
false
false
false
false
0
client_new(const char *name) { struct client *c; AN(name); ALLOC_OBJ(c, CLIENT_MAGIC); AN(c); REPLACE(c->name, name); c->vl = vtc_logopen(name); AN(c->vl); if (*c->name != 'c') vtc_log(c->vl, 0, "Client name must start with 'c'"); bprintf(c->connect, "%s", "${v1_sock}"); VTAILQ_INSERT_TAIL(&clients, c, li...
false
false
false
true
false
1
ctob64(unsigned char *p, int pad) { static signed char b64[4]; b64[0] = b64table[p[0] >> 2]; b64[1] = b64table[((p[0] & 0x3) << 4) | ((p[1] & 0xF0) >> 4)]; if (pad == 2) { b64[1] = b64table[(p[0] & 0x3) << 4]; b64[2] = b64[3] = '='; } else if (pad == 1) { b64[2] = b64table[((p[1] & 0xF) << 2)]; b64[3] = '...
false
false
false
false
false
0
acpi_ns_repair_HID(struct acpi_evaluate_info *info, union acpi_operand_object **return_object_ptr) { union acpi_operand_object *return_object = *return_object_ptr; union acpi_operand_object *new_string; char *source; char *dest; ACPI_FUNCTION_NAME(ns_repair_HID); /* We only care about string _HID objects (...
false
false
false
false
false
0
a_to_c_string (NODE_T * p, char *str, A68_REF row) { /* Assume "str" to be long enough - caller's responsibility! */ (void) p; if (INITIALISED (&row)) { A68_ARRAY *arr; A68_TUPLE *tup; int size, n = 0; GET_DESCRIPTOR (arr, tup, &row); size = ROW_SIZE (tup); if (size > 0) { int k; ...
false
false
false
false
false
0
DeallocateMemoryForAllRuns() { if(scores != NULL) //array with pointers to the actual array with scores { if (scores[0] != NULL) //scores[0] - pointer to memory with scores { delete[] scores[0]; } delete[] scores; scores = NULL; } if(matches1 != NULL)...
false
false
false
false
false
0
gpx_rm_from_global(gpx_global_entry* ge) { queue* elem, *tmp; QUEUE_FOR_EACH(&ge->queue, elem, tmp) { gpx_global_entry* g = (gpx_global_entry*) dequeue(elem); xfree(g->tagdata); xfree(g); } }
false
false
false
false
false
0
store_record(const gchar *src, const gchar *dst, sdp_record_t *rec) { char filename[PATH_MAX + 1], key[28]; sdp_buf_t buf; int err, size, i; char *str; create_name(filename, PATH_MAX, STORAGEDIR, src, "sdp"); create_file(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); snprintf(key, sizeof(key), "%17s#%08X",...
false
false
false
false
false
0
mute() { for (int i=0; i<bufsize; i++) buffer[i]=0; }
false
false
false
false
false
0
_bcf1_sync_alleles(bcf_hdr_t *hdr, bcf1_t *line, int nals) { line->n_allele = nals; hts_expand(char*, line->n_allele, line->d.m_allele, line->d.allele); char *als = line->d.als; int n = 0; while (n<nals) { line->d.allele[n] = als; while ( *als ) als++; als++; n++...
false
false
false
false
false
0
PALSARRecipeFCN( CeosSARVolume_t *volume, void *token ) { struct CeosSARImageDesc *ImageDesc = &(volume->ImageDesc); CeosTypeCode_t TypeCode; CeosRecord_t *record; char szSARDataFormat[29], szProduct[32]; memset( ImageDesc, 0, sizeof( struct CeosSARImageDesc ) ); /* -------------------------------...
true
true
false
false
false
1
watchdog_stop(struct watchdog_device *wdd) { int err = 0; mutex_lock(&wdd->lock); if (test_bit(WDOG_UNREGISTERED, &wdd->status)) { err = -ENODEV; goto out_stop; } if (!watchdog_active(wdd)) goto out_stop; if (test_bit(WDOG_NO_WAY_OUT, &wdd->status)) { dev_info(wdd->dev, "nowayout prevents watchdog bei...
false
false
false
false
false
0
decide_some_prefetch_mt_between_dlg(Info_for_prefetch *info_p, int use_mt, int assigns, int *assign, real *TaskEndTime, real *clock, ...
false
false
false
false
false
0
findInColumn(const int column, const int row) { int indxRow=-1; const int colBeg=UcolStarts_[column]; const int colEnd=colBeg+UcolLengths_[column]; for ( int i=colBeg; i<colEnd; ++i ){ if (UcolInd_[i]==row){ indxRow=i; break; } } return indxRow; }
false
false
false
false
false
0
newYear(int32_t gyear) const { UErrorCode status = U_ZERO_ERROR; int32_t cacheValue = CalendarCache::get(&gChineseCalendarNewYearCache, gyear, status); if (cacheValue == 0) { int32_t solsticeBefore= winterSolstice(gyear - 1); int32_t solsticeAfter = winterSolstice(gyear); int32_t n...
false
false
false
false
false
0
isl_ast_build_insert_dim( __isl_take isl_ast_build *build, int pos) { isl_ctx *ctx; isl_space *space, *ma_space; isl_id *id; isl_multi_aff *ma; build = isl_ast_build_cow(build); if (!build) return NULL; ctx = isl_ast_build_get_ctx(build); id = isl_id_alloc(ctx, "", NULL); if (!build->node) space = isl_a...
false
false
false
false
false
0
jslTokenAppendChar(JsLex *lex, char ch) { /* Add character to buffer but check it isn't too big. * Also Leave ONE character at the end for null termination */ if (lex->tokenl < JSLEX_MAX_TOKEN_LENGTH-1) { lex->token[lex->tokenl++] = ch; } }
false
false
false
false
false
0
dissect_ldap_T_extensibleMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 627 "../../asn1/ldap/ldap.cnf" attr_type=NULL; matching_rule_string=NULL; ldapvalue_string=NULL; matching_rule_dnattr=FALSE; offset = dissect_ldap_Ma...
false
false
false
false
false
0
art_rgb_run_alpha (guint8 *buf, guint8 r, guint8 g, guint8 b, int alpha, int n) { int i; int v; for (i = 0; i < n; i++) { v = *buf; *buf++ = v + (((r - v) * alpha + 0x80) >> 8); v = *buf; *buf++ = v + (((g - v) * alpha + 0x80) >> 8); v = *buf; *buf++ = v + (((b - v) * alp...
false
false
false
false
false
0
get_command(char *s, char *arg) { int inside = FALSE; while (*s) { if (*s==CHAR_VERBATIM) /* \ */ { if (*++s) *arg++ = *s++; } else if (*s==CHAR_QUOTE) /* " */ { s++; inside = !inside; } else i...
false
false
false
false
false
0
HandleUsbReset(U8 bDevStatus) { if (bDevStatus & DEV_STATUS_RESET) { DBG("\n!"); } }
false
false
false
false
false
0
_add_chars_till_limit(Evas_Object *obj, char **text, int can_add, Length_Unit unit) { int i = 0, current_len = 0; char *new_text; if (!*text) return; if (unit >= LENGTH_UNIT_LAST) return; new_text = *text; current_len = strlen(*text); while (*new_text) { int idx = 0, unit_size = 0; ...
false
true
true
false
false
1
go_plugin_service_unload (GOPluginService *service, GOErrorInfo **ret_error) { GOErrorInfo *error = NULL; g_return_if_fail (GO_IS_PLUGIN_SERVICE (service)); GO_INIT_RET_ERROR_INFO (ret_error); if (!service->is_loaded) { return; } go_plugin_unload_service (service->plugin, service, &error); if (error == NULL)...
false
false
false
false
false
0
set_limit_req_body(cmd_parms *cmd, void *conf_, const char *arg) { core_dir_config *conf = conf_; char *errp; if (APR_SUCCESS != apr_strtoff(&conf->limit_req_body, arg, &errp, 10)) { return "LimitRequestBody argument is not parsable."; } if (*errp || co...
false
false
false
false
false
0
pushFile (string filename) { if (!debugging) { return NULL ; } void *ctx = (void*)currentFile ; registerFile (filename) ; return ctx ; }
false
false
false
false
false
0
ses_arglist(fd, cmd, gap, fullname, flagp) FILE *fd; char *cmd; garray_T *gap; int fullname; /* TRUE: use full path name */ unsigned *flagp; { int i; char_u buf[MAXPATHL]; char_u *s; if (gap->ga_len == 0) return put_line(fd, "silent! argdel *"); if (fputs(cmd, fd) < 0) retur...
false
false
false
false
false
0
midgard_metadata_new (MidgardDBObject *object) { g_return_val_if_fail (object != NULL, NULL); MidgardMetadata *self = NULL; MidgardConnection *mgd = MGD_OBJECT_CNC (object); if (!mgd) self = g_object_new (MIDGARD_TYPE_METADATA, NULL); else self = g_object_new (MIDGARD_TYPE_METADATA, "connection", mgd, NULL);...
false
false
false
false
false
0
targetLockingEnemy (AIObj **f) { int i; ttf = 50 * timestep; if (target == NULL) target = f [0]; for (i = 0; i < maxfighter; i ++) if (target == f [i]) break; int z = 0; do { i ++; if (i >= maxfighter) { i = 0; z ++; } } while ((!f [i]->active || f [i]->party == party || f...
false
false
false
false
false
0
ast_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv, uint32_t handle, uint32_t width, uint32_t height) { struct ast_private *ast = crtc->dev->dev_private; struct ast_crtc *ast_crtc = to_ast_crtc(crtc); struct drm_gem_object *obj; struct ast_bo *bo; uint64_t gpu_addr; u32 csum; in...
false
false
false
false
false
0
FindFiles(const std::string& inexpr, GlobMessages* messages) { std::string cexpr; std::string::size_type cc; std::string expr = inexpr; this->Internals->Expressions.clear(); this->Internals->Files.clear(); if (!kwsys::SystemTools::FileIsFullPath(expr)) { expr = kwsys::SystemTools::GetCurrentWorkingDir...
false
false
false
false
false
0
VgaSetPELS(struct pelRegs *pels) { int i; for(i = 0; i < MAX_PELS; i++) { PortOutb(i, VGAPAL_OADR); PortOutb(pels->red[i], VGAPAL_DATA); PortOutb(pels->grn[i], VGAPAL_DATA); PortOutb(pels->blu[i], VGAPAL_DATA); } }
false
false
false
false
false
0
V_TestParticles (void) { particle_t *p; int i, j; float d, r, u; r_numparticles = MAX_PARTICLES; for (i=0 ; i<r_numparticles ; i++) { d = i*0.25f; r = 4*((i&7)-3.5f); u = 4*(((i>>3)&7)-3.5f); p = &r_particles[i]; for (j=0 ; j<3 ; j++) p->origin[j] = cl.refdef.vieworg[j] + cl.v_forward[j]*d + ...
false
false
false
false
false
0
rqs_get_matching_rule(const lListElem *rqs, const char *user, const char *group, const char *project, const char* pe, const char *host, const char *queue, lList *userset_list, lList* hgroup_list, dstring *rule_name) { lListElem *rule = NULL; lLis...
false
false
false
false
false
0
createMCStreamer(const Target &T, StringRef TT, MCContext &Ctx, MCAsmBackend &MAB, raw_ostream &_OS, MCCodeEmitter *_Emitter, bool RelaxAll, ...
false
false
false
false
false
0
ba_setup_wires(void) { int num_mps, i; static bool wires_setup = 0; if (!ba_initialized || wires_setup) return; wires_setup = 1; num_mps = 1; for (i=0; i<cluster_dims; i++) num_mps *= DIM_SIZE[i]; ba_main_mp_bitmap = bit_alloc(num_mps); ba_create_system(); bridge_setup_system(); for (i = 1; i <= LON...
false
false
false
false
false
0
tg3_phy_start(struct tg3 *tp) { struct phy_device *phydev; if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED)) return; phydev = tp->mdio_bus->phy_map[tp->phy_addr]; if (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) { tp->phy_flags &= ~TG3_PHYFLG_IS_LOW_POWER; phydev->speed = tp->link_config.speed; phydev->duplex ...
false
false
false
false
false
0
for_not_done(struct for_t *frs) { int32 tmp, has_xzs; word32 val; double d1; struct xstk_t *xsp; /* must move and execute for inc. at end not beginning of loop */ has_xzs = FALSE; xsp = __eval_xpr(frs->fortermx); if (xsp->xslen <= WBITS) { /* SJM 07/20/00 - must convert to real if real */ if (frs->fort...
false
false
false
false
false
0
FcCacheInsert (FcCache *cache, struct stat *cache_stat) { FcCacheSkip **update[FC_CACHE_MAX_LEVEL]; FcCacheSkip *s, **next; int i, level; lock_cache (); /* * Find links along each chain */ next = fcCacheChains; for (i = fcCacheMaxLevel; --i >= 0; ) { for (; (s = n...
true
true
false
false
true
1
get_null_value_row(int fd, char *flags, int row, int with_mask) { #ifdef HAVE_GDAL struct fileinfo *fcb = &G__.fileinfo[fd]; if (fcb->gdal) get_null_value_row_gdal(fd, flags, row); else #endif get_null_value_row_nomask(fd, flags, row); if (with_mask) embed_mask(flags, row); }
false
false
false
false
false
0
xnode_is_empty(const xnode_t *xn) { const xnode_t *xc; xnode_check(xn); xc = xnode_first_child(xn); if (NULL == xc) return TRUE; if (xnode_next_sibling(xc) != NULL) return FALSE; return XNODE_T_TEXT == xc->type && '\0' == *xc->u.t.text; }
false
false
false
false
false
0
log_local_address(const ap_errorlog_info *info, const char *arg, char *buf, int buflen) { if (info->c) return apr_snprintf(buf, buflen, "%s:%d", info->c->local_ip, info->c->local_addr->port); else return 0; }
false
false
false
false
false
0
do_video_get_event(unsigned int fd, unsigned int cmd, struct compat_video_event __user *up) { struct video_event kevent; mm_segment_t old_fs = get_fs(); int err; set_fs(KERNEL_DS); err = sys_ioctl(fd, cmd, (unsigned long) &kevent); set_fs(old_fs); if (!err) { err = put_user(kevent.type, &up->type); err ...
false
false
false
false
false
0
ToggleSfxState( void ) { #ifndef DISABLE_SOUND sfx_state ^= 1; if ( sfx_state ) { if ( !init_sfx ) InitSfx( sfx_state, sfx_volume ); } else if ( init_sfx ) ShutdownSfx(); #endif }
false
false
false
false
false
0
chown( const KUrl& url, const QString& owner, const QString& group ) { KIO_ARGS << url << owner << group; return SimpleJobPrivate::newJob(url, CMD_CHOWN, packedArgs); }
false
false
false
false
false
0
vtkparse_bracket_len(const char *text) { size_t i = 0; size_t j = 1; char bc = text[0]; char tc = 0; char semi = ';'; char c; if (bc == '(') { tc = ')'; } else if (bc == '[') { tc = ']'; } else if (bc == '{') { tc = '}'; semi = '\0'; } else if (bc == '<') { tc = '>'; } else { return 0; } do ...
false
false
false
false
false
0
_clutter_stage_has_queued_events (ClutterStage *stage) { ClutterStagePrivate *priv; g_return_val_if_fail (CLUTTER_IS_STAGE (stage), FALSE); priv = stage->priv; return priv->event_queue->length > 0; }
false
false
false
false
false
0
oaes_key_expand( OAES_CTX * ctx ) { size_t _i, _j; oaes_ctx * _ctx = (oaes_ctx *) ctx; _ctx->key->key_base = _ctx->key->data_len / OAES_RKEY_LEN; _ctx->key->num_keys = _ctx->key->key_base + OAES_ROUND_BASE; _ctx->key->exp_data_len = _ctx->key->num_keys * OAES_RKEY_LEN * OAES_COL_LEN; _ctx->key->exp_data ...
false
false
false
false
false
0
need_inode_page_update(struct f2fs_sb_info *sbi, nid_t ino) { struct page *i = find_get_page(NODE_MAPPING(sbi), ino); bool ret = false; /* But we need to avoid that there are some inode updates */ if ((i && PageDirty(i)) || need_inode_block_update(sbi, ino)) ret = true; f2fs_put_page(i, 0); return ret; }
false
false
false
false
false
0
nvis(char *mbdst, size_t dlen, int c, int flags, int nextc) { char cc[2]; int ret; cc[0] = c; cc[1] = nextc; ret = istrsenvisx(mbdst, &dlen, cc, 1, flags, "", NULL); if (ret < 0) return NULL; return mbdst + ret; }
true
true
false
false
false
1
printsextract_getSeqNumbers(AjPFile inf, ajint *cnts, ajint *lens, AjPStr *s, ajint n) { ajint i; ajint c; ajint len; for(i=0;i<n;++i) { while(!ajStrPrefixC(*s,"fl;")) { if(!ajReadlineTrim(inf,s)) ajFatal("Premature EOF"); if(ajStrPrefixC(*s,"gc;")) ajFatal("Missing fl; line")...
false
false
false
false
false
0
renderHTML(STD_NAMESPACE ostream &docStream, STD_NAMESPACE ostream &annexStream, size_t &annexNumber, const size_t flags) const { /* reference: image */ docStream << "<a h...
false
false
false
false
false
0
pfn_max_align_up(unsigned long pfn) { return ALIGN(pfn, max_t(unsigned long, MAX_ORDER_NR_PAGES, pageblock_nr_pages)); }
false
false
false
false
false
0
aio_pread(int fd, void *buf, size_t nbytes, off_t offset) { aio_cb.aio_lio_opcode = IOCB_CMD_PREAD; aio_cb.aio_fildes = fd; aio_cb.aio_buf = (unsigned long) buf; aio_cb.aio_nbytes = nbytes; aio_cb.aio_offset = offset; if (io_submit(aio_ctx, 1, &aio_cbp) != 1) err(1, "aio submit failed"); if (io_getevents(aio...
false
false
false
false
false
0
GenerateDefaultConfiguration() { FILE* xyzFp; if ( this->CheckGeometryFile(xyzFp) != VTK_OK) { return 0; } char buf[1024]; if (fread(buf, 1024, 1, xyzFp) != 1) { vtkErrorMacro ("MultiBlockPLOT3DReader error reading file: " << this->XYZFileName << " Premature EOF while r...
false
false
false
false
false
0
retrieve(const sockaddr* addr, UDTSOCKET& id) { CGuard vg(m_RIDVectorLock); // TODO: optimize search for (list<CRL>::iterator i = m_lRendezvousID.begin(); i != m_lRendezvousID.end(); ++ i) { if (CIPAddress::ipcmp(addr, i->m_pPeerAddr, i->m_iIPversion) && ((0 == id) || (id == i->m_iID))) { ...
false
false
false
false
false
0
encode_decimal128 (const struct real_format *fmt ATTRIBUTE_UNUSED, long *buf, const REAL_VALUE_TYPE *r) { decNumber dn; decContext set; decimal128 d128; int32_t image; decContextDefault (&set, DEC_INIT_DECIMAL128); set.traps = 0; decimal_to_decnumber (r, &dn); decimal128FromNumber (&d128, &dn, &s...
false
false
false
false
false
0
createListEntry(QDomDocument &doc, const QString &tagName, const QString &subTagName, const QStringList &list) { QDomElement el = doc.createElement(tagName); foreach( const QString &s, list ) { QDomElement subel = doc.createElement(subTagName); subel.appendChild(doc.cre...
false
false
false
false
false
0
isGrayscale() const { switch (depth()) { #ifndef QT_NO_IMAGE_TRUECOLOR case 32: #ifndef QT_NO_IMAGE_16_BIT case 16: #endif return allGray(); #endif //QT_NO_IMAGE_TRUECOLOR case 8: { for (int i=0; i<numColors(); i++) if (data->ctbl[i] != qRgb(i,i,i)) return false; return true; } } retu...
false
false
false
false
false
0
finalizeSize(Scope *sc) { //printf("StructDeclaration::finalizeSize() %s\n", toChars()); if (sizeok != SIZEOKnone) return; // Set the offsets of the fields and determine the size of the struct unsigned offset = 0; bool isunion = isUnionDeclaration() != NULL; for (size_t i = 0; i < membe...
false
false
false
false
false
0
procargs(int argc, char **argv) { int i; const char *xminusc; char **xargv; int login; xargv = argv; login = xargv[0] && xargv[0][0] == '-'; arg0 = xargv[0]; if (argc > 0) xargv++; for (i = 0; i < NOPTS; i++) optlist[i] = 2; argptr = xargv; login |= options(1); xargv = argptr; xminusc = minusc; if (*...
false
false
false
false
false
0
DeleteHydrogens(OBMol & mol) { for (OBAtomIterator it=mol.BeginAtoms(); it != mol.EndAtoms(); it++) { if ( (*it)->IsNonPolarHydrogen() ) { OBBondIterator voider; double charger = (*it)->GetPartialCharge(); charger += ((*it)->BeginNbrAtom(voider))->GetPartialCharge(); ...
false
false
false
false
false
0
Itk_ArchCompDeleteCmd(dummy, interp, objc, objv) ClientData dummy; /* unused */ Tcl_Interp *interp; /* current interpreter */ int objc; /* number of arguments */ Tcl_Obj *CONST objv[]; /* argument objects */ { int i; char *token; ItclClass *contextClass; Itcl...
false
false
false
false
false
0
data_ip_exist(struct in_addr ip, struct capt *idcap){ struct data_pack *base; struct data_pack *find; int hash; // calculate hash hash = DATA_IP_HASH(ip.s_addr); base = &data_ip_tab[hash]; find = base->next_ip; while(find != base){ if(find->cap_id == idcap && find->ip.s_a...
false
false
false
false
false
0
isPowerOfTwo(int x) { if (x < 2) return false; if (x & (x-1)) return false; return true; }
false
false
false
false
false
0
c_rinsert (VALUE self, VALUE pos, VALUE path) { PLAYLIST_METHOD_ADD_HANDLER_INT_STR (rinsert, pos, path); }
false
false
false
false
false
0
main(int argc, char * argv[]) { config myconfig; #ifdef MEMORY_LEAKS // to debug memory leaks with mtrace. It's better to use // a tool like memprof, mpatrol or valgrind though. mtrace (); #endif // init game environment #if !defined (SINGLE_DIR_INST) game::init (DATA_DIR); #else // chang...
false
false
false
false
false
0
checkUser(const char* name) { bool check = false; FILE* db = fopen(fixPathname(userAccessFile), "r"); if (db != NULL) { check = checkuserHosts(db, name); fclose(db); } else logError("Unable to open the user access file %s: %s", (const char*) userAccessFile, strerror(errno)); if (! check) c...
false
false
false
false
false
0