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
presolveStatus() const { if (nelems_>=0) { // feasible (or not done yet) return 0; } else { int presolveStatus = - nelems_; // If both infeasible and unbounded - say infeasible if (presolveStatus>2) presolveStatus = 1; return presolveStatus; } }
false
false
false
false
false
0
gwy_container_remove_by_prefix(GwyContainer *container, const gchar *prefix) { PrefixData pfdata; GSList *l; g_return_val_if_fail(GWY_IS_CONTAINER(container), 0); pfdata.container = container; pfdata.prefix = prefix; pfdata.prefix_length = prefix ? strlen(pfdata.prefix) : 0; pfdata.count =...
false
false
false
false
false
0
bam_read1(BGZF *fp, bam1_t *b) { bam1_core_t *c = &b->core; int32_t block_len, ret, i; uint32_t x[8]; if ((ret = bgzf_read(fp, &block_len, 4)) != 4) { if (ret == 0) return -1; // normal end-of-file else return -2; // truncated } if (bgzf_read(fp, x, 32) != 32) return -3; if (fp->is_be) { ed_swap_4p(&block_...
false
false
false
false
false
0
vc_setStringFlag(Flags flags, char* name, char* val) { try{ CVC3::CLFlags& f = *((CVC3::CLFlags*)flags); f.setFlag(name, string(val)); } catch (CVC3::Exception ex){ signal_error("vc_setStringFlag",error_int,ex); } }
false
false
false
false
false
0
g450_nextpll(const struct matrox_fb_info *minfo, const struct matrox_pll_limits *pi, unsigned int *fvco, unsigned int mnp) { unsigned int m, n, p; unsigned int tvco = *fvco; m = (mnp >> 16) & 0xFF; p = mnp & 0xFF; do { if (m == 0 || m == 0xFF) { if (m == 0) { if (p & 0x40) { return NO_MOR...
false
false
false
false
false
0
gtk_source_language_dispose (GObject *object) { GtkSourceLanguage *lang; lang = GTK_SOURCE_LANGUAGE (object); if (lang->priv->language_manager != NULL) { g_object_remove_weak_pointer (G_OBJECT (lang->priv->language_manager), (gpointer) &lang->priv->language_manager); lang->priv->language_manager = ...
false
false
false
false
false
0
xen_hvc_init(void) { int r; struct xencons_info *info; const struct hv_ops *ops; if (!xen_domain()) return -ENODEV; if (xen_initial_domain()) { ops = &dom0_hvc_ops; r = xen_initial_domain_console_init(); if (r < 0) return r; info = vtermno_to_xencons(HVC_COOKIE); } else { ops = &domU_hvc_ops; i...
false
false
false
false
false
0
traverseIndirections(Type *ta, Type *tb, void *p = NULL, bool a2b = true) { if (a2b) // check ta appears in tb { //printf("\ttraverse(1) %s appears in %s\n", ta->toChars(), tb->toChars()); if (ta->constConv(tb)) return 1; else if (ta->immutableOf()->equals(tb->immutableOf(...
false
false
false
false
false
0
reset_indexes() { for (unsigned int i=0; i < size; i++) { index[i] = i; } }
false
false
false
false
false
0
emulator_io_port_access_allowed(struct x86_emulate_ctxt *ctxt, u16 port, u16 len) { const struct x86_emulate_ops *ops = ctxt->ops; struct desc_struct tr_seg; u32 base3; int r; u16 tr, io_bitmap_ptr, perm, bit_idx = port & 0x7; unsigned mask = (1 << len) - 1; unsigned long base; ops->get_segment(ctxt, ...
false
false
false
false
false
0
ChannelNumberSpin_Changed(void) { /* * Stop current channel. */ RespawnVLC = false; StopVLC(); ClearProgramList(); if (SuppressSetChannel) { return; } if (!SelectedDev) { return; } /* * Validate channel number. */ int NewChannel = ChannelNumberSpin_ChangedGetChannelNumber(); if (NewChannel != g...
false
false
false
false
false
0
png_crc_error(png_structp png_ptr) { png_byte crc_bytes[4]; png_uint_32 crc; int need_crc = 1; if (PNG_CHUNK_ANCILLIARY(png_ptr->chunk_name)) { if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) == (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN)) need_crc = 0; } ...
false
false
false
false
false
0
page_setup(GtkWindow* parent) { if (!print_settings_h.get()) { print_settings_h.reset(gtk_print_settings_new()); } if (parent) gtk_widget_set_sensitive(GTK_WIDGET(parent), false); gtk_print_run_page_setup_dialog_async(parent, page_setup_h, print_settings_h, cgu_tpm_page_setup_done, parent); }
false
false
false
false
false
0
cos_dict_put_c_key_vector3(cos_dict_t *pcd, const char *key, const gs_vector3 *pvec) { cos_array_t *pca = cos_array_alloc(pcd->pdev, "cos_array_from_vector3"); int code; if (pca == 0) return_error(gs_error_VMerror); code = cos_array_add_vector3(pca, pvec); if (cod...
false
false
false
false
false
0
Get() { if (location().empty()) Init(""); return location(); }
false
false
false
false
false
0
find_iso639_1(const char *iso639_2) { size_t n; if (!iso639_2) return NULL; for (n=0; n<sizeof(iso639)/sizeof(iso639[0]); ++n) { if (!strcasecmp(iso639_2,iso639[n].iso639_2t) || (iso639[n].iso639_2b && !strcasecmp(iso639_2,iso639[n].iso639_2b))) { return iso639[n].iso639_1; } } return NULL; }
false
false
false
false
false
0
theoryOf(const Type& e) { const Expr& typeExpr = getBaseType(e).getExpr(); DebugAssert(!typeExpr.isNull(),"Null type"); int kind = typeExpr.getOpKind(); DebugAssert(d_theoryCore->d_theoryMap.count(kind) > 0, "Unknown operator: " + getEM()->getKindName(kind)); return d_theoryCore->d_theoryMap[kind]; }
false
false
false
false
false
0
pine_parse_name( const gchar *buf, const gchar *atp, const gchar **ap, const gchar **ep ) { gchar *name; const gchar *pos; const gchar *tmp; const gchar *bp; gint ilen; name = NULL; *ap = NULL; *ep = NULL; /* Find first non-separator char */ bp = buf; while( TRUE ) { if( strchr( ",; \n\r", *bp ) == N...
false
false
false
false
false
0
runStaticConstructorsDestructors(bool isDtors) { // Execute global ctors/dtors for each module in the program. for (unsigned m = 0, e = Modules.size(); m != e; ++m) runStaticConstructorsDestructors(Modules[m], isDtors); }
false
false
false
false
false
0
ScaleY( double scale, double offset, int start_index, int end_index ) { wxCHECK_RET( Ok(), wxT("Invalid wxPlotData") ); const int count = M_PLOTDATA->m_count; if (end_index < 0) end_index = count - 1; CHECK_START_END_INDEX_RET(start_index, end_index, count); register int i; double *y = M_PLOTDA...
false
false
false
false
false
0
generation_of(factor_vm* parent, object* obj) { if (parent->data->nursery->contains_p(obj)) return nursery_generation; else if (parent->data->aging->contains_p(obj)) return aging_generation; else if (parent->data->tenured->contains_p(obj)) return tenured_generation; else { critical_error("Bad ob...
false
false
false
false
false
0
cluster_in_db(pgsql_conn_t *pg_conn, char *cluster_name) { DEF_VARS; int found = 0; if (pg_conn->cluster_changed) { query = xstrdup_printf( "SELECT name FROM %s WHERE deleted=0 AND name='%s';", cluster_table, cluster_name); result = DEF_QUERY_RET; if (!result) { error("failed to query cluster name");...
false
false
false
false
false
0
preprocess_block(BLOCKAGE * pBlock){ int n = pBlock->num,i,j; int size=0; BOX * pBox = malloc(sizeof(BOX)*n); BOX * pPool = pBlock->pool; BOOL * m = malloc(sizeof(BOOL)*n); BOOL changed = FALSE; int counter=0; int DEADLOOP=1000; do{ memcpy(pBox,pBlock->pool,sizeof(BOX)*n); ...
false
true
false
false
false
1
i40e_vsi_request_irq(struct i40e_vsi *vsi, char *basename) { struct i40e_pf *pf = vsi->back; int err; if (pf->flags & I40E_FLAG_MSIX_ENABLED) err = i40e_vsi_request_irq_msix(vsi, basename); else if (pf->flags & I40E_FLAG_MSI_ENABLED) err = request_irq(pf->pdev->irq, i40e_intr, 0, pf->int_name, pf); else...
false
false
false
false
false
0
iwl_notification_wait_init(struct iwl_notif_wait_data *notif_wait) { spin_lock_init(&notif_wait->notif_wait_lock); INIT_LIST_HEAD(&notif_wait->notif_waits); init_waitqueue_head(&notif_wait->notif_waitq); }
false
false
false
false
false
0
do_in(MBState& s, const char* fromBegin, const char* fromEnd, const char*& fromNext, Char* toBegin, Char* toEnd, Char*& toNext) const { Utf8Codec::result retstat = ok; fromNext = fromBegin; toNext = toBegin; while(fromNext < fromEnd) { uint8_t* fnext = (uint8_...
false
false
false
false
true
1
takeScreenshotOfCurrentEpisode() { QString fileName = QFileDialog::getSaveFileName(this, tkTr(Trans::Constants::SAVE_FILE), settings()->path(Core::ISettings::UserDocumentsPath), tr("Images (*.png)")); if (!fi...
false
false
false
false
false
0
flag_is_empty(const bitflag *flags, const size_t size) { size_t i; for (i = 0; i < size; i++) if (flags[i] > 0) return FALSE; return TRUE; }
false
false
false
false
false
0
constrainSize(const Size& max_sz, const Size& min_sz) { Size curr_sz(getSize()); if (curr_sz.d_width > max_sz.d_width) { setWidth(max_sz.d_width); } else if (curr_sz.d_width < min_sz.d_width) { setWidth(min_sz.d_width); } if (curr_sz.d_height > max_sz.d_height) { setHeight(max_sz.d_height); } else if...
false
false
false
false
false
0
cconv_substruct_init(CTState *cts, CType *d, uint8_t *dp, TValue *o, MSize len, MSize *ip) { CTypeID id = d->sib; while (id) { CType *df = ctype_get(cts, id); id = df->sib; if (ctype_isfield(df->info) || ctype_isbitfield(df->info)) { MSize i = *ip; if (!gcref(df->name)) continue; /* Ig...
false
false
false
false
false
0
rg_analysis_analyze_stereo_int16 (RgAnalysisCtx * ctx, gconstpointer data, gsize size, guint depth) { gfloat conv_samples_l[256]; gfloat conv_samples_r[256]; gint32 peak_sample = 0; const gint16 *samples = (gint16 *) data; guint n_frames = size / (sizeof (gint16) * 2); gint shift = sizeof (gint16) * 8 -...
false
false
false
false
false
0
mcxStrRChrAint ( const char* p , int (*fbool)(int c) , ofs offset ) { const char* z = offset >= 0 ? p+offset : p + strlen(p) ; while (--z >= p && fbool((unsigned char) *z)) ; return (char*) (z >= p ? z : NULL) ; }
false
false
false
false
false
0
toast_datum_size(Datum value) { struct varlena *attr = (struct varlena *) DatumGetPointer(value); Size result; if (VARATT_IS_EXTERNAL(attr)) { /* * Attribute is stored externally - return the extsize whether * compressed or not. We do not count the size of the toast pointer * ... should we? */ st...
false
false
false
false
true
1
ensSliceadaptorNew( EnsPDatabaseadaptor dba) { EnsPSliceadaptor sla = NULL; if (!dba) return NULL; AJNEW0(sla); sla->Adaptor = dba; sla->CacheByIdentifier = ensCacheNew( ensECacheTypeAlphaNumeric, sliceadaptorKCacheMaxBytes, sliceadaptorKCacheMaxCount, ...
false
false
false
false
false
0
post_for_aligned(Window* w, float x_align, float y_align) { TransientWindow* t = new TransientWindow(this); t->style(new Style(style())); t->transient_for(w); t->wm_delete(new DialogHandler(this)); t->place(w->left() + 0.5 * w->width(), w->bottom() + 0.5 * w->height()); t->align(x_align, y_align...
false
false
false
false
false
0
decode_sib(x86_insn_op *op, int mod) { int sib = getsib(); int scale = mkscale(sib); int index = mkindex(sib); int base = mkbase(sib); int sdisp = mod; if ((base & 0x7) == 5 && mod == 0) { base = X86_REG_NO; sdisp = 2; } if (index == 4) { index = X86_REG_NO; } op->mem.base = base; op->mem.index = index...
false
false
false
false
false
0
MG_exit(AW_window *aww, AW_CL cl_reload_db2, AW_CL) { int reload_db2 = (int)cl_reload_db2; if (GLOBAL_gb_main) { // running inside normal ARB (aka import) mg_assert(reload_db2 == 0); aww->hide(); } else { if (reload_db2) { char *db2_name = aww->get_root()->awar(...
false
false
false
false
false
0
__intel_fbc_cleanup_cfb(struct drm_i915_private *dev_priv) { struct intel_fbc *fbc = &dev_priv->fbc; if (drm_mm_node_allocated(&fbc->compressed_fb)) i915_gem_stolen_remove_node(dev_priv, &fbc->compressed_fb); if (fbc->compressed_llb) { i915_gem_stolen_remove_node(dev_priv, fbc->compressed_llb); kfree(fbc->co...
false
false
false
false
false
0
equal(const SecAttr &b) const { try { const TLSSecAttr& a = dynamic_cast<const TLSSecAttr&>(b); if (!a) return false; // ... return false; } catch(std::exception&) { }; return false; }
false
false
false
false
false
0
qofJobSetOwner (GncJob *job, QofInstance *ent) { if (!job || !ent) { return; } gncJobBeginEdit (job); qofOwnerSetEntity(&job->owner, ent); mark_job (job); gncJobCommitEdit (job); }
false
false
false
false
false
0
stab_add_local_register( struct prog_info *pi, char *pName, char *pType, char *pRegister ){ int n, Register, Size; unsigned short CoffType, Type; struct syment *pEntry; n = strlen( pName ); /* see if it's 8 bytes or less */ Type = (unsigned short)atoi(pType + 1); /* skip past P, predefine...
false
false
false
false
true
1
property_cb (CRDocHandler *handler, CRString *name, CRTerm *values, gboolean is_important) { info_t *info; ccss_block_t *block; char const *property_name; ccss_property_class_t const *property_class; ccss_property_t *property; info = HANDLER_GET_INFO (handler); g_assert (info);...
false
false
false
false
false
0
find_range (GstQueue2 * queue, guint64 offset) { GstQueue2Range *range = NULL; GstQueue2Range *walk; /* first do a quick check for the current range */ for (walk = queue->ranges; walk; walk = walk->next) { if (offset >= walk->offset && offset <= walk->writing_pos) { /* we can reuse an existing range ...
false
false
false
false
false
0
operator() (const t_box_it& lhs, const t_box_it& rhs) const { if (lhs->height == rhs->height) return lhs->area() > rhs->area(); return lhs->height > rhs->height; }
false
false
false
false
false
0
convertAndCreateArrays( const ConstructUnitCommand::Producables& from, Container** items ) { *items = new Container(); return convertArrays( from, **items ); }
false
false
false
false
false
0
validateRequest(const string& expectedSignature, const string& url, vector<Var>& params) { string u = url; // sort params alphabetically sort(params.begin(), params.end()); // add params to url for(unsigned int i = 0; i < params.size(); i++) { u += params[i].key + params[i].value; ...
false
false
false
false
false
0
wait_for_writer(struct btrfs_root *root) { DEFINE_WAIT(wait); while (atomic_read(&root->log_writers)) { prepare_to_wait(&root->log_writer_wait, &wait, TASK_UNINTERRUPTIBLE); mutex_unlock(&root->log_mutex); if (atomic_read(&root->log_writers)) schedule(); finish_wait(&root->log_writer_wait, &wait); m...
false
false
false
false
false
0
utomatch(BW *bw) { int d; int c, /* Character under cursor */ f, /* Character to find */ dir; /* 1 to search forward, -1 to search backward */ switch (c = brch(bw->cursor)) { case '(': f = ')'; dir = 1; break; case '[': f = ']'; dir = 1; break; case '{': f = '}'; dir = 1; break; case...
false
false
false
false
false
0
cl_target_option_restore (struct gcc_options *opts, struct cl_target_option *ptr) { opts->x_target_flags = ptr->x_target_flags; if (targetm.target_option.restore) targetm.target_option.restore (ptr); }
false
false
false
false
false
0
ipmi_password_file_read(char * filename) { FILE * fp; char * pass = NULL; int l; pass = malloc(16); if (pass == NULL) { lprintf(LOG_ERR, "ipmitool: malloc failure"); return NULL; } fp = ipmi_open_file_read((const char *)filename); if (fp == NULL) { lprintf(LOG_ERR, "Unable to open password file %s", ...
false
false
false
false
false
0
sticks(ptr) /* creature sticks other creatures it hits */ register struct permonst *ptr; { return((boolean)(dmgtype(ptr,AD_STCK) || dmgtype(ptr,AD_WRAP) || attacktype(ptr,AT_HUGS))); }
false
false
false
false
false
0
make_fft_table(MFCCWork *w, int n) { int m; int me, me1; w->costbl_fft = (double *)mymalloc(sizeof(double) * n); w->sintbl_fft = (double *)mymalloc(sizeof(double) * n); for (m = 1; m <= n; m++) { me = 1 << m; me1 = me / 2; w->costbl_fft[m-1] = cos(PI / me1); w->sintbl_fft[m-1] = -sin(PI / ...
false
false
false
false
false
0
TIFFFetchPerSampleShorts(TIFF* tif, TIFFDirEntry* dir, uint16* pl) { uint16 samples = tif->tif_dir.td_samplesperpixel; int status = 0; if (CheckDirCount(tif, dir, (uint32) samples)) { uint16 buf[10]; uint16* v = buf; if (dir->tdir_count > NITEMS(buf)) v = (uint16*) _TIF...
false
false
false
false
false
0
match_table_add (match_table_t *table, unsigned *flags, char* path, int32 tag1, int32 ref1, int32 tag2, int32 ref2 ) { uint32 i; if (table->nobjs == table->size) { ...
false
false
false
false
false
0
_gtk_pango_get_text_before (PangoLayout *layout, AtkTextBoundary boundary_type, gint offset, gint *start_offset, gint *end_offset) { const gchar *text; gint start, e...
false
false
false
false
false
0
decstring(int decorators[]) /* creates a string of decorators (ornament, staccato, roll, up-bow etc.) */ /* from a boolean array */ { int i, j; char decs[DECSIZE+1]; j = 0; for (i=0; i<DECSIZE; i++) { if (decorators[i]) { decs[j] = decorations[i]; j = j + 1; }; }; decs[j] = '\0'; if (...
false
false
false
false
false
0
get_slot_from_name(const char *name) { struct hotplug_slot *slot; struct list_head *tmp; list_for_each(tmp, &pci_hotplug_slot_list) { slot = list_entry(tmp, struct hotplug_slot, slot_list); if (strcmp(hotplug_slot_name(slot), name) == 0) return slot; } return NULL; }
false
false
false
false
false
0
sanei_hp_choice_isEnabled (HpChoice this, HpOptSet optset, HpData data, const HpDeviceInfo *info) { if (!this->enable) return 1; return (*this->enable)(this, optset, data, info); }
false
false
false
false
false
0
f_4856(C_word t0,C_word t1){ C_word tmp; C_word t2; C_word t3; C_word t4; C_word t5; C_word t6; C_word t7; C_stack_overflow_check; loop: if(C_truep(C_i_nullp(t1))){ return(C_SCHEME_FALSE);} else{ t2=C_slot(t1,C_fix(0)); t3=C_slot(t2,C_fix(0)); t4=C_eqp(((C_word*)t0)[2],t3); if(C_truep(t4)){ return(t4);} else{ t5=C_slot...
false
false
false
false
false
0
finish_handshake (GTlsConnectionGnutls *gnutls, GTask *task, GError **error) { GTlsCertificate *peer_certificate; GTlsCertificateFlags peer_certificate_errors; g_assert (error != NULL); peer_certificate = gnutls->priv->peer_certificate_tmp; gnutls->priv->peer_certifica...
false
false
false
false
false
0
_MW_LookupInternal(PRWaitGroup *group, PRFileDesc *fd) { /* ** Find the receive wait object corresponding to the file descriptor. ** Only search the wait group specified. */ PRRecvWait **desc; PRIntn rehash = _MW_REHASH_MAX; _PRWaiterHash *hash = group->waiter; PRUintn hidx = _MW_HASH(fd...
false
false
false
false
false
0
moverender_rider(struct state *st, Drawable drawable, GC fgc, struct field *f, PxRider *rid, float x, float y, float r) { float px, py; unsigned long int c; double cv; /* add velocity to theta */ rid->t = fmod((rid->t + rid->vt + M_PI), (2 * M_PI)) - M_PI; ...
false
false
false
false
false
0
Prune() { while ((m_leastRecentlyUsedList.size() > 50000) || (m_totalFileCount > 1000000 && m_leastRecentlyUsedList.size() > 1000) || (m_totalFileCount > 5000000 && m_leastRecentlyUsedList.size() > 100)) { tFullEntryPosition pos = m_leastRecentlyUsedList.front(); tLruList::iterator* lruIt = (tLruList::iterato...
false
false
false
false
false
0
DSDPSchurMatVariableComputeR(DSDPSchurMat M, double *rcv){ DSDPFunctionBegin; *rcv=0.0; if (M.schur->r) *rcv=1.0; DSDPFunctionReturn(0); }
false
false
false
false
false
0
e_fm2_op_registry_entry_e_fm_set(E_Fm2_Op_Registry_Entry *entry, Evas_Object *e_fm) { if (!entry) return; _e_fm2_op_registry_entry_e_fm_monitor_stop(entry); entry->e_fm = e_fm; _e_fm2_op_registry_entry_e_fm_monitor_start(entry); }
false
false
false
false
false
0
oid_rt_get_channel_hdl(struct oid_par_priv *poid_par_priv) { struct _adapter *padapter = (struct _adapter *) (poid_par_priv->adapter_context); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct NDIS_802_11_CONFIGURATION *pnic_Config; u32 channelnum; if (poid_par_priv->type_of_oid != QUERY_OID) ...
false
false
false
false
false
0
daysInYear(int year) const { Q_D(const KCalendarSystem); if (isValid(year, 1, 1)) { return d->daysInYear(year); } return -1; }
false
false
false
false
false
0
SetRepresentation(const wxString& encodedCharacter, const wxString& representation) { SendMsg(SCI_SETREPRESENTATION, (sptr_t)(const char*)wx2sci(encodedCharacter), (sptr_t)(const char*)wx2sci(representation)); }
false
false
false
false
false
0
hostStopSpooling (Host host) { ASSERT (host->spoolTime != 0) ; clearTimer (host->statsId) ; hostLogStats (host,true) ; host->spoolTime = 0 ; }
false
false
false
false
false
0
atDistanceAndAzimuth(qreal distance, qreal azimuth, qreal distanceUp) const { if (!isValid()) return QGeoCoordinate(); double resultLon, resultLat; QGeoCoordinatePrivate::atDistanceAndAzimuth(*this, distance, azimuth, &resultLon, &resultLat); if ...
false
false
false
false
false
0
test_all(const char *arg) { union lunch { long l; char ch[4]; } in, out; long l0, l1, l2, lo; long i; (void) arg; /* i only has to hold a 24-bit value. */ const long maxval = 0xff | (0xff<<8) | (0xff<<16); const double dmaxval = maxval; for (i=0; i<=maxval; i++) { if ( 0x7FFFF == (i & 0x7FFF...
false
false
false
false
false
0
host_control_smi(void) { struct apm_cmd *apm_cmd; u8 *data; unsigned long flags; u32 num_ticks; s8 cmd_status; u8 index; apm_cmd = (struct apm_cmd *)smi_data_buf; apm_cmd->status = ESM_STATUS_CMD_UNSUCCESSFUL; switch (host_control_smi_type) { case HC_SMITYPE_TYPE1: spin_lock_irqsave(&rtc_lock, flags); /...
false
false
false
false
false
0
cblas_srotmg (float *d1, float *d2, float *b1, const float b2, float *P) { #define BASE float #include "source_rotmg.h" #undef BASE }
false
false
false
false
false
0
palette_get_color(pen_t pen, UINT8 *r, UINT8 *g, UINT8 *b) { /* special case the black pen */ if (pen == get_black_pen()) *r = *g = *b = 0; /* record the result from the game palette */ else if (pen < total_colors) { *r = RGB_RED(game_palette[pen]); *g = RGB_GREEN(game_palette[pen]); *b = RGB_B...
false
false
false
false
false
0
chess_game_stop (ChessGame* self, ChessResult _result_, ChessRule rule) { ChessResult _tmp0_; ChessRule _tmp1_; ChessClock* _tmp2_; g_return_if_fail (self != NULL); _tmp0_ = _result_; self->result = _tmp0_; _tmp1_ = rule; self->rule = _tmp1_; self->is_started = FALSE; _tmp2_ = self->priv->_clock; if (_tmp2_ ...
false
false
false
false
false
0
process_array_constructor(exec_list *instructions, const glsl_type *constructor_type, YYLTYPE *loc, exec_list *parameters, struct _mesa_glsl_parse_state *state) { void *ctx = state; /* Array constructors come in two forms: sized and unsized. Sized array * constructors look like 'vec4[2](a, b)'...
false
false
false
false
false
0
findMaxMinPercentile(FIBITMAP *Y, float minPrct, float *minLum, float maxPrct, float *maxLum) { int x, y; int width = FreeImage_GetWidth(Y); int height = FreeImage_GetHeight(Y); int pitch = FreeImage_GetPitch(Y); std::vector<float> vY(width * height); BYTE *bits = (BYTE*)FreeImage_GetBits(Y); for(y = ...
false
false
false
false
false
0
parseAttribute(AttributeImpl *attr) { switch(attr->id()) { case ATTR_HREF: { bool hadAnchor = m_hasAnchor; m_hasAnchor = attr->val() != 0; document()->incDOMTreeVersion(DocumentImpl::TV_IDNameHref); if (hadAnchor != m_hasAnchor) setChanged(); if (m_has...
false
false
false
false
false
0
doc2001_init(struct mtd_info *mtd) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; this->read_byte = doc2001_read_byte; this->write_buf = doc2001_writebuf; this->read_buf = doc2001_readbuf; ReadDOC(doc->virtadr, ChipID); ReadDOC(doc->virtadr, ChipID); ReadDOC(doc->virtadr, ChipID); i...
false
false
false
false
false
0
udp_port(struct sockaddr_storage *addr, int addr_len) { char sbuf[sizeof(int)*3+1]; if (getnameinfo((struct sockaddr *)addr, addr_len, NULL, 0, sbuf, sizeof(sbuf), NI_NUMERICSERV) != 0) { av_log(NULL, AV_LOG_ERROR, "getnameinfo: %s\n", strerror(errno)); return -1; } return strtol(sbuf...
false
false
false
false
false
0
_device_reprobe(void) { int i; for (i = 0; i < user_bde->num_devices(BDE_ALL_DEVICES); i++) { if (_devices[i].devid == 0) { _devices_init(i); } } return 0; }
false
false
false
false
false
0
signal_dictionary_changed_cb(std::string d) { std::string old; if (!mdi.set_dictionary(old, d)) { toolbar.set_dictionary(old); } }
false
false
false
false
false
0
SetStringValueIfUnset(const std::string& tag, const std::string& value, bool allow_clobber, /* = true */ bool dont_print /* = false */) { std::string val; bool found = GetStringValue(t...
false
false
false
false
false
0
git_status_list_alloc(git_index *index) { git_status_list *status = NULL; int (*entrycmp)(const void *a, const void *b); if (!(status = git__calloc(1, sizeof(git_status_list)))) return NULL; entrycmp = index->ignore_case ? status_entry_icmp : status_entry_cmp; if (git_vector_init(&status->paired, 0, entrycmp)...
false
false
false
false
false
0
SendFinished(SSL* ssl) { int sendSz, finishedSz = ssl->options.tls ? TLS_FINISHED_SZ : FINISHED_SZ; byte input[FINISHED_SZ + DTLS_HANDSHAKE_HEADER_SZ]; /* max */ byte *output; Hashes* ...
false
false
false
false
false
0
bson_append_code_w_scope_n( bson *b, const char *name, const char *code, size_t len, const bson *scope ) { size_t sl, size; if ( !scope ) return BSON_ERROR; sl = len + 1; size = 4 + 4 + sl + bson_size( scope ); if ( size > (size_t)INT32_MAX ) { b->err = BSON_SIZE_OVERFLOW; r...
false
false
false
false
false
0
rdrinit (void) /* This routine initializes the bnf reader. Parameters: zerolbl: set to TRUE if the reader should issue a warning when a label evaluates to 0 Returns: undefined */ { int ndx ; curnde = NULL ; cndesze = 0 ; newnde = NULL ; curtxt = NULL ; newtxt = NULL ; for (ndx = 0 ; ndx < S...
false
false
false
false
false
0
gsd_osd_window_finalize (GObject *object) { GsdOsdWindow *window; window = GSD_OSD_WINDOW (object); if (window->priv->icon_name) { g_free (window->priv->icon_name); window->priv->icon_name = NULL; } if (window->priv->monitors_changed_id > 0) { GdkScreen *screen; screen = gtk_widget_get_screen (GTK_WIDGET...
false
false
false
false
false
0
HandleQueryGuildBankTabText(WorldPacket& recv_data) { DEBUG_LOG("WORLD: Received opcode MSG_QUERY_GUILD_BANK_TEXT"); uint8 TabId; recv_data >> TabId; uint32 GuildId = GetPlayer()->GetGuildId(); if (!GuildId) return; Guild* pGuild = sGuildMgr.GetGuildById(GuildId); if (!pGuild) ...
false
false
false
false
false
0
self_cleanup(ObMenu *menu, gpointer data) { menu_clear_entries(menu); while (desktop_menus) { menu_free(desktop_menus->data); desktop_menus = g_slist_delete_link(desktop_menus, desktop_menus); } }
false
false
false
false
false
0
cverify(void *vp) { int *msgvec = vp, *ip; int ec = 0; #ifdef HAVE_STACK_OF STACK_OF(X509) *chain = NULL; #else STACK *chain = NULL; #endif X509_STORE *store; char *ca_dir, *ca_file; ssl_init(); ssl_vrfy_level = VRFY_STRICT; if ((store = X509_STORE_new()) == NULL) { ssl_gen_err("Error creating X509 store");...
false
false
false
false
true
1
process_value_alias(const char* fn, const int line, char **argv, int argc) { DICT_ATTR *my_da, *da; DICT_VALUE *dval; if (argc != 2) { fr_strerror_printf("dict_init: %s[%d]: invalid VALUE-ALIAS line", fn, line); return -1; } my_da = dict_attrbyname(argv[0]); if (!my_da) { fr_strerror_printf("...
false
false
false
false
false
0
test_new_for_name (void) { GError *error = NULL; PolkitUnixGroup *group; group = POLKIT_UNIX_GROUP (polkit_unix_group_new_for_name ("root", &error)); g_assert (group); g_assert_no_error (error); gint group_gid = polkit_unix_group_get_gid (group); g_assert_cmpint (group_gid, ==, 0); g_object_unref (gr...
false
false
false
false
false
0
key(int k, int x, int y) { if (k == 3 || k == 27 || k == 'q') exit(0); set_centered_pic(0); if (k == KEY_F(1) || k == 'h') { help("minesweeper.html", minesweeper_help); } if (k == 'a' && penguin == PENGUIN_NORMAL) autoplay(); if (k == 'A' && penguin == PENGUIN_NORMAL) { auto_play_mode...
false
false
false
false
false
0
Close(const Request &notification) { QSharedPointer<Edge> edge = notification.GetFrom().dynamicCast<Edge>(); if(!edge) { qWarning() << "Connection attempt Edge close not from an Edge: " << notification.GetFrom()->ToString(); return; } edge->Stop("Closed from remote peer"); }
false
false
false
false
false
0
bc_gen_load_op(JVM_METHOD *meth, unsigned int lvnum, JVM_DATA_TYPE rt) { JVM_CODE_GRAPH_NODE *node; if(!meth) { BAD_ARG(); return NULL; } if(lvnum > 255) { node = bytecode0(meth, jvm_wide); bytecode1(meth, jvm_load_op[rt], lvnum); } else if(lvnum <= 3) node = bytecode0(meth, jvm_sho...
false
false
false
false
false
0
main(int argc, char **argv) { struct event* ev; struct event* timeout; struct event_base* base; evutil_socket_t pair[2]; struct timeval tv; struct cpu_usage_timer timer; double usage, secPassed, secUsed; #ifdef _WIN32 WORD wVersionRequested; WSADATA wsaData; wVersionRequested = MAKEWORD(2, 2); (void) WS...
false
false
false
false
false
0
_overlay_place(Elm_Map_Smart_Data *sd) { Eina_List *l, *ll; Elm_Map_Overlay *overlay; eina_list_free(sd->group_overlays); sd->group_overlays = NULL; EINA_LIST_FOREACH (sd->overlays, l, overlay) { // Reset groups if ((overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS) || (over...
false
false
false
false
false
0
lynxfb_ops_imageblit(struct fb_info *info, const struct fb_image *image) { unsigned int base, pitch, Bpp; unsigned int fgcol, bgcol; struct lynxfb_par *par; struct sm750_dev *sm750_dev; par = info->par; sm750_dev = par->dev; /* * each time 2d function begin to work,below three variable always need * be...
false
false
false
false
false
0
emitCaretPositionChanged(const DOM::Position &pos) { // pos must not be already converted to range-compliant coordinates Position rng_pos = pos.equivalentRangeCompliantPosition(); Node node = rng_pos.node(); emit caretPositionChanged(node, rng_pos.offset()); }
false
false
false
false
false
0