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
giraffe_fov_config_create(cpl_parameterlist* list) { const cxchar* s = NULL; cpl_parameter* p; GiFieldOfViewConfig* config = NULL; if (list == NULL) { return NULL; } config = cx_calloc(1, sizeof *config); p = cpl_parameterlist_find(list, "giraffe.fov.range.minimum"); conf...
false
false
false
false
false
0
luaB_tonumber (lua_State *L) { if (lua_isnoneornil(L, 2)) { /* standard conversion */ int isnum; lua_Number n = lua_tonumberx(L, 1, &isnum); if (isnum) { lua_pushnumber(L, n); return 1; } /* else not a number; must be something */ luaL_checkany(L, 1); } else { size_t l; c...
false
false
false
false
false
0
nfsd4_encode_getdeviceinfo(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_getdeviceinfo *gdev) { struct xdr_stream *xdr = &resp->xdr; const struct nfsd4_layout_ops *ops; u32 starting_len = xdr->buf->len, needed_len; __be32 *p; dprintk("%s: err %d\n", __func__, nfserr); if (nfserr) goto out; nf...
false
false
false
false
false
0
color( unsigned long n ) { static unsigned long oldcol; if ( fd_gc && oldcol != n ) { XSetForeground( fd_display, fd_gc, n ); oldcol = n; } }
false
false
false
false
false
0
aa_label_match(struct aa_profile *profile, struct aa_label *label, unsigned int state, bool subns, u32 request, struct aa_perms *perms) { int error = label_compound_match(profile, label, state, subns, request, perms); if (!error) return error; *perms = allperms; return label_components_match(prof...
false
false
false
false
false
0
hit_sorter_by_position(const void *vh1, const void *vh2) { CM_HIT *h1 = *((CM_HIT **) vh1); /* don't ask. don't change. Don't Panic. */ CM_HIT *h2 = *((CM_HIT **) vh2); if (h1->cm_idx > h2->cm_idx) return 1; /* first key, cm_idx (unique id for models), low to high */ else if (h1->cm_idx < h2->cm_idx...
false
false
false
false
false
0
mpt_lan_init (void) { show_mptmod_ver(LANAME, LANVER); LanCtx = mpt_register(lan_reply, MPTLAN_DRIVER, "lan_reply"); if (LanCtx <= 0) { printk (KERN_ERR MYNAM ": Failed to register with MPT base driver\n"); return -EBUSY; } dlprintk((KERN_INFO MYNAM ": assigned context of %d\n", LanCtx)); if (mpt_reset...
false
false
false
false
false
0
prune_dis_dtc(t30_state_t *s) { int i; /* Find the last octet that is really needed, set the extension bits, and trim the message length */ for (i = 18; i > 4; i--) { /* Strip the top bit */ s->local_dis_dtc_frame[i] &= (DISBIT1 | DISBIT2 | DISBIT3 | DISBIT4 | DISBIT5 | DISBIT6 | DISB...
false
false
false
false
false
0
_dbus_message_iter_close_signature (DBusMessageRealIter *real) { DBusString *str; const char *v_STRING; dbus_bool_t retval; _dbus_assert (real->iter_type == DBUS_MESSAGE_ITER_TYPE_WRITER); _dbus_assert (real->u.writer.type_str != NULL); _dbus_assert (real->sig_refcount > 0); real->sig_refcount -= 1; ...
false
false
false
false
false
0
loadProfile1() { bool dnaFlagBefore = clustalw::userParameters->getDNAFlag(); int errorCode = 0; QString myFile = ""; // Mark Jan 18th 2007: changes to remember working Dir FileDialog fd; myFile = fd.getOpenDataFileName(this, tr("Load Profile 1")); if(myFile == "") { ...
false
false
false
false
false
0
for_each_global_decl (void (*callback) (tree decl)) { tree t; tree decls; tree decl; unsigned i; FOR_EACH_VEC_ELT (*all_translation_units, i, t) { decls = DECL_INITIAL (t); for (decl = BLOCK_VARS (decls); decl; decl = TREE_CHAIN (decl)) callback (decl); } for (decl = BLOCK_VARS (ext_...
false
false
false
false
false
0
dlmunlock(struct dlm_ctxt *dlm, struct dlm_lockstatus *lksb, int flags, dlm_astunlockfunc_t *unlockast, void *data) { enum dlm_status status; struct dlm_lock_resource *res; struct dlm_lock *lock = NULL; int call_ast, is_master; if (!lksb) { dlm_error(DLM_BADARGS); return DLM_BADARGS; } if (flags & ~(L...
false
false
false
false
false
0
flst_insert_after( /*==============*/ flst_base_node_t* base, /*!< in: pointer to base node of list */ flst_node_t* node1, /*!< in: node to insert after */ flst_node_t* node2, /*!< in: node to add */ mtr_t* mtr) /*!< in: mini-transaction handle */ { ulint space; fil_addr_t node1_addr; fil_addr_t node2_addr;...
false
false
false
false
false
0
message_free_body(body) struct body *body; { struct param *param, *nextparam; int part; if (body->type) { free(body->type); free(body->subtype); for (param = body->params; param; param = nextparam) { nextparam = param->next; free(param->attribute); free(param->value); free(param); }...
false
false
false
false
false
0
get_column_prefix (rtbl_t table, struct column_data *c) { if (c == NULL) return ""; if (c->prefix) return c->prefix; if (table->column_prefix) return table->column_prefix; return ""; }
false
false
false
false
false
0
rt2x00debug_create_file_chipset(const char *name, struct rt2x00debug_intf *intf, struct debugfs_blob_wrapper *blob) { const struct rt2x00debug *debug = intf->debug; char *data; data = kzalloc(9 * MAX_LINE_LENGTH, GFP_KERNEL); if (!data) return NULL; b...
false
false
false
false
false
0
slave_missing_p (slave *s) { if (time(NULL) > s->seen + time_before_missing) return 1; return 0; }
false
false
false
false
false
0
OnMouseMiddleClick(wxMouseEvent& event) { event.Skip(); // emulate middle mouse paste under all systems due to buggy wxClipboard const int pos = PositionFromPoint(wxPoint(event.GetX(), event.GetY())); if (pos == wxSCI_INVALID_POSITION || pos != m_middleClickPos) return; GotoPos(pos); if ...
false
false
false
false
false
0
cmDependsFortranParser_RuleElif(cmDependsFortranParser* parser) { /* Note: There are parser limitations. See the note at * cmDependsFortranParser_RuleIf(..) */ // Always taken unless an #ifdef or #ifndef-branch has been taken // already. If the second condition isn't meet already // (parser->InPPFalseB...
false
false
false
false
false
0
onAxesToggled(GtkToggleButton *toggle, gpointer data _U_) { VisuData *dataObj; if (disableCallbacks || !currentAxes) return; dataObj = visu_ui_panel_getData(VISU_UI_PANEL(panelAxes)); if (visu_gl_ext_axes_setBasisFromBox (currentAxes, (gtk_toggle_button_get_active(toggle))?visu_boxed_getBox(V...
false
false
false
false
false
0
globus_i_gfs_config_is_anonymous( const char * userid) { globus_bool_t valid = GLOBUS_FALSE; char * anonymous_names; GlobusGFSName(globus_i_gfs_config_is_anonymous); GlobusGFSDebugEnter(); anonymous_names = globus_i_gfs_c...
false
false
false
false
false
0
do_binop(int op, int v1, int v2) { switch(op) { case '+': return v1 + v2; case '-': return v1 - v2; case '*': return v1 * v2; } }
false
false
false
false
false
0
getTransSwizzle(R600InstrInfo::BankSwizzle Swz, unsigned Op) { switch (Swz) { case R600InstrInfo::ALU_VEC_012_SCL_210: { unsigned Cycles[3] = { 2, 1, 0}; return Cycles[Op]; } case R600InstrInfo::ALU_VEC_021_SCL_122: { unsigned Cycles[3] = { 1, 2, 2}; return Cycles[Op]; } case R600InstrInfo::...
false
false
false
false
true
1
clearContent() { delete _nextContent; _nextContent = 0; switch (_contentType) { case CONTENT_OBJECT: _content.object = 0; break; case CONTENT_TEXT: _content.text->deref(); _content.text = 0; break; case CONTENT_COUNTER:...
false
false
false
false
false
0
gp_free_sitemem(geosite * fp) { geopoint *gpt, *tmp; G_free((void *)fp->filename); fp->filename = NULL; if (fp->points) { for (gpt = fp->points; gpt;) { if (gpt->cattr) { G_free(gpt->cattr); } tmp = gpt; gpt = gpt->next; G_free(tmp); } fp->n_sites = 0; fp->points = NULL...
false
false
false
false
false
0
twiddler_mod_to_table(char *mod) { struct twiddler_map_struct *ptr; int len = strlen(mod); if (len == 0) return twiddler_map->table; for (ptr = twiddler_map; ptr->table; ptr = ptr++) { if (!strncasecmp(mod,ptr->keyword,len)) return ptr->table; } return NULL; }
false
false
false
false
false
0
nb_callback(struct notifier_block *self, unsigned long event, void *ctx) { switch (event) { case (NETEVENT_NEIGH_UPDATE):{ cxgb_neigh_update((struct neighbour *)ctx); break; } case (NETEVENT_REDIRECT):{ struct netevent_redirect *nr = ctx; cxgb_redirect(nr->old, nr->new, nr->neigh, nr->dadd...
false
false
false
false
false
0
rsxx_cram_read(struct file *fp, char __user *ubuf, size_t cnt, loff_t *ppos) { struct rsxx_cardinfo *card = file_inode(fp)->i_private; char *buf; ssize_t st; buf = kzalloc(cnt, GFP_KERNEL); if (!buf) return -ENOMEM; st = rsxx_creg_read(card, CREG_ADD_CRAM + (u32)*ppos, cnt, buf, 1); if (!st) st = ...
false
false
false
false
false
0
getAtomSymbol(TSimpleMolecule & sm, int atAtom) { bool test=false; string result=""; if (sm.getAtom(atAtom)->anum.length() > 0) test=true; if (test) result=sm.getAtom(atAtom)->anum; else result=aSymb[sm.getAtom(atAtom)->na]; return result; }
false
false
false
false
false
0
isns_object_detach(isns_object_t *obj) { isns_object_t *parent; /* Detach from parent */ if ((parent = obj->ie_container) != NULL) { int removed; obj->ie_container = NULL; removed = isns_object_list_remove( &parent->ie_children, obj); isns_assert(removed != 0); } return 0; }
false
false
false
false
false
0
ParseIdentifierName(bool* ok) { Token::Value next = Next(); if (next != Token::IDENTIFIER && next != Token::FUTURE_RESERVED_WORD && !Token::IsKeyword(next)) { ReportUnexpectedToken(next); *ok = false; return Handle<String>(); } return GetSymbol(ok); }
false
false
false
false
false
0
_giraffe_virtualslit_setup(GiVirtualSlit* self, cxint bin, cxdouble center, cxdouble width, const cpl_image* signal, const cpl_image* variance, const cpl_image* bpixel) { register cxint ny = cpl_image_get_size_x(signal); register ...
false
false
false
true
false
1
pk_minimize(ap_manager_t* man, pk_t* po) { pk_internal_t* pk = pk_init_from_manager(man,AP_FUNID_MINIMIZE); if (po->C || po->F){ poly_chernikova2(man,po,NULL); if (pk->exn){ pk->exn = AP_EXC_NONE; man->result.flag_exact = man->result.flag_best = false; return; } if (po->C || po->F...
false
false
false
true
false
1
branch_last(glp_tree *T, int *_next) { int j, next; double beta; /* choose the column to branch on */ for (j = T->n; j >= 1; j--) if (T->non_int[j]) break; xassert(1 <= j && j <= T->n); /* select the branch to be solved next */ beta = glp_get_col_prim(T->mip, j); i...
false
false
false
false
false
0
lt_tag_parse_with_extra_token(lt_tag_t *tag, const char *tag_string, lt_error_t **error) { lt_return_val_if_fail (tag != NULL, FALSE); lt_return_val_if_fail (tag->state != STATE_NONE, FALSE); return _lt_tag_parse(tag, tag_string, FALSE, error); }
false
false
false
false
false
0
spanne_new(Query *query, IndexReader *ir) { int i; Query *clause; SpanEnum *self = (SpanEnum *)ALLOC(SpanNearEnum); SpanNearQuery *snq = SpNQ(query); SpNEn(self)->first_time = true; SpNEn(self)->in_order = snq->in_order; SpNEn(self)->slop = snq->slop; SpNEn(self)->...
false
false
false
false
false
0
NewBlock() { Block* block = (Block*) calloc( 1, sizeof(Block) + sizeof(PathNode)*(allocate-1) ); block->nextBlock = 0; nAvailable += allocate; for( unsigned i=0; i<allocate; ++i ) { freeMemSentinel.AddBefore( &block->pathNode[i] ); } return block; }
false
false
false
false
false
0
numberoftrailingzeros (GtBitsequence x) { if (x & GT_LASTHALVEBITS) { return numberoftrailingzeros32 ((uint32_t) (x & GT_LASTHALVEBITS)); } return 32 + numberoftrailingzeros32 ((uint32_t) (x >> 32)); }
false
false
false
false
false
0
put_htmlized_text(const char **pzText, int N){ if( N>0 ){ char *z = htmlize(*pzText, N); cgi_printf("%s", z); free(z); *pzText += N; } }
false
false
false
false
false
0
write_avc_config(char *sdpLine, GF_AVCConfig *avcc, GF_AVCConfig *svcc) { u32 count = 0; if (avcc) count += gf_list_count(avcc->sequenceParameterSets) + gf_list_count(avcc->pictureParameterSets) + gf_list_count(avcc->sequenceParameterSetExtensions); if (svcc) count += gf_list_count(svcc->sequenceParameterSets) + gf...
false
true
false
false
false
1
smartypants(int c, int *flags, MMIOT *f) { int i; if ( f->flags & (DENY_SMARTY|INSIDE_TAG) ) return 0; for ( i=0; i < NRSMART; i++) if ( (c == smarties[i].c0) && islike(f, smarties[i].pat) ) { if ( smarties[i].entity ) Qprintf(f, "&%s;", smarties[i].entity); shift(f, smarties[i].shift); ...
false
false
false
false
false
0
mountedby(struct mntent *mnt, char *username) { char *s, *cp; if (!(s=strdup(mnt->mnt_opts))) { errx(1, "out of memory"); } for (cp=strtok(s, ","); cp; cp=strtok(NULL, ",")) { if (strncmp(cp, "name=", 5) == 0) { int eq = (strcmp(cp+5, username) == 0); free(s); return eq; } } free(s); return 0; }
false
false
false
false
false
0
afr_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, mode_t mode, mode_t umask, fd_t *fd, dict_t *params) { afr_private_t *priv = NULL; afr_local_t *local = NULL; afr_internal_lock_t *int_...
false
false
false
false
false
0
EmitWin64EHSetFrame(unsigned Register, unsigned Offset) { EnsureValidW64UnwindInfo(); MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo; if (CurFrame->LastFrameInst >= 0) report_fatal_error("Frame register and offset already specified!"); if (Offset & 0x0F) report_fatal_error("Misaligned frame pointe...
false
false
false
false
false
0
parse_params(int argc, char **argv, struct params *params) { struct getlongopt *parser; /* option parser */ int id; /* id of parsed option */ const char *arg; /* argument of parsed option */ enum getlongopt_ret ret; /* return value from option parser */ struct...
false
false
false
false
false
0
OSBase_UnixProcessProviderEnumInstanceNames( CMPIInstanceMI * mi, const CMPIContext * ctx, const CMPIResult * rslt, const CMPIObjectPath * ref) { CMPIObjectPath * op = NULL; CMPIStatus rc = {CMPI_RC_OK, NULL}; struct processlist * lptr = NULL; struct p...
false
false
false
false
false
0
adapter_init_chip(struct AdapterCtlBlk *acb) { struct NvRamType *eeprom = &acb->eeprom; /* Mask all the interrupt */ DC395x_write8(acb, TRM_S1040_DMA_INTEN, 0x00); DC395x_write8(acb, TRM_S1040_SCSI_INTEN, 0x00); /* Reset SCSI module */ DC395x_write16(acb, TRM_S1040_SCSI_CONTROL, DO_RSTMODU...
false
false
false
false
false
0
setSelected(bool _selected) { if(!impl) return; ((HTMLOptionElementImpl *)impl)->setSelected(_selected); }
false
false
false
false
false
0
gtk_plot_dt_inside_triangle_circle(GtkPlotDTtriangle *t, GtkPlotDTnode *n) { gdouble r,x,y; if (!t || !n) return FALSE; if (t->radius < 0.0) { gtk_plot_dt_circle(&t->ccenter,&t->radius,t->na,t->nb,t->nc); } x= n->x-t->ccenter.x; y= n->y-t->ccenter.y; r= x*x + y*y; #ifdef DELAUNAY_DEBUG2 fprintf(stde...
false
false
false
false
false
0
util_url_escape (const char *src) { int len = strlen(src); /* Efficiency not a big concern here, keep the code simple/conservative */ char *dst = calloc(1, len*3 + 1); unsigned char *source = (unsigned char *)src; int i,j=0; for(i=0; i < len; i++) { if(safechars[source[i]]) { ...
false
false
false
false
false
0
has_flag(item_flag f) { if (is_gun()) { for (int i = 0; i < contents.size(); i++) { if (contents[i].has_flag(f)) return true; } } return (type->item_flags & mfb(f)); }
false
false
false
false
false
0
match(InputText* textIn, CharsetMatch *results) const { const uint8_t *input = textIn->fRawInput; int32_t confidence = 0; if (input[0] == 0xFE && input[1] == 0xFF) { confidence = 100; } // TODO: Do some statastics to check for unsigned UTF-16BE results->set(textIn, this, confidence); ...
false
false
false
false
false
0
vmw_ttm_unmap_dma(struct vmw_ttm_tt *vmw_tt) { struct vmw_private *dev_priv = vmw_tt->dev_priv; if (!vmw_tt->vsgt.sgt) return; switch (dev_priv->map_mode) { case vmw_dma_map_bind: case vmw_dma_map_populate: vmw_ttm_unmap_from_dma(vmw_tt); sg_free_table(vmw_tt->vsgt.sgt); vmw_tt->vsgt.sgt = NULL; ttm_me...
false
false
false
false
false
0
on_gobutton_hbox_leave (GtkWidget *widget, GdkEvent *event, GapPlayerMainGlobalParams *gpp) { /*if (gap_debug) printf("ON_GOBUTTON_HBOX_LEAVE\n");*/ if(gpp == NULL) { return; } /* reset go_base...
false
false
false
false
false
0
i40e_init_interrupt_scheme(struct i40e_pf *pf) { int vectors = 0; ssize_t size; if (pf->flags & I40E_FLAG_MSIX_ENABLED) { vectors = i40e_init_msix(pf); if (vectors < 0) { pf->flags &= ~(I40E_FLAG_MSIX_ENABLED | #ifdef I40E_FCOE I40E_FLAG_FCOE_ENABLED | #endif I40E_FLAG_RSS_ENABLED | ...
false
false
false
false
false
0
get_block_run(blkid_probe pr, const struct befs_super_block *bs, const struct block_run *br, int fs_le) { return blkid_probe_get_buffer(pr, ((blkid_loff_t) FS32_TO_CPU(br->allocation_group, fs_le) << FS32_TO_CPU(bs->ag_shift, fs_le) << FS32_TO_CPU(bs->block_shift, fs_le)) + ((blkid_loff_t) FS16_T...
false
false
false
false
false
0
cr_om_parser_destroy (CROMParser * a_this) { g_return_if_fail (a_this && PRIVATE (a_this)); if (PRIVATE (a_this)->parser) { cr_parser_destroy (PRIVATE (a_this)->parser); PRIVATE (a_this)->parser = NULL; } if (PRIVATE (a_this)) { g_free (P...
false
false
false
false
false
0
db9_open(struct input_dev *dev) { struct db9 *db9 = input_get_drvdata(dev); struct parport *port = db9->pd->port; int err; err = mutex_lock_interruptible(&db9->mutex); if (err) return err; if (!db9->used++) { parport_claim(db9->pd); parport_write_data(port, 0xff); if (db9_modes[db9->mode].reverse) { ...
false
false
false
false
false
0
remove_node(GList* node) { // get pointers to the nodes we need to join. GList* node_next = node->next; GList* node_prev = node->prev; // if this is in the middle, we need to reassign both pointers. if ((node != d_front_ptr) && (node != d_back_ptr)) { node_next->prev = node_prev; node_prev->next = node_next...
false
false
false
false
false
0
_bd_go(void *data, void *data2) { E_Dialog *dia; Evas_Object *c, *o, *ob; Evas_Coord w, h; dia = data; if (!dia) return; if (dia->content_object) evas_object_del(dia->content_object); c = e_widget_list_add(e_win_evas_get(dia->win), 0, 0); if (!data2) { o = _bd_icccm_create(...
false
false
false
false
false
0
ReadImageInformation() { this->m_GZFile = gzopen( m_FileName.c_str(), "rb"); if( !this->m_GZFile ) { itkExceptionMacro(<< "Can't find/open file: " << m_FileName); return; } ReadVolumeHeader(); gzclose(this->m_GZFile); }
false
false
false
false
false
0
downloadFinished() { if(mNetworkReply->error() != QNetworkReply::NoError) { QTextStream stream(stdout); stream << QObject::tr("Unable to download the requested file, \"%1\"").arg(mNetworkReply->errorString()) << "\n"; stream.flush(); QApplication::exit(-1); } else { QByteArray data = mNetworkReply->readA...
false
false
false
false
false
0
setCacheabilityMetadata(bool cachingAllowed) { if (!cachingAllowed) { setMetaData(QLatin1String("no-cache"), QLatin1String("true")); setMetaData(QLatin1String("expire-date"), QLatin1String("1")); // Expired } else { QString tmp; tmp.setNum(m_request.cacheTag.expireDate); ...
false
false
false
false
false
0
focusblur_aaa_separate (guint8 *data, guint8 *min_ret, guint8 *max_ret, gfloat *ratio_ret) { if (! focusblur_aaa_check (data, min_ret, max_ret)) return; *ratio_ret = (gfloat) (data[4] - *min_ret) / (*max_ret - *min_ret); }
false
false
false
false
false
0
OnFile(const wxString& filename) { // Filter out savegames, as well as cache and backup files wxString cmp = wxFileName::FileName(filename).GetFullName().Lower(); if (!cmp.Matches(_T("save*.dat")) && !cmp.Matches(_T("thumbs.db")) && !cmp.Matches(_T("*~")) && !cmp.Matches(_T("debug.txt"))) { wxFi...
false
false
false
false
false
0
gst_oss4_audio_find_device (GstObject * oss) { GValueArray *arr; gchar *ret = NULL; arr = gst_oss4_property_probe_get_values (GST_OBJECT (oss), "device"); if (arr != NULL) { if (arr->n_values > 0) { const GValue *val; val = g_value_array_get_nth (arr, 0); ret = g_value_dup_string (val);...
false
false
false
false
false
0
typenameTypeIdAndMod(ParseState *pstate, const TypeName *typeName, Oid *typeid_p, int32 *typmod_p) { Type tup; tup = typenameType(pstate, typeName, typmod_p); *typeid_p = HeapTupleGetOid(tup); ReleaseSysCache(tup); }
false
false
false
false
false
0
first() { current = 0; if (current >= count) return (0); else return (data[current ++]); }
false
false
false
false
false
0
VarFindOnly(const char name[], GNode *ctxt) { Var *var; name = VarLocal(name); if ((var = VarLookup(&ctxt->context, name)) != NULL) return (var); return (NULL); }
false
false
false
false
false
0
improvement(int i, int &newBasisMember)const { FieldVector e=edgeDirection(i); FieldElement ew=dot(e,w); FieldElement ret(theField); bool first=true; newBasisMember=-1; for(int s=0;s<A.getHeight();s++)//This is _the_ line where an anticycling rule is implemented // for(int s=A.getHeight()-1;s>=0;s--)//Th...
false
false
false
false
false
0
__set_keyfile(MidgardConfig *self) { guint n_props, i; GValue pval = {0,}; const gchar *nick = NULL; gchar *tmpstr; GParamSpec **props = g_object_class_list_properties( G_OBJECT_GET_CLASS(G_OBJECT(self)), &n_props); /* It should not happen */ if(!props) g_error("Midgard Config class has no members register...
false
false
false
false
false
0
alGetSourcef(ALuint source, ALenum eParam, ALfloat *pflValue) { ALCcontext *pContext; ALsource *Source; ALdouble Offsets[2]; ALdouble updateLen; pContext = GetContextRef(); if(!pContext) return; if(pflValue) { if((Source=LookupSource(pContext, source)) != NULL) ...
false
false
false
false
false
0
lm85_init_client(struct i2c_client *client) { int value; /* Start monitoring if needed */ value = lm85_read_value(client, LM85_REG_CONFIG); if (!(value & 0x01)) { dev_info(&client->dev, "Starting monitoring\n"); lm85_write_value(client, LM85_REG_CONFIG, value | 0x01); } /* Warn about unusual configuration b...
false
false
false
false
false
0
GetUptime(void) { const char * cp; int fd; int cc; ULONG intVal; ULONG fracVal; ULONG fracScale; char buf[128]; fd = open(PROCDIR "/uptime", O_RDONLY); if (fd < 0) return 0; cc = read(fd, buf, sizeof(buf) - 1); (void) close(fd); if (cc <= 0) return 0; buf[cc] = '\0'; cp = buf; while (isBlank(...
false
false
false
false
false
0
is_abstract_inherit(Node *n, Node *base = 0, int first = 0) { if (!first && (base == n)) return 0; if (!base) { /* Root node */ Symtab *stab = Getattr(n, "symtab"); /* Get symbol table for node */ Symtab *oldtab = Swig_symbol_setscope(stab); int ret = is_abstract_inherit(n, n, 1); ...
false
false
false
false
false
0
click_unlink_force (const gchar* path, GError** error) { gboolean _tmp0_ = FALSE; const gchar* _tmp1_ = NULL; gint _tmp2_ = 0; gboolean _tmp4_ = FALSE; GError * _inner_error_ = NULL; g_return_if_fail (path != NULL); _tmp1_ = path; _tmp2_ = g_unlink (_tmp1_); if (_tmp2_ < 0) { gint _tmp3_ = 0; _tmp3_ = errn...
false
false
false
false
false
0
S_op_integerize(pTHX_ OP *o) { I32 type = o->op_type; PERL_ARGS_ASSERT_OP_INTEGERIZE; /* integerize op. */ if ((PL_opargs[type] & OA_OTHERINT) && (PL_hints & HINT_INTEGER)) { dVAR; o->op_ppaddr = PL_ppaddr[++(o->op_type)]; } if (type == OP_NEGATE) /* XXX might want a ck_negate() for th...
false
false
false
false
false
0
finish_build(gpointer user_data) { build_store_t * data = (build_store_t *)user_data; if (data->prog_window) { unregister_toplevel_window(data->prog_window); gtk_widget_destroy(data->prog_window); data->prog_window = NULL; } build_store_free(data); build_busy = 0; return FALSE; }
false
false
false
false
false
0
blocate(s_indx) word s_indx; { register char *s; register int i; extern char *ftable[]; extern int ftbsize; s = &lsspace[s_indx]; for (i = 0; i < ftbsize; i++) if (strcmp(ftable[i], s) == 0) return i + 1; return 0; }
false
false
false
false
false
0
setFocusBack(FluxboxWindow &fbwin) { // do nothing if there are no windows open // don't change focus order while cycling if (m_focused_list.empty() || s_reverting) return; m_focused_win_list.moveToBack(fbwin); // we need to move its clients to the back while preserving their order Foc...
false
false
false
false
false
0
OnMouse(wxMouseEvent& event) {//======================================== int frame; int ix; if(event.RightDown()) { PopupMenu(menu_spectdisplay); return; } wxClientDC dc(this); PrepareDC(dc); wxPoint pt(event.GetLogicalPosition(dc)); if(spectseq->numframes==0) return; frame = (int)(pt.y/(FRAME_HEI...
false
false
false
false
false
0
getLong() { long result = 0; for (int j = 0; j < 4; ++j) { int c = deeper->getch(); if (c < 0) fatal_error("gunzip: premature end of file"); result += c << (j * 8); } return result; }
false
false
false
false
false
0
FactionTypeStr() { AString temp; if (IsNPC()) return AString("NPC"); if(Globals->FACTION_LIMIT_TYPE == GameDefs::FACLIM_UNLIMITED) { return (AString("Unlimited")); } else if(Globals->FACTION_LIMIT_TYPE == GameDefs::FACLIM_MAGE_COUNT) { return(AString("Normal")); } else if(Globals->FACTION_LIMIT_TYPE == GameDe...
false
false
false
false
false
0
coll_parse_andop_append (xmmsv_coll_token_t *tokens, xmmsv_coll_t *operator, xmmsv_coll_t **ret) { xmmsv_coll_t *first, *tmp; xmmsv_coll_token_t *tk; tk = coll_parse_orop (tokens, &first); if (!first) { *ret = NULL; return tokens; } /* skip the AND operator if present */ if (tk && ...
false
false
false
false
false
0
numa2dAddNumber(NUMA2D *na2d, l_int32 row, l_int32 col, l_float32 val) { NUMA *na; PROCNAME("numa2dAddNumber"); if (!na2d) return ERROR_INT("na2d not defined", procName, 1); if (row < 0 || row >= na2d->nrows) return ERROR_INT("row ...
false
false
false
false
false
0
FuncIS_SUBSET_FLAGS ( Obj self, Obj flags1, Obj flags2 ) { Int len1; Int len2; UInt * ptr1; UInt * ptr2; Int i; Obj trues; /* do some trivial...
false
false
false
false
false
0
infc_browser_subscribe_nack(InfcBrowser* browser, InfXmlConnection* connection, guint node_id) { InfcBrowserPrivate* priv; xmlNodePtr xml; priv = INFC_BROWSER_PRIVATE(browser); xml = xmlNewNode(NULL, (const xmlChar*)"subscribe-nack"); if(node_id > 0) i...
false
false
false
false
false
0
asn1_get_tag( unsigned char **p, const unsigned char *end, size_t *len, int tag ) { if( ( end - *p ) < 1 ) return( POLARSSL_ERR_ASN1_OUT_OF_DATA ); if( **p != tag ) return( POLARSSL_ERR_ASN1_UNEXPECTED_TAG ); (*p)++; return( asn1_get_len( p, end, le...
false
false
false
false
false
0
GetEigenVectorFromLargestEigenValue( const aiMatrix3x3& mtx ) const { float scale = FindLargestMatrixElem( mtx ); aiMatrix3x3 mc = ScaleMatrix( mtx, 1.0f / scale ); mc = mc * mc * mc; aiVector3D v( 1.0f ); aiVector3D lastV = v; for ( int i = 0; i < 100; ++i ) { v = mc * v; v.Normalize( ); if ( ( v - lastV...
false
false
false
false
false
0
fs_rtp_session_set_send_bitrate (FsRtpSession *self, guint bitrate) { FS_RTP_SESSION_LOCK (self); if (bitrate) self->priv->send_bitrate = bitrate; if (self->priv->send_codecbin) codecbin_set_bitrate (self->priv->send_codecbin, bitrate); if (self->priv->send_bitrate_adapter) g_object_set (self->pr...
false
false
false
false
false
0
set_temp_offset(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); int nr = sensor_attr->index; struct smsc47m192_data *data = dev_get_drvdata(dev); struct i2c_client *client = data->client; u8 sfr = i2c_smbu...
false
false
false
false
false
0
annual_or_decennial_dates (const DATASET *dset, int pd, double sd0, int T, double *x) { int t, yr = (int) sd0; for (t=0; t<T; t++) { x[t] = 10000*yr + 101; yr += pd; } return 0; }
false
false
false
false
false
0
zalloc(int bytes) { void *buf; if (bytes <= 0) return 0; if (!(buf = malloc(bytes))) { fprintf(stderr, "*** FATAL ERROR ***\n" "zalloc failed to allocate memory.\n" "Request size: %d bytes.\n\nSorry.\n", bytes); abort(); } memset(buf, 0, bytes); ...
false
false
false
false
false
0
create_nodes (GstBin * bin, GstElement * sink, gint depth, gint children, gint flavour) { GstElement *new_sink, *src; gint i; for (i = 0; i < children; i++) { if (depth > 0) { if (!create_node (bin, sink, sink_pads[flavour][ELEM_MIX], &new_sink, children, flavour)) { return FA...
false
false
false
false
false
0
isChatTabbed(const TabbableWidget* chat) const { foreach(TabDlg* tabDlg, tabs_) { if (tabDlg->managesTab(chat)) { return true; } } return false; }
false
false
false
false
false
0
crm_log_args(int argc, char **argv) { int lpc = 0; int len = 0; int restore = FALSE; int existing_len = 0; int line = __LINE__; static int logged = 0; char *arg_string = NULL; struct qb_log_callsite *args_cs = qb_log_callsite_get(__func__, __FILE__, ARGS_FMT, LOG_NOTICE, line, 0...
false
true
false
false
false
1
findMacro(const QString &str, int *pos, QString *ret) { forever { int openPos = str.indexOf(QLatin1String("%{"), *pos); if (openPos < 0) return 0; int varPos = openPos + 2; int closePos = str.indexOf(QLatin1Char('}'), varPos); if (closePos < 0) return ...
false
false
false
false
false
0
ompfbe_write_flg_check_str(fsbe_context *cx, char *barrier_count, char *src_pe, char *src_dir, char *dst_pe, char *dst_dir) { static char barrier_symbol[2][16] = {"BARRIER_FLG(", "BARRIER_FLG_"}; static char barrier_symbol_punct[2][4] = {",", "_"}; static char barrier_symbo...
true
true
false
false
false
1
re_registers_to_regmatch(regexp_registers_t old_regs, regmatch_t pmatch[], size_t nmatch) { size_t i=0; /* We have to set the last entry to -1 */ nmatch = nmatch - 1; for (i=0; (i < nmatch) && (old_regs->start[i] > -1) ; i++) { pmatch[i...
false
false
false
false
false
0
ompi_osc_rdma_control_send(ompi_osc_rdma_module_t *module, ompi_proc_t *proc, uint8_t type, int32_t value0, int32_t value1) { int ret = OMPI_SUCCESS; mca_bml_base_endpoint_t *endpoint = NULL; mca_bml_base_btl_t *bml_btl = NULL; mca_btl_base_descrip...
false
false
false
false
false
0