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
copy_attrs(const char *from, const char *to) { struct stat st; if (lstat(from, &st) == -1) return -1; if (!(discofs_options.copyattr & COPYATTR_NO_MODE)) { if (chmod(to, st.st_mode) == -1) PERROR("copy_attrs: setting mode failed"); } if (!(discofs_options.copyattr ...
false
false
false
false
false
0
nss_ShutdownShutdownList(void) { SECStatus rv = SECSuccess; int i; /* call all the registerd functions first */ for (i=0; i < nssShutdownList.peakFuncs; i++) { struct NSSShutdownFuncPair *funcPair = &nssShutdownList.funcs[i]; if (funcPair->func) { if ((*funcPair->func)(funcPair->appData,NULL) !=...
false
false
false
false
false
0
elm_entry_context_menu_clear(Evas_Object *obj) { ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); Elm_Entry_Context_Menu_Item *it; if (!wd) return; EINA_LIST_FREE(wd->items, it) { eina_stringshare_del(it->label); eina_stringshare_del(it->icon_file); ...
false
false
false
false
false
0
factors_satisfies(const struct webauth_factors *factors, const char *factor) { int i; const char *candidate; if (factors == NULL || apr_is_empty_array(factors->factors)) return false; if (strcmp(factor, WA_FA_RANDOM_MULTIFACTOR) == 0 && factors->multifactor) return true; for (i = 0;...
false
false
false
false
false
0
process (GeglOperation *op, void *in_buf, void *out_buf, glong n_pixels, const GeglRectangle *roi, gint level) { gfloat *in = in_buf; gfloat *out = out_buf; gfloat *m; gfloat ma[25] = ...
false
false
false
false
false
0
set_current_groups(struct group_info *group_info) { struct cred *new; new = prepare_creds(); if (!new) return -ENOMEM; set_groups(new, group_info); return commit_creds(new); }
false
false
false
false
false
0
error_exit_client(struct Client *client_p, int error) { /* * ...hmm, with non-blocking sockets we might get * here from quite valid reasons, although.. why * would select report "data available" when there * wasn't... so, this must be an error anyway... --msa * actually, EOF occurs when read() returns 0 and...
true
true
false
false
false
1
setName(const QString &name) { d->name = name; // now reset the config, which may be based on our name delete d->config; d->config = 0; delete d->dummyConfig; d->dummyConfig = 0; registerOperationsScheme(); emit serviceReady(this); }
false
false
false
false
false
0
insertString(int pos_,const MSString &string_) { pasting(MSTrue); MSString buffer; formatOutput(buffer); if (pos_==-1) buffer<<string_; else { buffer.insert(string_,pos_); if (pos_<=selectionStart()) { selectionStart(selectionStart()+string_.length()); selectionEnd(selection...
false
false
false
false
false
0
XORWORD(ulong32 w, unsigned char *b) { ulong32 t; LOAD32L(t, b); t ^= w; STORE32L(t, b); }
false
false
false
false
true
1
OnPageChanged( wxWizardExEvent& WXUNUSED(event) ) { CMainDocument* pDoc = wxGetApp().GetDocument(); wxString strBuffer = wxEmptyString; wxASSERT(pDoc); wxASSERT(wxDynamicCast(pDoc, CMainDocument)); wxASSERT(m_pTitleStaticCtrl); wxASSERT(m_pProxyHTTPDescriptionCtrl); wxASSERT(m_pProxyH...
false
false
false
false
false
0
rsvg_compile_bg (RsvgDrawingCtx * ctx) { RsvgCairoRender *render = RSVG_CAIRO_RENDER (ctx->render); cairo_surface_t *surface; cairo_t *cr; GList *i; surface = _rsvg_image_surface_new (render->width, render->height); if (surface == NULL) return NULL; cr = cairo_create (surface); ...
false
false
false
false
false
0
quote_string(const char *s, char *out, size_t idx, size_t len, int display) { const char *p, *q; for(p = s; *p && idx < len; p++){ q = strchr(quotable_chars, *p); if (q && display) { add_char(out, idx, len, replace_chars[q - quotable_chars]); } else if (q) { add_char(out, idx, len, '\\'); add_...
false
false
false
false
false
0
wbcir_idle_rx(struct rc_dev *dev, bool idle) { struct wbcir_data *data = dev->priv; if (!idle && data->rxstate == WBCIR_RXSTATE_INACTIVE) data->rxstate = WBCIR_RXSTATE_ACTIVE; if (idle && data->rxstate != WBCIR_RXSTATE_INACTIVE) { data->rxstate = WBCIR_RXSTATE_INACTIVE; if (data->carrier_report_enabled) ...
false
false
false
false
false
0
gtk_plot_bar_set_width (GtkPlotBar *bar, gdouble width) { if(width < 0.0) return; bar->width = width; }
false
false
false
false
false
0
acl_chk_key(struct iscsi_acl *client, int key_type, int *negotiated_option, unsigned int option_count, int *option_list, const char *(*value_to_text) (int)) { const char *key_val; int length; unsigned int i; key_val = acl_get_key_val(&client->recv_key_block, key_type); if (!key_val) { *negotiated_opti...
false
false
false
false
false
0
traverse(const Shape& parent, bool tr, Renderer* r) const { double caseValue = 0.0; if (mSwitchExp->evaluate(&caseValue, 1, r) != 1) { CfdgError::Error(mLocation, "Error evaluating switch selector"); return; } switchMap::const_iterator it = mCaseState...
false
false
false
false
false
0
inferAggregate(Scope *sc, Dsymbol *&sapply) { Identifier *idapply = (op == TOKforeach) ? Id::apply : Id::applyReverse; #if DMDV2 Identifier *idfront = (op == TOKforeach) ? Id::Ffront : Id::Fback; int sliced = 0; #endif Type *tab; Type *att = NULL; Expression *org_aggr = aggr; AggregateDeclar...
false
false
false
false
false
0
map_addnickdb(struct map_session_data *sd) { nullpo_retv(sd); strdb_insert(nick_db,sd->status.name,sd); }
false
false
false
false
false
0
verbsChar(V p) {R (p>=DT_VERB_OFFSET && p < DT_SPECIAL_VERB_OFFSET)?vc[((I)p-DT_VERB_OFFSET)/2]:'\0';}
false
false
false
false
false
0
RangeCreate(Oid rangeTypeOid, Oid rangeSubType, Oid rangeCollation, Oid rangeSubOpclass, RegProcedure rangeCanonical, RegProcedure rangeSubDiff) { Relation pg_range; Datum values[Natts_pg_range]; bool nulls[Natts_pg_range]; HeapTuple tup; ObjectAddress myself; ObjectAddress referenced; pg_range = heap_o...
false
false
false
false
false
0
setFixedHandicap(int handicap) { Q_ASSERT(handicap >= 2 && handicap <= 9); if (!isRunning()) { return false; } if (handicap <= fixedHandicapUpperBound()) { m_process.write("fixed_handicap " + QByteArray::number(handicap) + '\n'); if (waitResponse()) { // Black starts...
false
false
false
false
false
0
nifti_nim_is_valid(nifti_image * nim, int complain) { int errs = 0; if( !nim ){ fprintf(stderr,"** is_valid_nim: nim is NULL\n"); return 0; } if( g_opts.debug > 2 ) fprintf(stderr,"-d nim_is_valid check...\n"); /**- check that dim[] matches the individual values ndim, nx, ny, ... */ if(...
false
false
false
false
false
0
resourceModifiedTime(ResourceGroup* grp, const String& resourceName) { OGRE_LOCK_MUTEX(grp->OGRE_AUTO_MUTEX_NAME); // lock group mutex // Try indexes first ResourceLocationIndex::iterator rit = grp->resourceIndexCaseSensitive.find(resourceName); if (rit != grp->resourceIndexCase...
false
false
false
false
false
0
meter_ptime(double t, char *s, double elapsed) { long hour; long min; long sec; long frac; char buffer[50]; if (elapsed > 0) snprintf(buffer, sizeof(buffer), " %5.1f%%", 100. * t / elapsed); else buffer[0] = 0; frac...
true
true
false
false
false
1
_NP_decrRefCount() { omni::poRcLock->lock(); int done = --pd_refCount > 0; omni::poRcLock->unlock(); if( done ) return; OMNIORB_USER_CHECK(pd_refCount == 0); // If this fails then the application has released a Policy // reference too many times. delete this; }
false
false
false
false
false
0
DecipherUpdate(char* data, int len, unsigned char** out, int* out_len) { if (!initialised_) { *out_len = 0; *out = NULL; return 0; } *out_len=len+EVP_CIPHER_CTX_block_size(&ctx); *out= new unsigned char[*out_len]; EVP_CipherUpdate(&ctx, *out, out_len, (unsigned char*)data, len); ...
false
false
false
false
false
0
PyErr_SetArgsError(PyTypeObject *type, char *name, PyObject *args) { if (!PyErr_Occurred()) { PyObject *err = Py_BuildValue("(OsO)", type, name, args); PyErr_SetObject(PyExc_InvalidArgsError, err); Py_DECREF(err); } return NULL; }
false
false
false
false
false
0
Symbols_To_Bits (Object x, int mflag, SYMDESCR *stab) { register SYMDESCR *syms; register unsigned long int mask = 0; Object l, s; register char *p; register int n; if (!mflag) Check_Type (x, T_Symbol); for (l = x; !Nullp (l); l = Cdr (l)) { if (mflag) { Check_Type (l, T...
false
false
false
false
false
0
gf_isom_modify_edit_segment(GF_ISOFile *movie, u32 trackNumber, u32 seg_index, u64 EditDuration, u64 MediaTime, u8 EditMode) { GF_Err e; GF_TrackBox *trak; GF_EdtsEntry *ent; trak = gf_isom_get_track_from_file(movie, trackNumber); if (!trak || !seg_index) return GF_BAD_PARAM; e = CanAccessMovie(movie, GF_ISOM_OPE...
false
false
false
false
false
0
flip() { if (subIdx_ || TargetRegisterInfo::isPhysicalRegister(dstReg_)) return false; std::swap(srcReg_, dstReg_); flipped_ = !flipped_; return true; }
false
false
false
false
false
0
ifx_spi_power_state_clear(struct ifx_spi_device *ifx_dev, unsigned char val) { unsigned long flags; spin_lock_irqsave(&ifx_dev->power_lock, flags); if (ifx_dev->power_status) { ifx_dev->power_status &= ~val; if (!ifx_dev->power_status) pm_runtime_put(&ifx_dev->spi_dev->dev); } spin_unlock_irqrestore(&ifx...
false
false
false
false
false
0
ladish_app_supervisor_set_project_name( ladish_app_supervisor_handle supervisor_handle, const char * project_name) { char * dup; if (project_name != NULL) { dup = strdup(project_name); if (dup == NULL) { log_error("strdup(\"%s\") failed", project_name); return false; } } else ...
false
false
false
false
false
0
goc_path_draw (GocItem const *item, cairo_t *cr) { GocPath *path = GOC_PATH (item); gboolean scale_line_width = goc_styled_item_get_scale_line_width (GOC_STYLED_ITEM (item)); gboolean needs_restore; cairo_save(cr); needs_restore = TRUE; cairo_set_fill_rule (cr, path->fill_rule? CAIRO_FILL_RULE_EVEN_ODD: CAIRO_FI...
false
false
false
false
false
0
lookup_fnfields (tree xbasetype, tree name, int protect) { tree rval = lookup_member (xbasetype, name, protect, /*want_type=*/false, tf_warning_or_error); /* Ignore non-functions, but propagate the ambiguity list. */ if (!error_operand_p (rval) && (rval && !BASELINK_P (rval))) return NULL_TREE...
false
false
false
false
false
0
exif_data_unref (ExifData *data) { if (!data) return; data->priv->ref_count--; if (!data->priv->ref_count) exif_data_free (data); }
false
false
false
false
false
0
switch_modifier(snd_use_case_mgr_t *uc_mgr, const char *old_modifier, const char *new_modifier) { struct use_case_modifier *xold, *xnew; struct transition_sequence *trans; struct list_head *pos; int err, seq_found = 0; ...
false
false
false
false
false
0
tonga_get_voltage_index(phm_ppt_v1_voltage_lookup_table *look_up_table, uint16_t voltage) { uint8_t count = (uint8_t) (look_up_table->count); uint8_t i; PP_ASSERT_WITH_CODE((NULL != look_up_table), "Lookup Table empty.", return 0;); PP_ASSERT_WITH_CODE((0 != count), "Lookup Table empty.", return 0;); for (i = ...
false
false
false
false
false
0
config_set_hash_filters(const char *attrname, char *value, char *errorbuf, int apply) { int val = 0; int retVal = LDAP_SUCCESS; retVal = config_set_onoff(attrname, value, &val, errorbuf, apply); if (retVal == LDAP_SUCCESS) { set_hash_filters(val); } return retVal; }
false
false
false
false
false
0
focus_order_to_top(ObClient *c) { focus_order = g_list_remove(focus_order, c); if (!c->iconic) { focus_order = g_list_prepend(focus_order, c); } else { GList *it; /* insert before first iconic window */ for (it = focus_order; it && !((ObClient*)it->data)->iconic...
false
false
false
false
false
0
aac_sa_intr(int irq, void *dev_id) { struct aac_dev *dev = dev_id; unsigned short intstat, mask; intstat = sa_readw(dev, DoorbellReg_p); /* * Read mask and invert because drawbridge is reversed. * This allows us to only service interrupts that have been enabled. */ mask = ~(sa_readw(dev, SaDbCSR.PRISETIRQMA...
false
false
false
false
false
0
auth_resolve_groups(struct userlist *l, char *groups) { char *group = NULL; unsigned int g, group_mask = 0; if (!groups || !*groups) return 0; while ((group = strtok(group?NULL:groups," "))) { for (g = 0; g < l->grpcnt; g++) if (!strcmp(l->groups[g], group)) break; if (g == l->grpcnt) { Alert("N...
false
false
false
false
false
0
mreadmsg(mtmp, otmp) struct monst *mtmp; struct obj *otmp; { boolean vismon = canseemon(mtmp); char onambuf[BUFSZ]; short saverole; unsigned savebknown; if (!vismon && !flags.soundok) return; /* no feedback */ otmp->dknown = 1; /* seeing or hearing it read reveals its label */ /* shouldn't be able to he...
false
false
false
true
false
1
createvar(varname name, int status, int n, int mode) { int bytes; vari *v; /* compute the length of the variable in bytes. some systems mess up is this is not a multiple of 8. */ bytes = vbytes(n,mode); while ( (bytes & 8) > 0 ) bytes++; if (lf_error) return(NUL...
false
false
false
false
false
0
assoc_allreduce(void *sbuf, void *rbuf, int count, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm) { int err, rank; char *local_buffer = NULL, *local_origin; char *send_ptr, *recv_ptr; lam_ssi_coll_data_t *lcd = comm->c_ssi_coll_data; MPI_Comm_rank(comm, &rank); /* Set root to setup coordinator comms, etc...
false
false
false
false
false
0
v9fs_fid_clone(struct dentry *dentry) { struct p9_fid *fid, *ret; fid = v9fs_fid_lookup(dentry); if (IS_ERR(fid)) return fid; ret = p9_client_walk(fid, 0, NULL, 1); return ret; }
false
false
false
false
false
0
r_postlude(struct SN_env * z) { int among_var; while(1) { /* repeat, line 62 */ int c = z->c; z->bra = z->c; /* [, line 63 */ among_var = find_among(z, a_1, 3); /* substring, line 63 */ if (!(among_var)) goto lab0; z->ket = z->c; /* ], line 63 */ switch(among_var)...
false
false
false
false
false
0
PageSetChecksumInplace(Page page, BlockNumber blkno) { /* If we don't need a checksum, just return */ if (PageIsNew(page) || !DataChecksumsEnabled()) return; ((PageHeader) page)->pd_checksum = pg_checksum_page((char *) page, blkno); }
false
false
false
false
false
0
eliminate_degenerate_phis (void) { bitmap interesting_names; bitmap interesting_names1; /* Bitmap of blocks which need EH information updated. We can not update it on-the-fly as doing so invalidates the dominator tree. */ need_eh_cleanup = BITMAP_ALLOC (NULL); /* INTERESTING_NAMES is effectively our ...
false
false
false
false
false
0
appendTo( UChar *buffer, int32_t *len) const { int32_t origLen = *len; int32_t kId = id; for (int32_t i = origLen + idLen - 1; i >= origLen; i--) { int32_t digit = kId % 10; buffer[i] = digit + 0x30; kId /= 10; } *len = origLen + idLen; }
false
false
false
false
false
0
startswith(object_cref prefix, object_cref start) const { bool result = _BOOST_PYTHON_ASLONG(this->attr("startswith")(prefix,start).ptr()); if (PyErr_Occurred()) throw_error_already_set(); return result; }
false
false
false
false
false
0
HasBarryPlugins() const { const_iterator b = begin(), e = end(); for( ; b != e; ++b ) { if( (*b)->GetAppName() == Config::Barry::AppName() ) return true; } return false; }
false
false
false
false
false
0
gst_aspect_ratio_crop_transform_caps (GstAspectRatioCrop * aspect_ratio_crop, GstCaps * caps) { GstCaps *transform; gint size, i; transform = gst_caps_new_empty (); size = gst_caps_get_size (caps); for (i = 0; i < size; i++) { GstStructure *s; GstStructure *trans_s; s = gst_caps_get_struct...
false
false
false
false
false
0
eventually_available_single( const Research& res, list<const Technology*>* dependencies, list<int>& stack, int id ) { Technology* tech = technologyRepository.getObject_byID( id ); if ( !tech ) return false; else return tech->eventually_available( res, dependencies, stack ); }
false
false
false
false
false
0
bmap(struct inode *inode, sector_t block) { sector_t res = 0; if (inode->i_mapping->a_ops->bmap) res = inode->i_mapping->a_ops->bmap(inode->i_mapping, block); return res; }
false
false
false
false
false
0
kprobe_int3_handler(struct pt_regs *regs) { kprobe_opcode_t *addr; struct kprobe *p; struct kprobe_ctlblk *kcb; if (user_mode(regs)) return 0; addr = (kprobe_opcode_t *)(regs->ip - sizeof(kprobe_opcode_t)); /* * We don't want to be preempted for the entire * duration of kprobe processing. We conditionally...
false
false
false
false
true
1
gudev_add_device (GMtpVolumeMonitor *monitor, GUdevDevice *device, gboolean do_emit) { GMtpVolume *volume; const char *usb_bus_num, *usb_device_num; char *uri; GFile *activation_mount_root; usb_bus_num = g_udev_device_get_property (device, "BUSNUM"); if (usb_bus_num == NULL) { g_warning ("device %s has...
false
false
false
false
false
0
reader_free(struct cube_reader *rd) { DBG_fprintf(stderr, "Cube: free the reader structure.\n"); g_string_free(rd->line, TRUE); if (rd->comment) g_free(rd->comment); g_hash_table_destroy(rd->elements); if (rd->nodeTypes) g_free(rd->nodeTypes); if (rd->coords) g_free(rd->coords); if (rd->densi...
false
false
false
false
false
0
CColorControl(gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, const wchar_t *text, IGUIElement* parent, s32 id=-1 ) : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect< s32 >(pos, pos+core::dimension2d<s32>(80, 75))) , DirtyFlag(true) , ColorStatic(0) , EditAlpha(0) , E...
false
false
false
false
false
0
merge_branch(void) { git_oid their_oids[1]; git_annotated_commit *their_head; git_merge_options merge_opts = GIT_MERGE_OPTIONS_INIT; git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT; int error; cl_git_pass(git_oid_fromstr(&their_oids[0], MERGE_BRANCH_OID)); cl_git_pass(git_annotated_commit_lookup(...
false
false
false
false
false
0
nmc_is_nm_running (NmCli *nmc, GError **error) { DBusGConnection *connection = NULL; DBusGProxy *proxy = NULL; GError *err = NULL; gboolean has_owner = FALSE; g_return_val_if_fail (error == NULL || *error == NULL, FALSE); connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &err); if (!connection) { g_string_printf...
false
false
false
false
false
0
scanHeap(int mark_soft_refs) { for(mark_scan_ptr = heapbase; mark_scan_ptr < heaplimit;) { uintptr_t hdr = HEADER(mark_scan_ptr); uintptr_t size; if(HDR_ALLOCED(hdr)) { Object *ob = (Object*)(mark_scan_ptr + HEADER_SIZE); int mark = IS_MARKED(ob); size = ...
false
false
false
false
false
0
voutlet_dspprolog(struct _voutlet *x, t_signal **parentsigs, int myvecsize, int calcsize, int phase, int period, int frequency, int downsample, int upsample, int reblock, int switched) { /* no buffer means we're not a signal outlet */ if (!x->x_buf) return; x->x_updown.downsample=downsam...
false
false
false
true
false
1
save_state (GnomeClient *client, gint phase, GnomeRestartStyle save_style, gint shutdown, GnomeInteractStyle interact_style, gint fast, gpointer client_data) { char *argv[20]; int i = 0, j; gint xpos, ypos; gdk_window_g...
false
false
false
false
false
0
dig_angle_next_line(struct Plus_head *plus, plus_t current_line, int side, int type) { int i, next; int current; int line; plus_t node; P_NODE *Node; P_LINE *Line; const char *dstr; int debug_level; dstr = G__getenv("DEBUG"); if (dstr != NULL) debug_level = atoi(dstr); ...
false
false
false
false
true
1
get_text_tile_info( int offset ){ const data16_t *source = sys16_textram; int tile_number = source[offset]; int pri = tile_number >> 8; if( sys16_textmode==2 ){ /* afterburner: ?---CCCT TTTTTTTT */ SET_TILE_INFO( 0, (tile_number&0x1ff) + sys16_tile_bank0 * 0x1000, 512+384+((tile_number>>9)&0x7...
false
false
false
false
false
0
CloseZipU(HZIP hz) { if (hz==0) {lasterrorU=ZR_ARGS;return ZR_ARGS;} TUnzipHandleData *han = (TUnzipHandleData*)hz; if (han->flag!=1) {lasterrorU=ZR_ZMODE;return ZR_ZMODE;} TUnzip *unz = han->unz; lasterrorU = unz->Close(); delete unz; delete han; return lasterrorU; }
false
false
false
false
false
0
genie_get_sound (NODE_T * p) { A68_INT channel, sample; A68_SOUND w; int addr, k, n, z, m; BYTE_T *d; POP_OBJECT (p, &sample, A68_INT); POP_OBJECT (p, &channel, A68_INT); POP_OBJECT (p, &w, A68_SOUND); if (!(VALUE (&channel) >= 1 && VALUE (&channel) <= (int) NUM_CHANNELS (&w))) { diagnostic_node (A6...
false
false
false
false
false
0
show_size( off_t size ) { switch ( sizefmt ) { case SF_BYTES: (void) printf( "%ld", (long) size ); /* spec says should have commas */ break; case SF_ABBREV: if ( size < 1024 ) (void) printf( "%ld", (long) size ); else if ( size < 1024 ) (void) printf( "%ldK", (long) size / 1024L ); else if ( ...
false
false
false
false
false
0
build_v2_class_reference_decl (tree ident) { tree decl; char buf[BUFSIZE]; snprintf (buf, BUFSIZE, "_OBJC_ClassRef_%s", IDENTIFIER_POINTER (ident)); decl = start_var_decl (objc_class_type, buf); OBJCMETA (decl, objc_meta, meta_class_ref); return decl; }
false
false
false
false
false
0
hirsch_ps_dyn(const float* prof1,const int* seq2,struct hirsch_mem* hm, int* hirsch_path,int sip) { int mid = ((hm->enda - hm->starta) / 2)+ hm->starta; float input_states[6] = {hm->f[0].a,hm->f[0].ga,hm->f[0].gb,hm->b[0].a,hm->b[0].ga,hm->b[0].gb}; int old_cor[5] = {hm->starta,hm->enda,hm->startb,hm->endb,mid}; ...
false
false
false
false
false
0
onPaint(FXObject*,FXSelector,void*){ #ifdef HAVE_GL_H FXGLVisual *vis=(FXGLVisual*)getVisual(); FXASSERT(xid); if(makeCurrent()){ drawWorld(wvt); if(vis->isDoubleBuffer()) swapBuffers(); makeNonCurrent(); } #endif return 1; }
false
false
false
false
false
0
sel_make_classes(void) { int rc, nclasses, i; char **classes; /* delete any existing entries */ sel_remove_entries(class_dir); rc = security_get_classes(&classes, &nclasses); if (rc) return rc; /* +2 since classes are 1-indexed */ last_class_ino = sel_class_to_ino(nclasses + 2); for (i = 0; i < nclasses;...
false
false
false
false
false
0
exp_table(float x) { int index; index = (int) ((x + 16.0) * 1000.0); if (index >= EXP_TABLE_LEN) index = EXP_TABLE_LEN - 1; else if (index < 0) index = 0; return (exp_data[index]); }
false
false
false
false
false
0
HISsync(struct history *h) { bool r = false; if (his_checknull(h)) return false; TMRstart(TMR_HISSYNC); r = (*h->methods->sync)(h->sub); TMRstop(TMR_HISSYNC); return r; }
false
false
false
false
false
0
tdfxBlit( void *drv, void *dev, DFBRectangle *rect, int dx, int dy ) { TDFXDriverData *tdrv = (TDFXDriverData*) drv; TDFXDeviceData *tdev = (TDFXDeviceData*) dev; Voodoo2D *voodoo2D = tdrv->voodoo2D; u32 cmd = 1 | (1 <<8) | (0xCC << 24);//SST_2D_GO | SST_2D_SCRNTOSCRNBLIT | (ROP_COPY ...
false
false
false
false
false
0
toXml() const { switch (_type) { case TypeNil: return nilToXml(); case TypeBoolean: return boolToXml(); case TypeInt: return intToXml(); case TypeDouble: return doubleToXml(); case TypeString: return stringToXml(); case TypeDateTime: return timeToXml(); cas...
false
false
false
false
false
0
readstdin(int len) { int ll, l1, lt, lr; int cpulim; cpulim=rlimit_cpu; rlimit_cpu=3; lr=len; l1=0; while(lr>0) { nowtime=time(0); initalarm(); ll=lr; if(ll>READSTDIN_WINDOW) ll=READSTDIN_WINDOW; lt=fread(stdinbuf+l1,1,ll,stdin); if(lt!=ll) user_error("parm_too_long"); lr-=ll; l1+=ll; ...
false
false
false
false
true
1
qcaspi_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ring) { struct qcaspi *qca = netdev_priv(dev); if ((ring->rx_pending) || (ring->rx_mini_pending) || (ring->rx_jumbo_pending)) return -EINVAL; if (netif_running(dev)) qcaspi_netdev_close(dev); qca->txr.count = max_t(u32, ring->tx...
false
false
false
false
false
0
gucharmap_chartable_paste_received_cb (GtkClipboard *clipboard, const char *text, gpointer user_data) { gpointer *data = (gpointer *) user_data; GucharmapChartable *chartable = *data; gunichar wc; g_slice_free (gpointer, data); if...
false
false
false
false
false
0
createDockWindows() { int size1 = 0; int size2 = 0; const QByteArray& state = settings->mainWindowState(); if (!state.isEmpty()) { const int* sizes = (const int*)state.constData(); size1 = sizes[0]; size2 = sizes[1]; } propertyDock = new QDockWidget(tr("Properties"), this); propertyDock->setObjectName("GL...
false
false
false
false
false
0
sky81452_reg_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; const struct regulator_init_data *init_data = dev_get_platdata(dev); struct regulator_config config = { }; struct regulator_dev *rdev; config.dev = dev->parent; config.init_data = init_data; config.of_node = dev->of_node; confi...
false
false
false
false
false
0
protein_ramachandran_phi( const MMonomer& m1, const MMonomer& m2 ) { ftype result = clipper::Util::nan(); int index_cx = m1.lookup( " C ", clipper::MM::ANY ); int index_n = m2.lookup( " N ", clipper::MM::ANY ); int index_ca = m2.lookup( " CA ", clipper::MM::ANY ); int index_c = m2.lookup( " C ", clipper:...
false
false
false
false
false
0
send_filter_frame(struct net_device *dev, int mc_cnt) { struct uli526x_board_info *db = netdev_priv(dev); void __iomem *ioaddr = db->ioaddr; struct netdev_hw_addr *ha; struct tx_desc *txptr; u16 * addrptr; u32 * suptr; int i; ULI526X_DBUG(0, "send_filter_frame()", 0); txptr = db->tx_insert_ptr; suptr = (u32...
false
false
false
false
false
0
sig_catch(int sig_no) { if(SIGINT == sig_no || SIGTERM == sig_no){ Tracker.ClearRestart(); Tracker.SetStoped(); signal(sig_no,sig_catch2); } }
false
false
false
false
false
0
DumpTString(TaggedString* s, FILE* D) { if (s==NULL) DumpString(NULL,0,D); else DumpString(s->str,s->u.s.len+1,D); }
false
false
false
false
false
0
on_ok_button() { if(board.getLayout().isValid()) { hide(); signal_on_close(board.getLayout()); signal_on_close.clear(); } else error_dialog("This is not a valid board. There has to "\ "be at least one piece of each color and "\ ...
false
false
false
false
false
0
ocsp_ResponderIDTypeByTag(int derTag) { CERTOCSPResponderIDType responderIDType; switch (derTag) { case 1: responderIDType = ocspResponderID_byName; break; case 2: responderIDType = ocspResponderID_byKey; break; default: responderIDType = ocspResponderID_other; break; } ...
false
false
false
false
false
0
isns_scn_setup(isns_scn_t *scn, isns_object_t *node) { isns_object_list_t portals = ISNS_OBJECT_LIST_INIT; isns_object_t *entity; unsigned int i; entity = isns_object_get_entity(node); if (entity == NULL || !isns_object_find_descendants(entity, &isns_portal_template, NULL, &portals)) return NULL; for (i...
false
false
false
false
false
0
ldr_split_string(struct list_main *dst, char *src) { char *word, *pos; char c; pos = src; do { word = pos; while (*word && issep_map[ARCH_INDEX(*word)]) word++; if (!*word) break; pos = word; while (!issep_map[ARCH_INDEX(*pos)]) pos++; c = *pos; *pos = 0; list_add_unique(dst, word); *pos++ = c; ...
false
false
false
false
false
0
drawMsgWin( WINDOW* win, std::vector<std::string> words ) { wclear( win ); box( win, 0, 0 ); int i = 1; std::vector<std::string>::const_iterator j = words.begin(); while( j != words.end() ) { mvwprintw( win, i, 1, j->c_str() ); i++; j++; } wrefresh( win ); }
false
false
false
false
false
0
check_input(){ int i ; printf("check input\n"); printf("%d,%d,%d,%d\n",frame.ll.x,frame.ll.y,frame.ur.x,frame.ur.y); printf("source %d %d %d %d\n", source.name, source.location.x,source.location.y,source.bufname); printf("num sink %d\n",sink.num); for(i=0;i<sink.num; i++){ printf("%d %d %d %d\n", sink.po...
false
false
false
false
false
0
dib0700_i2c_xfer_legacy(struct i2c_adapter *adap, struct i2c_msg *msg, int num) { struct dvb_usb_device *d = i2c_get_adapdata(adap); struct dib0700_state *st = d->priv; int i,len; if (mutex_lock_interruptible(&d->i2c_mutex) < 0) return -EINTR; if (mutex_lock_interruptible(&d->usb_mutex) < 0) { err("cou...
false
true
false
false
false
1
throw_error(CELL error, F_STACK_FRAME *callstack_top) { /* If the error handler is set, we rewind any C stack frames and pass the error to user-space. */ if(userenv[BREAK_ENV] != F) { /* If error was thrown during heap scan, we re-enable the GC */ gc_off = false; /* Reset local roots */ gc_locals = gc_loca...
false
false
false
false
false
0
ISolveWithin(const Spline *spline,int major, extended val,extended tlow, extended thigh) { Spline1D temp; extended ts[3]; const Spline1D *sp = &spline->splines[major]; int i; /* Calculation for t=1 can yield rounding errors. Insist on the endpoints */ /* (the Spline1D is not a perfectly accur...
false
false
false
false
false
0
setOriginator(const char *aetitle) { if ((aetitle == NULL) || (strlen(aetitle) == 0)) return originator.clear(); else return originator.putString(aetitle); }
false
false
false
false
false
0
runtime_initialized (MonoProfiler *prof) { process_profiler_event (EVENT_KIND_VM_START, mono_thread_current ()); if (agent_config.defer) start_debugger_thread (); }
false
false
false
false
false
0
PublishItem( const std::string& itemid, XmlElement* payload, std::string* task_id_out) { std::vector<XmlElement*> children; children.push_back(payload); PublishItem(itemid, children, task_id_out); }
false
false
false
false
false
0
handle_focus_out(event_t *ev) { D_EVENTS(("handle_focus_out(ev [%8p] on window 0x%08x)\n", ev, ev->xany.window)); REQUIRE_RVAL(XEVENT_IS_MYWIN(ev, &primary_data), 0); if (TermWin.focus) { TermWin.focus = 0; if (images[image_bg].current != images[image_bg].disabled) { images[ima...
false
false
false
false
false
0
lxt2_wr_set_initial_value(struct lxt2_wr_trace *lt, char value) { if(lt) { switch(value) { case '0': case '1': case 'x': case 'z': break; case 'Z': value = 'z'; break; default: value = 'x'; break; } lt->initial_value = value; } }
false
false
false
false
false
0