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
parse_yesno(const char *str, int def) { int ret = def; if (str) { switch (*str) { case 'f': /* false */ case 'F': /* FALSE */ case 'n': /* no */ case 'N': /* NO */ case '0': /* 0 */ ret = 0; break; case 't': /* true */ case 'T': /* TRUE */ case 'y': /* yes */ case 'Y': /* YES */ case...
false
false
false
false
false
0
is_subject_of_agreement_remote(Slapi_Entry *e, const Repl_Agmt *ra) { int retval = 0; int is_in_subtree = 0; const Slapi_DN *agreement_subtree = NULL; const Slapi_DN *sdn = NULL; const subtreePair* subtree_pairs = NULL; if (!e) { goto error; } sdn = slapi_entry_get_sdn_const(e); /* First test for the sync'e...
false
false
false
false
false
0
firestream_init_one(struct pci_dev *pci_dev, const struct pci_device_id *ent) { struct atm_dev *atm_dev; struct fs_dev *fs_dev; if (pci_enable_device(pci_dev)) goto err_out; fs_dev = kzalloc (sizeof (struct fs_dev), GFP_KERNEL); fs_dprintk (FS_DEBUG_ALLOC, "Alloc fs-dev: %p(%Zd)\n", fs_dev, s...
false
false
false
false
false
0
thumbnail_done (NautilusDirectory *directory, NautilusFile *file, GdkPixbuf *pixbuf, gboolean tried_original) { const char *thumb_mtime_str; time_t thumb_mtime = 0; file->details->thumbnail_is_up_to_date = TRUE; file->details->thumbnail_tried_original = tried_original; if (file->details->thumbnail) { g_...
false
false
false
false
true
1
DerefInc(SQInteger op,SQObjectPtr &target, SQObjectPtr &self, SQObjectPtr &key, SQObjectPtr &incr, bool postfix) { SQObjectPtr tmp, tself = self, tkey = key; if (!Get(tself, tkey, tmp, false, true)) { Raise_IdxError(tkey); return false; } _RET_ON_FAIL(ARITH_OP( op , target, tmp, incr)) Set(tself, tkey, target,true)...
false
false
false
false
false
0
setbrightness(struct gspca_dev *gspca_dev, s32 val) { struct sd *sd = (struct sd *) gspca_dev; if (sd->sensor == SENSOR_OV767x) { if (val < 0) val = 0x80 - val; sccb_reg_write(gspca_dev, 0x55, val); /* bright */ } else { sccb_reg_write(gspca_dev, 0x9b, val); } }
false
false
false
false
false
0
Print_Bonds( reax_system *system, reax_list *bonds, char *fname ) { int i, j, pj; bond_data *pbond; bond_order_data *bo_ij; FILE *f = fopen( fname, "w" ); for( i = 0; i < system->N; ++i ) for( pj = Start_Index(i, bonds); pj < End_Index(i, bonds); ++pj ) { pbond = &(bonds->select.bond_list[pj]); ...
false
false
false
false
false
0
ComputeNextStep(vtkParticleCollection * particles, double dt) { this->DeformationModel->ComputeForces(); for(int id=0; id<particles->GetNumberOfItems(); id++) { vtkParticle * part = particles->GetParticle(id); double * vel = part->GetVelocity(); double * pos = part->GetPosition(); double * dvi =...
false
false
false
false
false
0
includes (const Unit *a, const Unit *b) const { Map::const_iterator a_iter = _nodes.find (a); Map::const_iterator b_iter = _nodes.find (b); if (a_iter == _nodes.end () || b_iter == _nodes.end ()) return false; bool result = includes (a_iter->second, b_iter->second); // reset 'visited' flags reset_vis...
false
false
false
false
false
0
rcu_torture_cb(struct rcu_head *p) { struct rcu_torture *rp = container_of(p, struct rcu_torture, rtort_rcu); if (torture_must_stop_irq()) { /* Test is ending, just drop callbacks on the floor. */ /* The next initialization will pick up the pieces. */ return; } if (rcu_torture_pipe_update_one(rp)) rcu_tort...
false
false
false
false
false
0
epic_resume (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); if (!netif_running(dev)) return 0; epic_restart(dev); /* pci_power_on(pdev); */ return 0; }
false
false
false
false
false
0
main(int argc, char **argv) { char *key, output[SHA256_DIGEST_SIZE], i, *info; int infolen; long keysize; if (argc < 2) { fprintf(stderr, "Usage: %s <message>\n", argv[0]); return 1; } infolen = strlen(argv[1]); info = argv[1]; FILE *keyfile = fopen(KEYFILE, "r"); if (!keyfile) { perror(KEYFILE); re...
false
false
false
false
false
0
GetDump(uint32 guid) { std::string dump; dump += "IMPORTANT NOTE: This sql queries not created for apply directly, use '.pdump load' command in console or client chat instead.\n"; dump += "IMPORTANT NOTE: NOT APPLY ITS DIRECTLY to character DB or you will DAMAGE and CORRUPT character DB\n\n"; // revis...
false
false
false
false
false
0
SaveVec(KN<double> *const & f, string *const & nome) { std::ofstream outfile (nome->data(),ios_base::binary); // To access value at node i of vector N, do as follow: *(N[0]+i) // Explanation (C++ for dummies as I am ;-): // N is an alias to the KN object. // N[0] is a pointer to the first ...
false
false
false
false
false
0
cargoChanged() { //unitHighLight.setNew( unitHighLight.getMark() ); if ( cargoWidget ) { cargoWidget->redrawAll(); if ( mainScreenWidget && mainScreenWidget->getUnitInfoPanel() ) mainScreenWidget->getUnitInfoPanel()->showUnitData( cargoWidget->getMarkedUnit(), NU...
false
false
false
false
false
0
_ic_process_key_event (BusInputContext *context, GVariant *parameters, GDBusMethodInvocation *invocation) { guint keyval = IBUS_KEY_VoidSymbol; guint keycode = 0; guint modifiers = 0; g_variant_get (parameters, "(uuu)", &keyval, &keyco...
false
false
false
false
false
0
builtin_hdrmacro( FRAME * frame, int flags ) { LIST * l = lol_get( frame->args, 0 ); LISTITER iter = list_begin( l ), end = list_end( l ); for ( ; iter != end; iter = list_next( iter ) ) { TARGET * t = bindtarget( list_item( iter ) ); /* Scan file for header filename macro definitions. */ if ( DEB...
false
false
false
false
false
0
zn_free_additional_subzones(zone_t *zone) { struct subzone *sz = zone->zn_arena.sz_next; while (sz) { struct subzone *next = sz->sz_next; subzone_free_arena(sz); xfree(sz); sz = next; } zone->zn_arena.sz_next = NULL; zrange_clear(zone); }
false
false
false
false
false
0
ExecIndexAdvanceArrayKeys(IndexArrayKeyInfo *arrayKeys, int numArrayKeys) { bool found = false; int j; for (j = 0; j < numArrayKeys; j++) { ScanKey scan_key = arrayKeys[j].scan_key; int next_elem = arrayKeys[j].next_elem; int num_elems = arrayKeys[j].num_elems; Datum *elem_values = arrayKeys[j]....
false
false
false
false
false
0
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); r...
false
false
false
false
false
0
setEditable(bool editable) { if (editable) { // Create a KLineEdit instead of a QLineEdit // Compared to QComboBox::setEditable, we might be missing the SH_ComboBox_Popup code though... // If a style needs this, then we'll need to call QComboBox::setEditable and then setLineEdit again ...
false
false
false
false
false
0
lcrt_accels_set_data(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { int *key; gtk_tree_model_get(model, iter, KEYVAL_COLUMN, &key, ...
false
false
false
false
false
0
raw_write_blk(io_channel channel, struct unix_private_data *data, unsigned long long block, int count, const void *buf) { ssize_t size; ext2_loff_t location; int actual = 0; errcode_t retval; if (count == 1) size = channel->block_size; else { if (count < 0) size = -count; ...
false
false
false
false
false
0
python_quote_print(FILE *stream, const char *src) { const char sq = '\''; const char bq = '\\'; const char nl = '\n'; char c; fputc(sq, stream); while ((c = *src++)) { if (c == nl) { fputc(bq, stream); fputc('n', stream); continue; } if (c == sq || c == bq) fputc(bq, stream); fputc(c, stream)...
false
false
false
false
false
0
wnck_tasklist_update_icon_geometries (WnckTasklist *tasklist, GList *visible_tasks) { gint x, y, width, height; GList *l1; for (l1 = visible_tasks; l1; l1 = l1->next) { WnckTask *task = WNCK_TASK (l1->data); GtkAllocation allocation; if (!gtk_widget_get_realized (task->butto...
false
false
false
false
false
0
UpdateProjectFile() { if (m_pControl && m_pProjectFile) { m_pProjectFile->editorPos = m_pControl->GetCurrentPos(); m_pProjectFile->editorTopLine = m_pControl->GetFirstVisibleLine(); m_pProjectFile->editorOpen = true; } }
false
false
false
false
false
0
del_vk(struct hive *hdesc, int vkofs) { struct vk_key *vk; vk = (struct vk_key *)(hdesc->buffer + vkofs); if (vk->id != 0x6b76) { printf("del_vk: Key pointer not to 'vk' node!\n"); return; } if ( !(vk->len_data & 0x80000000) && vk->ofs_data) { free_val_data(hdesc, vkofs); } free_block(hde...
false
false
false
false
false
0
mptctl_eventreport (unsigned long arg) { struct mpt_ioctl_eventreport __user *uarg = (void __user *) arg; struct mpt_ioctl_eventreport karg; MPT_ADAPTER *ioc; int iocnum; int numBytes, maxEvents, max; if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) { printk(KERN_ERR MYNAM "%s@%d...
false
false
false
false
false
0
getfuname(strom) truc *strom; { truc fun; int tok, sflg; tok = nexttok(strom,1); if(tok != SYMBOLTOK) { rerror(funcsym,err_sym,voidsym); return(parserrsym); } fun = mksym(SymBuf,&sflg); if(sflg >= sSYSTEM) { rerror(funcsym,err_funame,fun); return(parserrsym);...
false
false
false
false
false
0
doDrawPath(TPathMode mode) { bool eofill = (fillRule() == EEvenOddRule); // if (!mode) // iStream << "np"; // flush path if (mode == EFilledOnly) fillPath(eofill, false); else if (mode == EStrokedOnly) strokePath(); else { fillPath(eofill, true); strokePath(); } iStream << "\n"; }
false
false
false
false
false
0
AcpiExInsertIntoField ( ACPI_OPERAND_OBJECT *ObjDesc, void *Buffer, UINT32 BufferLength) { void *NewBuffer; ACPI_STATUS Status; UINT64 Mask; UINT64 WidthMask; UINT64 ...
false
false
false
false
false
0
_conf_new(void) { if (!_conf) { _conf = E_NEW(Module_Config, 1); /* setup defaults */ _conf->cmd_terminal = eina_stringshare_add("/usr/bin/x-terminal-emulator -e"); _conf->cmd_sudo = eina_stringshare_add("/usr/bin/gksudo --preserve-env"); } _conf->version = MOD_CONFIG_F...
false
false
false
false
false
0
toString( std::string& to ) const { UT_UTF8String x; toString( x ); to = x.utf8_str(); return to; }
false
false
false
false
false
0
DoClampToUint8(HClampToUint8* instr) { HValue* value = instr->value(); Representation input_rep = value->representation(); LOperand* reg = UseRegister(value); if (input_rep.IsDouble()) { return DefineAsRegister(new LClampDToUint8(reg, TempRegister())); } else...
false
false
false
false
false
0
borg_decurse_weapon(void) { /* Nothing to decurse */ if (borg_uses_swaps && decurse_weapon_swap == -1) return (FALSE); /* Ability for heavy curse */ if (borg_uses_swaps && decurse_weapon_swap == 1) { if (-1 == borg_slot(TV_SCROLL,SV_SCROLL_STAR_REMOVE_CURSE) && !borg_prayer_okay...
false
false
false
false
false
0
cstate_pmus_register(void) { int err; if (has_cstate_core) { err = perf_pmu_register(&cstate_core_pmu, cstate_core_pmu.name, -1); if (WARN_ON(err)) pr_info("Failed to register PMU %s error %d\n", cstate_core_pmu.name, err); } if (has_cstate_pkg) { err = perf_pmu_register(&cstate_pkg_pmu, cstate_pkg_p...
false
false
false
false
false
0
setvramb8(uint8 *p, uint32 b) { int x; FCEUPPU_LineUpdate(); for(x=7;x>=0;x--) VPageR[x]=p+(b<<13); PPUCHRRAM|=255; }
false
false
false
false
false
0
frogr_model_set_remote_photosets (FrogrModel *self, GSList *remote_sets) { FrogrModelPrivate *priv = NULL; FrogrPhotoSet *set = NULL; GSList *item = NULL; g_return_if_fail(FROGR_IS_MODEL (self)); priv = FROGR_MODEL_GET_PRIVATE (self); /* Remove all the remote photosets *...
false
false
false
false
false
0
UnStandby() { PEERNODE *p = m_head; for( ; p; p = p->next ){ if( PEER_IS_SUCCESS(p->peer) ) p->peer->UnStandby(); } }
false
false
false
false
false
0
assign_warnings(graph_chars) register uchar *graph_chars; { int i; for (i = 0; i < WARNCOUNT; i++) if (graph_chars[i]) warnsyms[i] = graph_chars[i]; }
false
false
false
false
true
1
gimmix_search_init (void) { if (!gimmix_config_get_bool("enable_search")) gtk_widget_hide (search_box); return; }
false
false
false
false
false
0
center_under_mouse(Widget shell, int w, int h) { int x,y,rx,ry,mask,width=0,height=0,nx,ny; Window root,child; if (!XtIsShell(shell)) oops("move_under_mouse: not a shell"); XQueryPointer(dpy, RootWindowOfScreen(XtScreen(shell)), &root, &child, &rx, &ry, &x, &y, &mask); XtVaGetVal...
false
false
false
false
false
0
_stream_writen(HSQUIRRELVM v) { SETUP_STREAM(v); SQInteger format, ti; SQFloat tf; sq_getinteger(v, 3, &format); switch(format) { case 'l': { SQInteger i; sq_getinteger(v, 2, &ti); i = ti; self->Write(&i, sizeof(SQInteger)); } break; case 'i': { SQInt32 i; sq_getinteger(v, 2, &ti); i = (SQIn...
false
false
false
false
false
0
snd_i2c_bit_readbyte(struct snd_i2c_bus *bus, int last) { int i; unsigned char data = 0; snd_i2c_bit_set(bus, 0, 1); snd_i2c_bit_direction(bus, 1, 0); /* SCL - wr, SDA - rd */ for (i = 7; i >= 0; i--) { snd_i2c_bit_set(bus, 1, 1); if (snd_i2c_bit_data(bus, 0)) data |= (1 << i); snd_i2c_bit_set(bus, 0, 1)...
false
false
false
false
false
0
dump_edge_info (FILE *file, edge e, int do_succ) { basic_block side = (do_succ ? e->dest : e->src); /* both ENTRY_BLOCK_PTR & EXIT_BLOCK_PTR depend upon cfun. */ if (cfun && side == ENTRY_BLOCK_PTR) fputs (" ENTRY", file); else if (cfun && side == EXIT_BLOCK_PTR) fputs (" EXIT", file); else fprint...
false
false
false
false
true
1
shared_bind (int rebind) { ACE_TRACE (ACE_TEXT ("ACE_Name_Handler::shared_bind")); ACE_NS_WString a_name (this->name_request_.name (), this->name_request_.name_len () / sizeof (ACE_WCHAR_T)); ACE_NS_WString a_value (this->name_request_.value (), this->name_reques...
false
false
false
false
false
0
DeleteItem(unsigned int i) { if(i < GetItemCount()) { bool select = listbox->IsSelected(i); listbox->Delete(i); if(select) { if(i < (unsigned int) listbox->GetCount()) listbox->SetSelection(i); else if(listbox->GetCount() > 0) listbox->...
false
false
false
false
false
0
reset() { // hopefully, no one derived from this class... this->~Solver(); new (this) Solver(); }
false
false
false
false
false
0
_tag_is_set (FrogrPicture *self, const gchar *tag) { FrogrPicturePrivate *priv = FROGR_PICTURE_GET_PRIVATE (self); GSList *item; gboolean tag_found = FALSE; for (item = priv->tags_list; item; item = g_slist_next (item)) { if (g_str_equal ((gchar *)item->data, tag)) { tag_found = TRU...
false
false
false
false
false
0
mapFloatItem(const std::string& name, double data) { m_socket << '#' << hexEncode(name) << '=' << data; }
false
false
false
false
false
0
think_resign() { //---- only resign when the ship has stopped ----// if( !is_ai_all_stop() ) return 0; //--- retire this ship if we have better ship technology available ---// if( unit_id == UNIT_TRANSPORT ) { if( unit_res[UNIT_CARAVEL]->get_nation_tech_level(nation_recno) > 0 || unit_res[UNIT_GALLEON]-...
false
false
false
false
false
0
tt3650_ci_read_cam_control(struct dvb_ca_en50221 *ca, int slot, u8 address) { u8 buf[2]; int ret; if (slot) return -EINVAL; buf[0] = address & 3; ret = tt3650_ci_msg_locked(ca, TT3650_CMD_CI_RD_CTRL, buf, 1, 2); ci_dbg("0x%02x -> %d 0x%02x", address, ret, buf[1]); if (ret < 0) return ret; return buf[1...
false
false
false
false
false
0
CreateRefData() const { return new wxPlotMarkerRefData; }
false
false
false
false
false
0
gamgi_phys_cell_conventional_I (gamgi_cell *cell, int offset, int k0, int k1, int j0, int j1, int i0, int i1, double *points) { int i, j, k; /********************************* * store coordinates for i nodes * *********************************/ for (i = i0; i <= i1; i++) { for (j = j0; j <= j1; j++) { f...
false
false
false
false
false
0
collect_obj_classes(ilets, otmp, here, incl_gold, filter, itemcount) char ilets[]; register struct obj *otmp; boolean here, incl_gold; boolean FDECL((*filter),(OBJ_P)); int *itemcount; #else int collect_obj_classes(ilets, otmp, here, filter, itemcount) char ilets[]; register struct obj *otmp; boolean here; boolean FDEC...
false
false
false
false
false
0
acs_success(Kwv *kwv, Kwv *kwv_args, Acs_result *result) { int i, st; char *p; Kwv_pair *v; for (v = conf_var(CONF_ACS_SUCCESS); v != NULL; v = v->next) { p = v->val; log_msg((LOG_TRACE_LEVEL, "Evaluating ACS_SUCCESS expr: \"%s\"", p)); st = acs_eval(p, kwv, kwv_args, result->cr, NULL); if (acs_expr_error_...
false
false
false
false
false
0
in_package(n, ns, ul,isize,esize) object n, ns, ul; int isize,esize; { object x, y; vs_mark; x = find_package(n); if (x == Cnil) { #ifdef ANSI_COMMON_LISP FEpackage_error(n,"No such package"); return Cnil; #else x = make_package(n, ns, ul,isize,esize); goto L; #endif } if (isize) rehash_pack...
false
false
false
false
false
0
vicam_control_msg(struct gspca_dev *gspca_dev, u8 request, u16 value, u16 index, u8 *data, u16 len) { int ret; ret = usb_control_msg(gspca_dev->dev, usb_sndctrlpipe(gspca_dev->dev, 0), request, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, value, index, data, len, 1000); if ...
false
false
false
false
false
0
clear() { m_vOffsets.clear(); UT_VECTOR_PURGEALL(GR_Item *, m_vItems); m_vItems.clear(); }
false
false
false
false
false
0
parseAutogroup (const unsigned char *line) { vString *name = vStringNew (); /* Found Autocommand Group (augroup) */ const unsigned char *cp = line + 2; if ((int) *++cp == 'r' && (int) *++cp == 'o' && (int) *++cp == 'u' && (int) *++cp == 'p') ++cp; if (isspace ((int) *cp)) { while (*cp && isspace ((int) *c...
false
false
false
false
false
0
check_ranks (int n, const int *ranks) { int i; for (i=1 ; i < n ; i++) { if ( ranks[i-1] > ranks [i] ) { return false; } } return true; }
false
false
false
false
false
0
get_dirty_rectangle(void) { static cairo_rectangle_t rect; static cairo_rectangle_t rect_full = { 0, 0, WIDTH_MM * ONSCREEN_SURFACE_SCALE, HEIGHT_MM * ONSCREEN_SURFACE_SCALE}; if (_invalidated) { _invalidated = false; return &rect_full; } if (!_dirty) return NULL; cairo_rectangle_...
false
false
false
false
false
0
tsls_free_data (const MODEL *pmod) { gretl_matrix *endog = gretl_model_get_data(pmod, "endog"); double **X = gretl_model_get_data(pmod, "tslsX"); int i, m = 0; if (endog != NULL && X != NULL) { for (i=0; i<pmod->ncoeff; i++) { if (endog->val[i] != 0) m++; } for (i=0; i<m; i++) { free(X[i])...
false
false
false
false
false
0
table_XOR (struct GMTMATH_INFO *info, double **stack[], GMT_LONG *constant, double *factor, GMT_LONG last, GMT_LONG col, GMT_LONG n_row) /*OPERATOR: XOR 2 1 B if A == NaN, else A. */ { GMT_LONG i, prev; double a = 0.0, b = 0.0; prev = last - 1; if (constant[prev]) a = factor[prev]; if (constant[last]) b = factor...
false
false
false
false
false
0
eb_cli_help(const char *cmd) { unsigned int i = 0; printf("Usage: %s [OPTION]...\n", cmd); printf("An integrated instant messenger program.\n"); printf("Supports AIM, ICQ, MSN, Yahoo!, Jabber, and IRC.\n\n"); #if defined (HAVE_GETOPT) || defined (HAVE_GETOPT_LONG) for (i = 0; options[i].help != NULL; i++) { #if...
false
false
false
false
false
0
fm_file_info_set_from_menu_cache_item(FmFileInfo* fi, MenuCacheItem* item) { const char* icon_name; icon_name = menu_cache_item_get_icon(item); _fm_path_set_display_name(fi->path, menu_cache_item_get_name(item)); if(icon_name) { fi->icon = fm_icon_from_name(icon_name); } if(menu_cach...
false
false
false
false
false
0
removeASymbolAfter(const Expr *E, char Symbol) { SourceRange ExprRange = E->getSourceRange(); SourceLocation LocStart = ExprRange.getBegin(); const char *StartBuf = SrcManager->getCharacterData(LocStart); int Offset = 0; while (*StartBuf != Symbol) { StartBuf++; Off...
false
false
false
false
false
0
EffectApplyAreaAura(SpellEffectIndex eff_idx) { if (!unitTarget) { return; } if (!unitTarget->IsAlive()) { return; } AreaAura* Aur = new AreaAura(m_spellInfo, eff_idx, &m_currentBasePoints[eff_idx], m_spellAuraHolder, unitTarget, m_caster, m_CastItem); m_spellAuraHolder->AddAura(Aur, ef...
false
false
false
false
false
0
secondary_rig_selected_cb (GtkComboBox *box, gpointer data) { GtkRigCtrl *ctrl = GTK_RIG_CTRL (data); gchar *buff; gchar *name1, *name2; sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s:%s: Secondary device selected: %d"), __FILE__, __FUNCTION__, gtk_combo_bo...
false
false
false
false
false
0
cli_int_history(struct cli_def *cli, char *command, char *argv[], int argc) { int i; cli_error(cli, "\nCommand history:"); for (i = 0; i < MAX_HISTORY; i++) { if (cli->history[i]) cli_error(cli, "%3d. %s", i, cli->history[i]); } return CLI_OK; }
false
false
false
false
false
0
intel_lr_context_do_pin(struct intel_context *ctx, struct intel_engine_cs *engine) { struct drm_device *dev = engine->dev; struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_gem_object *ctx_obj = ctx->engine[engine->id].state; struct intel_ringbuffer *ringbuf = ctx->engine[engine->id].ring...
false
false
false
false
false
0
eb_set_hooks(EB_Hookset *hookset, const EB_Hook *hook) { EB_Error_Code error_code; const EB_Hook *h; eb_lock(&hookset->lock); LOG(("in: eb_set_hooks(hooks=[below])")); if (eb_log_flag) { for (h = hook; h->code != EB_HOOK_NULL; h++) LOG((" hook=%d", h->code)); } /* * Set hook...
false
false
false
false
false
0
gt_feature_index_gfflike_save_del(void *key, GT_UNUSED void *val, void *data, GtError *err) { GtFeatureNode *fn = (GtFeatureNode*) key; GtFeatureNodeIterator *it; unsigned long *id; ObserverCallbackInfo *oci = (ObserverCallbackInfo*) data; int had_err = 0; it = ...
false
false
false
false
false
0
AcpiNsRepair_TSS ( ACPI_EVALUATE_INFO *Info, ACPI_OPERAND_OBJECT **ReturnObjectPtr) { ACPI_OPERAND_OBJECT *ReturnObject = *ReturnObjectPtr; ACPI_STATUS Status; ACPI_NAMESPACE_NODE *Node; /* * We can only sort the _TSS return package if there is no _PSS in the ...
false
false
false
false
false
0
hm_addhash_bin(struct cli_matcher *root, const void *binhash, enum CLI_HASH_TYPE type, uint32_t size, const char *virusname) { const unsigned int hlen = hashlen[type]; const struct cli_htu32_element *item; struct cli_sz_hash *szh; struct cli_htu32 *ht; int i; if (size) { /* size non-zer...
false
true
false
false
false
1
gdkrgb_gdk_draw_gray_image(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj drawable_scm; GdkDrawable* drawable; ScmObj gc_scm; GdkGC* gc; ScmObj x_scm; int x; ScmObj y_scm; int y; ScmObj width_scm; int width; ScmObj height_scm; int height; ScmObj dith_scm; int dith; ScmObj buf_scm; ...
false
false
false
false
false
0
Dump(GDALPDFArray* poArray, int nDepth) { if (nDepthLimit >= 0 && nDepth > nDepthLimit) return; int nLength = poArray->GetLength(); int i; CPLString osIndent; for(i=0;i<nDepth;i++) osIndent += " "; for(i=0;i<nLength;i++) { fprintf(f, "%sItem[%d]:", osIndent.c_str(), ...
false
false
false
false
false
0
on_isymbol_manager_sys_single_scan_end (SymbolDBEngine *dbe, SymbolDBPlugin *sdb_plugin) { PackageScanData *pkg_scan; /* ignore signals when scan-end has already been received */ if (sdb_plugin->current_pkg_scanned == NULL) { return; } pkg_scan = sdb_plugin->current_pkg_scanned; pkg_scan->files_done++; gt...
false
false
false
false
false
0
rds_language_lut(const uint8_t lc) { const uint8_t max_lc = 127; const char *language; static const char *language_lut[128] = { "Unknown", "Albanian", "Breton", "Catalan", "Croatian", "Welsh", "Czech", "Danish", "German", "English", "Spanish", "Esperanto", "Estonian", "Basque", "Faroese", "French", "Frisi...
false
false
false
false
false
0
_af_setup_free_instruments (AFfilesetup setup) { if (setup->instruments) { for (int i=0; i < setup->instrumentCount; i++) setup->instruments[i].freeLoops(); free(setup->instruments); } setup->instruments = NULL; setup->instrumentCount = 0; }
false
false
false
false
false
0
H5HF_sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect, uint8_t *buf) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT /* Check arguments. */ HDassert(hdr); HDassert(sect); HDassert(buf); /* Check if this indirect section has a pa...
false
false
false
false
false
0
removeAppender(SharedAppenderPtr appender) { if(appender == NULL) { getLogLog().warn( LOG4CPLUS_TEXT("Tried to remove NULL appender") ); return; } LOG4CPLUS_BEGIN_SYNCHRONIZE_ON_MUTEX( appender_list_mutex ) ListIteratorType it = appenderList.begin(); while (it != appenderLi...
false
false
false
false
false
0
symbol_print(ScmObj obj, ScmPort *port, ScmWriteContext *ctx) { if (SCM_WRITE_MODE(ctx) == SCM_WRITE_DISPLAY) { SCM_PUTS(SCM_SYMBOL_NAME(obj), port); } else { if (!SCM_SYMBOL_INTERNED(obj)) SCM_PUTZ("#:", -1, port); Scm_WriteSymbolName(SCM_SYMBOL_NAME(obj), port, ctx, 0); } }
false
false
false
false
false
0
timerEvent( QTimerEvent * te ) { if ( !isVisible() ) return; if ( te->timerId() == m_sleepTimer ) wakeUp(); else if ( te->timerId() != m_animTimer ) return; if ( m_explicit ) return; // the user explicitly altered content by wheeling, don't take it away if ( m_time...
false
false
false
false
false
0
ext2_init(struct ext2_desc *desc, const char *dev_path) { int ret; struct ext2_super_block *super_block; desc->fd = open(dev_path, O_RDONLY); if (desc->fd < 0) { print_error("open device \"%s\" failed", dev_path); return desc->fd; } super_block = &desc->super_block; ret = ext2_read_super_block(desc, supe...
false
false
false
false
true
1
get_max_out_arc(HTK_HMM_Trans *tr, int state_num) { LOGPROB max_a; int afrom; LOGPROB a; max_a = LOG_ZERO; for (afrom = 0; afrom < state_num - 1; afrom++) { a = tr->a[afrom][state_num-1]; if (max_a < a) max_a = a; } return(max_a); }
false
false
false
false
false
0
readSV8(File *file) { bool readSH = false, readRG = false; while(!readSH && !readRG) { ByteVector packetType = file->readBlock(2); uint packetSizeLength = 0; unsigned long packetSize = readSize(file, packetSizeLength); unsigned long dataSize = packetSize - 2 - packetSizeLength; if(packetType =...
false
false
false
false
false
0
stk500v2_set_sck_period_mk2(PROGRAMMER * pgm, double v) { int i; for (i = 0; i < sizeof(avrispmkIIfreqs); i++) { if (1 / avrispmkIIfreqs[i] >= v) break; } if (verbose > 2) fprintf(stderr, "Using p = %.2f us for SCK (param = %d)\n", 1000000 / avrispmkIIfreqs[i], i); return stk500v2_setpar...
false
false
false
false
false
0
main_request(struct view *view, enum request request, struct line *line) { enum open_flags flags = display[0] == view ? OPEN_SPLIT : OPEN_DEFAULT; if (request == REQ_ENTER) open_view(view, REQ_VIEW_DIFF, flags); else return request; return REQ_NONE; }
false
false
false
false
false
0
kvm_assigned_dev_thread_intx(int irq, void *dev_id) { struct kvm_assigned_dev_kernel *assigned_dev = dev_id; if (!(assigned_dev->flags & KVM_DEV_ASSIGN_PCI_2_3)) { spin_lock_irq(&assigned_dev->intx_lock); disable_irq_nosync(irq); assigned_dev->host_irq_disabled = true; spin_unlock_irq(&assigned_dev->intx_loc...
false
false
false
false
false
0
Java_ncsa_hdf_hdflib_HDFLibrary_Vsetname (JNIEnv *env, jclass clss, jint vgroup_id, jstring name) { intn rval; char *str; str = (char *)ENVPTR->GetStringUTFChars(ENVPAR name,0); rval = Vsetname((int32)vgroup_id, (char *)str); ENVPTR->ReleaseStringUTFChars(ENVPAR name,str); if (rval == FAIL) ...
false
false
false
false
false
0
htmlCharOffsetCmd(clientData, interp, objc, objv) ClientData clientData; Tcl_Interp *interp; /* Current interpreter. */ int objc; /* Number of arguments. */ Tcl_Obj *CONST objv[]; /* Argument strings. */ { int iByteOffset; int iRet; char *z...
false
false
false
false
false
0
delimited (reader_t *pipe_) { zmq_assert (in_pipe == pipe_); zmq_assert (!delimiter_processed); delimiter_processed = true; // If we are in process of being closed, but still waiting for all // pending messeges being sent, we can terminate here. if (state == pending) proceed_with_term...
false
false
false
false
false
0
main(int argv, char** argc) { setvbuf(stdout, NULL, _IONBF, 0); struct addrinfo addr, *res; int sock; memset(&addr, 0, sizeof addr); addr.ai_family = AF_UNSPEC; addr.ai_socktype = SOCK_STREAM; getaddrinfo("chat.deviantart.com", "3900", &addr, &res); sock = socket(res->ai_family, res-...
false
false
false
false
false
0
upsdrv_initinfo(void) { int msglen, v; char *a,*p,avail_list[300]; /* find out which variables/commands this UPS supports */ msglen = 0; sec_cmd(SEC_POLLCMD, SEC_AVAILP1, avail_list, &msglen); p = avail_list + msglen; if (p != avail_list) *p++ = ','; msglen = 0; sec_cmd(SEC_POLLCMD...
false
false
false
false
false
0
instance() { Lock lock(instMutex); static instanceCleaner c; if(!inst) { inst = new Log(); } return *inst; }
false
false
false
false
false
0
coeff(int narg, char **arg) { if (narg < 5 || narg > 6) error->all(FLERR,"Incorrect args for pair coefficients"); if (!allocated) allocate(); int ilo,ihi,jlo,jhi; force->bounds(arg[0],atom->ntypes,ilo,ihi); force->bounds(arg[1],atom->ntypes,jlo,jhi); double a_one = force->numeric(FLERR,arg[2]); dou...
false
false
false
false
false
0
ajNamSvrGetUrl(const AjPStr svrname, AjPStr* url) { const NamPEntry data; AjPTable svrtable; const AjPStr svrval = NULL; data = ajTableFetchS(namSvrMasterTable, svrname); if(!data) ajFatal("%S is not a known server", svrname); svrtable = (AjPTable) data->data; svrval = ajTableFetchC(sv...
false
false
false
true
false
1
getrpcbynumber(number) register int number; { register struct rpcdata *d = _rpcdata(); register struct rpcent *p; if (d == 0) return (0); setrpcent(0); while ((p = getrpcent())) { if (p->r_number == number) break; } endrpcent(); return (p); }
false
false
false
false
false
0
test_repo_hashfile__filtered(void) { git_oid a, b; cl_repo_set_bool(_repo, "core.autocrlf", true); cl_git_append2file("status/.gitattributes", "*.txt text\n*.bin binary\n\n"); /* create some sample content with CRLF in it */ cl_git_mkfile("status/testfile.txt", "content\r\n"); cl_git_mkfile("status/testfile.bi...
false
false
false
false
false
0