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
getObjValue() const { if (modelPtr_->numberIterations()||modelPtr_->upperIn_!=-COIN_DBL_MAX) { // This does not pass unitTest when getObjValue is called before solve. //printf("obj a %g %g\n",modelPtr_->objectiveValue(), // OsiSolverInterface::getObjValue()); if (fakeMinInSimplex_) return -...
false
false
false
false
false
0
GetNextField(const wxString& str, size_t& cookie) { // These are taken to seperate "fields" static const wxChar* s_delims = wxT("\t\n\x0b\x0c\r !\"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~"); wxString field; ECharType curType = ECTNone; for (; cookie < str.Length(); ++cookie) { wxChar c = str[cookie]; if ((c >= wxT(...
false
false
false
false
false
0
mdf_inner_prod(const spx_word16_t *x, const spx_word16_t *y, int len) { spx_word32_t sum=0; len >>= 1; while(len--) { spx_word32_t part=0; part = MAC16_16(part,*x++,*y++); part = MAC16_16(part,*x++,*y++); /* HINT: If you had a 40-bit accumulator, you could shift only at the end */ ...
false
false
false
false
false
0
guestfs_session_mount_9p(GuestfsSession *session, const gchar *mounttag, const gchar *mountpoint, GuestfsMount9P *optargs, GError **err) { guestfs_h *g = session->priv->g; if (g == NULL) { g_set_error(err, GUESTFS_ERROR, 0, "attempt to call %s after the session has been closed", ...
false
false
false
false
false
0
AuParser_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { AuParser *self; self = (AuParser *)type->tp_alloc(type, 0); if (self != NULL) { self->au = NULL; } return (PyObject *)self; }
false
false
false
false
false
0
able_door(game *g, point p) { return (g->m.ter(p.x, p.y) == t_door_c || g->m.ter(p.x, p.y) == t_door_b || g->m.ter(p.x, p.y) == t_door_o || g->m.ter(p.x, p.y) == t_door_locked); }
false
false
false
false
false
0
unique_id_child_init(apr_pool_t *p, server_rec *s) { pid_t pid; /* * Note that we use the pid because it's possible that on the same * physical machine there are multiple servers (i.e. using Listen). But * it's guaranteed that none of them will share the same pids between * children. *...
true
true
false
false
false
1
writeDatagram(int path, const QByteArray &buf, const QHostAddress &addr, int port) { if(path == Direct) { Private::WriteItem wi; wi.type = Private::WriteItem::Direct; wi.addr = addr; wi.port = port; d->pendingWrites += wi; d->sock->writeDatagram(buf, addr, port); } else if(path == Relayed) { if(d->tu...
false
false
false
false
false
0
commit_lookup(git_revwalk *walk, const git_oid *oid) { commit_object *commit; if ((commit = git_hashtable_lookup(walk->commits, oid)) != NULL) return commit; commit = alloc_commit(walk); if (commit == NULL) return NULL; git_oid_cpy(&commit->oid, oid); if (git_hashtable_insert(walk->commits, &commit->oid, ...
false
false
false
false
false
0
DisplayOptQueue(const TRAN_OPT_QUEUE & opt_queue) { const int kQueueSize = opt_queue.size(); for( int i = 0; i < kQueueSize; i++ ) { std::cout << "[" << i << "/" << kQueueSize << "]: "; switch( opt_queue[i].file_type ) { case AFFINE_FILE: { std::cout << "AFFINE"; } ...
false
false
false
false
false
0
attack_city(piece_info_t *att_obj, loc_t loc) { city_info_t *cityp; int att_owner, city_owner; cityp = find_city (loc); ASSERT (cityp); att_owner = att_obj->owner; city_owner = cityp->owner; if (irand (2) == 0) { /* attack fails? */ if (att_owner == USER) { comment ("The scum defen...
false
false
false
true
false
1
val_real() { DBUG_ASSERT(fixed == 1); double value= args[0]->val_real(); if ((null_value= args[0]->null_value)) return 0.0; if (value <= 0.0) { signal_divide_by_null(); return 0.0; } return log(value); }
false
false
false
false
false
0
write_wifi_mac(const char *system_mnt_point, char *mac, size_t size) { int ret; char i600_wifi_mac[1024], i200_wifi_mac[1024]; text_path_cat(i200_wifi_mac, sizeof(i200_wifi_mac), system_mnt_point, I200_WIFI_MAC_FILE); ret = file_writeto(i200_wifi_mac, mac, size, 0, O_TRUNC); if (ret < 0) { print_error("file_w...
true
true
false
false
false
1
gtkaml_markup_parser_parse_using_directive (GtkamlMarkupParser* self, GtkamlMarkupScanner* scanner, const gchar* ns, ValaNamespace* ns_current, GError** error) { GtkamlMarkupScanner* _tmp0_; const gchar* _tmp1_; GtkamlMarkupNamespace* _tmp2_ = NULL; GtkamlMarkupNamespace* ns_sym; ValaSourceReference* _tmp3_; Vala...
false
false
false
false
false
0
gx_default_text_release(gs_text_enum_t *pte, client_name_t cname) { rc_decrement_only(pte->dev, cname); rc_decrement_only(pte->imaging_dev, cname); }
false
false
false
false
false
0
_malloc_prefork(void) { unsigned i; /* Acquire all mutexes in a safe order. */ malloc_spin_lock(&arenas_lock); for (i = 0; i < narenas; i++) { if (arenas[i] != NULL) malloc_spin_lock(&arenas[i]->lock); } malloc_spin_unlock(&arenas_lock); malloc_mutex_lock(&base_mtx); malloc_mutex_lock(&huge_mtx); #ifd...
false
false
false
false
false
0
skl_cldma_fill_buffer(struct sst_dsp *ctx, unsigned int size, const void *curr_pos, bool intr_enable, bool trigger) { dev_dbg(ctx->dev, "Size: %x, intr_enable: %d\n", size, intr_enable); dev_dbg(ctx->dev, "buf_pos_index:%d, trigger:%d\n", ctx->cl_dev.dma_buffer_offset, trigger); dev_dbg(ctx->dev, "spib position...
false
true
false
false
false
1
gzgetc(gzFile file) { int ret; unsigned char buf[1]; gz_statep state; /* get internal structure */ if (file == NULL) return -1; state = (gz_statep)file; /* check that we're reading and that there's no (serious) error */ if (state->mode != GZ_READ || (state->err != Z_OK && state-...
true
true
false
false
false
1
L1() {register object *base=vs_base; register object *sup=base+VM1; VC1 vs_check; {register object V1; V1=(base[0]); vs_top=sup; goto TTL; TTL:; if(!(type_of((V1))==t_fixnum|| type_of((V1))==t_bignum|| type_of((V1))==t_ratio|| type_of((V1))==t_shortfloat|| type_of((V1))==t_longfloat|| type_of((V1))==t_complex)){...
false
false
false
false
false
0
usb_hcd_request_irqs(struct usb_hcd *hcd, unsigned int irqnum, unsigned long irqflags) { int retval; if (hcd->driver->irq) { snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d", hcd->driver->description, hcd->self.busnum); retval = request_irq(irqnum, &usb_hcd_irq, irqflags, hcd->irq_descr, hc...
false
false
false
false
false
0
fprintDEF() { fprintf (DEF_FILE, "VERSION 5.2 ;\n"); fprintf (DEF_FILE, "NAMESCASESENSITIVE ON ;\n"); fprintf (DEF_FILE, "BUSBITCHARS \"()\" ;\n"); fprintf (DEF_FILE, "DIVIDERCHAR \".\" ;\n\n"); fprintf (DEF_FILE, "DESIGN %s ;\n\n", LV_name); fprintf (DEF_FILE, " TECHNOLOGY ...
false
false
false
false
false
0
pac_get_vector_screen (pacmangamestruct * pp, pacmanstruct * p, const int x, const int y, int *vx, int *vy) { int lx, ly; lx = (x - pp->xb) / pp->xs; ly = (y - pp->yb) / pp->ys; if (lx < 0) lx = 0; else if ((unsigned int) lx > LEVWIDTH) lx = LEVWIDTH - 1; ...
false
false
false
false
false
0
reload_inner_reg_of_subreg (rtx x, enum machine_mode mode, int output) { rtx inner; /* Only SUBREGs are problematical. */ if (GET_CODE (x) != SUBREG) return 0; inner = SUBREG_REG (x); /* If INNER is a constant or PLUS, then INNER must be reloaded. */ if (CONSTANT_P (inner) || GET_CODE (inner) == PL...
false
false
false
false
false
0
ObjectProxy(Connection &conn, const Path &path, const char *service) : Object(conn, path, service) { register_obj(); }
false
false
false
false
false
0
cmp(const FWObject *obj, bool recursive) throw(FWException) { if (!FWObject::cmp(obj, recursive)) return false; const DynamicGroup *group = DynamicGroup::constcast(obj); return group->m_filter == m_filter; }
false
false
false
false
false
0
pixDisplayPtaaPattern(PIX *pixd, PIX *pixs, PTAA *ptaa, PIX *pixp, l_int32 cx, l_int32 cy) { l_int32 i, n; l_uint32 color; PIXCMAP *cmap; PTA *pta; PROCNAME("pixDisplayPtaaP...
false
false
false
false
false
0
StripFlag(StringRef Feature) { return hasFlag(Feature) ? Feature.substr(1) : Feature; }
false
false
false
false
false
0
polarity_show(struct device *child, struct device_attribute *attr, char *buf) { const struct pwm_device *pwm = child_to_pwm_device(child); const char *polarity = "unknown"; switch (pwm_get_polarity(pwm)) { case PWM_POLARITY_NORMAL: polarity = "normal"; break; case PWM_POLARITY_INVERSED: pol...
false
true
false
false
false
1
camif_clk_get(struct camif_dev *camif) { int ret, i; for (i = 1; i < CLK_MAX_NUM; i++) camif->clock[i] = ERR_PTR(-EINVAL); for (i = 0; i < CLK_MAX_NUM; i++) { camif->clock[i] = clk_get(camif->dev, camif_clocks[i]); if (IS_ERR(camif->clock[i])) { ret = PTR_ERR(camif->clock[i]); goto err; } ret = clk...
false
false
false
false
false
0
R_Subsector (int num) { int count; seg_t* line; subsector_t* sub; #ifdef RANGECHECK if (num>=numsubsectors) I_Error ("R_Subsector: ss %i with numss = %i", num, numsubsectors); #endif sscount++; sub = &subsectors[num]; frontsector = sub->sector; count = sub->numlines; lin...
false
false
false
false
false
0
AppendInterest(LInterest **head, LInterest *new) { if (!head) { OOGLError(0,"Null head pointer in AppendInterest"); return; } while (*head) head = &((*head)->next); *head = new; }
false
false
false
false
false
0
mord_2exp (mpz_ptr ldst, mpz_ptr rdst, mpz_srcptr lsrc, mpz_srcptr rsrc, mp_bitcnt_t n) { mp_size_t rsrc_size = SIZ(rsrc); mp_size_t len = ABS (rsrc_size); mp_ptr rsrc_ptr = PTR(rsrc); mp_ptr p, rdst_ptr; mp_limb_t plow; p = rsrc_ptr; plow = *p; while (n >= GMP_NUMB_BITS && plow =...
false
false
false
false
false
0
gpg_ctx_set_mode (struct _GpgCtx *gpg, enum _GpgCtxMode mode) { gpg->mode = mode; gpg->need_passwd = ((gpg->mode == GPG_CTX_MODE_SIGN) || (gpg->mode == GPG_CTX_MODE_DECRYPT)); }
false
false
false
false
false
0
gen3_stolen_size(int num, int slot, int func) { size_t stolen_size; u16 gmch_ctrl; gmch_ctrl = read_pci_config_16(0, 0, 0, I830_GMCH_CTRL); switch (gmch_ctrl & I855_GMCH_GMS_MASK) { case I855_GMCH_GMS_STOLEN_1M: stolen_size = MB(1); break; case I855_GMCH_GMS_STOLEN_4M: stolen_size = MB(4); break; case ...
false
false
false
false
false
0
RemoveMarkedCells() { vtkIdType numIds = this->MarkedCellIdList->GetNumberOfIds(); for (vtkIdType i = 0; i < numIds; i++) { this->CellIdList->DeleteId(this->MarkedCellIdList->GetId(i)); } this->InitializeScalars(); this->Modified(); }
false
false
false
false
false
0
check_var(SymTab *st, Var* v) { Declr *d; int dim; ExpListNode *eln; d = symtab_find(st, v->name); if(!d) print_error("variable is not declared" , v->line); if(d->tag == DECLR_FUNC) print_error("illegal use of a function", v->line); v->var = d; dim = d->type->dimensions; eln = v->idxs; whi...
false
false
false
true
false
1
sysrq_reset_seq_param_set(const char *buffer, const struct kernel_param *kp) { unsigned long val; int error; error = kstrtoul(buffer, 0, &val); if (error < 0) return error; if (val > KEY_MAX) return -EINVAL; *((unsigned short *)kp->arg) = val; sysrq_reset_seq_version++; return 0; }
false
false
false
false
false
0
draw_deco_note(void) { struct deco_elt *de, *de2; struct deco_def_s *dd; int f, t, staff, voice; for (de = deco_head; de != 0; de = de->next) { t = de->t; dd = &deco_def_tb[t]; if (de->flags & DE_LDST) { /* start of long decoration */ t = dd->ld_end; voice = de->s->voice; /* search in the voice */ f...
false
false
false
false
false
0
dump_symbol_table( libspectrum_tape_generalised_data_symbol_table *table ) { size_t i, j; libspectrum_byte pulses = libspectrum_tape_generalised_data_symbol_table_max_pulses( table ); libspectrum_word symbols = libspectrum_tape_generalised_data_symbol_table_symbols_in_table( table ); printf(" Symb...
false
false
false
false
false
0
update(HashObject *self, PyObject *args) { unsigned char *data; size_t len; if (!PyArg_ParseTuple(args, "s#:Update", &data, &len)) return NULL; if (!self->ctx) { PyErr_SetString(PyExc_AssertionError, "algorithm has already finished"); return NULL; } CYFER_Hash_Update(self->ctx, data, len); Py_INCREF(Py_N...
false
false
false
false
false
0
vmnc_handle_wmvd_rectangle (GstVMncDec * dec, struct RfbRectangle *rect, const guint8 * data, int len, gboolean decode) { /* Cursor data. */ int datalen = 2; int type, size; if (len < datalen) { GST_DEBUG_OBJECT (dec, "Cursor data too short"); return ERROR_INSUFFICIENT_DATA; } type = RFB_GET_U...
false
false
false
false
false
0
getAllPkgs() { Dir dir(Config::logdir()); string name; while (dir.read(name)) { try { add(new Pkg(name)); } catch (Pkg::ConstructorError&) { } } if (empty()) gOut.vrb("paco: No packages logged in directory " + Config::logdir() + "\n"); }
false
false
false
false
false
0
awar_updated_cb(AW_root */*aw_root*/, AW_CL cl_awar) { if (!in_global_awar_cb) { AW_awar *awar = (AW_awar*)cl_awar; char *content = awar->read_as_string(); const char *db_path = get_db_path(awar); GB_transaction dummy(gb_main4awar); GBDATA *gb...
false
false
false
false
false
0
getbones(void) { int fd; int ok; char c, *bonesid, oldbonesid[10]; if (discover) { /* save bones files for real games */ return 0; } /* wizard check added by GAN 02/05/87 */ if (rn2(3) /* only once in three times do we find bones */ #ifdef WIZARD && !wizard #end...
false
false
false
false
false
0
read(hsStream* S, plResManager* mgr) { plArmatureBrain::read(S, mgr); clearStages(); fStages.setSizeNull(S->readInt()); for (size_t i=0; i<fStages.getSize(); i++) { fStages[i] = plAnimStage::Convert(mgr->ReadCreatable(S)); fStages[i]->readAux(S); } fCurStage = S->readInt(); ...
false
false
false
false
false
0
nothrow_libfn_p (tree fn) { tree id; if (TREE_PUBLIC (fn) && DECL_EXTERNAL (fn) && DECL_NAMESPACE_SCOPE_P (fn) && DECL_EXTERN_C_P (fn)) /* OK */; else /* Can't be a C library function. */ return 0; id = DECL_ASSEMBLER_NAME (fn); return !!libc_name_p (IDENTIFIER_POINTER (id), I...
false
false
false
false
false
0
xcrc_read(struct sar_file *out, void *buf, size_t count) { xxiobuf_read(out->file, buf, count); if(A_HAS_CRC(out)) out->crc = crc32(buf, out->crc, count); }
false
false
false
false
false
0
intel_pmu_pebs_enable(struct perf_event *event) { struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); struct hw_perf_event *hwc = &event->hw; struct debug_store *ds = cpuc->ds; bool first_pebs; u64 threshold; hwc->config &= ~ARCH_PERFMON_EVENTSEL_INT; first_pebs = !pebs_is_enabled(cpuc); cpuc->pebs_ena...
false
false
false
false
false
0
tryListen(int lock) { if (negotInfo->flags&NF_LOSER) return; if (!lock) negotLock(); tryListenLock(); if (!lock) negotUnlock(); }
false
false
false
false
false
0
glusterd_quota_disable (glusterd_volinfo_t *volinfo, char **op_errstr) { int32_t ret = -1; char *quota_status = NULL, *quota_limits = NULL; GF_VALIDATE_OR_GOTO ("glusterd", volinfo, out); GF_VALIDATE_OR_GOTO ("glusterd", op_errstr, out); ret = glusterd_check_if...
false
false
false
false
false
0
clearall() { poller->bailIfCalculating() ; while (memused) { linkedmem *nu = memused->next ; free(memused) ; memused = nu ; } generation = 0 ; increment = 1 ; tilelist = 0 ; supertilelist = 0 ; bricklist = 0 ; rootlev = 0 ; cleandowncounter = 63 ; usedmemory = 0 ; d...
false
false
false
false
false
0
collection_tests_construct (GType object_type, const gchar* name) { CollectionTests * self = NULL; const gchar* _tmp0_ = NULL; g_return_val_if_fail (name != NULL, NULL); _tmp0_ = name; self = (CollectionTests*) gee_test_case_construct (object_type, _tmp0_); gee_test_case_add_test ((GeeTestCase*) self, "[Collectio...
false
false
false
false
false
0
p_pick_rgn_render_region (const GimpPixelRgn *srcPR ,const GimpPixelRgn *dstPR ,guint src_channel_pick ,guint dst_channel_pick) { guint row; guchar* src = srcPR->data; guchar* dest = dstPR->data; for (row = 0; row < dstPR->h; row++) { ...
false
false
false
false
false
0
node_pair(GepNode *N1, GepNode *N2) { uintptr_t P1 = uintptr_t(N1), P2 = uintptr_t(N2); if (P1 <= P2) return std::make_pair(N1, N2); return std::make_pair(N2, N1); }
false
false
false
false
false
0
shuffle(int o_low, int o_high, bool domaterial) { int i, j, num_to_shuffle; short sw; int color; for (num_to_shuffle = 0, j=o_low; j <= o_high; j++) if (!objects[j].oc_name_known) num_to_shuffle++; if (num_to_shuffle < 2) return; for (j=o_low; j <= o_high; j++) { if (object...
false
false
false
false
false
0
mboxdriver_fetch_size(mailsession * session, uint32_t indx, size_t * result) { struct mailmbox_folder * folder; int r; char * data; size_t len; int res; folder = session_get_mbox_session(session); if (folder == NULL) { res = MAIL_ERROR_FETCH; goto err; } r = mailmbox_validate_read_lock(...
false
false
false
false
false
0
select_button(button_info *ub,int x,int y) { int i; int row; int column; button_info *b; if (!ub->flags.b_Container) return ub; x -= buttonXPad(ub) + buttonFrame(ub); y -= buttonYPad(ub) + buttonFrame(ub); if(x >= ub->c->width || x < 0 || y >= ub->c->height || y < 0) return ub; column = x ...
false
false
false
false
false
0
xdr_guestfs_hivex_node_set_value_args (XDR *xdrs, guestfs_hivex_node_set_value_args *objp) { register int32_t *buf; if (!xdr_int64_t (xdrs, &objp->nodeh)) return FALSE; if (!xdr_string (xdrs, &objp->key, ~0)) return FALSE; if (!xdr_int64_t (xdrs, &objp->t)) return FALSE; if (!xdr_bytes (xdrs, (char *...
false
false
false
false
false
0
Scm_SimpleMain(int argc, const char *argv[], const char *script, u_long flags) { ScmModule *user = Scm_UserModule(); ScmObj mainproc, args; ScmLoadPacket lpak; SCM_ASSERT(argc > 0); if (Scm_Load("gauche-init.scm", 0, &lpak)) { Scm_Printf(SCM_CURERR, "%s: Couldn't load ga...
false
false
false
false
false
0
isSuitableForMask(MachineInstr *&MI, unsigned SrcReg, int CmpMask, bool CommonUse) { switch (MI->getOpcode()) { case ARM::ANDri: case ARM::t2ANDri: if (CmpMask != MI->getOperand(2).getImm()) return false; if (SrcReg == MI->getOperand(CommonUse ? 1 : 0).getReg(...
false
false
false
false
false
0
gf_sg_new_subscene(GF_SceneGraph *scene) { GF_SceneGraph *tmp; if (!scene) return NULL; tmp = gf_sg_new(); if (!tmp) return NULL; tmp->parent_scene = scene; tmp->script_action = scene->script_action; tmp->script_action_cbck = scene->script_action_cbck; tmp->script_load = scene->script_load; tmp->on_node_modifi...
false
false
false
false
false
0
dn_ignore_case_to_end( char *dn, char *end ) { unsigned char *s = NULL, *d = NULL; int ssz, dsz; /* normalize case (including UTF-8 multi-byte chars) */ for (s = d = (unsigned char *)dn; s && s < (unsigned char *)end && *s; s += ssz, d += dsz) { slapi_utf8ToLower( s, d, &ssz, &dsz ); ...
false
false
false
false
false
0
get_crypt_key(store, twice) int store; int twice; /* Ask for the key twice. */ { char_u *p1, *p2 = NULL; int round; for (round = 0; ; ++round) { cmdline_star = TRUE; cmdline_row = msg_row; p1 = getcmdline_prompt(NUL, round == 0 ? (char_u *)_("Enter encryption key: ") : (char_u *)_...
false
false
false
false
false
0
loadMusic( string fn ) { if (enabled) { if (fn2mus.find(fn) == fn2mus.end()) { // open the file for reading ifstream inputFile ( fn.c_str(), ios::in); if (!inputFile.good()) { cout << "ERROR: file " << fn << " does not exist!" << endl; exit(1); } musics.push_back(Mix_LoadMUS(fn.c_str())); ...
false
false
false
false
false
0
ath5k_hw_eeprom_read(struct ath5k_hw *ah, u32 offset, u16 *data) { u32 status, timeout; /* * Initialize EEPROM access */ if (ah->ah_version == AR5K_AR5210) { AR5K_REG_ENABLE_BITS(ah, AR5K_PCICFG, AR5K_PCICFG_EEAE); (void)ath5k_hw_reg_read(ah, AR5K_EEPROM_BASE + (4 * offset)); } else { ath5k_hw_reg_write(...
false
false
false
false
false
0
TakePower() { if (m_CastItem || m_triggeredByAuraSpell) { return; } // health as power used if (m_spellInfo->powerType == POWER_HEALTH) { m_caster->ModifyHealth(-(int32)m_powerCost); return; } if (m_spellInfo->powerType >= MAX_POWERS) { sLog.outError("Spell:...
false
false
false
false
false
0
insert_4chan_4f_rgba_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in ) { GLchan *c = (GLchan *)v; DEBUG_INSERT; (void) a; UNCLAMPED_FLOAT_TO_CHAN(c[0], in[0]); c[1] = 0; c[2] = 0; c[3] = CHAN_MAX; }
false
false
false
false
false
0
altera_uart_break_ctl(struct uart_port *port, int break_state) { struct altera_uart *pp = container_of(port, struct altera_uart, port); unsigned long flags; spin_lock_irqsave(&port->lock, flags); if (break_state == -1) pp->imr |= ALTERA_UART_CONTROL_TRBK_MSK; else pp->imr &= ~ALTERA_UART_CONTROL_TRBK_MSK; al...
false
false
false
false
false
0
irmo_method_get_argument2(IrmoMethod *method, unsigned int arg_number) { irmo_return_val_if_fail(method != NULL, NULL); irmo_return_val_if_fail(arg_number < method->narguments, NULL); return method->arguments[arg_number]; }
false
false
false
false
false
0
space3270out(int n) { unsigned nc = 0; /* amount of data currently in obuf */ unsigned more = 0; if (obuf_size) nc = obptr - obuf; while ((nc + n + EH_SIZE) > (obuf_size + more)) { more += BUFSIZ; } if (more) { obuf_size += more; obuf_base = (unsigned char *)Realloc((char *)obuf_base, obuf_size); ...
false
false
false
false
false
0
findITE(const Expr& e, Expr& condition, Expr& thenpart, Expr& elsepart) { if (!e.getType().isBool() && e.isITE()) { condition = e[0]; if (!condition.containsTermITE()) { thenpart = e[1]; elsepart = e[2]; return; } } vector<Expr> kids; int i = 0; for (; i < e.arity(); ++i) { ...
false
false
false
false
false
0
_find_leftmost_common(struct rx_node *or, struct rx_node **l, struct rx_node **r, unsigned leftmost) { struct rx_node *left = or->left, *right = or->right; unsigned left_depth = _depth(left, leftmost); unsigned right_depth = _depth(right, leftmos...
false
false
false
false
false
0
GFXgetgfxattr (int argc, lvar_t *argv) { Tkvindex_t tkvi; Ggattr_t gattr; long rtnm; int wi; char *s; gattr.flags = 0; if ( getint (argv[0].o, &wi) == -1 || !ISAWIDGET (wi) || !T_ISTABLE (argv[1].o) ) return L_FAILURE; s = NULL; for (Tgetfirst (argv[1].o...
false
false
false
false
false
0
view_to_model_col (ETableItem *eti, gint view_col) { ETableCol *ecol = e_table_header_get_column (eti->header, view_col); return (ecol != NULL) ? ecol->spec->model_col : -1; }
false
false
false
false
false
0
make_file_row(PFS_file *pfs) { PFS_file_class *safe_class; safe_class= sanitize_file_class(pfs->m_class); if (unlikely(safe_class == NULL)) return; /* Files don't have a in memory structure associated to it, so we use the address of the PFS_file buffer as object_instance_begin */ make_instr_row...
false
false
false
false
false
0
CRYPTO_ccm128_decrypt_ccm64(CCM128_CONTEXT *ctx, const unsigned char *inp, unsigned char *out, size_t len,ccm128_f stream) { size_t n; unsigned int i,L; unsigned char flags0 = ctx->nonce.c[0]; block128_f block = ctx->block; void * key = ctx->key; union { u64 u[2]; u8 c[16]; } scratch; if (!(flags0&0x40)) ...
false
false
false
false
false
0
assimilate_handler( WORKUNIT& wu, vector<RESULT>& /*results*/, RESULT& canonical_result ) { SCOPE_MSG_LOG scope_messages(log_messages, MSG_NORMAL); scope_messages.printf("[%s] Assimilating\n", wu.name); if (wu.canonical_resultid) { OUTPUT_FILE_INFO output_file; scope_messages.printf("[%...
false
false
false
false
false
0
getfline(char* str, int slen, int descr, int ret) { char *tempbuf; int i, j, len; updatecontext(); tempbuf = mycalloc(slen); j = 0; str[0] = '\0'; while((len = read(descr,tempbuf,slen)) > 0) { for (i=0; i<len; i++) { if (tempbuf[i] == '\n' || tempbuf[i] == 13) /* 13...
false
true
false
false
true
1
pk_plugin_details_cb (PkBackendJob *job, PkDetails *item, PkPlugin *plugin) { gchar *package_id; gchar *description; gchar *license; gchar *url; guint64 size; PkGroupEnum group; PkPackage *package; /* get data */ g_object_get (item, "package-id", &package_id, "group", &group, "de...
false
false
false
false
false
0
bookview_stop_thread (gpointer data) { EDataBookView *view = data; if (!view->priv->running) e_book_backend_stop_view (view->priv->backend, view); g_object_unref (view); return NULL; }
false
false
false
false
false
0
EmitBinaryOp(BinaryOperation* expr, Token::Value op, OverwriteMode mode) { __ pop(rdx); BinaryOpStub stub(op, mode); JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. __ call(stub.GetCode(), RelocInfo::CODE_TARG...
false
false
false
false
false
0
stp_color_register(const stp_color_t *color) { if (color_list == NULL) { stpi_init_color_list(); stp_deprintf(STP_DBG_COLORFUNC, "stpi_color_register(): initialising color_list...\n"); } CHECK_COLOR(color); if (color) { /* Add new color algorithm if it does not already exist *...
false
false
false
false
false
0
rejustify_insertions_text(const ESL_ALPHABET *abc, ESL_MSA *msa, const int *inserts, const int *matmap, const int *matuse, int M) { int idx; int k; int apos; int nins; int npos, opos; for (idx = 0; idx < msa->nseq; idx++) { for (k = 0; k < M; k++) if (inserts[k] > 1) { for (nins = 0, ap...
false
false
false
false
false
0
init(Info* infoPtrIn, Settings* settingsPtrIn, ParticleData* particleDataPtrIn, Rndm* rndmPtrIn, BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn, Couplings* couplingsPtrIn, SigmaTotal* sigmaTotPtrIn, SusyLesHouches* slhaPtrIn) { // Store pointers. infoPtr = infoPtrIn; settingsPtr = setting...
false
false
false
false
false
0
taxtable_reset_refcount (gpointer key, gpointer value, gpointer notused) { GncTaxTable *table = key; gint32 count = GPOINTER_TO_INT(value); if (count != gncTaxTableGetRefcount(table) && !gncTaxTableGetInvisible(table)) { PWARN("Fixing refcount on taxtable %s (%" G_GINT64_FORMAT " -> %d)\n", ...
false
false
false
false
false
0
rocker_carrier_init(const struct rocker_port *rocker_port) { const struct rocker *rocker = rocker_port->rocker; u64 link_status = rocker_read64(rocker, PORT_PHYS_LINK_STATUS); bool link_up; link_up = link_status & (1 << rocker_port->pport); if (link_up) netif_carrier_on(rocker_port->dev); else netif_carrier_...
false
false
false
false
false
0
main(int argc,char** argv) { rfbScreenInfoPtr server; rfbRegisterProtocolExtension(&backChannelExtension); server=rfbGetScreen(&argc,argv,400,300,8,3,4); if(!server) return 0; server->frameBuffer=(char*)malloc(400*300*4); rfbInitServer(server); ...
false
false
false
false
false
0
show_error( const char * const msg, const int errcode, const bool help ) { if( msg && msg[0] ) { fprintf( stderr, "%s: %s", program_name, msg ); if( errcode > 0 ) fprintf( stderr, ": %s", strerror( errcode ) ); fprintf( stderr, "\n" ); } if( help ) fprintf( stderr, "Try '%s --help' for mor...
false
false
false
false
false
0
end_rwlock_wrwait_v1(PSI_rwlock_locker* locker, int rc) { PFS_wait_locker *pfs_locker= reinterpret_cast<PFS_wait_locker*> (locker); DBUG_ASSERT(pfs_locker != NULL); PFS_events_waits *wait= &pfs_locker->m_waits_current; if (wait->m_timer_state == TIMER_STATE_STARTED) { wait->m_timer_end= get_timer_value(p...
false
false
false
false
false
0
MKDMakeActive(MathKernDlg *mkd,CharView *cv) { GRect r; int i; if ( mkd==NULL ) return; for ( i=0; i<4; ++i ) (&mkd->cv_topright)[i].inactive = true; cv->inactive = false; GDrawSetUserData(mkd->gw,cv); GDrawSetUserData(mkd->cvparent_w,cv); for ( i=0; i<4; ++i ) GDrawRequestExpose((&mk...
false
false
false
false
false
0
_iodbcdm_cata_state_ok ( STMT_t * pstmt, int fidx) { sqlstcode_t sqlstat = en_00000; if (pstmt->asyn_on == en_NullProc) { switch (pstmt->state) { case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: sqlstat = en_S1010; break; case en_stmt_fetched: case en_stmt_xfetched: ...
false
false
false
false
false
0
_get_auth_info_for_display (GdmDisplayAccessFile *file, GdmDisplay *display, unsigned short *family, unsigned short *address_length, char **address, ...
false
false
false
false
false
0
ParseCMAP_format0 (HPDF_FontDef fontdef, HPDF_UINT32 offset) { HPDF_TTFontDefAttr attr = (HPDF_TTFontDefAttr)fontdef->attr; HPDF_STATUS ret; HPDF_BYTE array[256]; HPDF_UINT size; HPDF_UINT16 *parray; HPDF_UINT i; HPDF_PTRACE((" ParseCMAP_format0\n")); ret = HPDF...
false
false
false
false
false
0
xaccSplitSetDateReconciledTS (Split *split, Timespec *ts) { if (!split || !ts) return; xaccTransBeginEdit (split->parent); split->date_reconciled = *ts; qof_instance_set_dirty(QOF_INSTANCE(split)); xaccTransCommitEdit(split->parent); }
false
false
false
false
false
0
gd_main_icon_view_draw (GtkWidget *widget, cairo_t *cr) { GdMainIconView *self = GD_MAIN_ICON_VIEW (widget); GtkAllocation allocation; GtkStyleContext *context; GdkRectangle line_rect; GdkRectangle rect; GtkTreePath *path; GArray *lines; GtkTreePath *rubberband_start, *rubberband_end; GTK_WIDGET...
false
false
false
false
false
0
synth_setnote (int voice, int note, int bend) { int n, fre, oct; float delta; delta = 0; n = note % 12; if (bend < 8192) bend = 8192-bend; delta = pow(2, (float) (bend%8192)/8192.0); if (bend > 8192) fre = ym3812_note[n]*delta; else fre = ym3812_note[n]/delta; oct =...
false
false
false
false
false
0
getHashTableEntry (unsigned long hashedValue) { hashEntry **const table = getHashTable (); hashEntry *entry; Assert (hashedValue < TableSize); entry = table [hashedValue]; return entry; }
false
false
false
false
false
0
NsConnContent(Ns_Conn *conn, char **nextPtr, int *availPtr) { Conn *connPtr = (Conn *) conn; if (connPtr->next == NULL) { if (connPtr->content == NULL && (conn->flags & NS_CONN_FILECONTENT)) { connPtr->map = NsMap(connPtr->tfd, 0, conn->contentLength, 1, &connPtr->maparg); if (connPtr->map != N...
false
false
false
false
false
0
test(std::istream& in) const { char buf[80]; in.getline(buf, 79); if (std::strncmp(buf, "<?xml", 5) != 0) { in.clear(); in.seekg(0, std::ios::beg); return false; } in.getline(buf, 79); if (! std::strstr(buf, "<ledger")) { in.clear(); in.seekg(0, std::ios::beg); return false; } ...
false
false
false
false
false
0
LibMemoryMap ( OUT UINTN *NoEntries, OUT UINTN *MapKey, OUT UINTN *DescriptorSize, OUT UINT32 *DescriptorVersion ) { EFI_STATUS Status; EFI_MEMORY_DESCRIPTOR *Buffer; UINTN BufferSize; // // ...
false
false
false
false
false
0