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
elf_xtensa_action_discarded (asection *sec) { if (strcmp (".xt_except_table", sec->name) == 0) return 0; if (strcmp (".xt_except_desc", sec->name) == 0) return 0; return _bfd_elf_default_action_discarded (sec); }
false
false
false
false
false
0
focus(Fl_Widget *o) { if (o && !o->visible_focus()) return; if (grab()) return; // don't do anything while grab is on Fl_Widget *p = focus_; if (o != p) { Fl::compose_reset(); focus_ = o; // make sure that fl_xfocus is set to the top level window // of this widget, or fl_fix_focus will clear our...
false
false
false
false
false
0
GetUnrollMetadataForLoop(const Loop *L, StringRef Name) { if (MDNode *LoopID = L->getLoopID()) return GetUnrollMetadata(LoopID, Name); return nullptr; }
false
false
false
false
false
0
doublePixels(const QImage &src) const { int w = src.width(); int h = src.height(); QImage dst( w*2, h*2, src.format() ); if (src.depth() == 1) { kDebug(265) << "image depth 1 not supported\n"; return QImage(); } int x, y; if (src.depth() == 32) { QRgb* l1, *l2; for (y=0; y<h; ...
false
false
false
false
false
0
NDT_V2_GetNodeType(u32 NDT_Tag, u32 NodeTag) { if(!NDT_Tag || !NodeTag) return 0; switch(NDT_Tag) { case NDT_SFWorldNode: return ALL_GetNodeType(SFWorldNode_V2_TypeToTag, SFWorldNode_V2_Count, NodeTag, GF_BIFS_V2); case NDT_SF3DNode: return ALL_GetNodeType(SF3DNode_V2_TypeToTag, SF3DNode_V2_Count, NodeTag, GF_B...
false
false
false
false
false
0
ath10k_mac_vif_tx_lock(struct ath10k_vif *arvif, int reason) { struct ath10k *ar = arvif->ar; lockdep_assert_held(&ar->htt.tx_lock); WARN_ON(reason >= BITS_PER_LONG); arvif->tx_paused |= BIT(reason); ieee80211_stop_queue(ar->hw, arvif->vdev_id); }
false
false
false
false
false
0
mt312_get_symbol_rate(struct mt312_state *state, u32 *sr) { int ret; u8 sym_rate_h; u8 dec_ratio; u16 sym_rat_op; u16 monitor; u8 buf[2]; ret = mt312_readreg(state, SYM_RATE_H, &sym_rate_h); if (ret < 0) return ret; if (sym_rate_h & 0x80) { /* symbol rate search was used */ ret = mt312_writereg(state, ...
false
false
false
false
false
0
read(const Filename &fn, MetricsFinder *finder, ErrorHandler *errh) { Slurper slurper(fn); return read(slurper, finder, errh); }
false
false
false
false
false
0
select_p_update_node_config (int index) { if (index >= select_node_cnt) { error("select_p_update_node_config: index too large %d>%d", index, select_node_cnt); return SLURM_ERROR; } if (select_fast_schedule) return SLURM_SUCCESS; select_node_record[index].real_memory = select_node_record[index]. no...
false
false
false
false
false
0
filetypes_index(gint idx) { return (idx >= 0 && idx < (gint) filetypes_array->len) ? filetypes[idx] : NULL; }
false
false
false
false
false
0
return_channel(int channel, CSOUND *sound) { CCHANNEL *ch = NULL; if (channel < 0 || channel >= channel_count) { if (sound) GB.Unref(POINTER(&sound)); GB.ReturnNull(); return; } ch = channel_cache[channel]; if (!ch) { ch = GB.New(GB.FindClass("Channel"), NULL, NULL); channel_cache[ch...
false
false
false
false
false
0
GVL_isosurf_get_att(int id, int isosurf_id, int att, int *set, float *constant, char *mapname) { int src; geovol_isosurf *isosurf; G_debug(3, "GVL_isosurf_get_att"); isosurf = gvl_isosurf_get_isosurf(id, isosurf_id); if (isosurf) { if (-1 != (src = gvl_isosurf_get_att_src(isosurf, att))) { ...
false
false
false
false
false
0
cycle(double index, double loRange, double hiRange) { int lo = int(loRange); int hi = int(hiRange); int range = hi - lo + 1; if (range <= 0) return lo; int result = int(index) % range; if (result < 0) result += range; return lo + result; }
false
false
false
false
false
0
totem_pl_parser_save_m3u (TotemPlParser *parser, TotemPlPlaylist *playlist, GFile *output, gboolean dos_compatible, GError **error) { TotemPlPlaylistIter iter; GFileOutputStr...
false
false
false
false
false
0
goto_tabpage_tp(tp, trigger_enter_autocmds, trigger_leave_autocmds) tabpage_T *tp; int trigger_enter_autocmds; int trigger_leave_autocmds; { /* Don't repeat a message in another tab page. */ set_keep_msg(NULL, 0); if (tp != curtab && leave_tabpage(tp->tp_curwin->w_buffer, trigger_leave_a...
false
false
false
false
false
0
command_dispose_test_stream(char * token, Channel * c) { char id[256]; int err = 0; json_read_string(&c->inp, id, sizeof(id)); if (read_stream(&c->inp) != 0) exception(ERR_JSON_SYNTAX); if (read_stream(&c->inp) != MARKER_EOM) exception(ERR_JSON_SYNTAX); #if SERVICE_Streams if (!err) { ...
true
true
false
false
false
1
GMT_init_track (double y[], GMT_LONG n, struct GMT_XSEGMENT **S) { /* GMT_init_track accepts the y components of an x-y track of length n and returns an array of * line segments that have been sorted on the minimum y-coordinate */ GMT_LONG a, b, nl = n - 1; struct GMT_XSEGMENT *L = NULL; int GMT_ysort (const v...
false
false
false
false
false
0
print_block(const uint8_t *b, int size) { int i=0; fprintf(stderr,"BEGIN OF %d BYTES---\n", size); for(i=0; i<size; i++) { fprintf(stderr,"%d ", *(b+i)); } fprintf(stderr,"END OF %d BYTES---\n", size); }
false
false
false
false
false
0
Definition (ostream& out) { if (idraw_format()) { ArrowMultiLineOvComp* comp = (ArrowMultiLineOvComp*) GetSubject(); ArrowMultiLine* aml = comp->GetArrowMultiLine(); const Coord* x, *y; int n = aml->GetOriginal(x, y); float arrow_scale = aml->ArrowScale(); out << "Begin " << MARK << " " << Name() << "\n"...
false
false
false
false
false
0
drawGL (CVector3 *z1, CVector3 *z2, CVector3 *tl, float alpha2, float lum2, bool drawlight2, bool istextured2) { int i; CVector3 tl1; tl1.x = tl->x + this->tl->x; tl1.y = tl->y + this->tl->y; tl1.z = tl->z + this->tl->z; if (draw == 0) return; if (draw == 2 || gl->isSphereInFrustum (tl1.x, tl1.y, ...
false
false
false
true
false
1
get_time() { if (susp_cnt == 0) return sys_time() - susp_accum; else return susp_start - susp_accum; }
false
false
false
false
false
0
remove_lat_multicast(int ifn) { // Add Multicast membership for LAT on socket struct packet_mreq pack_info; /* Fill in socket options */ pack_info.mr_type = PACKET_MR_MULTICAST; pack_info.mr_alen = 6; pack_info.mr_ifindex = ifn; /* This is the LAT multicast address */ ...
false
false
false
false
false
0
str_str( UBYTE *s, UBYTE *t ) { int c; while( *s ) { c = str_cmp( s, t ); if( c == 0 || c == STR_LONGER ) return s; s++; } return NULL; }
false
false
false
false
false
0
OdModf(order *od, xlist *elist, int *node_status, int *marker, int *isize, int *oinfo, int rsze, int *rchset, ...
false
false
false
false
false
0
index_get(struct index *idx, struct slice *sk, struct slice *sv) { int ret = 0, value_len, result; uint64_t value_off = 0UL; struct skipnode *node; struct skiplist *cur_list; struct skiplist *merge_list; /* * 0) Get from bloomfilter,if bloom_get return 1,next * 1) First lookup from active memtable * 2)...
false
true
false
false
true
1
parse_modem_interfaces(const char *path, DBusMessageIter *ifaces) { DBG("%s", path); while (dbus_message_iter_get_arg_type(ifaces) == DBUS_TYPE_STRING) { const char *iface; dbus_message_iter_get_basic(ifaces, &iface); if (g_str_equal(iface, OFONO_NETWORKREG_INTERFACE)) { network_found(path); return; ...
false
false
false
false
false
0
extract(u_int start, u_int chars) const { fxAssert(start+chars<slength, "Str::extract: Invalid range"); return fxStr(data+start,chars); }
false
false
false
false
false
0
gdl_dock_notebook_set_orientation (GdlDockItem *item, GtkOrientation orientation) { GtkWidget *child = gdl_dock_item_get_child (item); if (child && GTK_IS_NOTEBOOK (child)) { if (orientation == GTK_ORIENTATION_HORIZONTAL) gtk_notebook_set_tab_pos (GTK_...
false
false
false
false
false
0
IoBlock_activate(IoBlock *self, IoObject *target, IoObject *locals, IoMessage *m, IoObject *slotContext) { IoState *state = IOSTATE; IoBlockData *selfData = DATA(self); List *argNames = selfData->argNames; IoObject *scope = selfData->scope; IoObject *blockLocals = IOCLONE(state->localsProto); IoObject *result; ...
false
false
false
false
false
0
dun_error (NmaBtDevice *self, const char *func, GError *error, const char *fallback) { g_warning ("%s: DUN error: %s", func, (error && error->message) ? error->message : fallback); _set_status (self, _("Error: %s"), (error && error->message) ? error->message : fallback); _set_busy (self, FALSE); dun_cleanup (self)...
false
false
false
false
false
0
etfci_drop_full_header (ETableFieldChooserItem *etfci) { GObject *header; if (!etfci->full_header) return; header = G_OBJECT (etfci->full_header); if (etfci->full_header_structure_change_id) g_signal_handler_disconnect ( header, etfci->full_header_structure_change_id); if (etfci->full_header_dimension_cha...
false
false
false
false
false
0
lto_symtab_encoder_delete_node (lto_symtab_encoder_t encoder, symtab_node node) { void **slot, **last_slot; int index; lto_encoder_entry last_node; slot = pointer_map_contains (encoder->map, node); if (slot == NULL || !*slot) return false; index = (size_t) *slot - 1; gcc_checking_assert (...
false
false
false
false
false
0
NotifyModified(DocModification mh) { if (mh.modificationType & SC_MOD_INSERTTEXT) { decorations.InsertSpace(mh.position, mh.length); } else if (mh.modificationType & SC_MOD_DELETETEXT) { decorations.DeleteRange(mh.position, mh.length); } for (int i = 0; i < lenWatchers; i++) { watchers[i].watcher->NotifyModif...
false
false
false
false
false
0
IsTag(P_WBXML_INFO buffer, WBXML_TAG tag) { BOOL result = FALSE; if (buffer) { if (BytesLeft(buffer) >= sizeof(WBXML_TAG)) { result = ((*((WBXML_TAG*) buffer->m_curpos)) == tag); } else { /* No more data, so nope, not this tag */ result = FALSE; } } else { ParseErr...
false
false
false
false
false
0
parse_len(const char *line) { char num[PKT_LEN_SIZE + 1]; int i, error; long len; const char *num_end; memcpy(num, line, PKT_LEN_SIZE); num[PKT_LEN_SIZE] = '\0'; for (i = 0; i < PKT_LEN_SIZE; ++i) { if (!isxdigit(num[i])) return GIT_ENOTNUM; } error = git__strtol32(&len, num, &num_end, 16); if (error ...
false
false
false
false
false
0
ocrdma_add(struct be_dev_info *dev_info) { int status = 0, i; u8 lstate = 0; struct ocrdma_dev *dev; dev = (struct ocrdma_dev *)ib_alloc_device(sizeof(struct ocrdma_dev)); if (!dev) { pr_err("Unable to allocate ib device\n"); return NULL; } dev->mbx_cmd = kzalloc(sizeof(struct ocrdma_mqe_emb_cmd), GFP_KERNE...
false
false
false
false
false
0
icalparameter_free (icalparameter* parameter) { struct icalparameter_impl * impl; impl = (struct icalparameter_impl*)parameter; /* HACK. This always triggers, even when parameter is non-zero icalerror_check_arg_rv((parameter==0),"parameter");*/ #ifdef ICAL_FREE_ON_LIST_IS_ERROR icalerror_assert( (i...
false
false
false
false
true
1
del_bezier_vectors(Bezier_Vectors * bvectors) { GDEBUG("Removing bezier vectors %p and vectors %p, %p, %p, and %p", bvectors, bvectors->p0, bvectors->p1, bvectors->p2, bvectors->p3); del_vector(bvectors->p0); del_vector(bvectors->p1); del_vector(bvectors->p2); del_vector(bvectors->p3); free(bvectors); retu...
false
false
false
false
false
0
uvd_v1_0_init(struct radeon_device *rdev) { struct radeon_ring *ring = &rdev->ring[R600_RING_TYPE_UVD_INDEX]; uint32_t tmp; int r; /* raise clocks while booting up the VCPU */ if (rdev->family < CHIP_RV740) radeon_set_uvd_clocks(rdev, 10000, 10000); else radeon_set_uvd_clocks(rdev, 53300, 40000); r = uvd_v...
false
false
false
false
false
0
list_insert_after(list, data, bytes) LIST *list; char *data; int bytes; { LIST_ELEMENT *new; /* Allocate storage for the new element and its data.*/ new = list_create_element(data, bytes); if (new == NULL) return(NULL); /* Now insert the element after the current, considering the cases: * ...
false
false
false
false
false
0
ProcessHeader(const char* name, size_t nlen, const char* value, size_t vlen, HttpError* error) { std::string sname(name, nlen), svalue(value, vlen); data_->addHeader(sname, svalue); return PR_CONTINUE; }
false
false
false
false
false
0
stb0899_postproc(struct stb0899_state *state, u8 ctl, int enable) { struct stb0899_config *config = state->config; const struct stb0899_postproc *postproc = config->postproc; /* post process event */ if (postproc) { if (enable) { if (postproc[ctl].level == STB0899_GPIOPULLUP) stb0899_write_reg(state, pos...
false
false
false
false
false
0
handler_msn_prp (u_char *raw, int length, ip_address source, u_short source_port, ip_address destination, u_short destination_port) { int rc, nt; log_debug (4, "Entry into handler_msn_prp"); rc= get_new_line_malloc (&next_line, raw, length); if (rc<0) return rc; nt= get_tokens (next_line, &line_tokens, 0);...
false
false
false
false
false
0
odm_cfo(char value) { int ret_val; if (value < 0) { ret_val = 0 - value; ret_val = (ret_val << 1) + (ret_val >> 1); /* set bit12 as 1 for negative cfo */ ret_val = ret_val | BIT(12); } else { ret_val = value; ret_val = (ret_val << 1) + (ret_val >> 1); } return ret_val; }
false
false
false
false
false
0
LI1(object first,...) { va_list ap; int narg = VFUN_NARGS; VMB1 VMS1 VMV1 {object V1; object V2; object V3; object V4; object V5; object V6; va_start(ap,first); narg= narg - 0; { parse_key_new_new(narg,Vcs +0,(struct key *)(void *)&LI1key,first,ap); V1=(Vcs[0]); V2=(Vcs[1]); V3=(Vcs[2]); V4=(Vcs[3]); ...
false
false
false
false
false
0
gck_session_get_info (GckSession *self) { GckSessionInfo *sessioninfo; CK_FUNCTION_LIST_PTR funcs; CK_SESSION_INFO info; GckModule *module; CK_RV rv; g_return_val_if_fail (GCK_IS_SESSION (self), NULL); module = gck_session_get_module (self); g_return_val_if_fail (GCK_IS_MODULE (module), NULL); funcs = gck_m...
false
false
false
false
false
0
loose_clipboard() { if (clip_star.owned || clip_plus.owned) { x11_export_final_selection(); if (clip_star.owned) clip_lose_selection(&clip_star); if (clip_plus.owned) clip_lose_selection(&clip_plus); if (x11_display != NULL) XFlush(x11_display); } }
false
false
false
false
false
0
sigs_eq(jl_value_t *a, jl_value_t *b) { if (jl_has_typevars(a) || jl_has_typevars(b)) { return jl_types_equal_generic(a,b); } return jl_types_equal(a, b); }
false
false
false
false
false
0
_e2_window_toggle_full_screen (gpointer from, E2_ActionRuntime *art) { if (app.mainwindow_state & GDK_WINDOW_STATE_FULLSCREEN) gtk_window_unfullscreen (GTK_WINDOW(app.main_window)); else gtk_window_fullscreen (GTK_WINDOW(app.main_window)); return TRUE; }
false
false
false
false
false
0
snd_mixer_detach_hctl(snd_mixer_t *mixer, snd_hctl_t *hctl) { struct list_head *pos; list_for_each(pos, &mixer->slaves) { snd_mixer_slave_t *s; s = list_entry(pos, snd_mixer_slave_t, list); if (hctl == s->hctl) { list_del(pos); free(s); return 0; } } return -ENOENT; }
false
false
false
false
false
0
init_ctrl_async(struct dim_channel *ch, u8 type, u8 is_tx, u16 ch_address, u16 hw_buffer_size) { if (!g.dim_is_initialized || !ch) return DIM_ERR_DRIVER_NOT_INITIALIZED; if (!check_channel_address(ch_address)) return DIM_INIT_ERR_CHANNEL_ADDRESS; ch->dbr_size = hw_buffer_size; ch->dbr_addr = alloc_dbr(ch...
false
false
false
false
false
0
ocfs2_set_refcount_tree(struct inode *inode, struct buffer_head *di_bh, u64 refcount_loc) { int ret; handle_t *handle = NULL; struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data; struct ocfs2_inode_info *oi = OCFS2_I(inode); struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); struct buffer_h...
false
false
false
false
false
0
encodeLiteralStatic(unsigned int ch) { //trace("c: %d", ch); if (ch < 144) { putBitsR(ch + 0x0030 , 8); // 00110000 } else if (ch < 256) { putBitsR(ch - 144 + 0x0190 , 9); // 110010000 } else if (ch < 280) { putBitsR(ch - 256 + 0x0000 , 7)...
false
false
false
false
false
0
insertRepresentationEntry( DcmRepresentationEntry * repEntry) { DcmRepresentationListIterator insertedEntry; DcmRepresentationListIterator result; if (findRepresentationEntry(*repEntry, result).good()) { // this type of representation entry was already present in the list if (repEntr...
false
false
false
false
false
0
frame_airmass(struct ccd_frame *fr, double ra, double dec) { double v; double lat, lng, jd; char dms[64]; if (fits_get_double(fr, P_STR(FN_AIRMASS), &v) > 0) { return v; } if (fits_get_string(fr, P_STR(FN_LATITUDE), dms, 63) <= 0) return 0.0; if (dms_to_degrees(dms, &lat)) return 0.0; if (fits_get_st...
false
false
false
false
false
0
gtk_source_view_style_updated (GtkWidget *widget) { GtkSourceView *view; /* call default handler first */ GTK_WIDGET_CLASS (gtk_source_view_parent_class)->style_updated (widget); view = GTK_SOURCE_VIEW (widget); /* re-set tab stops, but only if we already modified them, i.e. * do nothing with good old 8-space...
false
false
false
false
false
0
f_serverlist(argvars, rettv) typval_T *argvars UNUSED; typval_T *rettv; { char_u *r = NULL; #ifdef FEAT_CLIENTSERVER # ifdef WIN32 r = serverGetVimNames(); # else make_connection(); if (X_DISPLAY != NULL) r = serverGetVimNames(X_DISPLAY); # endif #endif rettv->v_type = VAR_STRING; rett...
false
false
false
false
false
0
set_units (GtkComboBox *combo, GNCDateDelta *gdd) { gint active; active = gtk_combo_box_get_active(GTK_COMBO_BOX(gdd->units_combo)); if ((active < GNC_DATE_DELTA_DAYS) || (active > GNC_DATE_DELTA_YEARS)) active = GNC_DATE_DELTA_DAYS; gdd->units = active; g_signal_emit (gdd, date_delta_sign...
false
false
false
false
false
0
TIFFWriteBufferSetup(TIFF* tif, void* bp, tmsize_t size) { static const char module[] = "TIFFWriteBufferSetup"; if (tif->tif_rawdata) { if (tif->tif_flags & TIFF_MYBUFFER) { _TIFFfree(tif->tif_rawdata); tif->tif_flags &= ~TIFF_MYBUFFER; } tif->tif_rawdata = NULL; } if (size == (tmsize_t)(-1)) { size ...
false
false
false
false
false
0
ncx_get_short_uchar(const void *xp, uchar *ip) { ix_short xx; get_ix_short(xp, &xx); *ip = xx; if(xx > UCHAR_MAX || xx < 0) return NC_ERANGE; return ENOERR; }
false
false
false
false
false
0
ocfs2_inode_unlock(struct inode *inode, int ex) { int level = ex ? DLM_LOCK_EX : DLM_LOCK_PR; struct ocfs2_lock_res *lockres = &OCFS2_I(inode)->ip_inode_lockres; struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); mlog(0, "inode %llu drop %s META lock\n", (unsigned long long)OCFS2_I(inode)->ip_blkno, ...
false
false
false
false
false
0
rl_ding () { if (_rl_echoing_p) { switch (_rl_bell_preference) { case NO_BELL: default: break; case VISIBLE_BELL: #ifdef __MSDOS__ ScreenVisualBell (); break; #else if (_rl_visible_bell) { tputs (_rl_visible_bell, 1, _rl_output_character_function); break; } ...
false
false
false
false
false
0
sec_filter(trans *p, int filtn, int off) { int i,j; int error; int count,c; uint8_t *buf, *secbuf; section *sec; // fprintf(stderr,"sec_filter\n"); if (filtn < 0 || filtn >= MAXFILT) return; count = 188 - off; c = 0; buf = p->packet+off; sec = &p->sec[filtn]; secbuf = sec->payload; if(!filt_is_ready(p,...
false
false
false
false
false
0
replaceInString(const char *str, const char *before, const char *after) { int len; size_t beforeLen = strlen(before), afterLen = strlen(after); char *buf, *ret; const char *ptr; for (ptr = str, len = 0; (ptr = strstr(ptr, before)); len++) ptr += beforeLen; len = strlen(str) + (afterLen ...
false
true
false
false
false
1
DU_ngetStatusString(Uint16 statusCode) { const char *s = NULL; switch (statusCode) { case STATUS_Success: s = "Success"; break; case STATUS_N_AttributeListError: s = "Warning: AttributeListError"; break; case STATUS_N_ClassInstanceConflict: s = "Failure: ClassInstanceConflict...
false
false
false
false
false
0
CreateVechMatWdata(int n, int ishift, double alpha, const int *ind, const double *vals, int nnz, vechmat **A){ int info; vechmat* V; DSDPCALLOC1(&V,vechmat,&info);DSDPCHKERR(info); V->n=n; V->ishift=ishift, V->ind=ind; V->val=vals;V->nnzeros=nnz; V->alpha=alpha; V->owndata=0; *A=V; return 0; }
false
false
false
false
false
0
_mesa_CallList(GLuint list) { GLboolean save_compile_flag; GET_CURRENT_CONTEXT(ctx); FLUSH_CURRENT(ctx, 0); if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glCallList %d\n", list); if (list == 0) { _mesa_error(ctx, GL_INVALID_VALUE, "glCallList(list==0)"); return; } if (0) ...
false
false
false
false
false
0
gauche_glib_g_signal_lookup(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj name_scm; const char * name; ScmObj type_scm; ScmClass* type; ScmObj SCM_SUBRARGS[2]; int SCM_i; SCM_ENTER_SUBR("g-signal-lookup"); for (SCM_i=0; SCM_i<2; SCM_i++) { SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i); } name_...
false
false
false
false
false
0
HandleNotification(const CMuleNotiferBase& ntf) { if (wxThread::IsMain()) { #ifdef AMULE_DAEMON ntf.Notify(); #else if (theApp->amuledlg) { ntf.Notify(); } #endif } else { CMuleGUIEvent evt(ntf.Clone()); wxPostEvent(wxTheApp, evt); } }
false
false
false
false
false
0
xfs_btree_decrement( struct xfs_btree_cur *cur, int level, int *stat) /* success/failure */ { struct xfs_btree_block *block; xfs_buf_t *bp; int error; /* error return value */ int lev; union xfs_btree_ptr ptr; XFS_BTREE_TRACE_CURSOR(cur, XBT_ENTRY); XFS_BTREE_TRACE_ARGI(cur, level); ASSERT(level...
false
false
false
false
false
0
transmit_timeout(void *arg) { NCR_Instance inst = (NCR_Instance) arg; double timeout_delay; int do_auth; inst->timer_running = 0; switch (inst->opmode) { case MD_BURST_WAS_ONLINE: /* With online burst switch to online before last packet */ if (inst->burst_total_samples_to_go <= 1) in...
false
false
false
false
false
0
get_string_width(Display *display, char *s, Font font) /* width of s in font */ { XFontStruct *fstruct = NULL; int rv = 0; fstruct = XQueryFont(display, font); if(!fstruct) { fprintf(stderr, "string_width: cannot find font %d.\n", (int)font); goto ERROR; } rv = XTextWidth(fstruct, s, strlen(s)...
false
false
false
false
false
0
updateGC(GC gc_) { unsigned long mask; MSClipArea *clip; MSDashLine *dash; mask=GCLineWidth|GCLineStyle|GCForeground|GCBackground|GCFont| GCCapStyle|GCJoinStyle|GCFillStyle|GCFillRule|GCDashOffset|GCArcMode; XGetGCValues(owner()->display(),gc_,mask,&gcValues()); if ((dash=findDashGC(gc_))!=...
false
false
false
false
false
0
applyHidingScheme(VisuData *data) { gboolean redraw; g_signal_emit_by_name(G_OBJECT(data), "AskForShowHide", &redraw, NULL); if (redraw) g_signal_emit_by_name(G_OBJECT(data), "VisibilityChanged", NULL); return redraw; }
false
false
false
false
false
0
UnpicklerMemoProxy_New(UnpicklerObject *unpickler) { UnpicklerMemoProxyObject *self; self = PyObject_GC_New(UnpicklerMemoProxyObject, &UnpicklerMemoProxyType); if (self == NULL) return NULL; Py_INCREF(unpickler); self->unpickler = unpickler; PyObject_GC_Track(...
false
false
false
false
false
0
gst_ossmixer_open (GstOssMixer * mixer) { #ifdef SOUND_MIXER_INFO struct mixer_info minfo; #endif g_return_val_if_fail (mixer->mixer_fd == -1, FALSE); mixer->mixer_fd = open (mixer->device, O_RDWR); if (mixer->mixer_fd == -1) goto open_failed; /* get masks */ if (ioctl (mixer->mixer_fd, SOUND_MIXER_R...
false
false
false
false
true
1
snd_ca0106_free(struct snd_ca0106 *chip) { if (chip->res_port != NULL) { /* avoid access to already used hardware */ ca0106_stop_chip(chip); } if (chip->irq >= 0) free_irq(chip->irq, chip); // release the data #if 1 if (chip->buffer.area) snd_dma_free_pages(&chip->buffer); #endif // release the i/o port ...
false
false
false
false
false
0
add_stream (GstPlayBaseGroup * group, GstStreamInfo * info) { GValue v = { 0, }; GST_DEBUG ("add stream to group %p", group); /* keep ref to the group */ g_object_set_data (G_OBJECT (info), "group", group); g_value_init (&v, G_TYPE_OBJECT); g_value_set_object (&v, info); g_value_array_append (group->str...
false
false
false
false
false
0
validate_numnodes(node *n, int num, const char *const name) { if (NCH(n) != num) { PyErr_Format(parser_error, "Illegal number of children for %s node.", name); return 0; } return 1; }
false
false
false
false
false
0
e2_fs_walk_link (gchar **local_path E2_ERR_ARG()) { struct stat sb; #ifdef E2_VFSTMP FIXME get proper spacedata #endif #ifdef E2_VFS VPATH data = { *local_path, NULL }; if (!e2_fs_lstat (&data, &sb E2_ERR_SAMEARG()) && S_ISLNK (sb.st_mode)) #else if (!e2_fs_lstat (*local_path, &sb E2_ERR_SAMEARG()) && S_ISLNK (sb....
false
false
false
false
false
0
ap_proxy_get_worker(apr_pool_t *p, proxy_balancer *balancer, proxy_server_conf *conf, const char *url) { proxy_worker *worker; proxy_worker *max_worker = NULL; ...
false
false
false
false
false
0
list_members_replaced (const int *list, const DATASET *dset, int ref_id) { const char *errmsg = N_("Can't do this: some vars in original " "model have been redefined"); const char *label; char rword[16]; int j, mc, repl; if (ref_id == 0) { mc = get_model_count(); } else { mc = re...
true
true
false
false
false
1
unit_heal(struct block_list *bl,int hp,int sp) { nullpo_retr(0, bl); if(bl->type == BL_PC) pc_heal((struct map_session_data*)bl,hp,sp); else if(bl->type == BL_MOB) mob_heal((struct mob_data*)bl,hp); else if(bl->type == BL_HOM) homun_heal((struct homun_data*)bl,hp,sp); else if(bl->type == BL_MERC) merc_hea...
false
false
false
false
false
0
soxr_process(soxr_t p, void const * in , size_t ilen0, size_t * idone0, void * out, size_t olen , size_t * odone0) { size_t ilen, idone, odone = 0; unsigned u; bool flush_requested = false; if (!p) return "null pointer"; if (!in) flush_requested = true, ilen = ilen0 = 0; else { if ((...
false
false
false
false
false
0
sfip_convert_ip_text_to_binary( const int family, char *ip, void *dst) { char *my_ip; my_ip = ip; if( my_ip == NULL ) return( SFIP_FAILURE ); /* Across platforms, inet_pton() is inconsistent about leading 0's in AF_INET (ie IPv4 addresses. */ if( family == AF_INET ) { char ...
false
false
false
false
false
0
SITEfind(Name, CanCreate) char *Name; BOOL CanCreate; { register char *p; register int i; unsigned int j; register SITE *sp; SITEHASH *shp; char c; char buff[BUFSIZ]; /* Look for site in the hash table. */ /* SUPPRESS 6 *//* Over/underflow from plus expression */ SI...
false
false
false
false
false
0
throw_gold(struct obj *obj) { int range, odx, ody; long zorks = obj->quan; register struct monst *mon; if(!u.dx && !u.dy && !u.dz) { u.ugold += obj->quan; flags.botl = 1; dealloc_obj(obj); You("cannot throw gold at yourself."); return(0); } if(u.uswallow)...
false
false
false
false
false
0
bcm5600_dump_ports(struct nm_16esw_data *d) { struct bcm5600_table *table; struct bcm5600_port *port; m_uint32_t *entry; u_int vlan,tgid; int i; if (!(table = bcm5600_table_find(d,BCM5600_ADDR_PTABLE0))) return(-1); printf("%s: physical ports:\n",d->name); for(i=0;i<d->nr_port;i++) {...
false
false
false
false
false
0
CL_BaseMove (usercmd_t *cmd) { CL_AdjustAngles (); memset (cmd, 0, sizeof(*cmd)); VectorCopy (cl.viewangles, cmd->angles); if (in_strafe.state & 1) { cmd->sidemove += cl_sidespeed->value * CL_KeyState (&in_right); cmd->sidemove -= cl_sidespeed->value * CL_KeyState (&in_left); } cmd->sidemove ...
false
false
false
false
false
0
command_expand(char *cmd) { GSList *tmp; const char *match; int len, multiple; g_return_val_if_fail(cmd != NULL, NULL); multiple = FALSE; match = NULL; len = strlen(cmd); for (tmp = commands; tmp != NULL; tmp = tmp->next) { COMMAND_REC *rec = tmp->data; if (g_strncasecmp(rec->cmd, cmd, len) == 0 && ...
false
false
false
false
false
0
ovclosesearch(void *handle, bool freeblock) { OVSEARCH *search = (OVSEARCH *)handle; GROUPDATABLOCK *gdb; int i; #ifdef OV_DEBUG GROUPENTRY *ge; GROUPLOC gloc; #endif /* OV_DEBUG */ for (i = 0 ; i < GROUPDATAHASHSIZE ; i++) { for (gdb = groupdatablock[i] ; gdb != NULL ; gdb = gdb->next) { if (...
false
false
false
false
false
0
drawAttenction() { setMarkOpacity(1.0); #if 0 ANIMATE_PARAM(this, "backColor", 1000, QColor(255, 20, 20)); ANIMATE_PARAM(this, "textColor", 1000, QColor(255, 255, 255)); #else ANIMATE_PARAM(this, "backColor", 1000, QApplication::palette().color(QPalette::Highlight)); ANIMATE_PARAM(this, "textColor",...
false
false
false
false
false
0
start_async_command(const char *descr, char *cmd) { int pid; char err_str[512]; char *cwd; struct passwd *pw=NULL; struct passwd pw_struct; char *buffer; int size; size = get_pw_buffer_size(); buffer = sge_malloc(size); pw = sge_getpwnam_r(get_conf_val("job_owner"), &pw_struct, buffer, si...
true
true
false
false
true
1
acct_collect(long exitcode, int group_dead) { struct pacct_struct *pacct = &current->signal->pacct; cputime_t utime, stime; unsigned long vsize = 0; if (group_dead && current->mm) { struct vm_area_struct *vma; down_read(&current->mm->mmap_sem); vma = current->mm->mmap; while (vma) { vsize += vma->vm_en...
false
false
false
false
false
0
cx_debug_init(void) { const cxchar *value; cx_debug_initialized = TRUE; value = getenv("CX_DEBUG"); if (value != NULL) { static const cx_debug_key keys[] = { {"fatal_warnings", CX_DEBUG_FATAL_WARNINGS}, {"fatal_criticals", CX_DEBUG_FATAL_CRITICALS} }; ...
false
true
false
false
true
1
pre_svm_run(struct vcpu_svm *svm) { int cpu = raw_smp_processor_id(); struct svm_cpu_data *sd = per_cpu(svm_data, cpu); /* FIXME: handle wraparound of asid_generation */ if (svm->asid_generation != sd->asid_generation) new_asid(svm, sd); }
false
false
false
false
false
0
_ipmipower_setup (void) { int i; struct rlimit rlim; /* Make best effort to increase file descriptor limit, if it fails * for any reason, don't worry about it, its no big deal. */ if (getrlimit (RLIMIT_NOFILE, &rlim) == 0) { rlim.rlim_cur = rlim.rlim_max; setrlimit (RLIMIT_NOFILE,&rlim);...
false
false
false
false
false
0
GTextInfoArrayCount(GTextInfo **ti) { int i; for ( i=0; ti[i]->text || ti[i]->image || ti[i]->line; ++i ); return( i ); }
false
false
false
false
false
0
file_util_write_metadata_full(FileData *source_fd, GList *flist, GtkWidget *parent, UtilityPhase phase, FileUtilDoneFunc done_func, gpointer done_data) { UtilityData *ud; if (source_fd) flist = g_list_append(flist, file_data_ref(source_fd)); if (!flist) return; if (!file_data_add_ci_write_metadata_list(flist...
false
false
false
false
false
0
canSetRole(const XMPP::MUCItem& i1, const XMPP::MUCItem& i2, XMPP::MUCItem::Role r) { if (i2.role() == r) return true; if (r == MUCItem::Visitor) { return (i2.role() == MUCItem::Moderator ? canRevokeModerator(i1,i2) : canRevokeVoice(i1,i2)); } else if (r == MUCItem::Participant) { return (i2.role() < r ? can...
false
false
false
false
false
0