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
check_nm_ev_toggled(GtkToggleButton *togglebutton, gpointer user_data) { GtkWidget* xyplot = NULL; GList* data_list = NULL; GList* current = NULL; XYPlotWinData* data; gboolean nm = FALSE; GtkWidget* window = NULL; gdouble xmax = 0; gdouble ymax = 0; if(!user_data || !G_IS_OBJECT(user_data)) return; xyplot ...
false
false
false
false
false
0
vocisect_flags(objnum *list1, uint *flags1, objnum *list2, uint *flags2) { int i, j, k; for (i = k = 0 ; list1[i] != MCMONINV ; ++i) { for (j = 0 ; list2[j] != MCMONINV ; ++j) { if (list1[i] == list2[j]) { list1[k]...
false
false
false
false
false
0
ipmi_sel_parse_read_record_string (ipmi_sel_parse_ctx_t ctx, const char *fmt, char *buf, unsigned int buflen, unsigned int flags) { struct ipmi_sel_parse_entry *sel_parse_entry =...
false
false
false
false
false
0
cat_path(char *buf, size_t len, const char *dir, const char *base) { char *d = (char *) dir; char *b = (char *) base; char *s = buf; size_t left = len; if ((*s = *d)) while ((*++s = *++d) && --left) ; if (!left) { *s = '\0'; return 0; } /* Now we have at least 1 left in output buffer */ while (*--s ...
false
false
false
false
false
0
disable_gc_for_dlopen(void) { DCL_LOCK_STATE; LOCK(); while (GC_incremental && GC_collection_in_progress()) { GC_collect_a_little_inner(1000); } ++GC_dont_gc; UNLOCK(); }
false
false
false
false
false
0
sciw_set_menubar(state_t *s, gfxw_port_t *status_bar, menubar_t *menubar, int selection) { gfxw_list_t *list = make_titlebar_list(s, status_bar->bounds, status_bar); int offset = MENU_LEFT_BORDER; int i; clear_titlebar(status_bar); for (i = 0; i < menubar->menus_nr; i++) { menu_t *menu = menubar->menus + i; ...
false
false
false
false
false
0
online_notify (gboolean online, gpointer user_data) { SwServiceSmugmug *self = (SwServiceSmugmug *) user_data; SwService *service = SW_SERVICE (self); SwServiceSmugmugPrivate *priv = self->priv; if (online) { sw_keyfob_oauth ((OAuthProxy *) priv->auth_proxy, got_tokens_cb, self); } else { priv->autho...
false
false
false
false
false
0
ql_aen_lost(struct ql_adapter *qdev, struct mbox_params *mbcp) { int status; mbcp->out_count = 6; status = ql_get_mb_sts(qdev, mbcp); if (status) netif_err(qdev, drv, qdev->ndev, "Lost AEN broken!\n"); else { int i; netif_err(qdev, drv, qdev->ndev, "Lost AEN detected.\n"); for (i = 0; i < mbcp->out_count...
false
false
false
false
false
0
falcon_spi_cmd(struct efx_nic *efx, const struct falcon_spi_device *spi, unsigned int command, int address, const void *in, void *out, size_t len) { bool addressed = (address >= 0); bool reading = (out != NULL); efx_oword_t reg; int rc; /* Input validation */ if (len > FALCON_SPI_MAX_LEN) retur...
false
false
false
false
false
0
parse_funce(tuple_t *tuple, cistpl_funce_t *f) { u_char *p; int i; if (tuple->TupleDataLen < 1) return -EINVAL; p = (u_char *)tuple->TupleData; f->type = p[0]; for (i = 1; i < tuple->TupleDataLen; i++) f->data[i-1] = p[i]; return 0; }
false
false
false
false
false
0
period_to_usecs(struct snd_pcm_runtime *runtime) { int usecs; if (! runtime->rate) return -1; /* invalid */ /* take 75% of period time as the deadline */ usecs = (750000 / runtime->rate) * runtime->period_size; usecs += ((750000 % runtime->rate) * runtime->period_size) / runtime->rate; return usecs; }
false
false
false
false
false
0
cliReadReply(int output_raw_strings) { void *_reply; redisReply *reply; sds out = NULL; int output = 1; if (redisGetReply(context,&_reply) != REDIS_OK) { if (config.shutdown) { redisFree(context); context = NULL; return REDIS_OK; } if (con...
false
false
false
false
false
0
write_rcvrd_mst_node(struct ubifs_info *c, struct ubifs_mst_node *mst) { int err = 0, lnum = UBIFS_MST_LNUM, sz = c->mst_node_alsz; __le32 save_flags; dbg_rcvry("recovery"); save_flags = mst->flags; mst->flags |= cpu_to_le32(UBIFS_MST_RCVRY); ubifs_prepare_node(c, mst, UBIFS_MST_NODE_SZ, 1); err = ubifs_l...
false
false
false
false
false
0
slotStoredData( KIO::Job *, const QByteArray &data ) { // check for end-of-data marker: if ( data.size() == 0 ) return; unsigned int oldSize = m_data.size(); m_data.resize( oldSize + data.size() ); memcpy( m_data.data() + oldSize, data.data(), data.size() ); }
false
false
false
false
false
0
stac9460_dac_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); struct wtm_spec *spec = ice->spec; unsigned char val; int idx, id; mutex_lock(&spec->mute_mutex); if (kcontrol->private_value) { idx = STAC946X_MASTER_VOLUME; ...
false
false
false
false
false
0
G_get_ellipsoid_parameters(double *a, double *e2) { int in_stat, stat; char ipath[GPATH_MAX]; struct Key_Value *proj_keys; proj_keys = NULL; G__file_name(ipath, "", PROJECTION_FILE, PERMANENT); if (access(ipath, 0) != 0) { *a = 6378137.0; *e2 = .006694385; return 0; } proj_keys = ...
false
false
false
false
false
0
dcopy_to_ucol( int jcol, /* in */ int nseg, /* in */ int *segrep, /* in */ int *repfnz, /* in */ int *perm_r, /* in */ double *dense, /* modified - reset to zero on return */ GlobalLU_t *Glu /* modified */ ) { /...
false
false
false
false
false
0
USBHwISR(void) { U32 dwStatus; U32 dwIntBit; U8 bEPStat, bDevStat, bStat; int i; U16 wFrame; // LED9 monitors total time in interrupt routine DEBUG_LED_ON(9); // handle device interrupts dwStatus = USBDevIntSt; // frame interrupt if (dwStatus & FRAME) { // clear int USBDevIntClr = FRAME; // call handl...
false
false
false
false
false
0
main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))) { int i; printf ("#include <grub/types.h>\n"); printf ("#include <grub/dl.h>\n"); printf ("\n"); printf ("/* Under copyright legislature such automated output isn't\n"); printf ("covered by any copyright. Hence it's publi...
false
false
false
false
false
0
ck_activate_console_num (int console_fd, guint num) { gboolean ret; int res; g_assert (console_fd != -1); ret = FALSE; errno = 0; #ifdef VT_ACTIVATE res = ioctl (console_fd, VT_ACTIVATE, num); #else res = ERROR; errno = E...
false
false
false
false
false
0
exo_icon_view_accessible_factory_get_type (void) { static GType type = 0; if (!type) { const GTypeInfo tinfo = { sizeof (AtkObjectFactoryClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) exo_icon_view_accessible_factory_clas...
false
false
false
false
false
0
dialResponse(Status&) { ATResponse r; do { r = atResponse(rbuf, conf.dialResponseTimeout); switch (r) { case AT_ERROR: return (ERROR); // error in dial command case AT_BUSY: return (BUSY); // busy signal case AT_NOCARRIER: return (NOCARRIER); // no carrier detected case AT_OK: return (NOCARRI...
false
false
false
false
false
0
getIFD( const ExifIFDPath& ifdPath ) const { if (ifdPath.empty()) return NULL ; ExifIFD* crntIFD = getIFD(ifdPath[0].second) ; if( crntIFD == 0) return crntIFD; for (unsigned int i=1; i<ifdPath.size(); i++) { ExifIFDVec ifdVec; if (crntIFD->getSubIFDVec(ifdPath[i].f...
false
false
false
false
false
0
status_open(struct view *view) { struct stat statbuf; char exclude[SIZEOF_STR]; char indexcmd[SIZEOF_STR] = STATUS_DIFF_INDEX_CMD; char othercmd[SIZEOF_STR] = STATUS_LIST_OTHER_CMD; unsigned long prev_lineno = view->lineno; char indexstatus = 0; size_t i; for (i = 0; i < view->lines; i++) free(view->line[i]....
false
false
false
false
false
0
get_bg_tile_info(int tile_index) { int attr = videoram[2*tile_index+1]; int code = videoram[2*tile_index] + ((attr & 0xc0) << 2) + (tile_bank << 10); SET_TILE_INFO( 0, code, attr & 0xf, TILE_FLIPXY((attr & 0x30) >> 4)) }
false
false
false
false
false
0
ungrab (void) { if (!terminal ()) { data.owner = NULL; data.rtree = NULL; } data.pri = 0; }
false
false
false
false
false
0
GetRightCut(NUMA *narl, NUMA *nart, NUMA *nait, l_int32 w, l_int32 *pright) { l_int32 nrl, nrt, nit, ntrans, start, end, sign, txt2, pap2, found, trans; nrl = numaGetCount(narl); nrt = numaGetCount(nart); nit = numaGetCount(nait); /* Check for s...
false
false
false
false
false
0
nex_input(bool rem_out) { return new NexusSet; }
false
false
false
false
false
0
print_usage_bug(struct task_struct *curr, struct held_lock *this, enum lock_usage_bit prev_bit, enum lock_usage_bit new_bit) { if (!debug_locks_off_graph_unlock() || debug_locks_silent) return 0; printk("\n"); printk("=================================\n"); printk("[ INFO: inconsistent lock state ]\n"); print_...
false
false
false
false
false
0
decode_sprite(int gfx_index, struct GfxLayout *layout, const void *data) { /* decode the graphics */ Machine->gfx[gfx_index] = decodegfx(data, layout); if (!Machine->gfx[gfx_index]) return 1; /* set the color information */ Machine->gfx[gfx_index]->colortable = &Machine->remapped_colortable[1024]; Mac...
false
false
false
false
false
0
fpostfx(otmp) /* called after consuming (non-corpse) food */ register struct obj *otmp; { switch(otmp->otyp) { case SPRIG_OF_WOLFSBANE: if (u.ulycn >= LOW_PM || is_were(youmonst.data)) you_unwere(TRUE); break; case CARROT: make_blinded((long)u.ucreamed,TRUE); break; case FORTUNE_COOKIE: ...
false
false
false
false
false
0
ParseSqlQuery ( const CSphString & sQuery, CSphQuery & tQuery, CSphString & sError ) { SqlParser_t tParser; tParser.m_pBuf = sQuery.cstr(); tParser.m_pLastTokenStart = NULL; tParser.m_pParseError = &sError; tParser.m_pQuery = &tQuery; tParser.m_bGotQuery = false; tQuery.m_eMode = SPH_MATCH_EXTENDED2; // only ne...
false
false
false
false
false
0
mimeview_check_sig_thread_cb(void *data) { MimeView *mimeview = (MimeView *) data; MimeInfo *mimeinfo = mimeview->siginfo; debug_print("mimeview_check_sig_thread_cb\n"); if (mimeinfo == NULL) { /* message changed !? */ g_warning("no more siginfo!\n"); goto end; } if (!mimeview->check_data) { g_warnin...
false
false
false
false
false
0
PLprocessUpdates(const CVC3::Expr& e, const std::vector<CVC3::Expr>& updates, size_t idx=0) { // Processed all the updates if(idx >= updates.size()) return e; return PLprocessUpdates(PLprocessUpdate(e, updates[idx]), updates, idx+1); } }
false
false
false
false
false
0
sp8870_read_uncorrected_blocks (struct dvb_frontend* fe, u32* ublocks) { struct sp8870_state* state = fe->demodulator_priv; int ret; *ublocks = 0; ret = sp8870_readreg(state, 0xC0C); if (ret < 0) return -EIO; if (ret == 0xFFFF) ret = ~0; *ublocks = ret; return 0; }
false
false
false
false
false
0
TearDown() { while (first_chunk_ != NULL) { LargeObjectChunk* chunk = first_chunk_; first_chunk_ = first_chunk_->next(); LOG(DeleteEvent("LargeObjectChunk", chunk->address())); Page* page = Page::FromAddress(RoundUp(chunk->address(), Page::kPageSize)); Executability executable = page->IsPa...
false
false
false
false
false
0
dBodyAddRelForceAtRelPos (dBodyID b, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) { dAASSERT (b); dVector3 frel,prel,f,p; frel[0] = fx; frel[1] = fy; frel[2] = fz; frel[3] = 0; prel[0] = px; prel[1] = py; prel[2] = pz; prel[3] = 0; dMULTIPLY0_331 (f,b->posr.R,frel); dMUL...
false
false
false
false
false
0
killblock(int x, int y, int killed) { int c, explosionwait; /* Values we use a lot later: */ explosionwait = killed; c = blocks[y][x]; if (c != 0) { /* Remove the block: */ blocks[y][x] = 0; /* Put an explosion there: */ explodeblock(x, y,...
false
false
false
false
false
0
UzpVersion2(UzpVer2 *version) { if (version->structlen != sizeof(UzpVer2)) return sizeof(UzpVer2); #ifdef BETA version->flag = 1; #else version->flag = 0; #endif strcpy(version->betalevel, UZ_BETALEVEL); strcpy(version->date, UZ_VERSION_DATE); #ifdef ZLIB_VERSION /* Although ZLIB_VERS...
false
true
false
false
false
1
isSelected(YListItem *item) { // !!! remove this !!! bool s = item->getSelected(); int n = findItem(item); if (n == -1) return false; if (fDragging) { int beg = (fSelectStart < fSelectEnd) ? fSelectStart : fSelectEnd; int end = (fSelectStart < fSelectEnd) ? fSelectEnd : fSelect...
false
false
false
false
false
0
Hash_Key(const char *name, int modulus) { //fixme: optimize. unsigned int key; for (key=0;*name; name++) key += ((key<<3) + (key>>28) + *name); return (int)(key%modulus); }
false
false
false
false
false
0
_e2p_find_dofind (E2_FindDialogRuntime *rt) { if (rt == NULL) return NULL; pthread_cleanup_push ((gpointer)_e2p_find_cleanfind, (gpointer)rt); pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL); e2_utils_block_thread_signals (); //block all allowed signals to this thread findtargets *fdata = rt->matchda...
false
false
false
false
false
0
pvr2_msp3400_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd) { if (hdw->input_dirty || hdw->force_dirty) { const struct routing_scheme *sp; unsigned int sid = hdw->hdw_desc->signal_routing_scheme; u32 input; pvr2_trace(PVR2_TRACE_CHIPS, "subdev msp3400 v4l2 set_stereo"); sp = (sid < ARRAY_SIZE(r...
false
false
false
false
false
0
LowerOperation(SDValue Op, SelectionDAG &DAG) const { switch (Op.getOpcode()) { case ISD::GlobalAddress: return LowerGlobalAddress(Op, DAG); case ISD::GlobalTLSAddress: return LowerGlobalTLSAddress(Op, DAG); case ISD::BlockAddress: return LowerBlockAddress(Op, DAG); case ISD::ConstantPool: return...
false
false
false
false
false
0
get_fit_resid (const MODEL *pmod, const DATASET *dset, int *err) { FITRESID *fr; int t, dv = -1; if (!special_depvar(pmod)) { dv = gretl_model_get_depvar(pmod); if (dv < 0 || dv >= dset->v) { *err = E_DATA; return NULL; } } fr = fit_resid_new_for_model(pmod, dset, pmod->t1, pmod-...
false
false
false
false
false
0
EscSetSCodeG0(u_char ch) { int i=0; switch(ch) { case '0': con.g[0] = CS_GRAPH; break; case 'U': con.g[0] = CS_GRAPH; break; default: while (fSRegs[i].sign0) { if (fSRegs[i].sign0 == ch) { con.sb = (u_char)i; con.g[0] = CS_LEFT; break; } else if (fSRegs[i].sign1 == ch) { con....
false
false
false
false
false
0
GetExternalSymbolSymbol(StringRef Sym) const { SmallString<60> NameStr; Mangler::getNameWithPrefix(NameStr, Sym, getDataLayout()); return OutContext.getOrCreateSymbol(NameStr); }
false
false
false
false
false
0
varchar(PG_FUNCTION_ARGS) { VarChar *source = PG_GETARG_VARCHAR_PP(0); int32 typmod = PG_GETARG_INT32(1); bool isExplicit = PG_GETARG_BOOL(2); VarChar *result; int32 len, maxlen; size_t maxmblen; int i; char *s_data; len = VARSIZE_ANY_EXHDR(source); s_data = VARDATA_ANY(source); maxlen = ...
false
true
false
false
true
1
_e_gadcon_client_delfn(void *d __UNUSED__, void *o) { E_Gadcon_Client *gcc = o; E_Event_Gadcon_Client_Add *ev; if (gcc->instant_edit_timer) { ecore_timer_del(gcc->instant_edit_timer); gcc->instant_edit_timer = NULL; } if (gcc->o_base) evas_object_event_callback_del(gcc->o_bas...
false
false
false
false
false
0
img_plot_tile(struct img *pimg, const struct tile *ptile, const struct rgbcolor *pcolor, const bv_pixel pixel) { int x, y; index_to_map_pos(&x, &y, tile_index(ptile)); img_plot(pimg, x, y, pcolor, pixel); }
false
false
false
false
false
0
pwm_remove_table(struct pwm_lookup *table, size_t num) { mutex_lock(&pwm_lookup_lock); while (num--) { list_del(&table->list); table++; } mutex_unlock(&pwm_lookup_lock); }
false
false
false
false
false
0
get_princ_kt(krb5_context context, krb5_principal *principal, char *name) { krb5_error_code ret; krb5_principal tmp; krb5_ccache ccache; krb5_kt_cursor cursor; krb5_keytab_entry entry; char *def_realm; if (name == NULL) { /* * If the credential cache exists and specifies a cl...
false
false
false
false
false
0
alx_read_phy_core(struct alx_hw *hw, bool ext, u8 dev, u16 reg, u16 *phy_data) { u32 val, clk_sel; int err; *phy_data = 0; /* use slow clock when it's in hibernation status */ clk_sel = hw->link_speed != SPEED_UNKNOWN ? ALX_MDIO_CLK_SEL_25MD4 : ALX_MDIO_CLK_SEL_25MD128; if (ext) { val = dev << ...
false
false
false
false
false
0
GetDatabaseTupleByOid(Oid dboid) { HeapTuple tuple; Relation relation; SysScanDesc scan; ScanKeyData key[1]; /* * form a scan key */ ScanKeyInit(&key[0], ObjectIdAttributeNumber, BTEqualStrategyNumber, F_OIDEQ, ObjectIdGetDatum(dboid)); /* * Open pg_database and fetch a tuple. Force heap scan...
false
false
false
false
false
0
ips_freescb(ips_ha_t * ha, ips_scb_t * scb) { METHOD_TRACE("ips_freescb", 1); if (scb->flags & IPS_SCB_MAP_SG) scsi_dma_unmap(scb->scsi_cmd); else if (scb->flags & IPS_SCB_MAP_SINGLE) pci_unmap_single(ha->pcidev, scb->data_busaddr, scb->data_len, IPS_DMA_DIR(scb)); /* check to make sure thi...
false
false
false
false
false
0
mimetype( const KUrl &) { mimeType("text/html"); finished(); }
false
false
false
false
false
0
FetchOptVec(string in_key, GroupEntity *in_parent) { // Empty vec to return vector<string> eretvec; if (in_parent == NULL) in_parent = root; map<string, vector<string> >::iterator cmitr = in_parent->value_map.find(StrLower(in_key)); // No such key if (cmitr == in_parent->value_map.end()) ...
false
false
false
false
false
0
getHash(const unsigned char* data, size_t size, size_t pos) { unsigned result = 0; size_t amount, i; if(pos >= size) return 0; amount = HASH_NUM_CHARACTERS; if(pos + amount >= size) amount = size - pos; for(i = 0; i < amount; i++) result ^= (data[pos + i] << (i * HASH_SHIFT)); return result % HASH_NUM_VAL...
false
false
false
false
false
0
_e_mod_comp_win_real_hide(E_Comp_Win *cw) { if (cw->bd) { _e_mod_comp_win_hide(cw); return; } cw->real_hid = 1; _e_mod_comp_win_hide(cw); }
false
false
false
false
false
0
print(std::ostream & os, int width, const int * nonBasics, int m) { os.width(3); os.precision(4); os.setf(std::ios_base::right, std::ios_base::adjustfield); os<<"idx: "; const double * dense = denseVector(); for (int j = 0 ; j < m ; j++) { os.width(width); os.se...
false
false
false
false
false
0
utf2mb(FXchar* dst,FXint ndst,const FXchar* src,FXint nsrc) const { register FXint nr,len=0; FXwchar w; if(dst && src && 0<nsrc){ if(ndst<4) return -4; dst[0]='\0'; dst[1]='\0'; dst[2]='\xFE'; dst[3]='\xFF'; dst+=4; len+=4; while(0<nsrc){ nr=utf2wc(w,src,nsrc); if(nr<=0...
false
false
false
false
false
0
ssh_key_modifier_rsa (const char *elems, gcry_mpi_t *mpis) { gcry_mpi_t p; gcry_mpi_t q; gcry_mpi_t u; if (strcmp (elems, "nedupq")) /* Modifying only necessary for secret keys. */ goto out; u = mpis[3]; p = mpis[4]; q = mpis[5]; if (gcry_mpi_cmp (p, q) > 0) { /* P shall be smaller...
false
false
false
false
false
0
irmo_method_atom_length(IrmoMethodAtom *atom) { IrmoMethod *method = atom->method_data.method; unsigned int i; size_t len; // find length of atom, len = 0; // method number len += 1; // find length of arguments // copy strings while we are here ...
false
false
false
false
false
0
parse_space (const char **pp, const char *end) { char c; while (*pp < end && (c = **pp, ISSPACE (c))) (*pp)++; }
false
false
false
false
false
0
Perl__to_utf8_lower_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, const bool flags, bool* tainted_ptr) { UV result; dVAR; PERL_ARGS_ASSERT__TO_UTF8_LOWER_FLAGS; if (UTF8_IS_INVARIANT(*p)) { if (flags) { result = toLOWER_LC(*p); } else { return to_lower_latin1(*p, ustrp, lenp); } ...
false
false
false
false
false
0
test_index_conflicts__add(void) { git_index_entry ancestor_entry, our_entry, their_entry; cl_assert(git_index_entrycount(repo_index) == 8); memset(&ancestor_entry, 0x0, sizeof(git_index_entry)); memset(&our_entry, 0x0, sizeof(git_index_entry)); memset(&their_entry, 0x0, sizeof(git_index_entry)); ancestor_entry...
false
false
false
false
false
0
endContent(Region expose) { Snip *last = _last; if (expose && _expose) XUnionRegion(_expose, expose, expose); flushAppend(); if (last && !last->endseq && last->length == 0) { // // Avoid leaving empty snips, delete this. Empty Snip should be // restricted to transient existance while insert c...
false
false
false
false
false
0
sub_q(char * input){ char * buffer = strdup(input); char * buffer2; char code[4]; sprintf(code,"%d",exit_num); for(int i = 0; buffer[i] != '\0';i++){ if(buffer[i] == '$' && buffer[i+1] == '?'){ buffer2 = (char *)malloc(strlen(input) + 2); strncpy(buffer2,input,i); strncpy(&buffer2[i],cod...
false
false
false
false
false
0
ole_info_unref (MSOleInfo *info) { if (info->ref_count-- != 1) return; ols_bat_release (&info->bb.bat); ols_bat_release (&info->sb.bat); if (info->root_dir != NULL) { ole_dirent_free (info->root_dir); info->root_dir = NULL; } if (info->sb_file != NULL) { g_object_unref (info->sb_file); info->sb_file =...
false
false
false
false
false
0
draw_horizontal_brick_hatch (cairo_surface_t *hatch, GpHatch *hbr) { double hatch_size = gdip_hatch_get_width (hbr); double line_width = gdip_hatch_get_line_width (hbr); /* hatch is not supposed to be affected by user matrix (so we create a new context) */ cairo_t *ct2 = create_hatch_context (hatch, CAIRO_LINE_CAP_...
false
false
false
false
false
0
travlock (void) { int i; for (i=0; i<L->refSize; i++) if (L->refArray[i].status == LOCK) markobject(&L->refArray[i].o); }
false
false
false
false
false
0
update_cs43xx_mute(struct oxygen *chip) { u8 reg; reg = CS4398_MUTEP_LOW | CS4398_PAMUTE; if (chip->dac_mute) reg |= CS4398_MUTE_B | CS4398_MUTE_A; cs4398_write_cached(chip, 4, reg); update_cs4362a_volumes(chip); }
false
false
false
false
false
0
dbtable_free(dns_dbtable_t *dbtable) { /* * Caller must ensure that it is safe to call. */ RWLOCK(&dbtable->tree_lock, isc_rwlocktype_write); if (dbtable->default_db != NULL) dns_db_detach(&dbtable->default_db); dns_rbt_destroy(&dbtable->rbt); RWUNLOCK(&dbtable->tree_lock, isc_rwlocktype_write); isc_rw...
false
false
false
false
false
0
gnm_expr_new_set (GnmExprList *set) { int i, argc; GnmExprConstPtr *argv; GnmExprList *set0 = set; argc = gnm_expr_list_length (set); argv = argc ? g_new (GnmExprConstPtr, argc) : NULL; for (i = 0; set; i++, set = set->next) argv[i] = set->data; gnm_expr_list_free (set0); return gnm_expr_new_setv (argc, arg...
false
false
false
true
false
1
create_consensus(ED4_group_manager *upper_group_manager) { // creates consensus // is called by group manager ED4_group_manager *group_manager_for_child = upper_group_manager; if (is_group_manager()) { ED4_group_manager *group_manager = to_group_manager(); group_manager->table().i...
false
false
false
false
false
0
rtl88eu_mon_deinit(struct net_device *dev) { if (!dev) return; unregister_netdev(dev); }
false
false
false
false
false
0
flag_is_inter(const bitflag *flags1, const bitflag *flags2, const size_t size) { size_t i; for (i = 0; i < size; i++) if (flags1[i] & flags2[i]) return TRUE; return FALSE; }
false
false
false
false
false
0
extractable_set_asset (GESExtractable * self, GESAsset * asset) { /* FIXME That should go into #GESTrackElement, but * some work is needed to make sure it works properly */ if (ges_track_element_get_track_type (GES_TRACK_ELEMENT (self)) == GES_TRACK_TYPE_UNKNOWN) { ges_track_element_set_track_type (GE...
false
false
false
false
false
0
overlap4CGTF(CGTF* A, CGTF* B, CGTF* C, CGTF* D) { gdouble sum=0.0; gint np; gint nq; gint nr; gint ns; for(np=0;np<A->numberOfFunctions;np++) for(nq=0;nq<B->numberOfFunctions;nq++) for(nr=0;nr<C->numberOfFunctions;nr++) for(ns=0;ns<D->numberOfFunctions;ns++) sum += overlap4GTF(&(A->Gtf[np]),&(B->Gtf[nq]),...
false
false
false
false
false
0
Init() { if( lib != 0 ) return true; lib = new FT_Library; err = FT_Init_FreeType( lib); if( err) { delete lib; lib = 0; return false; } // FTC_Manager* manager; // // if( FTC_Manager_New( lib, 0, 0, 0, my_face_requester, 0, manager ) // { // delete manager; // manage...
false
false
false
false
false
0
vrt_do_string(struct worker *w, int fd, const struct http *hp, int fld, const char *err, const char *p, va_list ap) { char *b; // AN(p); AN(hp); b = VRT_String(hp->ws, NULL, p, ap); if (b == NULL || *b == '\0') { WSL(w, SLT_LostHeader, fd, err); } else { http_SetH(hp, fld, b); } va_end(ap); }
false
false
false
true
false
1
handleEndPopup(YPopupWindow *popup) { if (parent()) parent()->handleEndPopup(popup); }
false
false
false
false
false
0
create_xshm_image (Display *dpy, Visual *visual, unsigned int depth, int format, char *data, XShmSegmentInfo *shm_info, unsigned int width, unsigned int height) { Status status; XImage *image = 0; if (!get_boolean_resource(dpy, "useSHM", "Boolean")) return 0; if (!XShmQueryExtension (dp...
true
true
false
false
false
1
ch_do_scsi(scsi_changer *ch, unsigned char *cmd, int cmd_len, void *buffer, unsigned buflength, enum dma_data_direction direction) { int errno, retries = 0, timeout, result; struct scsi_sense_hdr sshdr; timeout = (cmd[0] == INITIALIZE_ELEMENT_STATUS) ? timeout_init : timeout_move; retry: errno = 0; re...
false
false
false
false
false
0
_MasterEndParallelItem(ArchiveHandle *AH, TocEntry *te, const char *str, T_Action act) { DumpId dumpId; int nBytes, n_errors; int status = 0; if (act == ACT_DUMP) { sscanf(str, "%u%n", &dumpId, &nBytes); Assert(dumpId == te->dumpId); Assert(nBytes == strlen(str)); } else if (act == ACT_RESTORE) ...
false
false
false
false
false
0
x_multiattrib_close (GSCHEM_TOPLEVEL *w_current) { if (w_current->mawindow != NULL) { /* cut link from dialog to selection */ disconnect_selection (MULTIATTRIB (w_current->mawindow)); gtk_widget_destroy (w_current->mawindow); w_current->mawindow = NULL; } }
false
false
false
false
false
0
state_setinfo(st_tree_t **nptr, const char *var, const char *val) { while (*nptr) { st_tree_t *node = *nptr; if (strcasecmp(node->var, var) > 0) { nptr = &node->left; continue; } if (strcasecmp(node->var, var) < 0) { nptr = &node->right; continue; } /* updating an existing entry */ if (!s...
false
false
false
false
false
0
nan() { static Vector4 v((float)G3D::fnan(), (float)G3D::fnan(), (float)G3D::fnan(), (float)G3D::fnan()); return v; }
false
false
false
false
false
0
init_weight(Plist rules, double variable_weight, double constant_weight, double not_weight, double or_weight, double sk_constant_weight, double prop_atom_weight, double nest_penalty, double depth_penalty, double var_penalty, double complexity) { Plist p; Variable_weight = variable_wei...
false
false
false
false
false
0
translate_tristrip_ushort2ushort_last2first( const void * _in, unsigned start, unsigned nr, void *_out ) { const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; for (i = start, j = 0; j < nr; j+=3, i++) { (out+j)[0] = (ushort)in[i+2]; (out+j)[1...
false
false
false
false
false
0
v1copy_advance(const char** ptr, char** buf, unsigned* len) { char* tmp; if ((tmp = memchr(*buf, 0, *len)) == 0) return 0; ++tmp; if (*len < (unsigned)(tmp - *buf)) return 0; *ptr = *buf; *len -= tmp - *buf; *buf = tmp; return 1; }
false
false
false
false
false
0
js_AllocSlot(JSContext *cx, JSObject *obj, uint32 *slotp) { JS_ASSERT(OBJ_IS_NATIVE(obj)); JSScope *scope = OBJ_SCOPE(obj); JSClass *clasp = obj->getClass(); if (scope->freeslot == JSSLOT_FREE(clasp) && clasp->reserveSlots) { /* Adjust scope->freeslot to include computed reserved slots, if any....
false
false
false
false
false
0
afs_lookup_server(struct afs_cell *cell, const struct in_addr *addr) { struct afs_server *server, *candidate; _enter("%p,%pI4", cell, &addr->s_addr); /* quick scan of the list to see if we already have the server */ read_lock(&cell->servers_lock); list_for_each_entry(server, &cell->servers, link) { i...
false
false
false
false
false
0
sort_cmps (const unsigned char *s1, const unsigned char *s2, const size_t size, const unsigned char *col) { size_t i; int ret; if (unlikely(col)) { for (i = 0; i < size; i++) { if ((ret = col[s1[i]] - col[s2[i]]) != 0) { return ret; } } } else { for (i = 0; i < size; i++) { if ((ret = s1[i...
false
false
false
false
false
0
accept_new_connection(int listen_socket, struct connection *cnx[], int* cnx_size) { int in_socket, free, i, res; struct connection *new; in_socket = accept(listen_socket, 0, 0); CHECK_RES_RETURN(in_socket, "accept"); res = set_nonblock(in_socket); if (res == -1) return -1; /* Find an emp...
false
false
false
false
false
0
UpdateContinuousCursor(double *q) { double tol2; vtkCell *cell; vtkPointData *pd; int subId; double pcoords[3], weights[8]; this->CurrentCursorPosition[0] = q[0]; this->CurrentCursorPosition[1] = q[1]; this->CurrentCursorPosition[2] = q[2]; pd = this->ImageData->GetPointData(); vtkPointData* outP...
false
false
false
false
false
0
notreg_cost (x, outer) rtx x; enum rtx_code outer; { return ((GET_CODE (x) == SUBREG && GET_CODE (SUBREG_REG (x)) == REG && GET_MODE_CLASS (GET_MODE (x)) == MODE_INT && GET_MODE_CLASS (GET_MODE (SUBREG_REG (x))) == MODE_INT && (GET_MODE_SIZE (GET_MODE (x)) < GET_MODE_SIZE (GET_MODE (...
false
false
false
false
false
0
writeData( const char* data, qint64 size ) { bool ok = device()->write( data, size ) == size; if ( !ok ) d->abortWriting(); return ok; }
false
false
false
false
false
0
em25xx_bus_B_check_for_device(struct em28xx *dev, u16 addr) { u8 buf; int ret; ret = em25xx_bus_B_recv_bytes(dev, addr, &buf, 1); if (ret < 0) return ret; return 0; /* * NOTE: With chips which do not support this operation, * it seems to succeed ALWAYS ! (even if no device connected) */ }
false
false
false
false
false
0
serialVFD_init_serial (Driver *drvthis) { PrivateData *p = drvthis->private_data; struct termios portset; /* Set up io port correctly, and open it...*/ debug( RPT_DEBUG, "%s: Opening device: %s", __FUNCTION__, p->device); p->fd = open(p->device, O_RDWR | O_NOCTTY | O_NDELAY); if (p->fd == -1) { report(RPT_ERR...
false
false
false
false
true
1