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
read_hall_of_fame() { char full_path[MAX_PATH+1]; int rc; File file; if (!misc.path_cat(full_path, sys.dir_config, HALL_OF_FAME_FILE_NAME, MAX_PATH)) { ERR("Path to the hall of fame too long.\n"); return 0; } if( !misc.is_file_exist(full_path) ) return 0; rc = file.file_open(full_path, 0, 1); // 0=d...
false
false
false
false
false
0
InGoodUTF8(int pos, int &start, int &end) const { int trail = pos; while ((trail>0) && (pos-trail < UTF8MaxBytes) && UTF8IsTrailByte(static_cast<unsigned char>(cb.CharAt(trail-1)))) trail--; start = (trail > 0) ? trail-1 : trail; const unsigned char leadByte = static_cast<unsigned char>(cb.CharAt(start)); const...
false
false
false
false
true
1
do_part_to_dev (const char *part) { int err = 1; size_t n = strlen (part); while (n >= 1 && c_isdigit (part[n-1])) { err = 0; n--; } if (err) { reply_with_error ("device name is not a partition"); return NULL; } char *r = strndup (part, n); if (r == NULL) { reply_with_perror ("str...
false
false
false
false
false
0
contains_muldiv (rtx x) { switch (GET_CODE (x)) { case MOD: case DIV: case UMOD: case UDIV: return 1; case MULT: return ! (CONST_INT_P (XEXP (x, 1)) && exact_log2 (UINTVAL (XEXP (x, 1))) >= 0); default: if (BINARY_P (x)) return contains_muldiv (XEXP (x, 0)) || contains_mu...
false
false
false
false
false
0
parse_section_data (MonoImage *m, int *num_clauses, const unsigned char *ptr) { unsigned char sect_data_flags; int is_fat; guint32 sect_data_len; MonoExceptionClause* clauses = NULL; while (1) { /* align on 32-bit boundary */ ptr = dword_align (ptr); sect_data_flags = *ptr; ptr++; is_fat = sect_dat...
false
false
false
false
false
0
skipnspace (TCHAR **s) { while (!_istspace (**s)) (*s)++; }
false
false
false
false
false
0
is_header_ogm (GstOggStream * pad, ogg_packet * packet) { if (packet->bytes >= 1 && (packet->packet[0] & 0x01)) return TRUE; return FALSE; }
false
false
false
false
false
0
translate_equalp(Matrix const &m0, Matrix const &m1, NR::Coord const epsilon) { return NR_DF_TEST_CLOSE(m0[4], m1[4], epsilon) && NR_DF_TEST_CLOSE(m0[5], m1[5], epsilon); }
false
false
false
false
false
0
InitParameters(struct ElmergridType *eg) { int i; eg->relh = 1.0; eg->inmethod = 0; eg->outmethod = 0; eg->nofilesin = 1; eg->unitemeshes = FALSE; eg->triangles = FALSE; eg->triangleangle = 0.0; eg->rotate = FALSE; eg->polar = FALSE; eg->cylinder = FALSE; eg->usenames = FALSE; eg->layers = 0;...
false
false
false
false
false
0
vmw_sou_surface_clip(struct vmw_kms_dirty *dirty) { struct vmw_kms_sou_surface_dirty *sdirty = container_of(dirty, typeof(*sdirty), base); struct vmw_kms_sou_dirty_cmd *cmd = dirty->cmd; SVGASignedRect *blit = (SVGASignedRect *) &cmd[1]; /* Destination rect. */ blit += dirty->num_hits; blit->left = dirty->unit...
false
false
false
false
false
0
json_encode(lua_State *l) { json_config_t *cfg = json_fetch_config(l); strbuf_t local_encode_buf; strbuf_t *encode_buf; char *json; int len; luaL_argcheck(l, lua_gettop(l) == 1, 1, "expected 1 argument"); if (!cfg->encode_keep_buffer) { /* Use private buffer */ encode_buf =...
false
false
false
false
false
0
do_probe (ide_drive_t *drive, u8 cmd) { ide_hwif_t *hwif = drive->hwif; const struct ide_tp_ops *tp_ops = hwif->tp_ops; u16 *id = drive->id; int rc; u8 present = !!(drive->dev_flags & IDE_DFLAG_PRESENT), stat; /* avoid waiting for inappropriate probes */ if (present && drive->media != ide_disk && cmd == ATA_CMD...
false
false
false
false
false
0
controlServerThread(void *unused) { char ich; while (1) { ich = getchar(); switch (ich) { case 'q': RTMP_LogPrintf("Exiting\n"); if (rtmpServer) stopStreaming(rtmpServer); break; default: RTMP_LogPrintf("Unknown command \'%c\', ignoring\n", ich); } sleep(1); ...
false
false
false
false
false
0
discardGame(int gameid) { ChessGame *cg; Board *b; char z[64]; global.debug("FicsProtocol","discardGame"); cg=global.getGame(gameid); if (!cg) return; switch(cg->protodata[0]) { case 257: // observed snprintf(z,64,"unobserve %d",cg->GameNumber); break; case 258: // examined strc...
false
false
false
false
false
0
ws_bc_add_const_float(WsBc *bc, WsUInt16 *index_return, WsFloat value) { WsUInt16 i; WsBcConstant *nc; /* Do we already have a suitable float32 constant? */ for (i = 0; i < bc->num_constants; i++) { if (bc->constants[i].type == WS_BC_CONST_TYPE_FLOAT32 && bc->constants[i].u.v_float ...
false
false
false
false
false
0
on_button6_released (GtkButton *button, gpointer user_data) { GtkWidget *spbtn1 = lookup_widget(window1,"spinbutton1"); GtkWidget *spbtn2 = lookup_widget(window1,"spinbutton2"); double val = jack_poll_time(); if (val < 0 ) {dothejack(0); retu...
false
false
false
false
false
0
gluebi_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, unsigned char *buf) { int err = 0, lnum, offs, bytes_left; struct gluebi_device *gluebi; gluebi = container_of(mtd, struct gluebi_device, mtd); lnum = div_u64_rem(from, mtd->erasesize, &offs); bytes_left = len; while (bytes_left)...
false
false
false
false
false
0
int_chr(int argc, VALUE *argv, VALUE num) { char c; unsigned int i; rb_encoding *enc; if (rb_num_to_uint(num, &i) == 0) { } else if (FIXNUM_P(num)) { rb_raise(rb_eRangeError, "%ld out of char range", FIX2LONG(num)); } else { rb_raise(rb_eRangeError, "bignum out of char range"); } ...
false
false
false
false
false
0
GetItemText(long item) const { wxListItem info; info.m_mask = wxLIST_MASK_TEXT; info.m_itemId = item; GetItem( info ); return info.m_text; }
false
false
false
false
false
0
got324() /* * Channel modes * * from: <server> * msg: <to> <chname> <mode> <params> * */ { chanrec *chan; split(NULL,Server->msg); split(Server->chname,Server->msg); split(Server->mode,Server->msg); strcpy(Server->sbuf,Server->msg); context; chan = Channel_channel(Server->chname); context; if(chan ...
false
false
false
false
false
0
outprob_state_nocache(GMMCalc *gc, int t, HTK_HMM_State *stateinfo, HTK_Param *param) { int d, i; /* set global values for outprob functions to access them */ for(d=0,i=0;i<gc->OP_nstream;i++) { gc->OP_vec_stream[i] = &(param->parvec[t][d]); d += gc->OP_veclen_stream[i]; } return(gmm_calc_mix(gc, stat...
false
false
false
false
false
0
draw_ball_helper(UINT8* p, int horz, UINT8 ENAB) { int width = 1 << ((CTRLPF >> 4) & 3); int i; for (i = 0; i < width; i++) { if (ENAB & 2) { p[horz % 160] = COLUPF >> 1; } horz++; } }
false
false
false
false
false
0
pipe_mkisofs_up (char *mkisofs_argv[],int infd,int outfd,off64_t outoff) { pid_t mkisofs_pid; int fildes[2],ret,n; if (pipe (fildes) < 0) perror (":-( unable to create pipe"), exit(FATAL_START(errno)); if ((mkisofs_pid=fork ()) == (pid_t)-1) perror (":-( unable to fork genisoimage"), exit(FATAL_S...
false
false
false
false
true
1
generateIntCast(Tree sig, Tree x) { return generateCacheCode(sig, subst("int($0)", CS(x))); }
false
false
false
false
false
0
srp_add_one(struct ib_device *device) { struct srp_device *srp_dev; struct ib_device_attr *dev_attr; struct srp_host *host; int mr_page_shift, p; u64 max_pages_per_mr; dev_attr = kmalloc(sizeof *dev_attr, GFP_KERNEL); if (!dev_attr) return; if (ib_query_device(device, dev_attr)) { pr_warn("Query device fa...
false
false
false
false
false
0
info_panel_setup_hostname (CcInfoPanel *self, GPermission *permission) { char *str; GtkWidget *entry; GError *error = NULL; if (permission == NULL) { g_debug ("Will not show hostname, hostnamed not installed"); return; } entry = WID ("name_entry"); if (g_p...
false
false
false
false
false
0
handle_ruleset_resource(const struct packet_ruleset_resource *p) { struct resource *presource = resource_by_number(p->id); fc_assert_ret_msg(NULL != presource, "Bad resource %d.", p->id); names_set(&presource->name, p->name, p->rule_name); sz_strlcpy(presource->graphic_str, p->graphic_str); sz_strlcpy(preso...
false
false
false
false
false
0
store_func(hx509_context context, void *ctx, hx509_cert c) { PKCS12_AuthenticatedSafe *as = ctx; PKCS12_OctetString os; PKCS12_CertBag cb; size_t size; int ret; memset(&os, 0, sizeof(os)); memset(&cb, 0, sizeof(cb)); os.data = NULL; os.length = 0; ret = hx509_cert_binary(conte...
false
false
false
false
false
0
bignum_maybe_new_sign(bignum* x_, int negative_p) { if ((BIGNUM_NEGATIVE_P(x_)) ? negative_p : (!negative_p)) return x_; else { return bignum_new_sign(x_, negative_p); } }
false
false
false
false
false
0
as_pg_remove_wckeys(pgsql_conn_t *pg_conn, uint32_t uid, slurmdb_wckey_cond_t *wckey_cond) { List ret_list = NULL; char *cond = NULL, *user_name = NULL; int rc = SLURM_SUCCESS; if (!wckey_cond) { error("as/pg: remove_wckeys: nothing to remove"); return NULL; } if(check_db_connection(pg_conn) != SLURM_...
false
false
false
false
false
0
enoughDataAvailable() { if (source->bytesAvailable() < qint64(sizeof(chunk))) return false; chunk descriptor; source->peek(reinterpret_cast<char *>(&descriptor), sizeof(chunk)); if (source->bytesAvailable() < qint64(sizeof(chunk) + descriptor.size)) return false; return true; }
false
false
false
false
false
0
hwsim_register_received_nl(struct sk_buff *skb_2, struct genl_info *info) { struct mac80211_hwsim_data *data; int chans = 1; spin_lock_bh(&hwsim_radio_lock); list_for_each_entry(data, &hwsim_radios, list) chans = max(chans, data->channels); spin_unlock_bh(&hwsim_radio_lock); /* In the future we shou...
false
false
false
false
false
0
cfgetispeed (termios_p) const struct termios *termios_p; { return ((termios_p->c_iflag & IBAUD0) ? 0 : termios_p->c_cflag & (CBAUD | CBAUDEX)); }
false
false
false
false
false
0
brcms_c_ucode_mac_upd(struct brcms_c_info *wlc) { /* enable or disable any active IBSSs depending on whether or not * we are on the home channel */ if (wlc->home_chanspec == wlc_phy_chanspec_get(wlc->band->pi)) { if (wlc->pub->associated) { /* * BMAC_NOTE: This is something that should be fixed * in ...
false
false
false
false
false
0
OnIncomingTunnel(const buzz::Jid &jid, Session *session) { std::string content_name; const TunnelContentDescription* content = NULL; if (!FindTunnelContent(session->remote_description(), &content_name, &content)) { session->Reject(STR_TERMINA...
false
false
false
false
false
0
finish_save_stack(char *name) { int i; int level = 0; int found_ident = !omit_symbol_names_option; need_space = 0; for (i = 0; i < save_end ; i++) { switch (token_stack[i].type) { case '(': if (omit_arguments_option) { if (level == 0) { save_token(token_stack+i); ...
false
false
false
false
false
0
cb_check_integer_value (cb_tree x) { struct cb_literal *l; struct cb_field *f; cb_tree y; if (x == cb_error_node) { return cb_error_node; } if (CB_TREE_CATEGORY (x) != CB_CATEGORY_NUMERIC) { goto invalid; } switch (CB_TREE_TAG (x)) { case CB_TAG_CONST: if (x != cb_zero) { goto invalid; } ret...
false
false
false
true
false
1
gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size, GstBuffer ** buf) { GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src); GstBuffer *buffer; int n; GST_DEBUG_OBJECT (interaudiosrc, "create"); buffer = NULL; g_mutex_lock (&interaudiosrc->surface->mutex); n = gst_adap...
false
false
false
false
false
0
gnc_gui_refresh_all (void) { if (suspend_counter != 0) { PERR ("suspend counter not zero"); return; } gnc_gui_refresh_internal (TRUE); }
false
false
false
false
false
0
timetz2tm(TimeTzADT *time, struct pg_tm * tm, fsec_t *fsec, int *tzp) { #ifdef HAVE_INT64_TIMESTAMP int64 trem = time->time; tm->tm_hour = trem / USECS_PER_HOUR; trem -= tm->tm_hour * USECS_PER_HOUR; tm->tm_min = trem / USECS_PER_MINUTE; trem -= tm->tm_min * USECS_PER_MINUTE; tm->tm_sec = trem / USECS_PER_SEC; ...
false
false
false
false
false
0
isValidContact(const Vec3& p) const { bool res=true; // check vs. Triangles vector<Triangle*>::const_iterator titer=m_triangles.begin(); while((titer!=m_triangles.end())&&(res)){ res=!((*titer)->dist(p).first); titer++; } // if no contact with triangle, check vs. Edges if(res){ vector<Edg...
false
false
false
false
false
0
put(ExecState *exec, const Identifier &propertyName, JSValue *value, int attr ) { #ifdef KJS_VERBOSE kDebug(6070) << "DOMCSSStyleDeclaration::put " << propertyName.qstring(); #endif DOMExceptionTranslator exception(exec); CSSStyleDeclarationImpl &styleDecl = *m_impl; if (propertyName == "cssText") { styleD...
false
false
false
false
false
0
parse_opt (int key, char *arg, struct argp_state *state _GL_UNUSED_PARAMETER) { char *p; int number; switch (key) { case 'd': debug = true; options |= SO_DEBUG; break; case OPT_ENVIRON: env_option = true; break; case 'p': if (arg && strlen (arg)) pid_fil...
false
false
false
false
false
0
EraseLevelCurses(int dev) { /* Redraw level track. */ int ii, y = 0; if (!((1 << dev) & devmask) || (dev > SOUND_MIXER_NRDEVICES - 1) || (dev < 0)) return; y = CountChannels(dev); attrset(COLOR_PAIR(TRACK_COLOR)); for (ii = 0; ii < level_width; ii++) mvaddch(YOFFSET + y, XOFFSET + menu_width + R_P...
false
false
false
false
false
0
mlk_coordinates(node *p, long *tipy) { /* establishes coordinates of nodes */ node *q, *first, *last, *pp1 =NULL, *pp2 =NULL; long num_sibs, p1, p2, i; if (p->tip) { p->xcoord = 0; p->ycoord = (*tipy); p->ymin = (*tipy); p->ymax = (*tipy); (*tipy) += down; return; } q = p->next...
false
false
false
true
false
1
ncursesw_if_catch_signal(int sig_num) { int bytes_written = 0; int ret_val; int ncursesw_if_write_buffer; // Note: // I think TRACE_LOGs in this function may cause a deadlock in case // they're called while a fflush for the tracelog is already underway. ncursesw_if_write_buffer = sig_num; //TRACE_LOG...
false
false
false
false
false
0
floodFillTexture( const ssize_t x_, const ssize_t y_, const Magick::Image &texture_ ) { modifyImage(); // Set drawing pattern options()->fillPattern(texture_.constImage()); // Get pixel view Pixels pixels(*this); // Fill image PixelPacket *p = pixels.get(x...
false
false
false
false
false
0
DrawErrorBars( GRA_wxWidgets *graphicsOutput, wxDC &dc ) { if( errorBars_.empty() )return; // std::vector<GRA_errorBar*>::const_iterator end = errorBars_.end(); for( std::vector<GRA_errorBar*>::const_iterator i=errorBars_.begin(); i!=end; ++i ) (*i)->Draw( graphicsOutput, dc ); }
false
false
false
false
false
0
adsi_display(unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2) { int bytes = 0; /* Sanity check line number */ if (page) { if (line > 4) return -1; } else { if (line > 33) return -1; } if (line < 1) { return -1; } /* Parameter type */ buf[bytes++] = ADSI_LOAD_VIRTU...
false
false
false
false
false
0
printline (const char *hname, const char *msg) { int c, pri; const char *p; char *q, line[MAXLINE + 1]; /* test for special codes */ pri = DEFUPRI; p = msg; if (*p == '<') { pri = 0; while (isdigit (*++p)) pri = 10 * pri + (*p - '0'); if (*p == '>') ++p; } if (pri & ~(LOG_FA...
true
true
false
false
false
1
shmem_lock_remove_counter(void *lock) { oshmem_lock_counter_t *counter = lock_find_counter(lock); if (counter) { oshmem_lock_counter_t *prev = counter->prev; oshmem_lock_counter_t *next = counter->next; if (next) { next->prev = prev; } if (prev) { ...
false
false
false
false
false
0
atl1_clean_rx_ring(struct atl1_adapter *adapter) { struct atl1_rfd_ring *rfd_ring = &adapter->rfd_ring; struct atl1_rrd_ring *rrd_ring = &adapter->rrd_ring; struct atl1_buffer *buffer_info; struct pci_dev *pdev = adapter->pdev; unsigned long size; unsigned int i; /* Free all the Rx ring sk_buffs */ for (i = 0;...
false
false
false
false
false
0
poses_test_compose2Dpoint(int a1, int a2) { const long N = 500000; CTicTac tictac; CPose2D a(1.0,2.0,DEG2RAD(10)); CPoint2D b(8.0,-5.0); CPoint2D p; for (long i=0;i<N;i++) { p = a+b; } double T = tictac.Tac()/N; dummy_do_nothing_with_string( mrpt::format("%f",p.x()) ); return T; }
false
false
false
false
false
0
pa12203001_set_power_state(struct pa12203001_data *data, bool on, u8 mask) { #ifdef CONFIG_PM int ret; if (on && (mask & PA12203001_ALS_EN_MASK)) { mutex_lock(&data->lock); if (data->px_enabled) { ret = pa12203001_als_enable(data, PA12203001_ALS_EN_MASK); if (ret < 0) goto err; } ...
false
false
false
false
false
0
next_search_hl(win, shl, lnum, mincol) win_T *win; match_T *shl; /* points to search_hl or a match */ linenr_T lnum; colnr_T mincol; /* minimal column for a match */ { linenr_T l; colnr_T matchcol; long nmatched; if (shl->lnum != 0) { /* Check for three situations: * 1. If the ...
false
false
false
false
false
0
glade_widget_pack_property_default (GladeWidget *widget, const gchar *id_property) { GladeProperty *property; g_return_val_if_fail (GLADE_IS_WIDGET (widget), FALSE); if ((property = glade_widget_get_pack_property (widget, id_property)) != NULL) return glade_property_default (property); return FALSE; }
false
false
false
false
false
0
atyfb_setup(char *options) { char *this_opt; if (!options || !*options) return 0; while ((this_opt = strsep(&options, ",")) != NULL) { if (!strncmp(this_opt, "noaccel", 7)) { noaccel = 1; } else if (!strncmp(this_opt, "nomtrr", 6)) { nomtrr = 1; } else if (!strncmp(this_opt, "vram:", 5)) vram = si...
false
false
false
false
false
0
signal_emit_id(int signal_id, int params, ...) { Signal *rec; va_list va; g_return_val_if_fail(signal_id >= 0, FALSE); g_return_val_if_fail(params >= 0 && params <= SIGNAL_MAX_ARGUMENTS, FALSE); rec = g_hash_table_lookup(signals, GINT_TO_POINTER(signal_id)); if (rec != NULL) { va_start(va, params); signal_e...
false
false
false
false
false
0
draw_sprites(struct mame_bitmap *bitmap,const struct rectangle *cliprect) { int offs; for (offs = 0;offs < spriteram_size;offs += 4) { if (spriteram[offs] & 0x01) { int sx,sy,flipx,flipy; sx = spriteram[offs+3]; sy = (240 - spriteram[offs+2]) & 0xff; flipx = spriteram[offs] & 0x04; ...
false
false
false
false
false
0
up_tool_show_wakeups (void) { guint i; gboolean ret; UpWakeups *wakeups; UpWakeupItem *item; guint total; GPtrArray *array; /* create new object */ wakeups = up_wakeups_new (); /* do we have support? */ ret = up_wakeups_get_has_capability (wakeups); if (!ret) { g_print ("No wakeup capability\n"); goto ...
false
false
false
false
false
0
dht_rename_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, int op_errno, fd_t *fd, dict_t *xdata) { dht_local_t *local = NULL; int this_call_cnt = -1; call_frame_t *prev = NULL; local = frame->local; prev = cookie;...
false
false
false
false
false
0
group_change_callback (NemoFile *file, GFile *res_loc, GError *error, NemoPropertiesWindow *window) { char *group; g_assert (NEMO_IS_PROPERTIES_WINDOW (window)); g_assert (window->details->group_change_file == file); group = window->details->group_change_group; g_assert (group != NULL)...
false
false
false
false
false
0
median(unsigned char inImg[256][256], unsigned char outImg[256][256]){ short filterM[9]; for(int i = 0; i < 256; i++) { for(int j = 0; j < 256; j++) { int n = 0; for(int fi = 0; fi < 3; fi++){ for(int fj = 0; fj < 3; fj++){ int x = (i + fi - 1 + 256) % 256; int y = (j + fj - 1 + 256) % ...
false
false
false
false
true
1
maybe_end_member_template_processing (void) { int i; int last; if (VEC_length (int, inline_parm_levels) == 0) return; last = VEC_pop (int, inline_parm_levels); for (i = 0; i < last; ++i) { --processing_template_decl; current_template_parms = TREE_CHAIN (current_template_parms); pop...
false
false
false
false
false
0
IReadBlock( int nBlockXOff, int nBlockYOff, void * pImage ) { int nDataSize = GDALGetDataTypeSize( eDataType ) / 8; int i; CPLAssert( nBlockYOff == 0 ); /* -------------------------------------------------------------------- */ /* Seek to profile. ...
false
false
false
false
false
0
verify_knownhost(ssh_session session){ char *hexa; int state; char buf[10]; unsigned char *hash = NULL; size_t hlen; ssh_key srv_pubkey; int rc; state=ssh_is_server_known(session); rc = ssh_get_publickey(session, &srv_pubkey); if (rc < 0) { return -1; } rc = ssh_get_publickey_hash(srv_p...
false
false
false
false
false
0
gwa_inherit_child_packing (GladeWidgetAdaptor *adaptor) { GladeWidgetAdaptor *parent_adaptor; GList *child_packings = NULL, *packing_list, *default_list; if ((parent_adaptor = gwa_get_parent_adaptor (adaptor)) != NULL) { for (packing_list = parent_adaptor->child_packings; packing_list; packin...
false
false
false
false
false
0
get_anon_bdev(dev_t *p) { int dev; int error; retry: if (ida_pre_get(&unnamed_dev_ida, GFP_ATOMIC) == 0) return -ENOMEM; spin_lock(&unnamed_dev_lock); error = ida_get_new_above(&unnamed_dev_ida, unnamed_dev_start, &dev); if (!error) unnamed_dev_start = dev + 1; spin_unlock(&unnamed_dev_lock); if (error ==...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__gui__controls__EditBox_GoToPosition(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__gui__controls__EditLine * line, int y, int x) { struct __ecereNameSpace__ecere__gui__controls__EditBox * __ecerePointer___ecereNameSpace__ecere__gui__controls_...
false
false
false
true
false
1
codecs_list_changed_nt (G_GNUC_UNUSED gpointer id, GmConfEntry *entry, gpointer data) { CodecsBox *self = CODECS_BOX (data); GSList *list = gm_conf_entry_get_list (entry); GSList *current_list = codecs_box_to_gm_conf_list (self); Ekiga::CodecList clist (list); ...
false
false
false
false
false
0
Perl_magic_settaint(pTHX_ SV *sv, MAGIC *mg) { dVAR; PERL_ARGS_ASSERT_MAGIC_SETTAINT; PERL_UNUSED_ARG(sv); /* update taint status */ if (TAINT_get) mg->mg_len |= 1; else mg->mg_len &= ~1; return 0; }
false
false
false
false
false
0
pop_modelview() { modelviews.pop_front(); if (modelviews.empty()) { modelviews.push_front(CL_Matrix4x4(true)); } modelview_changed(); }
false
false
false
false
false
0
ladish_room_project_save_complete(void * command_context, bool success) { cmd_ptr->done = true; cmd_ptr->success = success; if (!success) { ladish_notify_simple(LADISH_NOTIFY_URGENCY_HIGH, "Project save failed", LADISH_CHECK_LOG_TEXT); } }
false
false
false
false
false
0
setscatter(Matrix &data,int width){ deletescatter(); GDC_scatter = new GDC_SCATTER_T[ data.Nrows() ]; scat_ctr = 0; Matrix tmpdat = data; if(data.Ncols()<2){ tmpdat = data.Column(1); for(int ctr=1;ctr<=tmpdat.Nrows(); ctr++) tmpdat(ctr,1) = ctr-1; tmpdat |= data.Column(1); } for(int i=1;i<=tmpdat...
false
false
false
false
false
0
fusion_vector_init( FusionVector *vector, int capacity, FusionSHMPoolShared *pool ) { D_ASSERT( vector != NULL ); D_ASSERT( capacity > 0 ); vector->elements = NULL; vector->count = 0; vector->capacity = capacity; vector->p...
false
false
false
false
false
0
ldbm_config_db_logdirectory_get_ext(void *arg) { struct ldbminfo *li = (struct ldbminfo *) arg; if (strlen(li->li_dblayer_private->dblayer_log_directory) > 0) return (void *)li->li_dblayer_private->dblayer_log_directory; else return (void *)li->li_new_directory; }
false
false
false
false
false
0
ec_GF2m_neg(const mp_int *a, mp_int *r, const GFMethod *meth) { if (a == r) { return MP_OKAY; } else { return mp_copy(a, r); } }
false
false
false
false
false
0
mch_msg(str) char *str; { #if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI) /* On Unix use stdout if we have a tty. This allows "vim -h | more" and * uses mch_errmsg() when started from the desktop. * When not going to start the GUI also use stdout. * On Mac, when started from...
false
false
false
false
false
0
gtktexttag_gtk_text_tag_event(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj tag_scm; GtkTextTag* tag; ScmObj event_object_scm; GObject * event_object; ScmObj event_scm; GdkEvent* event; ScmObj iter_scm; GtkTextIter* iter; ScmObj SCM_SUBRARGS[4]; int SCM_i; SCM_ENTER_SUBR("gtk-text-tag-even...
false
false
false
false
false
0
listSymbols(StringRef Command, const TargetOptions &Options) { for (auto &Filename : InputFilenames) { std::string Error; std::unique_ptr<MemoryBuffer> Buffer; std::unique_ptr<LTOModule> Module = getLocalLTOModule(Filename, Buffer, Options, Error); if (!Module) { errs() << Command << ": ...
false
false
false
false
false
0
match_index_to_query_keys(PlannerInfo *root, IndexOptInfo *index, ScanDirection indexscandir, List *ignorables) { List *index_pathkeys; ListCell *index_cell; int index_col; ListCell *r; /* Get the pathkeys that exactly describe the index */ index_pathkeys = build_index_pathkeys(r...
false
false
false
false
false
0
DB_lock(OFBool exclusive) { int lockmode; if (exclusive) { lockmode = LOCK_EX; /* exclusive lock */ } else { lockmode = LOCK_SH; /* shared lock */ } if (dcmtk_flock(handle_->pidx, lockmode) < 0) { dcmtk_plockerr("DB_lock"); return DcmQRIndexDatabaseError; ...
false
false
false
false
false
0
gss_wrap_size_limit(OM_uint32 *minor_status, gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, OM_uint32 req_output_size, OM_uint32 *max_input_size) { gss_union_ctx_id_t ctx; gss_mechanism mech; OM_uint32 major_st...
false
false
false
false
false
0
L25() {register object *base=vs_base; register object *sup=base+VM25; VC25 vs_check; {object V167; object V168; V167=(base[0]); V168=(base[1]); vs_top=sup; goto TTL; TTL:; {object V169; V169= Cnil; {object V170; V170= ((V168))->v.v_self[(long)62]; V169= ( V171 = CMPcar((V170)), (type_of(V171) == t_sfun ?...
false
false
false
false
false
0
tokenOkay(int id) { if(!d->activeIds.contains(id)) return; d->activeIds.removeAll(id); handler_accept(d, id, SecureArray()); }
false
false
false
false
false
0
_get_id3v2_frame_info(const char *frame_data, unsigned int frame_size, struct lms_string_size *s, lms_charset_conv_t *cs_conv, int strip) { if (frame_size == 0) return; if (frame_size > s->len) { char *tmp; tmp = realloc(s->str, sizeof(char) * (frame_size + 1)); if (!tmp) ...
false
false
false
false
false
0
ignoreUnmap(Window /*w*/) { if (unmapCount == 0) return false; unmapCount--; return true; }
false
false
false
false
false
0
search(short n, boolean is_auto) { short s, i, j, row, col, t; short shown = 0, found = 0; static boolean reg_search; for (i = -1; i <= 1; i++) { for (j = -1; j <= 1; j++) { row = rogue.row + i; col = rogue.col + j; if ((row < MIN_ROW) || (row >= (ROGUE_LINES - 1)) || (col < 0) || (co...
false
false
false
false
false
0
AVCRawBinFSeek(AVCRawBinFile *psFile, int nOffset, int nFrom) { int nTarget = 0; CPLAssert(nFrom == SEEK_SET || nFrom == SEEK_CUR); /* Supported only with read access for now */ CPLAssert(psFile && psFile->eAccess != AVCWrite); if (psFile == NULL || psFile->eAccess == AVCWrite) retur...
false
false
false
false
false
0
wasp_vector_compare( wasp_vector a, wasp_vector b ){ wasp_integer al = wasp_vector_length( a ); wasp_integer bl = wasp_vector_length( b ); wasp_integer i, l = ( al > bl )? bl : al; for( i = 0; i < l; i ++ ){ wasp_integer d = wasp_cmp_eq( wasp_vector_get( a, i ), ...
false
false
false
false
false
0
comparepositions(const void *a, const void *b) { if (*((unsigned long *) a) < *((unsigned long *) b)) { return -1; } return 1; }
false
false
false
false
false
0
explain_buffer_sock_fprog(explain_string_buffer_t *sb, const struct sock_fprog *data) { if (explain_is_efault_pointer(data, sizeof(*data))) { explain_buffer_pointer(sb, data); return; } explain_string_buffer_puts(sb, "{ len = "); explain_buffer_uint(sb, data->len); explain_s...
false
false
false
false
false
0
dbm_cache_store(void *baton, gnutls_datum_t key, gnutls_datum_t data) { apr_dbm_t *dbm; apr_datum_t dbmkey; apr_datum_t dbmval; mgs_handle_t *ctxt = baton; apr_status_t rv; apr_time_t expiry; apr_pool_t *spool; if (mgs_session_id2dbm(ctxt->c, key.data, key.size, &dbmkey) < 0) return -1; /* we expire ...
false
false
false
false
false
0
addSphere(int xLoc,int yLoc,int zLoc,int radiusIn,Pixel colorIn) { Pixel2 tempColor; tempColor.r = colorIn.r; tempColor.g = colorIn.g; tempColor.b = colorIn.b; Sphere temp ( xLoc, yLoc, zLoc, radiusIn, tempColor); spheres.push_back(temp); }
false
false
false
false
false
0
getFileType(IOChannel& in) { in.seek(0); char buf[3]; if (in.read(buf, 3) < 3) { log_error(_("Can't read file header")); in.seek(0); return GNASH_FILETYPE_UNKNOWN; } // This is the magic number {0xff, 0xd8, 0xff} for JPEG format files if (std::equal(buf, buf + ...
false
false
false
false
false
0
set_xml(preset new_preset, bool clr, string dir) { ofstream presetsfile; if (clr == true) { presetsfile.open(dir.c_str()); } else { presetsfile.open(dir.c_str(), ios::app); } if (presetsfile.is_open()) { presetsfile << "<preset plugin=\"abgate\" name=\"" << new_preset.name << "\">\n"; presetsfile << "\t<pa...
false
false
false
false
false
0
qrencode(const char *intext, const char *outfile) { QRcode *qrcode; qrcode = encode(intext); if(qrcode == NULL) { perror("Failed to encode the input data:"); exit(EXIT_FAILURE); } writePNG(qrcode, outfile); QRcode_free(qrcode); }
false
false
false
false
false
0
build_get_context_with_message(BasicAutotoolsPlugin *plugin, const gchar *dir) { IAnjutaMessageManager *mesg_manager; gchar mname[128]; gchar *subdir; BuildContext *context = NULL; static gint message_pane_count = 0; /* Initialise regex rules */ build_regex_init(); subdir = g_path_get_basename (dir); /* Tran...
false
false
false
false
false
0
ensure_EargsSz(int sz) { if (EargsSz < sz) Eargsp = (char **) erealloc((void *) Eargsp, sizeof(char *) * (EargsSz = sz)); }
false
false
false
false
false
0
or_options_free(or_options_t *options) { if (!options) return; routerset_free(options->_ExcludeExitNodesUnion); if (options->NodeFamilySets) { SMARTLIST_FOREACH(options->NodeFamilySets, routerset_t *, rs, routerset_free(rs)); smartlist_free(options->NodeFamilySets); } config...
false
false
false
false
false
0