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
cam_b_first_large(real a) { real tmp; real ac, a2; int i; a = 2*a; /* the expension derived for different a; correct for this. */ a2 = a*a; tmp = 0; for(i=0, ac = -a2*a; i<MAX_LARGE_COEFS-1; i++) { tmp += 1.0/(large_coefs1[i]*ac); ac *= -a2; } return 2*tmp; }
false
false
false
false
false
0
isieve_list(isieve_t *obj, isieve_listcb_t *cb,void *rock, char **errstr) { char *refer_to; int ret = list_wcb(obj->version, obj->pout, obj->pin, cb, rock, &refer_to); if(ret == -2 && refer_to) { ret = do_referral(obj, refer_to); if(ret == STAT_OK) { ret = isieve_list(obj, cb, rock, errstr); } }...
false
false
false
false
false
0
uxst_get_src(int fd, struct sockaddr *sa, socklen_t salen, int dir) { if (dir) return getsockname(fd, sa, &salen); else return getpeername(fd, sa, &salen); }
false
false
false
false
false
0
clean_jobs(_ipp_printer_t *printer) /* I - Printer */ { _ipp_job_t *job; /* Current job */ time_t cleantime; /* Clean time */ if (cupsArrayCount(printer->jobs) == 0) return; cleantime = time(NULL) - 60; _cupsRWLockWrite(&(printer->rwlock)); for (job = (_ipp_job_t *)cupsArrayFirst(printer->jobs); ...
false
false
false
false
false
0
do_arg_to_python(PyObject* x) { if (x == 0) return boost::python::detail::none(); Py_INCREF(x); return x; }
false
false
false
false
false
0
isSeparable(int layer) { if (!checkLayerIndex(layer)) return false; int be_index = 0; BodyElement* be = getElement(layer, be_index++); while ( be != NULL ) { if ( be->isInnerBoundary() ) { return true; } be = getElement(layer, be_index++); } return false; }
false
false
false
false
false
0
exo_tree_view_leave_notify_event (GtkWidget *widget, GdkEventCrossing *event) { ExoTreeView *tree_view = EXO_TREE_VIEW (widget); /* be sure to cancel any pending single-click timeout */ if (G_UNLIKELY (tree_view->priv->single_click_timeout_id >= 0)) g_source_remove (t...
false
false
false
false
false
0
TriangleArea(double point0[3], double point1[3], double point2[3]) { double norm0Squared, norm1Squared, dot, crossNorm; norm0Squared = (point0[0]-point1[0])*(point0[0]-point1[0]) + (point0[1]-point1[1])*(point0[1]-point1[1]) + (point0[2]-point1[2])*(point0[2]-point1[2]); norm1Squared = (point2[0]-point1[0])*(p...
false
false
false
false
false
0
clutter_stage_x11_realize (ClutterStageWindow *stage_window) { ClutterStageX11 *stage_x11 = CLUTTER_STAGE_X11 (stage_window); ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window); ClutterBackend *backend = CLUTTER_BACKEND (stage_cogl->backend); ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (b...
false
false
false
false
false
0
SplitFileName() { if(!this->FileName) { vtkErrorMacro( << "Need to specify a filename" ); return; } // Pull the PathName component out of the FileName. size_t length = strlen(this->FileName); char* fileName = new char[length+1]; strcpy(fileName, this->FileName); char* begin = fileName; ch...
false
false
false
false
false
0
lpfc_disc_timeout(unsigned long ptr) { struct lpfc_vport *vport = (struct lpfc_vport *) ptr; struct lpfc_hba *phba = vport->phba; uint32_t tmo_posted; unsigned long flags = 0; if (unlikely(!phba)) return; spin_lock_irqsave(&vport->work_port_lock, flags); tmo_posted = vport->work_port_events & WORKER_DISC_T...
false
false
false
false
false
0
multi_config(struct pcmcia_device *link) { struct serial_info *info = link->priv; int i, base2 = 0; /* First, look for a generic full-sized window */ if (!pcmcia_loop_config(link, multi_config_check, &info->multi)) base2 = link->resource[0]->start + 8; else { /* If that didn't work, look for two windows */ ...
false
false
false
false
false
0
_BlockOffsetToPos(fl_BlockLayout * block, PT_DocPosition offset) const { UT_return_val_if_fail(block, 0); return block->getPosition(false) + offset; }
false
false
false
false
false
0
GetCurEvent ( int *track, const MIDITimedBigMessage **msg ) const { int t = state.GetCurEventTrack(); if ( t != -1 ) { if ( track ) { *track = t; } if ( msg ) { int num = state.next_event_number[t]; if ( num >= 0 ) { ...
false
false
false
false
false
0
group_free(struct group *grp) { switch (grp->type) { #ifdef USE_EC case EC2N: ec2n_free(grp); break; #endif case MODP: modp_free(grp); break; default: log_print("group_free: unknown group type %d", grp->type); break; } free(grp); }
false
true
false
false
false
1
color_maxcolor(int* max_color, int* st_max_color, int depth, int v_i_color){ if (v_i_color > *max_color){ *max_color = v_i_color; *st_max_color = depth; } }
false
false
false
false
false
0
rtw_indicate_wx_assoc_event(struct adapter *padapter) { union iwreq_data wrqu; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; memset(&wrqu, 0, sizeof(union iwreq_data)); wrqu.ap_addr.sa_family = ARPHRD_ETHER; memcpy(wrqu.ap_addr.sa_data, pmlmepriv->cur_network.network.MacAddress, ETH_ALEN); DBG_88E_LEVEL(...
false
false
false
false
false
0
gtk_sheet_deactivate_cell(GtkSheet *sheet) { gboolean veto = TRUE; g_return_val_if_fail (sheet != NULL, FALSE); g_return_val_if_fail (GTK_IS_SHEET (sheet), FALSE); if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))) return FALSE; if(sheet->state != GTK_SHEET_NORMAL) return FALSE; _gtkextra_signal_emit(GTK_OBJECT(sheet...
false
false
false
false
false
0
GetPointerFromElement(Tag const &tag, const File& inF) { const DataSet &ds = inF.GetDataSet(); if( ds.FindDataElement( tag ) ) { const DataElement &de = ds.GetDataElement( tag ); return de.GetByteValue(); } return 0; }
false
false
false
false
false
0
dbus_g_type_get_struct (const char *container, GType first_type, ...) { GArray *types; GType curtype, ret; va_list args; va_start (args, first_type); types = g_array_new (FALSE, FALSE, sizeof (GType)); curtype = first_type; while (curtype != G_TYPE_INVALID)...
false
false
false
false
false
0
__fscache_wait_on_invalidate(struct fscache_cookie *cookie) { _enter("%p", cookie); wait_on_bit(&cookie->flags, FSCACHE_COOKIE_INVALIDATING, TASK_UNINTERRUPTIBLE); _leave(""); }
false
false
false
false
false
0
getOpFamilyDescription(StringInfo buffer, Oid opfid) { HeapTuple opfTup; Form_pg_opfamily opfForm; HeapTuple amTup; Form_pg_am amForm; char *nspname; opfTup = SearchSysCache(OPFAMILYOID, ObjectIdGetDatum(opfid), 0, 0, 0); if (!HeapTupleIsValid(opfTup)) elog(ERROR, "cache lookup failed for opf...
false
false
false
true
false
1
EnterCombat(Unit* pEnemy) { // Store combat start position m_creature->SetCombatStartPosition(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); if (!pEnemy) { return; } Aggro(pEnemy); }
false
false
false
false
false
0
stars_preload_background_bitmap(char *fname) { int idx; if (fname == NULL) return; idx = stars_find_bitmap(fname); if (idx == -1) { return; } Starfield_bitmaps[idx].preload = 1; }
false
false
false
false
false
0
AT_SetPDUMode(gn_data *data, struct gn_statemachine *state) { gn_error error; at_driver_instance *drvinst = AT_DRVINST(state); /* If we're already in PDU mode don't send this AT command again */ if (drvinst->pdumode) return GN_ERR_NONE; if (sm_message_send(10, GN_OP_AT_SetPDUMode, "AT+CMGF=0\r", state)) retu...
false
false
false
false
false
0
asn1_write_oid( unsigned char **p, unsigned char *start, char *oid ) { int ret; size_t len = 0; // Write OID // len = strlen( oid ); if( *p - start < (int) len ) return( POLARSSL_ERR_ASN1_BUF_TOO_SMALL ); (*p) -= len; memcpy( *p, oid, len ); ASN1_CHK_ADD( len , asn1_write...
false
true
false
false
false
1
score_consensus(bcur) struct blocks_list *bcur; { double sum[MAXAA+1], maxw, weight; int seq1, pos, width, nseq, maxaa, aamark[MAXAA+1]; int aa1, aa2; Block *block; block = bcur->block; width = block->width; nseq = block->num_sequences; /*-------------------------------------------------------...
false
false
false
false
false
0
initNoRepeatedApplyReadOnly() { outputs_ = StateOutputs(RO_INVALID + 1, ButtonPolicy::ALL_BUTTONS); state_machine_ = StateMachine(RO_INVALID + 1, StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS)); // Build the state output map outputs_[INITIAL] = CLOSE; outputs_[VALID] = RESTORE | OKAY | APPLY | CANCEL; outpu...
false
false
false
false
false
0
service_on_name_lost (Service* self, GDBusConnection* connection, const gchar* name) { const gchar* _tmp0_ = NULL; const gchar* _tmp1_ = NULL; gchar* _tmp2_ = NULL; gchar* _tmp3_ = NULL; GMainLoop* _tmp4_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (connection != NULL); g_return_if_fail (name != N...
false
false
false
false
false
0
tmEq(struct tm const& t1, struct tm const& t2) { return t1.tm_sec == t2.tm_sec && t1.tm_min == t2.tm_min && t1.tm_hour == t2.tm_hour && t1.tm_mday == t1.tm_mday && t1.tm_mon == t2.tm_mon && t1.tm_year == t2.tm_year; }
false
false
false
false
false
0
push_insn(int t, int w, int e, struct verifier_env *env) { if (e == FALLTHROUGH && insn_state[t] >= (DISCOVERED | FALLTHROUGH)) return 0; if (e == BRANCH && insn_state[t] >= (DISCOVERED | BRANCH)) return 0; if (w < 0 || w >= env->prog->len) { verbose("jump out of range from insn %d to %d\n", t, w); return ...
false
false
false
false
false
0
reloadpalette() { ht_uformat_viewer::reloadpalette(); if (analy_sub) analy_sub->output->changeConfig(); }
false
false
false
false
false
0
zl10353_attach(const struct zl10353_config *config, struct i2c_adapter *i2c) { struct zl10353_state *state = NULL; int id; /* allocate memory for the internal state */ state = kzalloc(sizeof(struct zl10353_state), GFP_KERNEL); if (state == NULL) goto error; /* setup the state */ state->i2c = i2c; me...
false
false
false
false
false
0
setLineAnd(QLineF line, QPointF pos, bool useLine) { this->setPos(pos); if (useLine) this->setLine(line); setConnector1Rect(); }
false
false
false
false
false
0
make_sem_node(Module_table *mpt, qr_operator ope, const SemanticNode *lNode, const SemanticNode *rNode) { SemanticNode *newNode, *lNewNode, *rNewNode; SemanticLeaf *lNewLeaf, *rNewLeaf; symbol_type type; Type_table *type_entry; if( lNode == NULL || rNode ...
false
false
false
false
false
0
replace() { KFind::Private* df = KFind::d; #ifdef DEBUG_REPLACE kDebug() << "d->index=" << df->index; #endif if ( df->index == INDEX_NOMATCH && df->lastResult == Match ) { df->lastResult = NoMatch; return NoMatch; } do // this loop is only because validateMatch can fail { #i...
false
false
false
false
false
0
f1x_determine_channel(struct amd64_pvt *pvt, u64 sys_addr, bool hi_range_sel, u8 intlv_en) { u8 dct_sel_high = (pvt->dct_sel_lo >> 1) & 1; if (dct_ganging_enabled(pvt)) return 0; if (hi_range_sel) return dct_sel_high; /* * see F2x110[DctSelIntLvAddr] - channel interleave mode */ if (dct_interleave_e...
false
false
false
false
false
0
TI_buildRemoteSeries(TI_DBEntry *db, TI_StudyEntry *study) { TI_GenericCallbackStruct cbs; DcmDataset *query = NULL; OFBool ok = OFTrue; cbs.db = NULL; cbs.study = study; cbs.series = NULL; TI_destroySeriesEntries(study); /* get all known studies */ TI_buildSeriesQuery(&query, study);...
false
false
false
false
false
0
md_asn_oid (int algorithm, size_t *asnlen, size_t *mdlen) { gcry_md_spec_t *spec; const byte *asnoid = NULL; spec = spec_from_algo (algorithm); if (spec) { if (asnlen) *asnlen = spec->asnlen; if (mdlen) *mdlen = spec->mdlen; asnoid = spec->asnoid; } else log_bug ("no ASN.1 OID...
false
false
false
false
false
0
M37PW(uint32 A, uint8 V) { if (EXPREGS[0] != 2) V &= 0x7; else V &= 0xF; V |= EXPREGS[0] << 3; setprg8(A, V); }
false
false
false
false
false
0
_playback_copy_to_current(struct gl_context *ctx, const struct vbo_save_vertex_list *node) { struct vbo_context *vbo = vbo_context(ctx); GLfloat vertex[VBO_ATTRIB_MAX * 4]; GLfloat *data; GLuint i, offset; if (node->current_size == 0) return; if (node->current_data) {...
false
false
false
false
false
0
FcParseString (FcConfigParse *parse, FcVStackTag tag) { FcChar8 *s; if (!parse->pstack) return; s = FcStrBufDone (&parse->pstack->str); if (!s) { FcConfigMessage (parse, FcSevereError, "out of memory"); return; } if (!FcVStackPushString (parse, tag, s)) FcStrFree (s); }
false
false
false
false
false
0
area_histogram() { facet_id f_id; /* facet being worked on */ int bincount[HISTO_BINS]; int n; REAL ref_area = web.total_area/1000; for ( n = 0 ; n < HISTO_BINS ; n++ ) bincount[n] = 0; /* main loop sweeping over all triangles */ FOR_ALL_FACETS(f_id) { REAL area; /* area of triangle *...
false
true
false
false
false
1
getSingleConstraintMatchWeight( AsmOperandInfo &info, const char *constraint) const { ConstraintWeight weight = CW_Invalid; Value *CallOperandVal = info.CallOperandVal; // If we don't have a value, we can't do a match, // but allow it at the lowest weight. if (CallOperandVal == NULL) return CW_Def...
false
false
false
false
false
0
__lambda7_ (Block6Data* _data6_, GIsiCommErrorCode _error_, const gchar* msg) { NokiaIsiIsiDeviceGetInformation * self; const gchar* _tmp0_ = NULL; GIsiCommErrorCode _tmp1_ = 0; GHashTable* _tmp3_ = NULL; GHashTable* _tmp4_ = NULL; gchar* _tmp5_ = NULL; const gchar* _tmp6_ = NULL; GVariant* _tmp7_ = NULL; self...
false
false
false
false
false
0
val_exp_cred_args(OM_uint32 *minor_status, gss_cred_id_t cred_handle, gss_buffer_t token) { /* Initialize outputs. */ if (minor_status != NULL) *minor_status = 0; if (token != GSS_C_NO_BUFFER) { token->length = 0; token->value = NULL; } /* Validate argumen...
false
false
false
false
false
0
visitShl(BinaryOperator &I) { if (Value *V = SimplifyShlInst(I.getOperand(0), I.getOperand(1), I.hasNoSignedWrap(), I.hasNoUnsignedWrap(), TD)) return ReplaceInstUsesWith(I, V); if (Instruction *V = commonShiftTransforms(I)) return V; ...
false
false
false
false
false
0
GC_enable_incremental GC_PROTO(()) { # if !defined(SMALL_CONFIG) && !defined(KEEP_BACK_PTRS) /* If we are keeping back pointers, the GC itself dirties all */ /* pages on which objects have been marked, making */ /* incremental GC pointless. */ if (!GC_find_leak) { DCL_LOCK_STATE; DISABLE_SIGN...
false
false
false
false
false
0
dfb_gfxcard_state_release( CardState *state ) { D_ASSERT( card != NULL ); D_ASSERT( card->shared != NULL ); D_MAGIC_ASSERT( state, CardState ); D_ASSERT( state->destination != NULL ); /* start command processing if not already running */ if (card->funcs.EmitCommands) card->funcs...
false
false
false
false
false
0
seek_mpegps(bgav_demuxer_context_t * ctx, int64_t time, int scale) { int i; mpegps_priv_t * priv; priv = ctx->priv; /* Reset lpcm timestamps */ for(i = 0; i < ctx->tt->cur->num_audio_streams; i++) { if(ctx->tt->cur->audio_streams[i].fourcc == BGAV_MK_FOURCC('L','P','C','M')) { lp...
false
false
false
false
false
0
get_u64_parm (int optional, const char flag_c, int *flag_p, __u64 *value_p, unsigned int min_value, __u64 limit, const char *eprefix, const char *emsg) { int got_value = 0; __u64 value = *value_p; char *endp = NULL; if (!*argp && argc && (isdigit(**argv) || (flag_p && flag_c == **argv))) argp = *argv++, --argc...
false
false
false
false
false
0
s5k4ecgx_write(struct i2c_client *client, u32 addr, u16 val) { u16 high = addr >> 16, low = addr & 0xffff; int ret; v4l2_dbg(3, debug, client, "write: 0x%08x : 0x%04x\n", addr, val); ret = s5k4ecgx_i2c_write(client, REG_CMDWR_ADDRH, high); if (!ret) ret = s5k4ecgx_i2c_write(client, REG_CMDWR_ADDRL, low); if (...
false
false
false
false
false
0
popupMenu() { if (m_last_button_x < x() || m_last_button_x > x() + static_cast<signed>(width())) m_last_button_x = x(); popupMenu(m_last_button_x, frame().titlebarHeight() + frame().y()); }
false
false
false
false
false
0
setColor(const QColor & color, double op) { m_pen.setBrush(QBrush(color)); m_opacity = op; m_colorName = color.name(); this->update(); }
false
false
false
false
false
0
goldfish_audio_open(struct inode *ip, struct file *fp) { if (!audio_data) return -ENODEV; if (atomic_inc_return(&open_count) == 1) { fp->private_data = audio_data; audio_data->buffer_status = (AUDIO_INT_WRITE_BUFFER_1_EMPTY | AUDIO_INT_WRITE_BUFFER_2_EMPTY); AUDIO_WRITE(audio_data, AUDIO_INT_ENABLE...
false
false
false
false
false
0
xfs_iext_bno_to_irec( xfs_ifork_t *ifp, /* inode fork pointer */ xfs_fileoff_t bno, /* block number to search for */ int *erp_idxp) /* irec index of target ext list */ { xfs_ext_irec_t *erp = NULL; /* indirection array pointer */ xfs_ext_irec_t *erp_next; /* next indirection array entry */ int erp_idx; /* ind...
false
false
false
false
false
0
get_children_pid(struct inode *inode, struct pid *pid_prev, loff_t pos) { struct task_struct *start, *task; struct pid *pid = NULL; read_lock(&tasklist_lock); start = pid_task(proc_pid(inode), PIDTYPE_PID); if (!start) goto out; /* * Lets try to continue searching first, this gives * us significant speed...
false
false
false
false
false
0
bad_rock(struct permonst *mdat, xchar x, xchar y) { return ((In_sokoban(&u.uz) && sobj_at(BOULDER,x,y)) || (IS_ROCK(levl[x][y].typ) && (!tunnels(mdat) || needspick(mdat) || !may_dig(x,y)) && !(passes_walls(mdat) && may_passwall(x,y)))); }
false
false
false
false
false
0
output_results(const struct options *opts, const char *name, minmax *table, int table_size,off_t data_size) { minmax total_mm; total_mm = accumulate_minmax_stuff(table, table_size); print_indent(3); output_report("%s (%d iteration(s)):\n", name,table_size); /* Note: The maximum throu...
false
false
false
false
false
0
AppendProperty(const char* prop, const char* value, bool asString) { if (!prop) { return; } this->Properties.AppendProperty(prop, value, cmProperty::SOURCE_FILE, asString); }
false
false
false
false
false
0
consider_index_join_outer_rels(PlannerInfo *root, RelOptInfo *rel, IndexOptInfo *index, IndexClauseSet *rclauseset, IndexClauseSet *jclauseset, IndexClauseSet *eclauseset, List **bitindexpaths, List *indexjoinclauses, int considered_clauses, ...
false
false
false
false
false
0
of_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env) { int sl; if ((!dev) || (!dev->of_node)) return -ENODEV; /* Devicetree modalias is tricky, we add it in 2 steps */ if (add_uevent_var(env, "MODALIAS=")) return -ENOMEM; sl = of_device_get_modalias(dev, &env->buf[env->buflen-1], ...
false
false
false
false
false
0
get_time_list(char *arg, u32 *times, u32 *nb_times) { char *str; Float var; Double sec; u32 h, m, s, ms, f, fps; if (!arg || (arg[0]=='-') || !isdigit(arg[0])) return 0; /*SMPTE time code*/ if (strchr(arg, ':') && strchr(arg, ';') && strchr(arg, '/')) { if (sscanf(arg, "%02ud:%02ud:%02ud;%02ud/%02ud", &h, &m,...
false
false
false
false
false
0
getFrameLoop(const c8* name, s32& outBegin, s32&outEnd, s32& outFPS) const { for (u32 i=0; i < AnimationData.size(); ++i) { if (AnimationData[i].name == name) { outBegin = AnimationData[i].begin << MD2_FRAME_SHIFT; outEnd = AnimationData[i].end << MD2_FRAME_SHIFT; outEnd += MD2_FRAME_SHIFT == 0...
false
false
false
false
false
0
set ( void* t ) { if ( t == NULL ){ setNull(); return; } //make sure we have a threadlocal context (for cleanup) bool ret; INIT_THREAD(ret); assert(ret); _LUCENE_THREADID_TYPE id = _LUCENE_CURRTHREADID; //drop a reference to this ThreadLocal in ThreadData { #ifndef _CL_DISABLE_MULTITHREADING //slightly...
false
false
false
false
false
0
p_clear_one_point(gint idx) { if((idx >= 0) && (idx <= pvals->point_idx_max)) { pvals->point[idx].opacity = 100.0; /* 100 percent (no transparecy) */ pvals->point[idx].w_resize = 100.0; /* 100% no resizize (1:1) */ pvals->point[idx].h_resize = 100.0; /* 100% no resizize (1:1) */ pvals->point[idx]...
false
false
false
false
false
0
extend_assign_role_to_user(hashtab_key_t k __attribute__ ((unused)), hashtab_datum_t d, void *args) { user_datum_t *user = (user_datum_t *) d; uint32_t *value = (uint32_t *) args; if (ebitmap_set_bit(&user->roles.roles, *value - 1, 1)) { return -1; } return 0; }
false
false
false
false
false
0
up(void) { if(vsb()->value() > vsb()->min()) { vsb()->value(vsb()->value()-scrollInc()); } }
false
false
false
false
false
0
tdb_close(TDB_CONTEXT *tdb) { TDB_CONTEXT **i; int ret = 0; if (tdb->map_ptr) { if (tdb->flags & TDB_INTERNAL) SAFE_FREE(tdb->map_ptr); else tdb_munmap(tdb); } SAFE_FREE(tdb->name); if (tdb->fd != -1) ret = close(tdb->fd); SAFE_FREE(tdb->locked); /* Remove from contexts list */ for (i = &tdbs; *i...
false
false
false
false
false
0
findradius (edict_t *from, vec3_t org, float rad) { vec3_t eorg; int j; if (!from) from = g_edicts; else from++; for ( ; from < &g_edicts[globals.num_edicts]; from++) { if (!from->inuse) continue; if (from->solid == SOLID_NOT) continue; for (j=0 ; j<3 ; j++) eorg[j] = org[j] - (from->s.origin...
false
false
false
false
false
0
initialiseSample() { using namespace CEGUI; // load windows look SchemeManager::getSingleton().create("WindowsLook.scheme"); // load font and setup default if not loaded via scheme FontManager::getSingleton().create("DejaVuSans-10.font"); // set up defaults System::getSingleton().setDefau...
false
false
false
false
false
0
on_handle_get_context (UnityWebappsGenService *service_interface, GDBusMethodInvocation *invocation, const gchar *name, const gchar *domain, const gchar *icon_url, const gchar *mime_types, gpointer user_data) { UnityWebappsService *service; const gchar *context;...
false
false
false
false
false
0
getOperatorSubjectKeyIdentifier(UINT8 *buffer, UINT32 *length) { if(m_OpCert == NULL) { (*length) = 0; return E_UNKNOWN; } return m_OpCert->getSubjectKeyIdentifier(buffer, length); }
false
false
false
false
false
0
mpz_poly_from_string(mpz_poly_t poly, const char* s) { const char* whitespace = " \t\n\r"; // read poly length unsigned long length; if (!sscanf(s, "%ld", &length)) return 0; // jump to next whitespace s += strcspn(s, whitespace); poly->length = 0; mpz_poly_ensure_alloc(poly...
false
false
false
false
false
0
bms_is_member(int x, const Bitmapset *a) { int wordnum, bitnum; /* XXX better to just return false for x<0 ? */ if (x < 0) elog(ERROR, "negative bitmapset member not allowed"); if (a == NULL) return false; wordnum = WORDNUM(x); bitnum = BITNUM(x); if (wordnum >= a->nwords) return false; if ((a->wor...
false
false
false
false
false
0
createMimeDataFromSelection() const { QTextDocument *doc = new QTextDocument(); QTextCursor cursor(doc); cursor.insertFragment(textCursor().selection()); QString text = PsiRichText::convertToPlainText(doc); delete doc; QMimeData *data = new QMimeData; data->setText(text); data->setHtml(Qt::convertFromPlainTex...
false
false
false
false
false
0
getSpecificLongString(const Calendar &cal, UnicodeString &result, UErrorCode &status) const { result.remove(); if (U_FAILURE(status)) { return result; } UnicodeString tzid; cal.getTimeZone().getID(tzid); UDate date = cal.getTime(status); if (ca...
false
false
false
false
false
0
uninitscreen(void) { if (gdata.background == 2) return; if ( gdata.noscreen ) return; printf("\x1b[r\x1b[%i;1H\n",gdata.termlines); tcsetattr(fileno(stdin), TCSANOW, &gdata.startup_tio); return; }
false
false
false
false
false
0
attr_clean( Attribute *a ) { if ( a->a_nvals && a->a_nvals != a->a_vals && !( a->a_flags & SLAP_ATTR_DONT_FREE_VALS )) { if ( a->a_flags & SLAP_ATTR_DONT_FREE_DATA ) { free( a->a_nvals ); } else { ber_bvarray_free( a->a_nvals ); } } /* a_vals may be equal to slap_dummy_bv, a static empty berval; * th...
false
false
false
false
false
0
thd_init_client_charset(THD *thd, uint cs_number) { CHARSET_INFO *cs; /* Use server character set and collation if - opt_character_set_client_handshake is not set - client has not specified a character set - client character set is the same as the servers - client character set doesn't exists in serv...
false
false
false
false
false
0
containsParamsOfPriority (ArPriority::Priority highestPriority, ArPriority::Priority lowestPriority) { if (highestPriority > lowestPriority) { return false; } for (std::list<ArConfigArg>::iterator iter = myParams.begin(); ...
false
false
false
false
false
0
H5S_select_elements(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize_t *coord) { herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_NOAPI_NOINIT(H5S_select_elements) /* Check args */ HDassert(space); HDassert(num_elem); HDassert(coord); HDassert(op == H5S_SELECT_SET...
false
false
false
false
false
0
parseResults() const { ServiceMetaDataResults results; results.type = serviceType; results.location = serviceLocation; results.name = serviceName; results.description = serviceDescription; results.interfaces = serviceInterfaces; results.latestInterfaces = latestInterfaces(); return resu...
false
false
false
false
false
0
RemovePendingRequest(SystemAddress sa) { unsigned int i; i=0; pendingRequestsMutex.Lock(); for (i=0; i < pendingRequests.Size(); i++) { Request *request = pendingRequests[i]; if (request->hostEstimatedAddress==sa) { pendingRequests.RemoveAtIndex(i); RakNet::OP_DELETE(request, _FILE_AND_LINE_...
false
false
false
false
false
0
eet_dictionary_string_check(Eet_Dictionary *ed, const char *string) { int res = 0; int i; if ((!ed) || (!string)) return 0; eina_lock_take(&ed->mutex); if ((ed->start <= string) && (string < ed->end)) res = 1; if (!res) { for (i = 0; i < ed->c...
false
false
false
false
false
0
canUnitCapture( Vehicle* eht ) { return (eht->typ->hasFunction( ContainerBaseType::ConquerBuildings ) ) && fieldAccessible ( buildingToCapture->getEntryField(), eht) == 2 ; }
false
false
false
false
false
0
new_reg_scope(RegInfo *ri, String *Str) { RegInfo *old; old = reginfo; reginfo = ri ? ri : reginfo; /* use new ri or inherit old reginfo */ if (reginfo) reginfo->links++; return old; }
false
false
false
false
false
0
remove_key_from_history() { char_u *p; int i; i = hisidx[HIST_CMD]; if (i < 0) return; p = history[HIST_CMD][i].hisstr; if (p != NULL) for ( ; *p; ++p) if (STRNCMP(p, "key", 3) == 0 && !isalpha(p[3])) { p = vim_strchr(p + 3, '='); if (p == NULL) break; ++p; for (i = 0...
false
false
false
false
false
0
mesh_embed_recurse(graph *g,mesh *m,int x, int y, int w, int h, int k5, int k33, int bigk33){ int xd,yd,wd,hd; // not minimal spacing; the k33 needs vertical offset, but the others are larger just to space them out. if( bigk33 && w>=6 && h>=5 ){ wd = 5; hd = 4; xd = random_number() % (w-wd); yd =...
false
false
false
false
false
0
fs_queue_remove_all(fs_queue *queue, const void * data) { fs_list *list; unsigned int old_length; if (queue == NULL) { return 0; } old_length = queue->length; list = queue->head; while (list) { fs_list *next = list->next; if (list->data == data) fs_que...
false
false
false
false
false
0
opj_t2_init_seg( opj_tcd_cblk_dec_t* cblk, OPJ_UINT32 index, OPJ_UINT32 cblksty, OPJ_UINT32 first) { opj_tcd_seg_t* seg = 00; OPJ_UINT32 l_nb_segs = index + 1; if (l_nb_segs > cblk->m_current_max_segs) { ...
false
false
false
false
false
0
ksz9021_config_init(struct phy_device *phydev) { const struct device *dev = &phydev->dev; const struct device_node *of_node = dev->of_node; const struct device *dev_walker; /* The Micrel driver has a deprecated option to place phy OF * properties in the MAC node. Walk up the tree of devices to * find a device ...
false
false
false
false
false
0
soup_scheme_default_port (const char *scheme) { if (scheme == SOUP_URI_SCHEME_HTTP) return 80; else if (scheme == SOUP_URI_SCHEME_HTTPS) return 443; else if (scheme == SOUP_URI_SCHEME_FTP) return 21; else return 0; }
false
false
false
false
false
0
DoubleVerifyCallback(Widget w, XtPointer tag, XtPointer call_data) #else static void DoubleVerifyCallback(w, tag, call_data) Widget w; XtPointer tag; XtPointer call_data; #endif { VerifyCallbackStruct *data = (VerifyCallbackStruct *) tag; Widget text_w; String text_value; double double_value; Boolea...
false
false
false
false
false
0
gnucash_sheet_delete_cb (GtkWidget *widget, const gint start_pos, const gint end_pos, GnucashSheet *sheet) { GtkEditable *editable; Table *table = sheet->table; VirtualLocation virt_loc; int new_text_len; const char *old_te...
false
false
false
false
false
0
get_quant_star(struct lens *lens, struct state *state) { ensure0(lens->tag == L_STAR, state->info); struct lens *child = lens->child; struct tree *tree = NULL, *tail = NULL; struct re_registers *old_regs = state->regs; uint old_nreg = state->nreg; uint end = REG_END(state); uint start = REG_...
false
false
false
false
false
0
main (int argc, char *argv[]) { tests_start_mpfr (); if (argc != 1) /* teint x [prec] */ { mpfr_t x; mpfr_prec_t p; p = (argc < 3) ? 53 : atoi (argv[2]); mpfr_init2 (x, p); mpfr_set_str (x, argv[1], 10, MPFR_RNDN); printf ("eint("); mpfr_out_str (stdout, 10, 0, x, MPFR...
false
false
false
false
true
1
dbm_cache_expire(mgs_handle_t * ctxt) { apr_status_t rv; apr_dbm_t *dbm; apr_datum_t dbmkey; apr_datum_t dbmval; apr_time_t now; apr_time_t dtime; apr_pool_t *spool; int total, deleted; now = apr_time_now(); if (now - ctxt->sc->last_cache_check < (ctxt->sc->cache_timeout) / 2) return; ctxt->sc->las...
false
false
false
false
false
0
start() { #ifndef _WIN32 set_priv(user.c_str(), chroot.c_str(), "tthttpd"); #endif if (thread) return false; #if defined(_WIN32) && !defined(USE_PTHREAD) thread = (HANDLE)_beginthread((void (*)(void*))watch_thread, 0, (void*)this); #else pthread_create(&thread, NULL, watch_thread, (void*)this); #endif return thr...
false
false
false
false
false
0
mlog_write_ull( /*===========*/ byte* ptr, /*!< in: pointer where to write */ ib_uint64_t val, /*!< in: value to write */ mtr_t* mtr) /*!< in: mini-transaction handle */ { byte* log_ptr; ut_ad(ptr && mtr); mach_write_to_8(ptr, val); log_ptr = mlog_open(mtr, 11 + 2 + 9); /* If no logging is requested, we m...
false
false
false
false
false
0