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
jz4780_i2c_enable(struct jz4780_i2c *i2c) { unsigned short regval; unsigned long loops = 5; jz4780_i2c_writew(i2c, JZ4780_I2C_ENB, 1); do { regval = jz4780_i2c_readw(i2c, JZ4780_I2C_ENSTA); if (regval & JZ4780_I2C_ENB_I2C) return 0; usleep_range(5000, 15000); } while (--loops); dev_err(&i2c->adap.dev...
false
false
false
false
false
0
compute_color_rgb (QuantizeObj * quantobj, Histogram histogram, boxptr boxp, int icolor) /* Compute representative color for a box, put it in colormap[icolor] */ { /* Current algorithm: mean weighted by pixels (not colors) */ /* Note it is important to get the rounding correct! */ ColorFreq *histp; ...
false
false
false
false
false
0
bfa_fcport_ln_sm_up(struct bfa_fcport_ln_s *ln, enum bfa_fcport_ln_sm_event event) { bfa_trc(ln->fcport->bfa, event); switch (event) { case BFA_FCPORT_LN_SM_LINKDOWN: bfa_sm_set_state(ln, bfa_fcport_ln_sm_dn_nf); bfa_fcport_queue_cb(ln, BFA_PORT_LINKDOWN); break; default: bfa_sm_fault(ln->fcport->bfa, e...
false
false
false
false
false
0
makePath(ConnRef *lineRef, bool *flag) { bool isOrthogonal = (lineRef->routingType() == ConnType_Orthogonal); Router *router = lineRef->router(); VertInf *src = lineRef->src(); VertInf *tar = lineRef->dst(); VertInf *start = lineRef->start(); // TODO: Could be more efficient here. if (isOrt...
false
false
false
false
false
0
mxl5005s_writeregs(struct dvb_frontend *fe, u8 *addrtable, u8 *datatable, u8 len) { int ret = 0, i; if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); for (i = 0 ; i < len-1; i++) { ret = mxl5005s_writereg(fe, addrtable[i], datatable[i], 0); if (ret < 0) break; } ret = mxl5005s_writereg(fe, addr...
false
false
false
false
false
0
load_objects(void) { peers = users = iax_peercallno_pvts = iax_transfercallno_pvts = NULL; peercnts = callno_limits = calltoken_ignores = callno_pool = callno_pool_trunk = NULL; if (!(peers = ao2_container_alloc(MAX_PEER_BUCKETS, peer_hash_cb, peer_cmp_cb))) { goto container_fail; } else if (!(users = ao2_contai...
false
false
false
false
false
0
control_vector() { ptype_list* ptype; char *radical=NULL, *name; int index=0; char memo; int ret=0; memo=SEPAR; /*separator for nameindex()*/ for (ptype=VECTOR; ptype; ptype=ptype->NEXT) { if (radical==(char*) ptype->DATA) { index++; if (index!=ptype->TYPE) { ...
false
false
false
false
false
0
xim_imf_module_create(void) { EINA_LOG_DBG("%s in", __FUNCTION__); Ecore_IMF_Context *ctx = NULL; ctx = ecore_imf_context_new(&xim_class); if (!ctx) goto error; return ctx; error: free(ctx); return NULL; }
false
false
false
false
false
0
dot_product(double *val, int *ind, int collen, double *col) { const int* lastind = ind + collen; double prod = 0; while (ind != lastind) prod += (*val++) * col[*ind++]; return(prod); }
false
false
false
false
false
0
ghwp_file_get_hwp_version (GHWPFile *file, guint8 *major_version, guint8 *minor_version, guint8 *micro_version, guint8 *extra_version) { g_return_if_fail (GHWP_IS_FILE (file)); ...
false
false
false
true
false
1
get_strength(struct drxk_state *state, u64 *strength) { int status; struct s_cfg_agc rf_agc, if_agc; u32 total_gain = 0; u32 atten = 0; u32 agc_range = 0; u16 scu_lvl = 0; u16 scu_coc = 0; /* FIXME: those are part of the tuner presets */ u16 tuner_rf...
false
false
false
false
false
0
get_arg_cluster( FILE *file, char *name, int *count, int type, int warning ) { List *args; char token[MAX_TOKEN_LENGTH]; char **arg_list = 0; int i; *count = 0; /* search entry_name */ if ( !find_token( file, name, type, warning ) ) return 0; /* init list */ args = list_create( LI...
false
false
false
false
false
0
vim_isIDc(c) int c; { return (c > 0 && c < 0x100 && (chartab[c] & CT_ID_CHAR)); }
false
false
false
false
false
0
ldif_import_data( LdifFile *ldifFile, AddressCache *cache ) { cm_return_val_if_fail( ldifFile != NULL, MGU_BAD_ARGS ); ldifFile->retVal = MGU_SUCCESS; addrcache_clear( cache ); cache->dataRead = FALSE; ldif_open_file( ldifFile ); if( ldifFile->retVal == MGU_SUCCESS ) { /* Read data into the cache */ ldif_read...
false
false
false
false
false
0
prz_ok(struct persistent_ram_zone *prz) { return !!prz && !!(persistent_ram_old_size(prz) + persistent_ram_ecc_string(prz, NULL, 0)); }
false
false
false
false
false
0
signal_layout_activate_cb(int which, int x) { // TODO: Store the input_window state and restore it when we enable any. assert(which < 2); #ifdef ENABLE_EMULATOR if (which == 0) { _emulator.activate(x); #ifdef ENABLE_MULTIPRESS _multipress.activate(-1); statusbar.activate_input(true); if (input_win...
false
false
false
false
false
0
asn1p_value_fromref(asn1p_ref_t *ref, int do_copy) { if(ref) { asn1p_value_t *v = calloc(1, sizeof *v); if(v) { if(do_copy) { v->value.reference = asn1p_ref_clone(ref); if(v->value.reference == NULL) { free(v); return NULL; } } else { v->value.reference = ref; } v->type = ATV_...
false
false
false
false
false
0
show_header (GtkSourceCompletionModel *model, GList *provider_node) { ProviderInfo *provider_info = provider_node->data; add_header (provider_node); if (provider_info->visible) { GtkTreePath *path = get_proposal_path (model, provider_info->proposals->head); GtkTreeIter iter; iter.u...
false
false
false
false
false
0
er_paf_fill_paf_proplist_multi_hdu (const cpl_frame * frame, struct er_paf_config_item * config_item, int iext, char * arcfile) { cpl_propertylist * paf_proplist; cpl_propertylist * all_keywords_hdu_main; cpl_propertylist * all_keywords_hdu_ext; ...
false
false
false
false
false
0
krb5int_get_plugin_func (struct plugin_file_handle *h, const char *csymname, void (**ptr)(), struct errinfo *ep) { void *dptr = NULL; long err = krb5int_get_plugin_sym (h, csymname, 1, &dptr, ep); if (!err) { /* Cast function pointers to avoid code duplication */ *pt...
false
false
false
false
false
0
GNATS_unlk (int ac, char **av) { ErrorDesc err; if (! chk_nargs (ac, "PR to be unlocked")) return; if (! prExists (currentDatabase, av[0], &err)) { print_server_errors (err); return; } if (unlock_pr (currentDatabase, av[0], &err) != 0) { printf ("%d PR %s unlocked.\r\n", C...
false
false
false
false
false
0
__ecereDestructor___ecereNameSpace__ecere__Condition(struct __ecereNameSpace__ecere__Condition * this) { ((this->lock ? (__ecereClass___ecereNameSpace__ecere__sys__Mutex->Destructor ? __ecereClass___ecereNameSpace__ecere__sys__Mutex->Destructor(this->lock) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(this->lock)) ...
false
false
false
false
false
0
s3fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) { struct s3fb_info *par = info->par; int rv, mem, step; u16 m, n, r; /* Find appropriate format */ rv = svga_match_format (s3fb_formats, var, NULL); /* 32bpp mode is not supported on VIRGE VX, 24bpp is not supported on others */ if ((par->...
false
false
false
false
false
0
irmo_world_method_watch(IrmoWorld *world, char *method_name, IrmoInvokeCallback callback, void *user_data) { IrmoMethod *method; irmo_return_val_if_fail(world != NULL, NULL); irmo_return_val_if_fail(method_name != NULL, NULL); irmo_return_val_if_fail(callback != NULL, NULL); meth...
false
false
false
false
false
0
check_parm(char *pm) { char *p; for(p=pm;*p!=0;p++) { /* Underscore replacement */ if(*p=='_') {*p='K'; continue;} /* no escape commands. */ if(*p!='\n') continue; while(*p!=0 && isspace(*p)) p++; if(*p=='\\' && *(p+1)!='\\' && *(p+1)!='v' && *(p+1)!='p') *p='.'; if(*p=='\\') p++; } find_ille...
false
false
false
false
false
0
IsShallow(SweepContext& tcx, Node& node) { double height; if (tcx.basin.left_highest) { height = tcx.basin.left_node->point->y - node.point->y; } else { height = tcx.basin.right_node->point->y - node.point->y; } // if shallow stop filling if (tcx.basin.width > height) { return true; } retu...
false
false
false
false
false
0
iscsi_target_show_portals(struct iscsi_target *target, uint64_t sid, char *buf, int rest) { int len = 0, total = 0; struct iscsi_portal *portal; list_for_each_entry(portal, &iscsi_portals_list, iscsi_portal_siblings) { int is_ipv6; is_ipv6 = strchr(portal->addr, ':') != NULL; len = snprintf(buf, re...
false
false
false
false
false
0
go_style_set_cairo_line (GOStyle const *style, cairo_t *cr) { double width; GOLineDashSequence *line_dash; g_return_val_if_fail (GO_IS_STYLE (style) && cr != NULL, FALSE); if (style->line.dash_type == GO_LINE_NONE) return FALSE; if (style->line.width > 0.) width = style->line.width; else { cairo_matrix_t m...
false
false
false
false
false
0
simpleide_init( void ) { int error; simpleide_idechn = libspectrum_ide_alloc( LIBSPECTRUM_IDE_DATA8 ); ui_menu_activate( UI_MENU_ITEM_MEDIA_IDE_SIMPLE8BIT_MASTER_EJECT, 0 ); ui_menu_activate( UI_MENU_ITEM_MEDIA_IDE_SIMPLE8BIT_SLAVE_EJECT, 0 ); if( settings_current.simpleide_master_file ) { error = libs...
false
false
false
false
false
0
setup_create_toggleL (GtkWidget *tab, int row, const setting *set) { GtkWidget *wid; wid = gtk_check_button_new_with_label (_(set->label)); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wid), setup_get_int (&setup_prefs, set)); g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (setup_tog...
false
false
false
false
false
0
operator[](int i) const { beforeRead(); verifyType(ARRAY); debugAssert(m_data != NULL); Array<Any>& array = *(m_data->value.a); return array[i]; }
false
false
false
false
false
0
my_look_hostname(const char *name) { netid_t res = look_hostname(name); struct hostent *hp; if (res) return res; if (!(hp = gethostbyname(name))) { #ifdef DGAVIION struct in_addr ina_str; ina_str = inet_addr(name); res = ina_str.s_addr; #else res = inet_addr(name); #endif if (res == -1L) retur...
false
false
false
false
false
0
bdrv_eject(BlockDriverState *bs, int eject_flag) { BlockDriver *drv = bs->drv; int ret; if (!drv || !drv->bdrv_eject) { ret = -ENOTSUP; } else { ret = drv->bdrv_eject(bs, eject_flag); } if (ret == -ENOTSUP) { if (eject_flag) bdrv_close(bs); } }
false
false
false
false
false
0
rsct_usbdev_getDevByIdx(int num) { int rv; rsct_usbdev_t *devs=NULL; rsct_usbdev_t *d; rv=rsct_usbdev_scan(&devs); if (rv<0) { fprintf(stderr, "RSCT: Error scanning USB bus\n"); return NULL; } d=devs; while(d) { if (num--==0) break; d=d->next; } if (d) rsct_usbdev_list_u...
false
false
false
false
false
0
camel_vee_subfolder_data_new (CamelFolder *folder) { CamelVeeSubfolderData *data; gchar buffer[8], *folder_id; g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL); data = g_object_new (CAMEL_TYPE_VEE_SUBFOLDER_DATA, NULL); data->priv->folder = g_object_ref (folder); vee_subfolder_data_hash_folder (folder, bu...
false
false
false
false
false
0
rpaf_create_server_cfg(apr_pool_t *p, server_rec *s) { rpaf_server_cfg *cfg = (rpaf_server_cfg *)apr_pcalloc(p, sizeof(rpaf_server_cfg)); if (!cfg) return NULL; cfg->proxy_ips = apr_array_make(p, 0, sizeof(char *)); cfg->enable = 0; cfg->sethostname = 0; return (void *)cfg; }
false
false
false
false
false
0
nextfrom_dynarray(dynarray *this) { if (!this->v) graph_error("nextfrom_dynarray: dynarray wan't initialized!"); if (this->end >= this->size) extend_dynarray(this, this->increment); return (void *)((char *)(this->v) + this->entry_size * (this->end++)); }
false
false
false
false
false
0
WaypointReached(uint32 uiPointId) override { Player* pPlayer = GetPlayerForEscort(); if (!pPlayer) { return; } switch (uiPointId) { case 1: DoScriptText(SAY_MOVE, m_creature, pPlayer); break; case 8...
false
false
false
false
false
0
radeonReleaseDmaRegions(radeonContextPtr rmesa) { struct radeon_dma_bo *dma_bo; struct radeon_dma_bo *temp; const int expire_at = ++rmesa->dma.free.expire_counter + DMA_BO_FREE_TIME; const int time = rmesa->dma.free.expire_counter; if (RADEON_DEBUG & RADEON_DMA) { size_t free = 0, wait = 0, re...
false
false
false
false
false
0
tell_user(Widget parent, char *title, char *label) { Widget shell,tell; char *t,*l; t = get_string_resource(parent,title); l = get_string_resource(parent,label); if (strlen(t) == 0) t = title; if (strlen(l) == 0) l = label; shell = XtVaCreatePopupShell("popup_tell",tran...
false
false
false
false
false
0
netreceive_connectpoll(t_netreceive *x) { int fd = accept(x->x_connectsocket, 0, 0); if (fd < 0) post("netreceive: accept failed"); else { t_socketreceiver *y = socketreceiver_new((void *)x, (t_socketnotifier)netreceive_notify, (x->x_msgout ? netreceive_doit : 0), 0)...
false
false
false
false
false
0
__ide_wait_stat(ide_drive_t *drive, u8 good, u8 bad, unsigned long timeout, u8 *rstat) { ide_hwif_t *hwif = drive->hwif; const struct ide_tp_ops *tp_ops = hwif->tp_ops; unsigned long flags; int i; u8 stat; udelay(1); /* spec allows drive 400ns to assert "BUSY" */ stat = tp_ops->read_status(hwif); if (st...
false
false
false
false
false
0
get_folders (TrackerSparqlConnection *connection, GStrv search_terms, gboolean show_all, gint search_offset, gint search_limit, gboolean use_or_operator, ...
false
false
false
false
false
0
cond(c, where) char c; int where; { POSITION len; switch (c) { case 'a': /* Anything in the message yet? */ return (mp > message); case 'b': /* Current byte offset known? */ return (curr_byte(where) != NULL_POSITION); case 'c': return (hshift != 0); case 'e': /* At end of file? */ return (hit_eof); c...
false
false
false
false
false
0
__de_get_regs(struct de_private *de, u8 *buf) { int i; u32 *rbuf = (u32 *)buf; /* read all CSRs */ for (i = 0; i < DE_NUM_REGS; i++) rbuf[i] = dr32(i * 8); /* handle self-clearing RxMissed counter, CSR8 */ de_rx_missed(de, rbuf[8]); }
false
false
false
false
false
0
unqliteFindKVStore( const char *zName, /* Storage engine name [i.e. Hash, B+tree, LSM, etc.] */ sxu32 nByte /* zName length */ ) { unqlite_kv_methods **apStore,*pEntry; sxu32 n,nMax; /* Point to the set of installed engines */ apStore = (unqlite_kv_methods **)SySetBasePtr(&sUnqlMPGlobal.kv_storage); nMax = SySe...
false
false
false
false
false
0
globus_l_error_multiple_destroy_all( void * data) { globus_l_error_multiple_chain_t * instance; if(!data) { return; } instance = (globus_l_error_multiple_chain_t *) data; globus_object_free(instance->chain); if(instance->desc) { ...
false
false
false
false
false
0
qlcnic_is_first_func(struct pci_dev *pdev) { struct pci_dev *oth_pdev; int val = pdev->devfn; while (val-- > 0) { oth_pdev = pci_get_domain_bus_and_slot(pci_domain_nr (pdev->bus), pdev->bus->number, PCI_DEVFN(PCI_SLOT(pdev->devfn), val)); if (!oth_pdev) continue; if (oth_pdev->current_state != PCI_D...
false
false
false
false
false
0
xsh_vector_extract_range(cpl_vector* vin,const cpl_size pos, const int hsize) { cpl_vector* result; int i=0; int k=0; int size_i=0; int size_o=2*hsize+1; int ref=(int)pos; double* data_i=NULL; double* data_o=NULL; cpl_ensure(vin != NULL, CPL_ERROR_NULL_INPUT,NULL); cpl_ensure(hsize > 0, CPL_ERROR_I...
false
false
false
false
false
0
lpfc_sli_intr_handler(int irq, void *dev_id) { struct lpfc_hba *phba; irqreturn_t sp_irq_rc, fp_irq_rc; unsigned long status1, status2; uint32_t hc_copy; /* * Get the driver's phba structure from the dev_id and * assume the HBA is not interrupting. */ phba = (struct lpfc_hba *) dev_id; if (unlikely(!phb...
false
false
false
false
false
0
on_oni__button_help_clicked (GtkButton *button, GapOnionMainGlobalParams *gpp) { if(gap_debug) printf("CB: on_oni__button_help_clicked gpp: %d\n", (int)gpp); if(gpp) { gimp_standard_help_func(GAP_HELP_ID_ONION_CFG, gpp->main_dialog); } }
false
false
false
false
false
0
gsb_data_transaction_get_transactions_list_by_date ( void ) { GSList *list_tmp; if ( etat.add_archive_in_total_balance ) list_tmp = g_slist_copy ( complete_transactions_list ); else list_tmp = g_slist_copy ( transactions_list ); if ( etat.metatree_sort_transactions == 1 ) list_...
false
false
false
false
false
0
prune_unused_types_mark (dw_die_ref die, int dokids) { dw_die_ref c; if (die->die_mark == 0) { /* We haven't done this node yet. Mark it as used. */ die->die_mark = 1; /* If this is the DIE of a generic type instantiation, mark the children DIEs that describe its generic parms and args....
false
false
false
false
false
0
AddUnfiltered(const CUInt128& id, uint32_t ip, uint16_t port, uint16_t tport, uint8_t version, const CKadUDPKey& key, bool& ipVerified, bool update, bool fromHello) { if (id != me) { CContact *contact = new CContact(id, ip, port, tport, version, key, ipVerified); if (fromHello) { contact->SetReceivedHelloPacket...
false
false
false
false
false
0
qmonHostgroupChange(Widget w, XtPointer cld, XtPointer cad) { long mode = (long) cld; Cardinal hgnum; XmString *hgnames; String hgstr; lList *alp = NULL; DENTER(GUI_LAYER, "qmonHostgroupChange"); qmonMirrorMultiAnswer(HGROUP_T, &alp); if (alp) { qmonMessageBox(w, alp, 0); lFreeList...
false
false
false
false
false
0
getPipeLogin(name) char *name; { process_t *p_p ; link_t *p_l ; /* search all processes for name */ for (p_p = process_list ; p_p != NULL ; p_p = p_p->next) for (p_l = p_p->link ; p_l != NULL ; p_l = p_l->next) if (p_l->type == O_PIPE && p_l->dirn == IN && (!strcmp(p_l->obj_name, name))) ...
false
false
false
false
false
0
tp_base_contact_list_channel_constructed (GObject *object) { TpBaseContactListChannel *self = TP_BASE_CONTACT_LIST_CHANNEL (object); TpBaseChannel *base = (TpBaseChannel *) self; TpBaseConnection *conn = tp_base_channel_get_connection (base); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (con...
false
false
false
false
false
0
xy_to_rowcol( int X, int Y, int *row, int *column, int posType ) { int fontHeight = mMaxsize; int fontWidth = TMPFONTWIDTH; //mFontStruct->max_bounds.width; /* Find the visible line number corresponding to the Y coordinate */ *row = ( Y - text_area.y ) / fontHeight; if (...
false
false
false
false
false
0
setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2, tcPDPtr ) { assert(part1->id()==ParticleID::g); long idq = abs(part2->id()); assert(idq == ParticleID::ScalarDQSingletY43 || idq == ParticleID::ScalarDQSingletY13 || idq == ParticleID::ScalarDQSingletY23 || idq == ParticleID::ScalarDQTripletP || ...
false
false
false
false
false
0
fd_cache_synchronize (const char *fname) { int err = 0; #ifdef HAVE_FSYNC close_cache_t cc; if (DBG_IOBUF) log_debug ("fd_cache_synchronize (%s)\n", fname); for (cc=close_cache; cc; cc = cc->next ) { if (cc->fp != INVALID_FP && !fd_cache_strcmp (cc->fname, fname)) { if (DBG_IOBUF) log_...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__gui__controls__Stacker_OnChildVisibilityToggled(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * child, unsigned int visible) { struct __ecereNameSpace__ecere__sys__Size __simpleStruct1; struct __ecereNameSpace__ecere__sys__Size...
false
false
false
false
false
0
cbs_get_id() { id_t * ps_id; id_t i; if(!cbs_hash) return(0); ps_id = (id_t *) que_extract_data_r(q_id); if(ps_id) { i = *ps_id; free(ps_id); } else i = get_new_id(); return(i); }
false
false
false
false
false
0
_jsvTraceGetLowestLevel(JsVar *var, JsVar *searchVar) { if (var == searchVar) return 0; int found = -1; // Use IS_RECURSING flag to stop recursion if (var->flags & JSV_IS_RECURSING) return -1; var->flags |= JSV_IS_RECURSING; if (jsvHasSingleChild(var) && jsvGetFirstChild(var)) { JsVar *child = js...
false
false
false
false
false
0
atl1c_phy_init(struct atl1c_hw *hw) { struct atl1c_adapter *adapter = hw->adapter; struct pci_dev *pdev = adapter->pdev; int ret_val; u16 mii_bmcr_data = BMCR_RESET; if ((atl1c_read_phy_reg(hw, MII_PHYSID1, &hw->phy_id1) != 0) || (atl1c_read_phy_reg(hw, MII_PHYSID2, &hw->phy_id2) != 0)) { dev_err(&pdev->dev, ...
false
false
false
false
false
0
Compare(OBBase* pOb, istream& optionText, bool noEval, std::string*) { OBMol* pmol = dynamic_cast<OBMol*> (pOb); if(!pmol) return false; string title(pmol->GetTitle()); return CompareStringWithFilter(optionText, title, noEval); }
false
false
false
false
false
0
printLogFileEntryUW( FLMBYTE * pucLog, FLMUINT uiOffset) { if (pucLog) { printCommaNum( (FLMUINT64) FB2UW( &pucLog[uiOffset]), JUSTIFY_LEFT); } else { fnPrintf( m_pHRequest, "<td>-</td>"); } }
false
false
false
false
false
0
cyrus_acl_myrights(struct auth_state *auth_state, char *acl) { char *thisid, *rights, *nextid; long acl_positive = 0, acl_negative = 0; long *acl_ptr; for (thisid = acl; *thisid; thisid = nextid) { acl_ptr = &acl_positive; rights = strchr(thisid, '\t'); if (!rights) { break; } *rights++ = '\0...
false
false
false
false
false
0
SDattrinfo(int32 id, /* IN: object ID */ int32 index, /* IN: attribute index */ char *name, /* OUT: attribute name */ int32 *nt, /* OUT: attribute number type */ int32 *count /* OUT: number of attribute values */) { CONSTR(FUNC, "SDattrinfo"); /* for HGOTO...
false
false
false
false
false
0
on_auto_save_interval_changed (GSettings *settings, const gchar *key, GeditSettings *gs) { GList *docs, *l; gint auto_save_interval; g_settings_get (settings, key, "u", &auto_save_interval); docs = gedit_app_get_documents (GEDIT_APP (g_application_get_default ())); for (l = docs; l != ...
false
false
false
false
false
0
xmalloc(size_t bytes) { void *p; if ((p = malloc(bytes)) == NULL) { if (sent_sigstop) kill(-1, SIGCONT); nsyslog(LOG_ERR, "out of memory"); exit(1); } return p; }
false
false
false
false
true
1
nemo_window_slot_set_allow_stop (NemoWindowSlot *slot, gboolean allow) { NemoWindow *window; g_assert (NEMO_IS_WINDOW_SLOT (slot)); slot->allow_stop = allow; window = nemo_window_slot_get_window (slot); nemo_window_sync_allow_stop (window, slot); }
false
false
false
false
false
0
gst_video_scale_src_event (GstBaseTransform * trans, GstEvent * event) { GstVideoScale *videoscale = GST_VIDEO_SCALE (trans); gboolean ret; gdouble a; GstStructure *structure; GST_DEBUG_OBJECT (videoscale, "handling %s event", GST_EVENT_TYPE_NAME (event)); switch (GST_EVENT_TYPE (event)) { case ...
false
false
false
false
false
0
bSetDefaults( void ) { // Set the default units type if( ! bSetUnitsType( m_eDefUType ) ) return( FALSE ); // Set the default units if( ! bSetUnits( m_osDefUnits ) ) return( FALSE ); return( TRUE ); }
false
false
false
false
false
0
haveComposite(bool for_real) { if (!s_init) init(); if (for_real) return s_composite; else return s_use_composite; }
false
false
false
false
false
0
PM_SnapPosition (void) { int sign[3]; int i, j, bits; int16 base[3]; // try all single bits first static const int jitterbits[8] = {0,4,1,2,3,5,6,7}; // snap velocity to eigths pm->s.velocity[0] = (int)(pml.velocity[0]*8); pm->s.velocity[1] = (int)(pml.velocity[1]*8); pm->s.velocity[2] = (int)(pml.velocity[...
false
false
false
false
false
0
find_window_functions_walker(Node *node, WindowFuncLists *lists) { if (node == NULL) return false; if (IsA(node, WindowFunc)) { WindowFunc *wfunc = (WindowFunc *) node; /* winref is unsigned, so one-sided test is OK */ if (wfunc->winref > lists->maxWinRef) elog(ERROR, "WindowFunc contains out-of-range wi...
false
false
false
false
false
0
icalcomponent_get_first_real_component(icalcomponent *c) { icalcomponent *comp; for(comp = icalcomponent_get_first_component(c,ICAL_ANY_COMPONENT); comp != 0; comp = icalcomponent_get_next_component(c,ICAL_ANY_COMPONENT)){ icalcomponent_kind kind = icalcomponent_isa(comp); if(kind == ICAL_VEVENT_COMPONEN...
false
false
false
false
false
0
redisBufferRead(redisContext *c) { char buf[1024*16]; int nread; /* Return early when the context has seen an error. */ if (c->err) return REDIS_ERR; nread = read(c->fd,buf,sizeof(buf)); if (nread == -1) { if (errno == EAGAIN && !(c->flags & REDIS_BLOCK)) { /* Try a...
false
false
false
false
false
0
plugin_init (GstPlugin * plugin) { gst_videoscale_orc_init (); if (!gst_element_register (plugin, "videoscale", GST_RANK_NONE, GST_TYPE_VIDEO_SCALE)) return FALSE; GST_DEBUG_CATEGORY_INIT (video_scale_debug, "videoscale", 0, "videoscale element"); vs_4tap_init (); return TRUE; }
false
false
false
false
false
0
_backup_videomixer_video_convert_orc_putline_YVYU (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; orc_union32 * ORC_RESTRICT ptr0; const orc_union64 * ORC_RESTRICT ptr4; orc_union64 var37; orc_union32 var38; orc_union32 var39; orc_union32 var40; orc_union16 var41; orc_union16 var42; orc_un...
false
false
false
false
false
0
string_equals(struct string* s1, struct string* s2) { if (s1 == s2) return true; if (s1->s == s2->s) return true; if (s1->_u._s.length != s2->_u._s.length) return false; if (s1->s == NULL || s2->s == NULL) return false; if (memcmp(string_get(s1), string_get(s2), s1->_u._s.length) != 0) ...
false
false
false
false
false
0
gl_pixbuf_cache_add_pixbuf (GHashTable *pixbuf_cache, gchar *name, GdkPixbuf *pixbuf) { CacheRecord *test_record, *record; gl_debug (DEBUG_PIXBUF_CACHE, "START"); test_record = g_hash_table_lookup (pixbuf_cache, name); if (test_record != NULL) { /* pixbuf is already in the cache. */ gl_deb...
false
false
false
false
false
0
statsForEntry(rotating_node_t *node, void *arg) { ProfilerEntry *entry = (ProfilerEntry*) node; statscollector_t *collect = (statscollector_t*) arg; PyObject *info; int err; if (entry->callcount == 0) return 0; /* skip */ if (entry->calls != EMPTY_ROTATING_TREE) { collect->sub...
false
false
false
false
false
0
advanced_find_foreachfunc_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { AdvancedFind_ListData *udata; GtkHex *gh = (GtkHex *)data; gtk_tre...
false
false
false
false
false
0
process_jp2(FILE *inptr,unsigned long offset,struct image_summary *summary_entry, char *parent_name,int indent) { struct jp2box *box; unsigned long max_offset = 0L; unsigned long lastbox = 0L; unsigned long dumplength; while(!feof(inptr) && !lastbox) { ...
false
false
false
false
false
0
find_next_item( FL_OBJECT * obj ) { FL_POPUP_ENTRY *e; FLI_SELECT_SPEC *sp = obj->spec; for ( e = sp->sel->entry->next; e != NULL; e = e->next ) if ( IS_ACTIVATABLE( e ) ) return fli_set_popup_return( e ); return find_first_item( obj );; }
false
false
false
false
false
0
falcon_txc_logic_reset ( struct efab_nic *efab ) { int val; int tries = 50; val = falcon_mdio_read ( efab, MDIO_MMD_PCS, TXC_GLRGS_GLCMD ); val |= (1 << TXC_GLCMD_LMTSWRST_LBN); falcon_mdio_write ( efab, MDIO_MMD_PCS, TXC_GLRGS_GLCMD, val ); while ( tries--) { val = falcon_mdio_read ( efab, MDIO_MMD_PCS, TXC_...
false
false
false
false
false
0
ns__rename(struct soap *soap, char *name, enum t__status &status) { Factory *factory = (Factory*)soap->user; // get factory from gSOAP environment if (soap->header) { soap->header->h__handle = factory->rename(soap->header->h__handle, name); if (soap->header->h__handle) status = FACTORY_OK; else ...
false
false
false
false
false
0
declaration_rename_structunionenum( struct declaration *dion, enum type_type type, const char *old, const char *new ) { struct expr *initializer; type_rename_structunionenum(dion->type_name, type, old, new); initializer = declaration_initializer_get(dion); if (initializer) { expr_rename_structunionenum(init...
false
false
false
false
false
0
AcpiNsAttachObject ( ACPI_NAMESPACE_NODE *Node, ACPI_OPERAND_OBJECT *Object, ACPI_OBJECT_TYPE Type) { ACPI_OPERAND_OBJECT *ObjDesc; ACPI_OPERAND_OBJECT *LastObjDesc; ACPI_OBJECT_TYPE ObjectType = ACPI_TYPE_ANY; ACPI_FUNCTION_TRACE (NsAttachObject); /* ...
false
false
false
false
false
0
MouseDown( const SDL_MouseButtonEvent &button ) { if ( magnify > 0 ) { short mx = button.x - surface->LeftEdge(); short my = button.y - surface->TopEdge(); Rect mdsp( x + 1, y + 1, w - 2, h - 2 ); if ( mdsp.Contains( mx, my ) ) { if ( button.button == SDL_BUTTON_LEFT ) { last_hex.x = (...
false
false
false
false
false
0
marshal(CORBA::ValueBase* val, const char* repoId, cdrStream& stream) { CORBA::Long tag; if (val == 0) { // Nil tag = 0; tag >>= stream; return; } cdrAnyMemoryStream* astream = cdrAnyMemoryStream::downcast(&stream); if (astream) { // Value is being marshalled into an Any. We can't marshal it...
false
false
false
false
false
0
aisFail( /* RETURN: nothing */ H_COLLECT * h_ctxt, /* IN-OUT: collector context */ H_UINT prod) /* IN: nz if run, else tot */ { H_PTR h_ptr = (H_PTR)(h_ctxt->havege_app); procShared *tps = TESTS_SHARED(h_ctxt); onlineTests *context = (onlineTests *) h_c...
false
false
false
false
false
0
clone(ISceneNode* newParent, ISceneManager* newManager) { if (!newParent) newParent = Parent; if (!newManager) newManager = SceneManager; CSkyBoxSceneNode* nb = new CSkyBoxSceneNode(0,0,0,0,0,0, newParent, newManager, ID); nb->cloneMembers(this, newManager); for (u32 i=0; i<6; ++i) nb->Material[i...
false
false
false
false
false
0
luaU_badconstant (char* s, int i, TObject* o, TProtoFunc* tf) { int t=ttype(o); char* name= (t>0 || t<LUA_T_LINE) ? "?" : luaO_typenames[-t]; luaL_verror("cannot %s constant #%d: type=%d [%s]" IN,s,i,t,name,INLOC); }
false
false
false
false
false
0
lookChar() { if (predIdx >= rowBytes) { if (!getNextLine()) { return EOF; } } return predLine[predIdx]; }
false
false
false
false
false
0
A_SorcFX4Check(mobj_t * actor) { if (actor->special2.i-- <= 0) { P_SetMobjStateNF(actor, actor->info->deathstate); } }
false
false
false
false
false
0
volume_update_gui(volume_priv *c) { int volume; gchar buf[20]; ENTER; volume = oss_get_volume(c); if ((volume != 0) != (c->vol != 0)) { if (volume) k->set_icons(&c->meter, names); else k->set_icons(&c->meter, s_names); DBG("seting %s icons\n", volume ...
false
false
false
false
false
0
streamPriority() const { QStringList ret; foreach (const QString &ns, d->streamPriority) { if (!d->disabledStreamTypes.contains(ns)) { ret.append(ns); } } return ret; }
false
false
false
false
false
0
tnef_message(fmap_t *map, off_t *pos, uint16_t type, uint16_t tag, int32_t length, off_t fsize) { off_t offset; #ifdef CL_DEBUG uint32_t i32; char *string; #endif cli_dbgmsg("message tag 0x%x, type 0x%x, length %d\n", tag, type, (int)length); offset = *pos; /* * a lot of this stuff should be only discovere...
false
false
false
false
false
0