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
doIt(const Move& m, bool undo) { if(m.isNullMove()) { if(undo) { BitBoard::undoMove(m); } else { BitBoard::doMove(m); } return true; } if(!m.isLegal()) { return false; } CastlingRights oldCastlingRight...
false
false
false
false
false
0
gen_regexp_sequence (const char *str) { regexp_t sequence; char **sequence_vect; int els_num; int i; sequence_vect = get_str_vect (str, &els_num, ',', TRUE); if (els_num > 1) { sequence = XCREATENODEVAR (struct regexp, sizeof (struct regexp) + sizeof (regexp_t) * (els_num - 1)); sequen...
false
false
false
false
true
1
H5HF_hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw) { H5HF_hdr_cache_ud_t cache_udata; /* User-data for callback */ H5HF_hdr_t *hdr; /* Fractal heap header */ H5HF_hdr_t *ret_value; /* Return value */ FUNC_ENTER_NOAPI_NOINIT /* Check argume...
false
false
false
false
false
0
static_grab_objects (int *box, gamgi_enum class, gamgi_window *window) { GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (window->area); GdkGLContext *glcontext = gtk_widget_get_gl_context (window->area); gamgi_object **objects; int *levels; int width, height; gamgi_object *object; gamgi_slist *slist_old, *slist...
false
true
false
false
true
1
StackPop(stack *s) { Move *oldMove; struct stack_el *oldEl; if (s->top == NULL) return NULL; oldMove = s->top->mvt; oldEl = s->top; s->top = s->top->below; s->nSize--; free(oldEl); return oldMove; }
false
false
false
false
false
0
update_fence_and_insn (fence_t fence, insn_t insn, int need_stall) { bool asm_p; /* First, reflect that something is scheduled on this fence. */ asm_p = advance_state_on_fence (fence, insn); FENCE_LAST_SCHEDULED_INSN (fence) = insn; VEC_safe_push (rtx, gc, FENCE_EXECUTING_INSNS (fence), insn); if (SCHED_G...
false
false
false
false
false
0
addChar (FcChar32 c) { FcChar8 utf8[FC_UTF8_MAX_LEN]; int len; int i; len = ucs4_to_utf8 (c, utf8); if (foldChars) foldChars = realloc (foldChars, (nfoldChars + len) * sizeof (FcChar8)); else foldChars = malloc (sizeof (FcChar8) * len); if (!foldChars) panic ("out of memory"); for ...
false
false
false
false
true
1
ppc32_lha(cpu_ppc_t *cpu,m_uint32_t vaddr,u_int reg) { m_uint64_t data; void *haddr; haddr = PPC32_MEM_DACCESS(cpu,vaddr,PPC_MEMOP_LHZ,2,MTS_READ,&data); if (likely(haddr != NULL)) data = vmtoh16(*(m_uint16_t *)haddr); cpu->gpr[reg] = sign_extend_32(data,16); }
false
false
false
false
true
1
omap1_spi100k_probe(struct platform_device *pdev) { struct spi_master *master; struct omap1_spi100k *spi100k; int status = 0; if (!pdev->id) return -EINVAL; master = spi_alloc_master(&pdev->dev, sizeof(*spi100k)); if (master == NULL) { dev_dbg(&pdev->dev, "master allocation fail...
false
false
false
false
false
0
is_pos_number(char *text) { for(char *p=text;*p;p++) if(!isdigit(*p)) return false; return true; }
false
false
false
false
false
0
get_uri_perm (const char *uri, const char *perm_attribute) { GFile *f; GFileInfo *info; GError *error = NULL; gboolean result; f = g_file_new_for_uri (uri); info = g_file_query_info (f, perm_attribute, 0, NULL, &error); if (error != NULL) { result = FALSE; g_error_free (error); } else { result = g_file_i...
false
false
false
false
false
0
lbtf_op_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, unsigned int *new_flags, u64 multicast) { struct lbtf_private *priv = hw->priv; int old_mac_control = priv->mac_control; lbtf_deb_enter(LBTF_DEB_MACOPS); changed_flags &= SUPPORTED_FIF_FLAGS; *new_flags &= SUPPORTED_FIF_FLAGS;...
false
false
false
false
false
0
loglog_renaming_result (helpers::LogLog & loglog, tstring const & src, tstring const & target, long ret) { if (ret == 0) { loglog.debug ( DCMTK_LOG4CPLUS_TEXT("Renamed file ") + src + DCMTK_LOG4CPLUS_TEXT(" to ") + target); } else if (ret != ...
false
false
false
false
false
0
resize ( int newsize ) { char* nb = new char[newsize]; for ( int i = 0; i < size; i++ ) nb[i] = buf[i]; delete[] buf; buf = nb; }
false
false
false
false
false
0
DrawXAxis( wxDC *dc, bool refresh ) { wxCHECK_RET(m_xAxisDrawer, wxT("Invalid x axis drawer")); m_xAxisDrawer->SetTickPositions( m_xAxisTicks ); m_xAxisDrawer->SetTickLabels( m_xAxisTickLabels ); m_xAxisDrawer->SetPlotViewRect(m_viewRect); wxSize clientSize = m_xAxisRect.GetSize(); m_xAxisDrawe...
false
false
false
false
false
0
lam_rtrstore(int4 nodeid, int4 lnum, int4 pid, const char *buffer, int4 length) { struct nmsg nhead; /* network message desc. */ struct trreq *request; /* traced request */ LAM_ZERO_ME(nhead); request = (struct trreq *) nhead.nh_data; request->trq_req = TRQSTORE; request->trq_pid = pid; request->trq_lnum = ln...
false
false
false
false
false
0
main() { typedef WantToHaveFriend<int> FriendlyType; FriendlyType foo1; FriendlyType foo2; bool result = ( foo1 == foo2 ); if( result ) { return 1; } return 0; }
false
false
false
false
false
0
RCismaster(addr) INADDR addr; { register INADDR *ip; register int i; if (AmSlave) for (i = RCnmaster, ip = RCmaster; --i >= 0; ip++) /* SUPPRESS 112 *//* Retrieving long where char is stored */ if (addr.s_addr == ip->s_addr) return TRUE; return FALSE; }
false
false
false
false
false
0
my_g_bit_nth_lsf (gsize mask, gint nth_bit) { nth_bit ++; mask >>= nth_bit; if ((mask == 0) || (nth_bit == BITS_PER_CHUNK)) return -1; #if defined(__native_client__) && (defined(__i386__) || defined(__x86_64)) #define USE_X86_32BIT_INSTRUCTIONS 1 #endif #if (defined(__i386__) && defined(__GNUC__)) || defined(US...
false
false
false
false
false
0
pm860x_touch_dt_init(struct platform_device *pdev, struct pm860x_chip *chip, int *res_x) { struct device_node *np = pdev->dev.parent->of_node; struct i2c_client *i2c = (chip->id == CHIP_PM8607) ? chip->client \ : chip->companion; int data, n, ret; if (!np) return -ENODEV; np = of_get_child_by_...
false
false
false
false
false
0
fop_rename_cbk_stub (call_frame_t *frame, fop_rename_cbk_t fn, int32_t op_ret, int32_t op_errno, struct iatt *buf, struct iatt *preoldparent, struct iatt *postoldparent, struct iatt *prenewparent, struct iatt *postnewparent, dict_t *xdata) { ...
false
false
false
false
false
0
bnf_find_empty(struct object_s *p) { int num = 0; for (; p != NULL; p = p->next) if (p->type == '|') { if (num == 0) return 1; num = 0; } else num++; return (num == 0); }
false
false
false
false
false
0
doglob(record *rec, dlist *list, const char *dir, const char *rem) { dstring new; int special; /* set when a wildcard is found */ int result = 0; const char *obrace, *cbrace, *ptr; dstring_init(&new); special = 0; obrace = cbrace = NULL; // Check for {....}, \ *[? for (ptr = ...
false
false
false
false
false
0
ap_cookie_write(request_rec * r, const char *name, const char *val, const char *attrs, long maxage, ...) { const char *buffer; const char *rfc2109; apr_table_t *t; va_list vp; /* handle expiry */ buffer = ""; if (maxage) { buffer = apr_pstrc...
false
false
false
false
false
0
qla2x00_async_login(struct scsi_qla_host *vha, fc_port_t *fcport, uint16_t *data) { srb_t *sp; struct srb_iocb *lio; int rval; rval = QLA_FUNCTION_FAILED; sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL); if (!sp) goto done; sp->type = SRB_LOGIN_CMD; sp->name = "login"; qla2x00_init_timer(sp, qla2x00_get_a...
false
false
false
false
false
0
create_key_cb(struct ntb_key *key, void *user_data) { struct ntb_keyring_cookie *cookie = user_data; struct ntb_keyring *keyring = cookie->keyring; add_key(keyring, key); save_keyring(keyring); if (cookie->func) cookie->func(key, cookie->user_data)...
false
false
false
false
false
0
readEventArtists() { QHash<QString, QString> artists; while( !m_xml.atEnd() ) { m_xml.readNext(); if( m_xml.isEndElement() && m_xml.name() == "artists" ) break; if( m_xml.isStartElement() ) { if( m_xml.name() == "artist" ) artists.inse...
false
false
false
false
false
0
scrolljump_value() { if (p_sj >= 0) return (int)p_sj; return (curwin->w_height * -p_sj) / 100; }
false
false
false
false
false
0
sconf_get_schedd_job_info(void) { u_long32 info = 0; sge_mutex_lock("Sched_Conf_Lock", "", __LINE__, &pos.mutex); info = pos.c_is_schedd_job_info; sge_mutex_unlock("Sched_Conf_Lock", "", __LINE__, &pos.mutex); if (info == SCHEDD_JOB_INFO_FALSE) { GET_SPECIFIC(sc_state_t, sc_state, sc_sta...
false
false
false
false
false
0
refreshMenu() { // remove all items and then add them again removeAll(); // for each fluxboxwindow add every client in them to our clientlist Focusables::iterator win_it = m_list.begin(); Focusables::iterator win_it_end = m_list.end(); for (; win_it != win_it_end; ++win_it) { // add eve...
false
false
false
false
false
0
gnutls_x509_crq_verify (gnutls_x509_crq_t crq, unsigned int flags) { gnutls_datum data = { NULL, 0 }; gnutls_datum signature = { NULL, 0 }; bigint_t params[MAX_PUBLIC_PARAMS_SIZE]; int ret, params_size = 0, i; ret = _gnutls_x509_get_signed_data (crq->crq, "certificationRequestInfo", &data...
false
false
false
false
false
0
setpoitheme_cb (GtkWidget *combo) { gchar *theme; theme = gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo)); g_strlcpy (local_config.icon_theme, theme, sizeof (local_config.icon_theme)); get_poitype_tree (); init_poi_type_filter(); if ( mydebug > 1 ) { fprintf (stderr, "POI Theme changed to: %s\n", them...
false
false
false
false
false
0
checklog(char* filename) { struct stat fs; if (stat(filename, &fs) == 0) { if (fs.st_size > 0x40000000) { char oname[256]; snprintf(oname, sizeof(oname), "%s.old", filename); rename(filename, oname); } } }
true
true
false
false
false
1
calculate_container_datalen(struct buff *b) { int rs = 0; while( b ) { rs += b->used; b = b->next; } return(rs); }
false
false
false
false
false
0
udp_send(int argc, VALUE *argv, VALUE sock) { VALUE flags, host, port; rb_io_t *fptr; int n; struct addrinfo *res0, *res; struct rsock_send_arg arg; if (argc == 2 || argc == 3) { return rsock_bsock_send(argc, argv, sock); } rb_secure(4); rb_scan_args(argc, argv, "4", &arg.mesg, &fl...
false
false
false
false
false
0
retrieve ( uint32 index, // Number desired. std::size_t& len ) { char *buffer; if (index >= num_segments) throw exult_exception("objnum too large in read_object()"); file.seekg(0x80 + 8*index); // Get to info. long offset = Read4(file); // Get offset, length. len = Read4(file); if (!len) throw file_rea...
false
false
false
false
false
0
get_string(char const *str) { char ** res; if (!str) return NULL; res = (char **)tfind(str, &string_tree, (compare_func)strcmp); if (!res) { char *key = xstrdup(str); res = (char **)tsearch(key, &string_tree, (compare_func)strcmp); *res = key; } return *res; }
false
false
false
false
false
0
sendCANBusReaderSpeed() { // command: S0 --> S8 according to the selected speed unsigned char cmd[2]; cmd[0] = 'S'; switch( m_canbus_speed ) { case 10000: cmd[1] = '0'; break; case 20000: cmd[1] = '1'; break; case 50000: cmd[1] = '2'; break; case 100000: ...
false
false
false
false
false
0
genwqe_start(struct genwqe_dev *cd) { int err; struct pci_dev *pci_dev = cd->pci_dev; err = genwqe_read_ids(cd); if (err) return err; if (genwqe_is_privileged(cd)) { /* do this after the tweaks. alloc fail is acceptable */ genwqe_ffdc_buffs_alloc(cd); genwqe_stop_traps(cd); /* Collect registers e.g. F...
false
false
false
false
false
0
b_assemble (char *text, guint16 start_addr) { g_assert (state == B_STATE_IDLE); /* clean up previous */ ds_clean_up (); /* restart asm */ eef_asm_init (); sys.reg.sph = 0xff; sys.reg.spl = 0xff; gtk_statusbar_push (GTK_STATUSBAR(statusbar), gtk_statusbar_get_context_id(GTK_STATUSBAR(statusbar), SIM_C...
false
false
false
false
false
0
get_adep_dtu_transfer_time(Adep *adep, Array_table *ahead) { Array_def_use_table_semnode *apt; Array_table *atbl; const Block *src = adep->src; const Block *dst = adep->dst; real dt_time = 0.0; int src_lat, dst_lat; for (apt = adep->du; apt != NULL; apt = apt->next) { atbl = search_...
false
false
false
false
false
0
pipe_region_intersects(Evas_Engine_GL_Context *gc, int n, int x, int y, int w, int h) { int i, rx, ry, rw, rh, ii; rx = gc->pipe[n].region.x; ry = gc->pipe[n].region.y; rw = gc->pipe[n].region.w; rh = gc->pipe[n].region.h; if (!RECTS_INTERSECT(x, y, w, h, rx, ry, rw, rh)) ...
false
false
false
false
false
0
convertDateToDateTime( KJS::ExecState *exec, KJS::JSValue *value ) { KJS::List args; QDateTime returnDateTime; KJS::JSObject *obj = value->toObject( exec ); if ( toQString(obj->className()) == "Date" ) { int seconds = int( obj->get( exec, KJS::Identifier( "getSeconds" ) )->toObject( exec )->...
false
false
false
false
false
0
valid_civil_p(VALUE y, int m, int d, double sg, VALUE *nth, int *ry, int *rm, int *rd, int *rjd, int *ns) { double style = guess_style(y, sg); int r; if (style == 0) { int jd; r = c_valid_civil_p(FIX2INT(y), m, d, sg, rm, rd, &jd, ns); if (!r) return 0; decode_jd(INT2FIX(jd),...
false
false
false
false
false
0
fscache_objlist_add(struct fscache_object *obj) { struct fscache_object *xobj; struct rb_node **p = &fscache_object_list.rb_node, *parent = NULL; ASSERT(RB_EMPTY_NODE(&obj->objlist_link)); write_lock(&fscache_object_list_lock); while (*p) { parent = *p; xobj = rb_entry(parent, struct fscache_object, objlist...
false
false
false
false
false
0
gerb_fgetdouble(gerb_file_t *fd) { double result; char *end; errno = 0; result = strtod(fd->data + fd->ptr, &end); if (errno) { GERB_COMPILE_ERROR("Failed to read double"); return 0.0; } fd->ptr = end - fd->data; return result; }
false
false
false
false
false
0
_ml_P_IO_fcntl_l (ml_state_t *msp, ml_val_t arg) { int fd = REC_SELINT(arg, 0); int cmd = REC_SELINT(arg, 1); ml_val_t flock_rep = REC_SEL(arg, 2), obj; struct flock flock; int sts; flock.l_type = REC_SELINT(flock_rep, 0); flock.l_whenc...
false
false
false
false
false
0
check_footer(int target) { if(!l_targets[target].written) return; if(l_targets[target].flags & LOG_HTML) log_write_raw(target, "\t</BODY>\n</HTML>\n"); }
false
false
false
false
false
0
create_treeview(display_data_t *local, List *button_list) { signal_params_t *signal_params = xmalloc(sizeof(signal_params_t)); GtkTreeView *tree_view = GTK_TREE_VIEW(gtk_tree_view_new()); local->user_data = NULL; signal_params->display_data = local; signal_params->button_list = button_list; if (working_sview_con...
false
false
false
false
false
0
gda_quark_list_find (GdaQuarkList *qlist, const gchar *name) { gchar *value = NULL; g_return_val_if_fail (qlist, NULL); g_return_val_if_fail (name, NULL); if (qlist->hash_table) value = g_hash_table_lookup (qlist->hash_table, name); if (value) return value; ProtectedValue *pvalue = NULL; if (qlist->hash_pr...
false
false
false
false
false
0
nemo_view_reset_to_defaults (NemoView *view) { g_return_if_fail (NEMO_IS_VIEW (view)); NEMO_VIEW_CLASS (G_OBJECT_GET_CLASS (view))->reset_to_defaults (view); gboolean show_hidden = g_settings_get_boolean (nemo_preferences, NEMO_PREFERENCES_SHOW_HIDDEN_FILES); if (show_hidden) { nemo_window_se...
false
false
false
false
false
0
bet_future_modify_line ( gint account_number, gint number, gint mother_row ) { gchar *tmp_str; gint result; if ( bet_futur_dialog == NULL ) { bet_futur_dialog = bet_future_create_dialog ( account_number ); } else { bet_form_cle...
false
false
false
false
false
0
ConcreteConfigure( const ProcessingConfig& cfg ) { CopyAsConcreteConfig( mConfig, cfg ); mConfig.SetMidiDevice( "alsa:hw:1,0" ); // mConfig.SetMidiDevice( "file:test.mid" ); mNoteInConfig.SetDevice( mConfig.GetMidiDevice() ); mNoteInConfig.SetMessage( MIDI::eNoteOnOff ); ConfigureAndCheck( mNoteIn, mNoteInConfi...
false
false
false
false
false
0
hash_insert_FlowTable(uint32_t index_cache, void *flowkey, common_record_t *raw_record) { FlowTableRecord_t *record; uint32_t index = index_cache & FlowTable.IndexMask; // allocate enough memory for the new flow including all additional information in FlowTableRecord_t // MemoryHandle_get always succeeds. If no memo...
false
false
false
false
true
1
resize_filter_get_weight (resize_filter_t *resize_filter, double distance) { double scale = 1.0; if (resize_filter->weight_func == sinc_fast) scale = resize_filter->weight_func (fabs (distance)); return scale * resize_filter->weight_func (fabs (distance)); }
false
false
false
false
false
0
handle_cli_ael_set_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { switch (cmd) { case CLI_INIT: e->command = "ael set debug {read|tokens|macros|contexts|off}"; e->usage = "Usage: ael set debug {read|tokens|macros|contexts|off}\n" " Enable AEL read, token, macro, or context debugging...
false
false
false
false
false
0
test_parse_tail() { char *s = "true false null [1, 2, 3] {}"; json_ItemType types[] = { item_true, item_false, item_null, item_array, item_object }; int i; for (i = 0; *s; ++i) { test_printf("i=%d *s=0x%02X (%c)\n", i, *s, *s); test_that(i < array_size(types)); json_Item item; s = json_parse(s, ...
false
false
false
false
false
0
nm_keyfile_connection_set_path (NMKeyfileConnection *self, const char *path) { NMKeyfileConnectionPrivate *priv; g_return_if_fail (NM_IS_KEYFILE_CONNECTION (self)); g_return_if_fail (path != NULL); priv = NM_KEYFILE_CONNECTION_GET_PRIVATE (self); g_free (priv->path); priv->path = g_strdup (path); }
false
false
false
false
false
0
fli_tbox_clear( FL_OBJECT * obj ) { FLI_TBOX_SPEC *sp = obj->spec; int i; sp->select_line = sp->deselect_line = -1; if ( sp->num_lines == 0 ) return; for ( i = 0; i < sp->num_lines; i++ ) { if ( sp->lines[ i ]->specialGC ) { XFreeGC( flx->display, sp->line...
false
false
false
false
false
0
make_reorder_chain_1 (bb, prev) basic_block bb; basic_block prev; { edge e; basic_block next; rtx note; /* Mark this block visited. */ if (prev) { restart: RBI (prev)->next = bb; if (rtl_dump_file && prev->next_bb != bb) fprintf (rtl_dump_file, "Reordering block %d after %d\n", ...
false
false
false
false
false
0
Make(const TypeOfFE **l,int k) { const TypeOfFE** p=new const TypeOfFE*[k]; for (int i=0;i<k;i++) p[i]=l[i]; return p; }
false
false
false
false
false
0
trx_undo_page_set_next_prev_and_add( /*================================*/ page_t* undo_page, /*!< in/out: undo log page */ byte* ptr, /*!< in: ptr up to where data has been written on this undo page. */ mtr_t* mtr) /*!< in: mtr */ { ulint first_free; /*!< offset within undo_page */ ulint end_of_rec; /*...
false
false
false
false
false
0
asus_wmi_evaluate_method(u32 method_id, u32 arg0, u32 arg1, u32 *retval) { struct bios_args args = { .arg0 = arg0, .arg1 = arg1, }; struct acpi_buffer input = { (acpi_size) sizeof(args), &args }; struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; acpi_status status; union acpi_object *obj; u...
false
false
false
false
false
0
external_scroller_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param) { if (!strcmp(param->name, "content") && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) { Evas_Object *content = external_common_param_edje_object_get(obj, param); if ((strcmp(param->s, "")) && (!content))...
false
false
false
false
false
0
bufferevent_pair_get_partner(struct bufferevent *bev) { struct bufferevent_pair *bev_p; struct bufferevent *partner; bev_p = upcast(bev); if (! bev_p) return NULL; incref_and_lock(bev); partner = downcast(bev_p->partner); decref_and_unlock(bev); return partner; }
false
false
false
false
false
0
main(int argc, char *argv[]) { extern int optind; unsigned int buffer_size; int c,usage=0; int display_flags; Directory *dir; gp_init(); byte_addr = 0; #define DISPLAY_NOTHING 0 #define DISPLAY_DIR 1 #define DISPLAY_SYM 2 #define DISPLAY_ROM 4 #define DISPLAY_SRC 8 #define DISPLAY_MESS ...
false
true
false
false
true
1
posix_uname(PyObject *self, PyObject *noargs) { struct utsname u; int res; PyObject *value; Py_BEGIN_ALLOW_THREADS res = uname(&u); Py_END_ALLOW_THREADS if (res < 0) return posix_error(); value = PyStructSequence_New(&UnameResultType); if (value == NULL) return NULL...
false
false
false
false
false
0
Browser_Load_Default_Directory (void) { GFile **files; gchar *path_utf8; gchar *path; path_utf8 = g_strdup(DEFAULT_PATH_TO_MP3); if (!path_utf8 || strlen(path_utf8)<=0) { g_free(path_utf8); path_utf8 = g_strdup (g_get_home_dir ()); } /* FIXME: only in UTF-8 if coming fr...
false
false
false
false
true
1
load_vlan_mon(struct conf_sect_t *sect) { struct conf_option_t *opt; long mask[4096/8/sizeof(long)]; ipoe_nl_del_vlan_mon(-1); list_for_each_entry(opt, &sect->items, entry) { if (strcmp(opt->name, "vlan-mon")) continue; if (!opt->val) continue; if (parse_vlan_mon(opt->val, mask)) continue; if...
false
false
false
false
false
0
_privacy_free_z(zebra_t z) { zebra_list_t zlist; union xhashv xhv; log_debug(ZONE, "freeing zebra ctx"); if(xhash_iter_first(z->lists)) do { xhv.z_val = &zlist; xhash_iter_get(z->lists, NULL, NULL, xhv.val); pool_free(zlist->p); } while(xhash_iter_ne...
false
false
false
false
false
0
LoadRequiredExtensions( vtkOpenGLExtensionManager*mgr) { // Load extensions using vtkOpenGLExtensionManager bool gl12=mgr->ExtensionSupported("GL_VERSION_1_2")==1; bool gl14=mgr->ExtensionSupported("GL_VERSION_1_4")==1; bool gl15=mgr->ExtensionSupported("GL_VERSI...
false
false
false
false
false
0
dbg_autocolourise ( unsigned long stream ) { printf ( "\033[%dm", ( stream ? ( 31 + dbg_autocolour ( stream ) ) : 0 ) ); }
false
false
false
false
false
0
v9fs_evict_inode(struct inode *inode) { struct v9fs_inode *v9inode = V9FS_I(inode); truncate_inode_pages_final(&inode->i_data); clear_inode(inode); filemap_fdatawrite(&inode->i_data); v9fs_cache_inode_put_cookie(inode); /* clunk the fid stashed in writeback_fid */ if (v9inode->writeback_fid) { p9_client_clun...
false
false
false
false
false
0
show_new_file(struct rev_info *revs, struct cache_entry *new, int cached, int match_missing) { unsigned char *sha1; unsigned int mode; /* New file in the index: it might actually be different in * the working copy. */ if (get_stat_data(new, &sha1, &mode, cached, match_missing) < 0) return; diff_i...
false
false
false
false
false
0
dca_sysfs_add_req(struct dca_provider *dca, struct device *dev, int slot) { struct device *cd; static int req_count; cd = device_create(dca_class, dca->cd, MKDEV(0, slot + 1), NULL, "requester%d", req_count++); if (IS_ERR(cd)) return PTR_ERR(cd); return 0; }
false
false
false
false
false
0
line(double zx,double zy) { if (g.xinline==false) { move(g.curx,g.cury); } cairo_line_to(m_cr, zx, zy); }
false
false
false
false
false
0
OnBuildTargetRenamed(CodeBlocksEvent& event) { cbProject* project = event.GetProject(); if(project != m_pProject) { return; } wxString newTarget = event.GetBuildTargetName(); wxString oldTarget = event.GetOldBuildTargetName(); for (RemoteDebuggingMap::iterator it = m_CurrentRemoteDeb...
false
false
false
false
false
0
m_constant_fold (pIIR_ScalarSubtype st, RegionStack &rstack) { if (done(st) & CONST_FOLD) return 0; else done(st) |= CONST_FOLD; int error_count = 0; error_count += constant_fold(st->immediate_base, rstack); if (st->range != NULL) error_count += constant_fold(st->range, rstack); return error_count...
false
false
false
false
false
0
update_user_data_dir() { stringstream user_data_dir; user_data_dir << g_get_home_dir() << G_DIR_SEPARATOR_S << ".sunpinyin"; ASimplifiedChinesePolicy::instance().setUserDataDir(user_data_dir.str()); }
false
false
false
false
false
0
tearoff_click (GdkEventButton* ev) { if (_can_be_torn_off) { remove (contents); window_box.pack_start (contents); own_window.set_name (get_name()); close_event_box.set_name (get_name()); own_window.show_all (); hide (); Detach (); } return true; }
false
false
false
false
false
0
workers_wake_up (int max) { int i; for (i = 0; i < max; ++i) { State old_state, new_state; do { old_state = new_state = workers_state; /* * We must not wake workers up once done has * been posted. */ if (old_state.data.done_posted) return; if (old_state.data.num_waiting == 0) retu...
false
false
false
false
false
0
evbuffer_expand(struct evbuffer *buf, size_t datlen) { struct evbuffer_chain *chain; EVBUFFER_LOCK(buf); chain = evbuffer_expand_singlechain(buf, datlen); EVBUFFER_UNLOCK(buf); return chain ? 0 : -1; }
false
false
false
false
false
0
next_sector(struct ide_state *ide) { /* LBA direct? */ if (ide->cur_head_reg & 0x40) { ide->cur_sector++; if (ide->cur_sector == 0) { ide->cur_cylinder++; if (ide->cur_cylinder == 0) ide->cur_head++; } } /* standard CHS */ else { /* sectors are 1-based */ ide->cur_sector+...
false
false
false
false
false
0
hm_handler(request_rec *r) { apr_bucket_brigade *input_brigade; apr_size_t len; char *buf; apr_status_t status; apr_table_t *tbl; hm_server_t hmserver; char *ip; hm_ctx_t *ctx; if (strcmp(r->handler, "heartbeat")) { return DECLINED; } if (r->method_number != M_POST) ...
false
false
false
false
true
1
niu_get_ethtool_tcam_entry(struct niu *np, struct ethtool_rxnfc *nfc) { struct niu_parent *parent = np->parent; struct niu_tcam_entry *tp; struct ethtool_rx_flow_spec *fsp = &nfc->fs; u16 idx; u64 class; int ret = 0; idx = tcam_get_index(np, (u16)nfc->fs.location); tp = &parent->tcam[idx]; if (!tp-...
false
false
false
false
false
0
CPLHTTPDestroyResult( CPLHTTPResult *psResult ) { if( psResult ) { CPLFree( psResult->pabyData ); CPLFree( psResult->pszErrBuf ); CPLFree( psResult->pszContentType ); CSLDestroy( psResult->papszHeaders ); int i; for(i=0;i<psResult->nMimePartCount;i++) { ...
false
false
false
false
false
0
add_bookmark (gpointer data) { const char *edttxt; if (!check_status (_("Add Bookmark"), current_wdata, 0, 0, 0, 1)) return; edttxt = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (hostedit)->entry)); if (*edttxt == '\0') { ftp_log (gftp_logging_error, NULL, _("Add Bookmark: You must enter a ...
false
false
false
false
false
0
delete_selected_messages(void) { struct messageline *msgline; int i; int s; if ((messagesmp) && (messagesnr > 0)) { for (s = 0, i = 0; i < messagesnr; i++) { msgline = (struct messageline *)(messagesmp + (sizeof(struct messageline) * i)); if (msgline->delete) s++; } ...
false
false
false
false
false
0
handle_logger_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { switch (cmd) { case CLI_INIT: e->command = "logger reload"; e->usage = "Usage: logger reload [<alt-conf>]\n" " Reloads the logger subsystem state. Use after restarting syslogd(8) if you are using syslog logging.\n"; re...
false
false
false
false
false
0
genie_establish (NODE_T * p) { A68_CHANNEL channel; A68_REF ref_iden, ref_file; A68_FILE *file; int size; POP_OBJECT (p, &channel, A68_CHANNEL); POP_REF (p, &ref_iden); CHECK_REF (p, ref_iden, MODE (REF_STRING)); POP_REF (p, &ref_file); CHECK_REF (p, ref_file, MODE (REF_FILE)); file = FILE_DEREF (&r...
false
false
false
false
false
0
calc_cksum(int start, int end, u8 *mem) { u8 tmp = 0; int i; for (i = start; i < end; i++) tmp += mem[i]; return tmp; }
false
false
false
false
false
0
btrfs_add_delayed_qgroup_reserve(struct btrfs_fs_info *fs_info, struct btrfs_trans_handle *trans, u64 ref_root, u64 bytenr, u64 num_bytes) { struct btrfs_delayed_ref_root *delayed_refs; struct btrfs_delayed_ref_head *ref_head; int ret = 0; if (!fs_info->quota_enabled || !is_fstree(ref_root)) re...
false
false
false
false
false
0
indent(int n) { static const char *buf = " "; static int len = strlen(buf); return buf + len - n*3; }
false
false
false
false
false
0
mmc_test_profile_write_perf(struct mmc_test_card *test) { struct mmc_test_area *t = &test->area; unsigned long sz; unsigned int dev_addr; int ret; ret = mmc_test_area_erase(test); if (ret) return ret; for (sz = 512; sz < t->max_tfr; sz <<= 1) { dev_addr = t->dev_addr + (sz >> 9); ret = mmc_test_area_io(te...
false
false
false
false
false
0
decFontSize(const int stepping[], int count) { int zoomFactor = d->m_fontScaleFactor; if (zoomFactor > minZoom) { // find the entry nearest to the given zoomsizes for (int i = count-1; i >= 0; --i) if (stepping[i] < zoomFactor) { zoomFactor = stepping[i]; break; }...
false
false
false
false
false
0
c_str2ipv6(struct sample *smp) { if (!buf2ip6(smp->data.str.str, smp->data.str.len, &smp->data.ipv6)) return 0; smp->type = SMP_T_IPV6; smp->flags &= ~SMP_F_CONST; return 1; }
false
false
false
false
false
0
gkm_gnome2_storage_get_property (GObject *obj, guint prop_id, GValue *value, GParamSpec *pspec) { GkmGnome2Storage *self = GKM_GNOME2_STORAGE (obj); switch (prop_id) { case PROP_DIRECTORY: g_value_set_string (value, gkm_gnome2_storage_get_directory (self)); break; case PROP_MODUL...
false
false
false
false
false
0
create_stack_trace(Context * ctx) { StackTrace * stack = EXT(ctx); if (!stack->valid) { stack->frame_cnt = 0; stack->valid = 1; trace_stack(ctx, stack); } return stack; }
false
false
false
false
false
0
operator<<(OutputCharStream &os, FOTBuilder::Symbol sym) { switch (sym) { case FOTBuilder::symbolFalse: os << falseString; break; case FOTBuilder::symbolTrue: os << trueString; break; default: os << FOTBuilder::symbolName(sym); break; } return os; }
false
false
false
false
false
0
onexit() { ExitTrap *p; alarm(0); for (p=first; p; p=p->next) if (p->callcleanup) p->cleanup(); }
false
false
false
false
false
0