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
newgame() { int i; #ifdef MFLOPPY gameDiskPrompt(); #endif flags.ident = 1; for (i = 0; i < NUMMONS; i++) mvitals[i].mvflags = mons[i].geno & G_NOCORPSE; init_objects(); /* must be before u_init() */ flags.pantheon = -1; /* role_init() will reset this */ role_init(); /* must be before init_dungeons(), u...
false
false
false
false
false
0
shell_exec_search(struct gnutella_shell *sh, int argc, const char *argv[]) { shell_check(sh); g_assert(argv); g_assert(argc > 0); if (argc < 2) goto error; if (0 == ascii_strcasecmp(argv[1], "add")) { if (argc < 3) { shell_set_msg(sh, _("Query string missing")); goto error; } if (!utf8_is_valid_str...
false
false
false
false
false
0
GetCellId( int displayPos[2] ) { if (this->EnableVertexPicking) { return -1; } this->Update( displayPos ); return this->CellId; }
false
false
false
false
false
0
load_image_from_file_not_ply(int lp, const char *file) { GdkPixbuf *impixfile; #if GTK_MAJOR_VERSION < 2 impixfile= gdk_pixbuf_new_from_file(file); if (impixfile ==NULL) { showerr(file,_("\ the attempt to load the image file %s as produced error: %s")); return FALSE; } #else ...
false
false
false
false
false
0
WildCardListMatch(wxString list, wxString name, bool strip) { if(list==_T("")) //any empty list matches everything by default return true; wxString wildlist=list; wxString wild=list.BeforeFirst(';'); if(strip) wild=wild.Strip(wxString::both); while(wildlist!=_T("")) { if(...
false
false
false
false
false
0
propagate_block (basic_block bb, regset live, regset local_set, regset cond_local_set, int flags) { struct propagate_block_info *pbi; rtx insn, prev; int changed; pbi = init_propagate_block_info (bb, live, local_set, cond_local_set, flags); if (flags & PROP_REG_INFO) { int i; /* Process ...
false
false
false
true
true
1
__readVertices() { std::set<size_t> references; VerticesSet& V = *__vertices; for (size_t i=0; i<V.numberOfVertices(); ++i) { const double x = __getReal(); const double y = __getReal(); const double z = __getReal(); const size_t ref = __getInteger(); references.insert(ref); V[i] = Ve...
false
false
false
false
false
0
addICUPatterns(const Locale& locale, UErrorCode& status) { UnicodeString dfPattern; UnicodeString conflictingString; UDateTimePatternConflict conflictingStatus; DateFormat* df; if (U_FAILURE(status)) { return; } // Load with ICU patterns for (int32_t i=DateFormat::kFull; i<=Dat...
false
false
false
false
false
0
bt_ctf_field_type_structure_get_type( struct bt_ctf_field_type_structure *structure, const char *name) { struct bt_ctf_field_type *type = NULL; struct structure_field *field; GQuark name_quark = g_quark_try_string(name); size_t index; if (!name_quark) { goto end; } if (!g_hash_table_lookup_extended(struc...
false
false
false
false
false
0
aachar_to_num(ch) char ch; { if (ch >= 97 && ch <= 122) ch = ch - 32; /* Make letters upper case */ switch (ch) { case 'A': return(0); case 'R': return(1); case 'N': return(2); case 'D': return(3); case 'B': return(3); case 'C': return(4); case 'Q': return(5); case 'E': return(6); ...
false
false
false
false
false
0
login_write (struct logininfo *li) { #if !defined(HAVE_CYGWIN) && !defined(DONT_WARN_ON_NONROOT) if ((int)geteuid() != 0) { dropbear_log(LOG_WARNING, "Attempt to write login records by non-root user (aborting)"); return 1; } #endif /* set the timestamp */ login_set_current_time(li); #ifdef USE_LOGIN sy...
false
false
false
false
false
0
fs2netd_update_valid_tables() { int rc; int hacked = 0; if ( !Logged_in ) { return -1; } // if there are no tables to check with then bail if ( Table_valid_status.empty() ) { return -1; } // if we're a standalone, show a dialog saying "validating tables" if (Game_mode & GM_STANDALONE_SERVER) { std_cre...
false
false
false
false
false
0
SparseMatrix_exclude_submatrix(SparseMatrix A, int nrow, int ncol, int *rindices, int *cindices){ /* get a submatrix by excluding rows and columns */ int *r, *c, nr, nc, i; SparseMatrix B; if (nrow <= 0 && ncol <= 0) return A; r = MALLOC(sizeof(int)*((size_t)A->m)); c = MALLOC(sizeof(int)*((size_t)A->n));...
false
false
false
false
false
0
orefdat_(fortint* ksec1) { /* // Fortran-callable: // // INTEGER OREFDAT // EXTERNAL OREFDAT // // INDEX = OREFDAT(KSEC1) // // where KSEC1 contains GRIB section 1 after unpacking by GRIBEX. // // Returns the index of the reference date in the post-auxiliary array in // ECMWF local definition 4 (ocean da...
false
false
false
false
false
0
config_rename_kids( CfEntryInfo *ce ) { CfEntryInfo *ce2; struct berval rdn, nrdn; for (ce2 = ce->ce_kids; ce2; ce2 = ce2->ce_sibs) { struct berval newdn, newndn; dnRdn ( &ce2->ce_entry->e_name, &rdn ); dnRdn ( &ce2->ce_entry->e_nname, &nrdn ); build_new_dn( &newdn, &ce->ce_entry->e_name, &rdn, NULL ); bu...
false
false
false
false
false
0
getUnitOrNull() const { const DIE *p = this; while (p) { if (p->getTag() == dwarf::DW_TAG_compile_unit || p->getTag() == dwarf::DW_TAG_type_unit) return p; p = p->getParent(); } return nullptr; }
false
false
false
false
false
0
ican3_handle_message(struct ican3_dev *mod, struct ican3_msg *msg) { netdev_dbg(mod->ndev, "%s: modno %d spec 0x%.2x len %d bytes\n", __func__, mod->num, msg->spec, le16_to_cpu(msg->len)); switch (msg->spec) { case MSG_IDVERS: ican3_handle_idvers(mod, msg); break; case MSG_MSGLOST: case MSG_FMSGLOST: ...
false
false
false
false
false
0
acl_get_permset(acl_entry_t entry_d, acl_permset_t *permset_p) { acl_entry_obj *entry_obj_p = ext2int(acl_entry, entry_d); if (!entry_obj_p) { if (permset_p) *permset_p = NULL; return -1; } if (!permset_p) { errno = EINVAL; return -1; } *permset_p = int2ext(&entry_obj_p->eperm); return 0; }
false
false
false
false
false
0
usage() const { QString usage = fakeDevice()->property("usage").toString(); if (usage == "filesystem") { return Solid::StorageVolume::FileSystem; } else if (usage == "partitiontable") { return Solid::StorageVolume::PartitionTable; } else if (usage == "raid") { ...
false
false
false
false
false
0
px_put_u(stream * s, uint i) { if (i <= 255) px_put_ub(s, (byte)i); else px_put_us(s, i); }
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__com__Container_Free(struct __ecereNameSpace__ecere__com__Instance * this) { struct __ecereNameSpace__ecere__com__IteratorPointer * i; while(i = ((struct __ecereNameSpace__ecere__com__IteratorPointer * (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({ struct __...
false
false
false
false
false
0
part_at(int dx, int dy) { for (int i = 0; i < external_parts.size(); i++) { int p = external_parts[i]; if (parts[p].precalc_dx[0] == dx && parts[p].precalc_dy[0] == dy) return p; } return -1; }
false
false
false
false
false
0
chmod (const char *path, mode_t mode) { if (!libc_chmod) clickpreload_init (); /* also needed for package_path */ clickpreload_assert_path_in_instdir ("chmod", path); mode |= S_IWUSR; return (*libc_chmod) (path, mode); }
false
false
false
false
false
0
INET_rresolve(struct sockaddr_in *s_in, int numeric, uint32_t netmask) { /* addr-to-name cache */ struct addr { struct addr *next; struct sockaddr_in addr; int host; char name[1]; }; static struct addr *cache = NULL; struct addr *pn; char *name; uint32_t ad, host_ad; int host = 0; if (s_in->sin_famil...
true
true
false
false
false
1
gedit_document_get_metadata (GeditDocument *doc, const gchar *key) { gchar *value = NULL; g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), NULL); g_return_val_if_fail (key != NULL, NULL); if (doc->priv->metadata_info && g_file_info_has_attribute (doc->priv->metadata_info, key)) { value = g_s...
false
false
false
false
false
0
hexb(const char *s) { byte b=*(byte*)s; b -= '0'; if (b > 9) b -= 'a'-'0'-10; byte c = *(byte*)(s+1); c -= '0'; if (c > 9) c -= 'a'-'0'-10; return (b << 4) + c; }
false
false
false
false
false
0
edge_scc_exactly(struct isl_sched_edge *edge, int scc) { return edge->src->scc == scc && edge->dst->scc == scc; }
false
false
false
false
false
0
_hdb_find_master_key(uint32_t *mkvno, hdb_master_key mkey) { hdb_master_key ret = NULL; while(mkey) { if(ret == NULL && mkey->keytab.vno == 0) ret = mkey; if(mkvno == NULL) { if(ret == NULL || mkey->keytab.vno > ret->keytab.vno) ret = mkey; } else if((uint32_t)mkey->keytab.vno == *mkvno) ret...
false
false
false
false
false
0
new_arena(void) { struct arena_object* arenaobj; uint excess; /* number of bytes above pool alignment */ void *address; #ifdef PYMALLOC_DEBUG if (Py_GETENV("PYTHONMALLOCSTATS")) _PyObject_DebugMallocStats(stderr); #endif if (unused_arena_objects == NULL) { uint i; uin...
false
false
false
false
false
0
removeview () { if ( !viewOnMap ) fatalError ("void Vehicle :: removeview - the vehicle is not viewing the map"); tcomputevehicleview bes ( gamemap ); bes.init( this, -1 ); bes.startsearch(); viewOnMap = false; }
false
false
false
false
false
0
clone_req_option_list (ReqOption *req_option) { ReqOption *new_req_option; if (req_option == NULL) return NULL; new_req_option = (ReqOption *) xmalloc (sizeof (ReqOption)); new_req_option->or_option_terms = NULL; new_req_option->next = NULL; new_req_option->or_option_terms = clone_req_or_option_li...
false
false
false
false
false
0
get_htc_epid_queue(struct ath9k_htc_priv *priv, u8 epid) { struct ath_common *common = ath9k_hw_common(priv->ah); struct sk_buff_head *epid_queue = NULL; if (epid == priv->mgmt_ep) epid_queue = &priv->tx.mgmt_ep_queue; else if (epid == priv->cab_ep) epid_queue = &priv->tx.cab_ep_queue; else if (epid == priv->...
false
false
false
false
false
0
GC_initiate_gc() { if (GC_dirty_maintained) GC_read_dirty(); # ifdef STUBBORN_ALLOC GC_read_changed(); # endif # ifdef CHECKSUMS { extern void GC_check_dirty(); if (GC_dirty_maintained) GC_check_dirty(); } # endif GC_n_rescuing_pages = 0; if (GC_mark_state == MS_NONE) { ...
false
false
false
false
false
0
vpd_macaddress_get(adapter_t *adapter, int index, u8 mac_addr[]) { struct chelsio_vpd_t vpd; if (t1_eeprom_vpd_get(adapter, &vpd)) return 1; memcpy(mac_addr, vpd.mac_base_address, 5); mac_addr[5] = vpd.mac_base_address[5] + index; return 0; }
false
true
false
false
false
1
huge_ralloc(void *ptr, size_t oldsize, size_t size, size_t extra, size_t alignment, bool zero) { void *ret; size_t copysize; /* Try to avoid moving the allocation. */ ret = huge_ralloc_no_move(ptr, oldsize, size, extra); if (ret != NULL) return (ret); /* * size and oldsize are different enough that we n...
false
false
false
false
false
0
open_wave_file(lame_t gfp, char const *inPath, int *enc_delay, int *enc_padding) { FILE *musicin; /* set the defaults from info incase we cannot determine them from file */ lame_set_num_samples(gfp, MAX_U_32_NUM); if (!strcmp(inPath, "-")) { lame_set_stream_binary_mode(musicin = stdin); /* R...
false
false
false
false
false
0
drive_ata_check (UDisksLinuxDriveObject *object) { gboolean ret; UDisksLinuxDevice *device; ret = FALSE; if (object->devices == NULL) goto out; device = object->devices->data; if (device->ata_identify_device_data != NULL || device->ata_identify_packet_device_data != NULL) ret = TRUE; out: retu...
false
false
false
false
false
0
collection_table_move_focus(CollectTable *ct, gint row, gint col, gboolean relative) { gint new_row; gint new_col; if (relative) { new_row = ct->focus_row; new_col = ct->focus_column; new_row += row; if (new_row < 0) new_row = 0; if (new_row >= ct->rows) new_row = ct->rows - 1; while (col != 0) {...
false
false
false
false
false
0
e_ews_connection_get_free_busy (EEwsConnection *cnc, gint pri, EEwsRequestCreationCallback free_busy_cb, gpointer free_busy_user_data, GCancellable *cancellable, ...
false
false
false
false
false
0
insert(char *s, int token) { int len = strlen(s); if (lastentry + 1 >= SYMMAX) error("Symbol table full"); if (lastchar + len + 1 >= STRMAX) error("Lexemes array full"); lastentry = lastentry + 1; symtable[lastentry].token = token; symtable[lastentry].lexptr = &lexemes[lastchar + 1]; lastchar = lastchar +...
false
false
false
false
false
0
explain_buffer_in_addr(explain_string_buffer_t *sb, const struct in_addr *addr) { explain_string_buffer_puts(sb, inet_ntoa(*addr)); if (ntohl(addr->s_addr) == INADDR_ANY) { explain_string_buffer_puts(sb, " INADDR_ANY"); } else if (ntohl(addr->s_addr) == INADDR_BROADCAST) { ex...
false
false
false
false
true
1
load_provided(private_plugin_loader_t *this, provided_feature_t *provided, int level) { char *name, *provide; int indent = level * 2; if (provided->loaded || provided->failed) { return; } name = provided->entry->plugin->get_name(provided->entry->plugin); provide = plugin_feature_get_string(pro...
false
false
false
false
false
0
travBFS(Gpr_t * state, Expr_t* prog, comp_block * xprog) { nodestream nodes; queue *q; ndata *nd; Agnode_t *n; Agedge_t *cure; Agedge_t *nxte; Agraph_t *g = state->curgraph; q = mkQueue(); nodes.oldroot = 0; nodes.prev = 0; while ((n = nextNode(state, &nodes))) { nd = nData...
false
false
false
false
false
0
flip_bold(int state) { extern char *_setbold, *_clearallattr; if((pboldstate = state) == TRUE){ if(_setbold != NULL) putpad(_setbold); } else{ if(_clearallattr != NULL){ if(!color_blasted_by_attrs) color_blasted_by_attrs = pico_get_cur_color(); _force_fg_color_change = _force_bg_...
false
false
false
false
false
0
sync_delete_dir(const char *path) { hashtable *ht; sync_store(); pthread_mutex_lock(&m_sync_ht); /* remove basename ht from dirname ht */ ht = ht_remove_f(sync_ht, path, free); pthread_mutex_unlock(&m_sync_ht); /* no hashtable found */ if (!ht) return -1; /* ht should b...
false
false
false
false
false
0
avl_inapply( Avlnode *root, IFP fn, caddr_t arg, int stopflag ) { if ( root == 0 ) return( AVL_NOMORE ); if ( root->avl_left != 0 ) if ( avl_inapply( root->avl_left, fn, arg, stopflag ) == stopflag ) return( stopflag ); if ( (*fn)( root->avl_data, arg ) == stopflag ) return( stopflag ); if ( root...
false
false
false
false
false
0
getSiftKp( const cv::Mat& gray_img, const cv::Mat1b& mask_img, const cv::Mat& depth_img, cv::Matx33f K, float t, std::vector<cv::KeyPoint3D>& keypoints, cv::Mat1f& descriptors ) { Lowe::SIFT sift; sift.PeakThreshInit = 0.01 * t; Lowe::SIFT::KeyList lowe_kps; Lowe::SIFT::Image lowe_i...
false
false
false
false
false
0
opLineTo(Object args[], int numArgs) { if (!state->isCurPt()) { error(getPos(), "No current point in lineto"); return; } state->lineTo(args[0].getNum(), args[1].getNum()); }
false
false
false
false
false
0
test_vcard_qp_2_1_parsing (const gchar *vcard_str, const gchar *expected_text) { EVCard *vcard; EVCardAttribute *attr; gchar *value; vcard = e_vcard_new_from_string (vcard_str); g_return_val_if_fail (vcard != NULL, FALSE); attr = e_vcard_get_attribute (vcard, "FN"); g_return_val_if_f...
false
false
false
false
false
0
pj_init_plus( const char *definition ) { #define MAX_ARG 200 char *argv[MAX_ARG]; char *defn_copy; int argc = 0, i; PJ *result; /* make a copy that we can manipulate */ defn_copy = (char *) pj_malloc( strlen(definition)+1 ); strcpy( defn_copy, definition ); /* split into ...
true
true
false
false
false
1
profile_event_register(enum profile_type type, struct notifier_block *n) { int err = -EINVAL; switch (type) { case PROFILE_TASK_EXIT: err = blocking_notifier_chain_register( &task_exit_notifier, n); break; case PROFILE_MUNMAP: err = blocking_notifier_chain_register( &munmap_notifier, n); break; } ...
false
false
false
false
false
0
mupdate_ready(void) { pthread_mutex_lock(&ready_for_connections_mutex); if(ready_for_connections) { syslog(LOG_CRIT, "mupdate_ready called when already ready"); fatal("mupdate_ready called when already ready", EC_TEMPFAIL); } ready_for_connections = 1; pthread_cond_broadcast(&ready_for_connecti...
false
false
false
false
false
0
vfs_getattr (const gchar *path, struct stat *sbuf) { GFile *file; gint result = 0; debug_print ("vfs_getattr: %s\n", path); memset (sbuf, 0, sizeof (*sbuf)); sbuf->st_dev = 0; /* dev_t ID of device containing file */ sbuf->st_ino = 0; /* ino_t i...
false
false
false
false
false
0
gameport_destroy_port(struct gameport *gameport) { struct gameport *child; child = gameport_get_pending_child(gameport); if (child) { gameport_remove_pending_events(child); put_device(&child->dev); } if (gameport->parent) { gameport->parent->child = NULL; gameport->parent = NULL; } if (device_is_regis...
false
false
false
false
false
0
tcp_socket_state(int fd, thread_t * thread, char *ipaddress, uint16_t addr_port, int (*func) (thread_t *)) { int status; socklen_t slen; int ret = 0; timeval_t timer_min; /* Handle connection timeout */ if (thread->type == THREAD_WRITE_TIMEOUT) { DBG("TCP connection timeout to [%s]:%d.\n", ipaddress, ...
false
false
false
false
false
0
ajStrAssignS(AjPStr* Pstr, const AjPStr str) { AjBool ret = ajFalse; AjPStr thys; size_t size; size_t roundsize = STRSIZE; if(!*Pstr) { if(str) { size = str->Len + 1; if(size >= LONGSTR) roundsize = ajRound(size, LONGSTR); els...
false
false
false
false
false
0
kvm_pv_enable_async_pf(struct kvm_vcpu *vcpu, u64 data) { gpa_t gpa = data & ~0x3f; /* Bits 2:5 are reserved, Should be zero */ if (data & 0x3c) return 1; vcpu->arch.apf.msr_val = data; if (!(data & KVM_ASYNC_PF_ENABLED)) { kvm_clear_async_pf_completion_queue(vcpu); kvm_async_pf_hash_reset(vcpu); return...
false
false
false
false
false
0
find_bind(int fd, const struct sockaddr *addr, socklen_t addrlen) { anyfn_type *anyfn; anyfn= find_any("bind"); if (!anyfn) return -1; old_bind= (bindfn_type*)anyfn; return old_bind(fd,addr,addrlen); }
false
false
false
false
false
0
is_null_interval() { return maybe_null && max_value[0] == 1; }
false
false
false
false
false
0
Initialize(Handle<Object> target) { HandleScope scope; length_symbol = Persistent<String>::New(String::NewSymbol("length")); chars_written_sym = Persistent<String>::New(String::NewSymbol("_charsWritten")); Local<FunctionTemplate> t = FunctionTemplate::New(Buffer::New); constructor_template = Persistent<Func...
false
false
false
false
false
0
FindDir(const NameT &name) { DirMap::iterator di = g_dirmap.find(name); return di == g_dirmap.end() ? 0 : di->second; }
false
false
false
false
false
0
warn_broken_mlsx(void) { static int flag; if (flag++) return; warning(0,"working around malformed MLSx listing. For more information",0,0,0); warning(0,"see http://www.ohse.de/uwe/ftpcopy/faq.html#brokenmlsx.",0,0,0); }
false
false
false
false
false
0
parseLodDistances(String& params, MaterialScriptContext& context) { // Set to distance strategy context.material->setLodStrategy(DistanceLodSphereStrategy::getSingletonPtr()); StringVector vecparams = StringUtil::split(params, " \t"); // iterate over the parameters and parse values...
false
false
false
false
false
0
PropertyOfSameObject(Expression* e1, Expression* e2) { Property* p1 = e1->AsProperty(); Property* p2 = e2->AsProperty(); if ((p1 == NULL) || (p2 == NULL)) return false; return SameObject(p1->obj(), p2->obj()); }
false
false
false
false
false
0
init_vlc(VLC *vlc, int nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, int flags) { vlc->bits = nb_bits; vlc->table_size = 0; #ifdef DEBUG_VLC printf("build table nb_codes=%d\n", nb_codes); #end...
false
false
false
false
false
0
StrStrip(string in_str) { string temp; unsigned int start, end; start = 0; end = in_str.length(); if (in_str[0] == '\n') return ""; for (unsigned int x = 0; x < in_str.length(); x++) { if (in_str[x] != ' ' && in_str[x] != '\t') { start = x; break; ...
false
false
false
false
false
0
readAndParse(){ gMutex->lock(); clearParsingFinished(); makeParser(); bool lSuccess=false; char lBuffer[20]; string lLogString; cerr << __FILE__ << ":" << __LINE__ << ":readAndParse before parse" << endl; do { cout //<< "-" << flush; #ifdef _DEBUG #endif //was ...
false
false
false
false
false
0
wm5100_runtime_resume(struct device *dev) { struct wm5100_priv *wm5100 = dev_get_drvdata(dev); int ret; ret = regulator_bulk_enable(ARRAY_SIZE(wm5100->core_supplies), wm5100->core_supplies); if (ret != 0) { dev_err(dev, "Failed to enable supplies: %d\n", ret); return ret; } if (wm5100->pdata.ldo_...
false
false
false
false
false
0
KeccakF200OnWords(tKeccakLane *state) { unsigned int i; displayStateAsLanes(3, "Same, with lanes as 8-bit words", state); for(i=0; i<nrRounds; i++) KeccakF200Round(state, i); }
false
false
false
false
false
0
get_do_element_name(xmlNodePtr node) { Octstr *name = NULL; xmlAttrPtr attr; if ((attr = node->properties) != NULL) { while (attr != NULL) { if (attr->name && strcmp((char *)attr->name, "name") == 0) { name = create_octstr_from_node((char *)attr->children); ...
false
false
false
false
false
0
CreateRhombicosidodecahedron(double radius) { return CreateIcosahedron(radius*sqrt(10.0/(35.0+9.0*sqrt(5.0))))->cantellate(1.5*(sqrt(5.0)-1)); }
false
false
false
false
false
0
PyFF_Font_set_guide(PyFF_Font *self,PyObject *value,void *closure) { SplineSet *ss = NULL, *newss; int isquad = false; SplineFont *sf; Layer *guide; if ( value==NULL ) { PyErr_Format(PyExc_TypeError, "Cannot delete guide field" ); return( -1 ); } if ( PyType_IsSubtype(&PyFF_LayerType,((PyO...
false
false
false
false
false
0
unpack_search_buttons() { if( ! m_searchbar ) return; std::list< Gtk::Widget* > lists = m_searchbar->get_children(); std::list< Gtk::Widget* >::iterator it = lists.begin(); for( ; it != lists.end(); ++it ){ m_searchbar->remove( *(*it) ); if( dynamic_cast< Gtk::SeparatorToolItem* >( *it ...
false
false
false
false
false
0
gw_menu_file_close_save_file_ok ( GtkWidget *bt, GtkWindow *dg) { GWCatalogPlugin *plugin = NULL; GWDBContext *context = gw_am_get_current_catalog_context ( ); GWDBCatalog *catalog = NULL; gboolean result = FALSE; #ifdef GW_DEBUG_GUI_CALLBACK_COMPONENT g_print ( "*** GW - %s (%d) :: %s()\n", __FILE__, __LINE__, ...
false
false
false
false
false
0
cb_chime_entry(GtkWidget *widget, gpointer data) { gint which = (GPOINTER_TO_INT(data)) & 0x1; gint activate = (GPOINTER_TO_INT(data)) & 0x10; /* If editing the chime commands, block them until config is destroyed | or we get a "activate". */ chime_block = activate ? FALSE : TRUE; if (which) gkrellm_d...
false
false
false
false
false
0
put(PopplerCacheKey *key, PopplerCacheItem *item) { int movingStartIndex = lastValidCacheIndex + 1; if (lastValidCacheIndex == cacheSize - 1) { delete keys[lastValidCacheIndex]; delete items[lastValidCacheIndex]; movingStartIndex = cacheSize - 1; } else { lastValidCacheIndex++; } for (int i = ...
false
false
false
false
false
0
check_for_override (tree decl, tree ctype) { if (TREE_CODE (decl) == TEMPLATE_DECL) /* In [temp.mem] we have: A specialization of a member function template does not override a virtual function from a base class. */ return; if ((DECL_DESTRUCTOR_P (decl) || IDENTIFIER_VIRTUAL_P (DE...
false
false
false
false
false
0
RenameRelation(Oid myrelid, const char *newrelname, ObjectType reltype) { Relation targetrelation; Oid namespaceId; char relkind; /* * Grab an exclusive lock on the target table, index, sequence or view, * which we will NOT release until end of transaction. */ targetrelation = relation_open(myrel...
false
false
false
false
false
0
collectLeaves(QDomElement & element, QList<QDomElement> & leaves) { if (element.hasChildNodes()) { QDomElement c = element.firstChildElement(); while (!c.isNull()) { collectLeaves(c, leaves); c = c.nextSiblingElement(); } } else { leaves.append(element); } }
false
false
false
false
false
0
st_clear(st_table *table) { register st_table_entry *ptr, *next; st_index_t i; if (table->entries_packed) { table->num_entries = 0; return; } for(i = 0; i < table->num_bins; i++) { ptr = table->bins[i]; table->bins[i] = 0; while (ptr != 0) { next = ptr->next; free(ptr)...
false
false
false
false
false
0
cvar_cbase() { NODE *cref = ruby_cref; while (cref && cref->nd_next && (NIL_P(cref->nd_clss) || FL_TEST(cref->nd_clss, FL_SINGLETON))) { cref = cref->nd_next; if (!cref->nd_next) { rb_warn("class variable access from toplevel singleton method"); } } if (NIL_P(cref->nd_clss)) { rb_raise(rb_eTyp...
false
false
false
false
false
0
uri_worker_map_dump(jk_uri_worker_map_t *uw_map, const char *reason, jk_logger_t *l) { JK_TRACE_ENTER(l); if (uw_map) { int i, off; if (JK_IS_DEBUG_LEVEL(l)) { jk_log(l, JK_LOG_DEBUG, "uri map dump %s: id=%d, index=%d file='%s' reject_unsafe=%d " ...
false
false
false
false
false
0
axi_spdif_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct axi_spdif *spdif = snd_soc_dai_get_drvdata(dai); int ret; ret = snd_pcm_hw_constraint_ratnums(substream->runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &spdif->rate_constraints); if (ret) return ret; ret = clk_prepare_e...
false
false
false
false
false
0
dvb_id_bus_satellite_scanner_proxy_AddScanningData (DVBIDBusSatelliteScanner* self, guint frequency, const gchar* polarization, guint symbol_rate, GError** error) { GDBusMessage *_message; GVariant *_arguments; GVariantBuilder _arguments_builder; GDBusMessage *_reply_message; G_DBUS_ERROR; _message = g_dbus_messa...
false
false
false
false
false
0
parser_scan_multipart_subparts (GMimeParser *parser, GMimeMultipart *multipart) { struct _GMimeParserPrivate *priv = parser->priv; ContentType *content_type; GMimeObject *subpart; int found; do { /* skip over the boundary marker */ if (parser_skip_line (parser) == -1) { found = FOUND_EOS; break; } ...
false
false
false
false
false
0
ParseListOrder(char *s, int multiple_orders ) { char *q; uint32_t order_bits; order_bits = 0; while ( s ) { int i; q = strchr(s, '/'); if ( q && !multiple_orders ) { return -1; } if ( q ) *q = 0; i = 0; while ( order_mode[i].string ) { if ( strcasecmp(order_mode[i].string, s ) == 0 ) bre...
false
false
false
false
false
0
get_random_bytes(void *buf, int nbytes) { int i, n = nbytes, fd = get_random_fd(); int lose_counter = 0; unsigned char *cp = (unsigned char *) buf; if (fd >= 0) { while (n > 0) { i = read(fd, cp, n); if (i <= 0) { if (lose_counter++ > 16) break; continue; } n -= i; cp += i; lose_co...
false
false
false
false
false
0
BTDM_IsWifiBusy(struct rtw_adapter *padapter) { /*PMGNT_INFO pMgntInfo = &GetDefaultAdapter(padapter)->MgntInfo; */ struct mlme_priv *pmlmepriv = &GetDefaultAdapter(padapter)->mlmepriv; struct bt_30info *pBTInfo = GET_BT_INFO(padapter); struct bt_traffic *pBtTraffic = &pBTInfo->BtTraffic; if (pmlmepriv->LinkDetec...
false
false
false
false
false
0
waypoint_add_list(const char *name, SCP_vector<vec3d> &vec_list) { Assert(name != NULL); if (find_matching_waypoint_list(name) != NULL) { Warning(LOCATION, "Waypoint list '%s' already exists in this mission! Not adding the new list..."); return; } waypoint_list new_list(name); Waypoint_lists.push_back(new_...
false
false
false
false
false
0
paramsMess (int argc, t_atom*argv) { // FUN int i = (argc<FOG_ARRAY_LENGTH)?argc:FOG_ARRAY_LENGTH; while(i--)params[i]=atom_getfloat(argv+i); setModified(); }
false
false
false
false
false
0
SelectLine(int line) { m_selectedLines.clear(); m_focusedLine = line; if (line != -1) m_selectedLines.insert(line); Refresh(); }
false
false
false
false
false
0
FCEU_DrawLagCounter(uint8 *XBuf) { if (lagCounterDisplay) { // If currently lagging - display red, else display green uint8 color = (lagFlag) ? (0x16+0x80) : (0x2A+0x80); sprintf(lagcounterbuf, "%d", lagCounter); if(lagcounterbuf[0]) DrawTextTrans(ClipSidesOffset + XBuf + FCEU_TextScanlineOffsetFro...
false
false
false
false
false
0
mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags) { struct intel_engine_cs *engine = req->engine; u32 flags = hw_flags | MI_MM_SPACE_GTT; const int num_rings = /* Use an extended w/a on ivb+ if signalling from other rings */ i915_semaphore_is_enabled(engine->dev) ? hweight32(INTEL_INFO(engine->dev...
false
false
false
false
false
0
DSO_free(DSO *dso) { int i; if(dso == NULL) { DSOerr(DSO_F_DSO_FREE,ERR_R_PASSED_NULL_PARAMETER); return(0); } i=CRYPTO_add(&dso->references,-1,CRYPTO_LOCK_DSO); #ifdef REF_PRINT REF_PRINT("DSO",dso); #endif if(i > 0) return(1); #ifdef REF_CHECK if(i < 0) { fprintf(stderr,"DSO_free, bad re...
false
false
false
false
false
0
read_binary_matrix(Matrix& mres, ifstream& fs) { bool swapbytes = false; unsigned int testval; // test for byte swapping fs.read((char*)&testval,sizeof(testval)); if (testval!=BINFLAG) { swapbytes = true; Swap_Nbytes(1,sizeof(testval),&testval); if (testval!=BINFLAG) { cerr << ...
false
false
false
false
false
0
gw_db_file_set_rights_from_gchar ( GWDBFile *file, gchar *rights) { mode_t mode = 000000; //TODO replace by hexa code if ( (file != NULL) && (rights != NULL) && strlen ( rights)==10 ) { switch (rights[0]) { case 'b': mode|=S_IFBLK; break; case 'l': mode|=S_IFLNK; break; case 'd': mode|=S_IF...
false
false
false
false
false
0
Strsafe(y) char *y; { char *z; z = Strsafe_find(y); if( z==0 && (z=malloc( strlen(y)+1 ))!=0 ){ strcpy(z,y); Strsafe_insert(z); } MemoryCheck(z); return z; }
false
false
false
false
false
0
file_get_contents(const char* fn, size_t* len, anbool addzero) { struct stat st; char* buf; FILE* fid; off_t size; if (stat(fn, &st)) { fprintf(stderr, "file_get_contents: failed to stat file \"%s\"", fn); return NULL; } size = st.st_size; fid = fopen(fn, "rb"); if (!...
false
false
false
false
true
1
calcBorderThickness(void) { calcLeftBorderThick(); calcRightBorderThick(); calcTopBorderThick(); calcBotBorderThick(); // set the boolean flags m_bIsAlongTopBorder and m_bIsAlongBotBorder if (canDrawTopBorder()) { if (isFirstLineInBlock()) { m_bIsAlongTopBorder = true; } if (isSameYAsP...
false
false
false
false
false
0
m_next(GtkWidget *, cchar *menu) { int err, Nth; int nfiles = image_navi::nfiles; if (menu) zfuncs::F1_help_topic = "open_image_file"; if (Fmenulock) return; if (mod_keep()) return; if (! curr_file) return; for (Nth = curr_file_posn+1; Nth < nfiles; Nth++) // v.1...
false
false
false
false
false
0