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
nt_create_all_awars(AW_root *awr, AW_default def) { // creates awars for all modules reachable from ARB_NT main window awr->awar_string( AWAR_FOOTER, "", def); if (GB_read_clients(GLOBAL_gb_main)>=0){ awr->awar_string( AWAR_TREE, "tree_main", GLOBAL_gb_main); }else{ awr->awar_string( AW...
false
false
false
false
false
0
isns_attr_type_opaque_print(const isns_value_t *value, char *buf, size_t size) { unsigned char *data = value->iv_opaque.ptr; unsigned int i, len; /* There must be room for "<...>\0" */ if (size < 6) return; size -= 6; if ((len = value->iv_opaque.len) > 20) len = 20; if (size < 3 * len) len = size / 3; ...
false
true
false
false
false
1
lg216x_get_property(struct dvb_frontend *fe, struct dtv_property *tvp) { return (DTV_ATSCMH_FIC_VER == tvp->cmd) ? lg216x_get_frontend(fe) : 0; }
false
false
false
false
false
0
find_subloop_latch_edge_by_profile (vec<edge> latches) { unsigned i; edge e, me = NULL; gcov_type mcount = 0, tcount = 0; FOR_EACH_VEC_ELT (latches, i, e) { if (e->count > mcount) { me = e; mcount = e->count; } tcount += e->count; } if (tcount < HEAVY_EDGE_MIN_SAMPLES || (t...
false
false
false
true
false
1
kbdlight_is_supported(void) { int status = 0; if (!hkey_handle) return false; if (!acpi_has_method(hkey_handle, "MLCG")) { vdbg_printk(TPACPI_DBG_INIT, "kbdlight MLCG is unavailable\n"); return false; } if (!acpi_evalf(hkey_handle, &status, "MLCG", "qdd", 0)) { vdbg_printk(TPACPI_DBG_INIT, "kbdlight MLC...
false
false
false
false
false
0
gst_matroska_parse_handle_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) { gboolean res = TRUE; GstMatroskaParse *parse = GST_MATROSKA_PARSE (GST_PAD_PARENT (pad)); GST_DEBUG_OBJECT (parse, "have event type %s: %p on sink pad", GST_EVENT_TYPE_NAME (event), event); switch (GST_EVENT_...
false
false
false
false
false
0
nm_connection_lookup_setting_type_by_quark (GQuark error_quark) { SettingInfo *info; GHashTableIter iter; _ensure_registered (); g_hash_table_iter_init (&iter, registered_settings); while (g_hash_table_iter_next (&iter, NULL, (gpointer) &info)) { if (info->error_quark == error_quark) return info->type; } ...
false
false
false
false
false
0
VerifyRequestedRegion() { bool frameFlag = m_RequestedTemporalRegion.GetFrameStart() >= m_LargestPossibleTemporalRegion.GetFrameStart(); frameFlag &= m_RequestedTemporalRegion.GetFrameDuration() <= m_LargestPossibleTemporalRegion.GetFrameDuration(); bool realTimeFlag = m_RequestedTemporalRegion.GetRealSta...
false
false
false
false
false
0
target_find_by_name(const char *name) { struct iscsi_target *target; list_for_each_entry(target, &iscsi_targets_list, tlist) { if (!strcmp(tgt_targetname(target->tid), name)) return target; } return NULL; }
false
false
false
false
false
0
last_uniq_key(TABLE *table, uint keyno) { while (++keyno < table->s->keys) if (table->key_info[keyno].flags & HA_NOSAME) return 0; return 1; }
false
false
false
false
false
0
pixSetAllArbitrary(PIX *pix, l_uint32 val) { l_int32 i, j, w, h, d, wpl, npix; l_uint32 maxval, wordval; l_uint32 *data, *line; PROCNAME("pixSetAllArbitrary"); if (!pix) return ERROR_INT("pix not defined", procName, 1); pixGetDimensions(pix, &w, &h, &d); if (d =...
false
false
false
false
false
0
iodecl_prop_vpiget(struct h_t *hp, int32 prop) { int32 pval; struct net_t *np; struct hrec_t *hrp; hrp = hp->hrec; if (hrp->htyp2 == vpiUdpDefn) return(udpiodecl_get(hp, prop)); pval = vpiUndefined; np = hrp->hu.hnp; switch (prop) { case vpiDirection: if (np->ntyp == IO_IN) pval = vpiInput; else if (np...
false
false
false
false
false
0
auth_finished (TN_Authenticator * ap, int result) { if (ap && ap->cleanup) (*ap->cleanup) (ap); authenticated = ap; if (!authenticated) authenticated = &NoAuth; validuser = result; }
false
false
false
false
false
0
list_md_fn(const EVP_MD *m, const char *from, const char *to, void *arg) { const char *mname; /* Skip aliases */ if (!m) return; mname = OBJ_nid2ln(EVP_MD_type(m)); /* Skip shortnames */ if (strcmp(from, mname)) return; /* Skip clones */ if (EVP_MD_flags(m) & EVP_MD_FLAG_PKEY_DIGEST) return; if (strc...
false
false
false
false
false
0
est_utime(const char *path, time_t mtime){ struct utimbuf buf; assert(path); if(mtime < 0) return utime(path, NULL) == 0; buf.actime = mtime; buf.modtime = mtime; return utime(path, &buf) == 0; }
false
false
false
false
false
0
gdm_qos_init(void *nic_ptr) { struct nic *nic = nic_ptr; struct qos_cb_s *qcb = &nic->qos; int i; for (i = 0; i < QOS_MAX; i++) { INIT_LIST_HEAD(&qcb->qos_list[i]); qcb->csr[i].qos_buf_count = 0; qcb->csr[i].enabled = false; } qcb->qos_list_cnt = 0; qcb->qos_null_idx = QOS_MAX-1; qcb->qos_limit_size = 2...
false
false
false
false
false
0
copy_callback (GtkWidget *menu_item, gpointer data) { int page = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)); if (page < 0) return; if (page == 0) { vte_terminal_copy_clipboard (VTE_TERMINAL (term)); } else { GtkWidget *w = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), page); Program *p...
false
false
false
false
false
0
is_redundant_typedef (decl) tree decl; { if (TYPE_DECL_IS_STUB (decl)) return 1; if (DECL_ARTIFICIAL (decl) && DECL_CONTEXT (decl) && is_tagged_type (DECL_CONTEXT (decl)) && TREE_CODE (TYPE_NAME (DECL_CONTEXT (decl))) == TYPE_DECL && DECL_NAME (decl) == DECL_NAME (TYPE_NAME (DECL_C...
false
false
false
false
false
0
ci_get_svi2_voltage_table(struct radeon_device *rdev, struct radeon_clock_voltage_dependency_table *voltage_dependency_table, struct atom_voltage_table *voltage_table) { u32 i; if (voltage_dependency_table == NULL) return -EINVAL; voltage_table->mask_low = 0; voltage_table->phase_delay = 0; ...
false
false
false
false
false
0
GC_alloc_large(lw, k, flags) word lw; int k; unsigned flags; { struct hblk * h; word n_blocks = OBJ_SZ_TO_BLOCKS(lw); ptr_t result; if (!GC_is_initialized) GC_init_inner(); /* Do our share of marking work */ if(GC_incremental && !GC_dont_gc) GC_collect_a_little_inner((int)n_blocks); ...
false
false
false
false
false
0
dynamic_set_data_ctx(ENGINE *e, dynamic_data_ctx **ctx) { dynamic_data_ctx *c; c = OPENSSL_malloc(sizeof(dynamic_data_ctx)); if(!c) { ENGINEerr(ENGINE_F_DYNAMIC_SET_DATA_CTX,ERR_R_MALLOC_FAILURE); return 0; } memset(c, 0, sizeof(dynamic_data_ctx)); c->dynamic_dso = NULL; c->v_check = NULL; c->bind_engin...
false
false
false
false
false
0
return_one_attr( LDAP *ld, LDAPMessage *entry, char *attrtype, char *mimetype, int valindex ) { char *val; struct berval **bvals; unsigned long vlen; if (( bvals = ldap_get_values_len( ld, entry, attrtype )) == NULL ) { dsgw_error( DSGW_ERR_NOATTRVALUE, attrtype, DSGW_ERROPT_EXIT, 0, NULL ); } ...
false
false
false
true
false
1
ipv6_icmp_process_prefix(struct ipv6_context *context, struct icmpv6_opt_prefix *icmp_prefix) { struct ipv6_addr addr; char addr_str[INET6_ADDRSTRLEN]; /* we only process on-link address info */ if (!(icmp_prefix->flags & ICMPV6_OPT_PREFIX_FLAG_ON_LINK)) return; /* * We only process prefix length of...
false
false
false
false
false
0
initialize(const QStringList &arguments, QString *errorString) { if (Utils::Log::warnPluginsCreation()) qWarning() << "FREEMEDFORMS::MainWinPlugin::initialize"; Q_UNUSED(arguments); Q_UNUSED(errorString); messageSplash(tr("Initializing main window plugin...")); m_MainWindow->initialize(ar...
false
false
false
false
false
0
hwloc_look_xml(struct hwloc_backend *backend) { struct hwloc_topology *topology = backend->topology; struct hwloc_xml_backend_data_s *data = backend->private_data; struct hwloc__xml_import_state_s state, childstate; char *tag; hwloc_localeswitch_declare; int ret; assert(!topology->levels[0][0]->cpuset); ...
false
false
false
false
false
0
wizard_page_show(E_Wizard_Page *pg) { Evas_Object *o, *of, *ob, *ic; Eina_List *l; int i, sel = -1; char buf[PATH_MAX]; o = e_widget_list_add(pg->evas, 1, 0); e_wizard_title_set(_("Language")); of = e_widget_framelist_add(pg->evas, _("Select one"), 0); ob = e_widget_ilist_add(pg->evas, 32 * e_s...
true
true
false
false
false
1
emit_single_in_line (int indent, declaration *decl, int flag, relation rel) { char *upp_case; int freed = 0; tabify (fout, indent); if (flag == PUT) f_print (fout, "IXDR_PUT_"); else { if (rel == REL_ALIAS) f_print (fout, "objp->%s = IXDR_GET_", decl->name); else f_print (fout, "*genp++...
false
false
false
false
false
0
gegl_buffer_unlock (GeglBuffer *buffer) { gboolean ret = TRUE; GeglTileBackend *backend = gegl_buffer_backend (buffer); g_mutex_lock (buffer->tile_storage->mutex); g_assert (buffer->lock_count >=0); buffer->lock_count--; g_assert (buffer->lock_count >=0); if (buffer->lock_count == 0 && gegl_buffer_is_shar...
false
false
false
false
false
0
isRootInst(Instruction *I) { for (auto &DRS : RootSets) { if (std::find(DRS.Roots.begin(), DRS.Roots.end(), I) != DRS.Roots.end()) return true; } return false; }
false
false
false
false
false
0
spif_array_prepend(spif_array_t self, spif_obj_t obj) { ASSERT_RVAL(!SPIF_ARRAY_ISNULL(self), FALSE); REQUIRE_RVAL(!SPIF_OBJ_ISNULL(obj), FALSE); if (self->items) { self->items = SPIF_CAST_C(spif_obj_t *) REALLOC(self->items, SPIF_SIZEOF_TYPE(obj) * (self->len + 1)); } else { self->items...
false
true
false
false
true
1
show_stack_frame (FILE_T f, NODE_T * p, ADDR_T a68g_link, int *printed) { /* show the frame starting at frame pointer 'a68g_link', using symbol table from p as a map */ if (p != NO_NODE) { TABLE_T *q = TABLE (p); intro_frame (f, p, a68g_link, printed); ASSERT (snprintf (output_line, SNPRINTF_SIZE, "Dynami...
false
false
false
false
false
0
static_origin (gamgi_object *child, gamgi_object *parent) { gamgi_text *text; gamgi_orbital *orbital; gamgi_atom *atom; gamgi_direction *direction; gamgi_plane *plane; gamgi_group *group; gamgi_molecule *molecule; gamgi_cluster *cluster; gamgi_cell *cell; gamgi_assembly *assembly; gamgi_layer *layer; double origin[3]; ...
false
false
false
false
false
0
check_string(char *s) { char *str = s; if (BadPtr(s)) return asterix; for ( ;*s; s++) if (isspace(*s)) { *s = '\0'; break; } return (BadPtr(str)) ? asterix : str; }
false
false
false
false
false
0
iscsit_free_cmd(struct iscsi_cmd *cmd, bool shutdown) { struct se_cmd *se_cmd = NULL; int rc; bool op_scsi = false; /* * Determine if a struct se_cmd is associated with * this struct iscsi_cmd. */ switch (cmd->iscsi_opcode) { case ISCSI_OP_SCSI_CMD: op_scsi = true; /* * Fallthrough */ case ISCSI_...
false
false
false
false
false
0
printCsLensType(std::ostream& os, const Value& value, const ExifData* metadata) { if ( value.typeId() != unsignedShort || value.count() == 0) return os << "(" << value << ")"; const Len...
false
false
false
false
false
0
cb_config_modify_check_callback(Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry* e, int *returncode, char *returntext, void *arg) { LDAPMod **mods; char *attr_name; int i,j; cb_backend *cb = (cb_backend *) arg; CB_ASSERT (cb!=...
false
false
false
false
false
0
Emit_start_blocking(int IOType, int SeqNum, int *IOTypeIndex, float TimeOut) { unsigned long time_out_uS; /* microseconds */ unsigned long blocked_poll_interval = 10000; /* microseconds */ unsigned long wait_time; int status; /* Check that steering is enabled */ if(!ReG_Steering...
false
false
false
false
false
0
renderImplodeChildren(render_guts_t* guts, int indentation, const char* glue) const { rope_t ret; node_list_t::const_iterator i = this->_childNodes.begin(); while (i != this->_childNodes.end()) { if (*i != NULL) { ret += (*i)->render(guts, indentation); } i++; if (i != this->_childNodes.end(...
false
false
false
false
false
0
efx_siena_sriov_vfdi(struct work_struct *work) { struct siena_vf *vf = container_of(work, struct siena_vf, req); struct efx_nic *efx = vf->efx; struct vfdi_req *req = vf->buf.addr; struct efx_memcpy_req copy[2]; int rc; /* Copy this page into the local address space */ memset(copy, '\0', sizeof(copy)); copy[0]...
false
false
false
false
false
0
af_display_as_quad(const char *segname) { for(int i=0;quads[i];i++){ if(strcmp(segname,quads[i])==0) return true; } return false; }
false
false
false
false
false
0
lvs_rh_work(struct work_struct *work) { struct lvs_rh *lvs = container_of(work, struct lvs_rh, rh_work); struct usb_interface *intf = lvs->intf; struct usb_device *hdev = interface_to_usbdev(intf); struct usb_hcd *hcd = bus_to_hcd(hdev->bus); struct usb_hub_descriptor *descriptor = &lvs->descriptor; struct usb_po...
false
false
false
false
false
0
markVarForSelectPriv(ParseState *pstate, Var *var, RangeTblEntry *rte) { Index lv; Assert(IsA(var, Var)); /* Find the appropriate pstate if it's an uplevel Var */ for (lv = 0; lv < var->varlevelsup; lv++) pstate = pstate->parentParseState; markRTEForSelectPriv(pstate, rte, var->varno, var->varattno); }
false
false
false
false
false
0
flps_foldertab_box( int style, int x, int y, int w, int h, FL_COLOR col, int bw ) { float ctr, right, top; FL_POINT vert[ 10 ], *...
false
false
false
false
false
0
finishpcall (lua_State *L, int status) { if (!lua_checkstack(L, 1)) { /* no space for extra boolean? */ lua_settop(L, 0); /* create space for return values */ lua_pushboolean(L, 0); lua_pushstring(L, "stack overflow"); return 2; /* return false, msg */ } lua_pushboolean(L, status); /* first re...
false
false
false
false
false
0
run_run() { vvp_vector4_t tmp (1); tmp.set_bit(0, cur_out_); propagate_vec4(tmp); }
false
false
false
false
false
0
limit_string_to_x_lines (GString * string, gint x) { int i; int count = 0; for (i = 0; string->str[i] != '\0'; i++) { if (string->str[i] == '\n') { count++; if (count == x) { g_string_truncate (string, i); return TRUE; } } } return FALSE; }
false
false
false
false
false
0
aufs_update_time(struct inode *inode, struct timespec *ts, int flags) { int err; struct super_block *sb; struct inode *h_inode; sb = inode->i_sb; /* mmap_sem might be acquired already, cf. aufs_mmap() */ lockdep_off(); si_read_lock(sb, AuLock_FLUSH); ii_write_lock_child(inode); lockdep_on(); h_inode = au_h_i...
false
false
false
false
false
0
parse_bool(const char *value, bool *result) { size_t len = strlen(value); if (pg_strncasecmp(value, "true", len) == 0) { if (result) *result = true; } else if (pg_strncasecmp(value, "false", len) == 0) { if (result) *result = false; } else if (pg_strncasecmp(value, "yes", len) == 0) { if (result...
false
false
false
false
false
0
orinoco_ioctl_setrate(struct net_device *dev, struct iw_request_info *info, struct iw_param *rrq, char *extra) { struct orinoco_private *priv = ndev_priv(dev); int ratemode; int bitrate; /* 100s of kilobits */ unsigned long flags; /* As the user space doesn't know our highest rate, it uses -1 * t...
false
false
false
false
false
0
hash_table_remove(hash_table_t *h, key_t * key) { index_t chain; item_t *cur; assert(h && h->op && h->op->hash && h->op->compare && h->op->remove_callback); /* * hash_table_find() can be used to find the entry. */ chain = h->op->hash(h, key); cur = hash_table_find(h, key); if (cur) { list_remove(&h->en...
false
false
false
false
false
0
ConstructFilename(const char* spec, pid_t pid, char* buf, int buf_size) { CHECK_LT(snprintf(buf, buf_size, spec, static_cast<int>(pid ? pid : getpid())), buf_size); }
false
false
false
false
false
0
DebugNodeString(Prefilter* node) const { string node_string = ""; if (node->op() == Prefilter::ATOM) { DCHECK(!node->atom().empty()); node_string += node->atom(); } else { // Adding the operation disambiguates AND and OR nodes. node_string += node->op() == Prefilter::AND ? "AND" : "OR"; node...
false
false
false
false
false
0
k_pres_res_id_by_name (struct pres_file_t* pf, const char* name) { uint64_t i = 0, e = pf->cur_resentries; struct pres_resource_table_entry_t* table = pf->rtbl->table; for (i = 0; i < e; ++i) { /* entry was marked as deleted */ if (!table[i].id) continue; if (!strcmp((const char*)table[i].name, name)) r...
false
false
false
false
false
0
tp_connection_hold_handles (TpConnection *self, gint timeout_ms, TpHandleType handle_type, guint n_handles, const TpHandle *handles, TpConnectionHoldHandlesCb callback, ...
false
false
false
false
false
0
ShouldCollide(const b2Body* other) const { // At least one body should be dynamic. if (m_type != b2_dynamicBody && other->m_type != b2_dynamicBody) { return false; } // Does a joint prevent collision? for (b2JointEdge* jn = m_jointList; jn; jn = jn->next) { if (jn->other == other) { if (jn->joint->m_co...
false
false
false
false
false
0
caribou_display_adapter_get_default (void) { CaribouDisplayAdapter* result = NULL; CaribouDisplayAdapter* _tmp0_ = NULL; CaribouDisplayAdapter* _tmp19_ = NULL; CaribouDisplayAdapter* _tmp20_ = NULL; _tmp0_ = caribou_display_adapter_instance; if (_tmp0_ == NULL) { GdkDisplay* display = NULL; GdkDisplayManager*...
false
false
false
false
false
0
znatural(const string& s) { //Given a string, returns a natural from any digits that it STARTS with. bool isnumber = false; unsigned long long val = 0; if (!s.empty()) { if (s.size() > 2 && s[0]=='0' && ( s[1]=='x' || s[1]=='X' )) { pair<unsigned long long,bool> rsp = hex(s.substr(2)); if (rsp.second) ...
false
false
false
false
false
0
rcs_lockfilename (const char *rcsfile) { char *lockfile, *lockp; const char *rcsbase, *rcsp, *rcsend; int rcslen; /* Create the lockfile name. */ rcslen = strlen (rcsfile); lockfile = xmalloc (rcslen + 10); rcsbase = last_component (rcsfile); rcsend = rcsfile + rcslen - sizeof(RCSEXT); ...
false
false
false
false
false
0
get() const { QByteArray data; QDataStream stream(&data, QIODevice::WriteOnly); stream << m_commands; return data; }
false
false
false
false
false
0
parse_asx(bgav_redirector_context_t * r) { int result; bgav_yml_node_t * node; node = bgav_yml_parse(r->input); if(!node) { bgav_log(r->opt, BGAV_LOG_ERROR, LOG_DOMAIN, "Parse asx failed (yml error)"); return 0; } result = xml_2_asx(r, node); bgav_yml_free(node); if(!result...
false
false
false
false
false
0
c_hexgrep (state_t * s) { int i, seeklen, resnr, restype, resmax; unsigned char *seekstr = NULL; resource_t *script = NULL; char *dot = strchr (cmd_params[0].str, '.'); if (NULL == s) { fprintf(stderr, "console.c: c_hexgrep(): NULL passed for s\r\n"); return(-1); } seekstr = (unsigned char*)s...
false
false
false
false
true
1
anjuta_bookmarks_create_query (AnjutaBookmarks* bookmarks) { AnjutaBookmarksPrivate* priv = BOOKMARKS_GET_PRIVATE(bookmarks); IAnjutaSymbolManager* sym_manager; IAnjutaSymbolQuery * query_scope = NULL; sym_manager = anjuta_shell_get_interface (ANJUTA_PLUGIN(priv->docman)->shell, IAnjutaSymbolManager,...
false
false
false
false
false
0
add(const char* str) throw () { if (cur >= size) expand(); ptr[cur++] = strdup(str); }
false
false
false
false
false
0
orphand_io_init(orphand_server *srv, const char *path) { int status, sock = socket(AF_UNIX, SOCK_STREAM, 0); struct sockaddr_un uaddr; if (sock == -1) { perror("socket"); return -1; } memset(&uaddr, 0, sizeof(uaddr)); uaddr.sun_family = AF_UNIX; str...
false
false
false
false
true
1
mono_profiler_code_buffer_new (gpointer buffer, int size, MonoProfilerCodeBufferType type, gconstpointer data) { ProfilerDesc *prof; for (prof = prof_list; prof; prof = prof->next) { if (prof->code_buffer_new) prof->code_buffer_new (prof->profiler, buffer, size, type, (void*)data); } }
false
false
false
false
false
0
advOpActivate() { tsh_put_it in ; tsh_put_ot out ; /* send tuple name, priority, length */ if (!readn(newsock, (char *)&in, sizeof(tsh_put_it))) { return ; } in.proc_id = ntohl(in.proc_id); if (guardf(in.host, in.proc_id)) { ...
false
false
false
false
false
0
key_schedule_gc(time_t gc_at) { unsigned long expires; time_t now = current_kernel_time().tv_sec; kenter("%ld", gc_at - now); if (gc_at <= now || test_bit(KEY_GC_REAP_KEYTYPE, &key_gc_flags)) { kdebug("IMMEDIATE"); schedule_work(&key_gc_work); } else if (gc_at < key_gc_next_run) { kdebug("DEFERRED"); key...
false
false
false
false
false
0
jbig2_png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) { png_size_t check; check = fwrite(data, 1, length, (png_FILE_p)png_ptr->io_ptr); if (check != length) { png_error(png_ptr, "Write Error"); } }
false
false
false
false
false
0
settings_exit(void) { START_FUNC GError *err=NULL; gsize len; gchar *data=NULL; enum settings_cat cat; if (settings_infos) { for (cat=0; cat<SETTINGS_NUM_CATS; cat++) if (settings_infos->settings[cat]) g_object_unref(G_OBJECT(settings_infos->settings[cat])); if (settings_infos->config) { data=g_key_...
false
false
false
false
false
0
nested_svm_map(struct vcpu_svm *svm, u64 gpa, struct page **_page) { struct page *page; might_sleep(); page = kvm_vcpu_gfn_to_page(&svm->vcpu, gpa >> PAGE_SHIFT); if (is_error_page(page)) goto error; *_page = page; return kmap(page); error: kvm_inject_gp(&svm->vcpu, 0); return NULL; }
false
false
false
false
false
0
afterManage() { if (affectsWorkArea()) manager->updateWorkArea(); manager->updateClientList(); #ifdef CONFIG_SHAPE setShape(); #endif #ifndef NO_WINDOW_OPTIONS if (!(frameOptions() & foFullKeys)) grabKeys(); #endif fClientContainer->grabButtons(); #ifdef CONFIG_WINLIST #ifndef NO_WIN...
false
false
false
false
false
0
get_new_credentials_cache (GoaKerberosIdentityManager *self, krb5_ccache *credentials_cache) { krb5_error_code error_code; gboolean supports_multiple_identities; if (g_strcmp0 (self->priv->credentials_cache_type, "FILE") == 0) { goa_debug ("GoaKerberosIdentityM...
false
false
false
false
false
0
fPowInt( FIXP_DBL base_m, INT base_e, INT exp, INT *pResult_e ) { FIXP_DBL result; if (exp != 0) { INT result_e = 0; if (base_m != (FIXP_DBL)0) { { INT leadingBits; leadingBits = CountLeadingBits( base_m ); base_m <<= leadingBits; base_...
false
false
false
false
false
0
gst_jp2k_decimator_decimate_jpc (GstJP2kDecimator * self, GstBuffer * inbuf, GstBuffer ** outbuf_) { GstBuffer *outbuf = NULL; GstFlowReturn ret = GST_FLOW_OK; GstByteReader reader = GST_BYTE_READER_INIT_FROM_BUFFER (inbuf); GstByteWriter writer; MainHeader main_header; gst_byte_writer_init_with_size (...
false
false
false
false
false
0
ensure_texture_pixel_aspect_ratio (ClutterGstVideoSink *sink) { ClutterGstVideoSinkPrivate *priv = sink->priv; GParamSpec *pspec; GValue par = {0, }; if (priv->texture == NULL) return; pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (priv->texture), "pixe...
false
false
false
false
false
0
sql_finish_query(SQLSOCK * sqlsocket, UNUSED SQL_CONFIG *config) { #if (MYSQL_VERSION_ID >= 40100) rlm_sql_mysql_sock *mysql_sock = sqlsocket->conn; int status; skip_next_result: status = sql_store_result(sqlsocket, config); if (status != 0) { return status; } else if (mysql_sock->result != NULL) { radlog(L_D...
false
false
false
false
false
0
httpGetHostname(http_t *http, /* I - HTTP connection or NULL */ char *s, /* I - String buffer for name */ int slen) /* I - Size of buffer */ { if (!s || slen <= 1) return (NULL); if (http) { if (http->hostname[0] == '/') strlcpy(s, "localhost", slen); els...
false
false
false
false
false
0
construct_virtual_base (tree vbase, tree arguments) { tree inner_if_stmt; tree exp; tree flag; /* If there are virtual base classes with destructors, we need to emit cleanups to destroy them if an exception is thrown during the construction process. These exception regions (i.e., the period dur...
false
false
false
false
false
0
operator()(completion_entry_t *p1, completion_entry_t *p2) const { /* Paths always come last for no particular reason */ if (p1->cmd_is_path != p2->cmd_is_path) { return p1->cmd_is_path < p2->cmd_is_path; } else { return p1->cmd < p2->cmd; ...
false
false
false
false
false
0
LDLfactor(MAT *A) #endif { unsigned int i, k, n, p; Real **A_ent; Real d, sum; STATIC VEC *r = VNULL; if ( ! A ) error(E_NULL,"LDLfactor"); if ( A->m != A->n ) error(E_SQUARE,"LDLfactor"); n = A->n; A_ent = A->me; r = v_resize(r,n); MEM_STAT_REG(r,TYPE_VEC); for ( k = 0; k < n; k++ ) { sum = 0.0; f...
false
false
false
true
false
1
bgav_mpv_get_pixel_aspect(bgav_mpv_sequence_header_t * h, gavl_video_format_t * ret) { if(!h->mpeg2) /* MPEG-1 */ { ret->pixel_width = mpeg1_aspect[h->aspect_ratio].num; ret->pixel_height = mpeg1_aspect[h->aspect_ratio].den; } else /* MPEG-2 */ { if(h->aspect...
false
false
false
false
false
0
OpGetMap() { pmd_getmap_it in ; pmd_getmap_ot out ; int i ; if (!readn(newsock, (char *)&in, sizeof(in))) return ; /* read input for operation */ /* printf(" pmd: received (%s)\n", in.mapid); */ for (i = 0 ; i < TABLE_SIZE ; i++) { if ((table[i].used == USED) && (!strcmp(table[i].mapid, in.m...
false
false
false
false
false
0
l1sp_prints(g, p) l1sp_ctx *g; char *p; { size_t n; n=strlen(p); if(!ioallocp(g, n)) l1sp_flush(g); if(!ioallocp(g, n)) l1sp_dienomem(g, n); memcpy(g->l1_iobuffer+g->l1_iosize, p, n); g->l1_iosize+=n; }
false
false
false
false
false
0
release_pmc_hardware(void) { int i; for (i = 0; i < x86_pmu.num_counters; i++) { release_perfctr_nmi(x86_pmu_event_addr(i)); release_evntsel_nmi(x86_pmu_config_addr(i)); } }
false
false
false
false
false
0
push_front(int value) { Node* newbie = new Node(value); newbie->next = head; head = newbie; ++size; }
false
false
false
false
false
0
xmlSecOpenSSLKeyDataX509GetIdentifier(xmlSecKeyDataPtr data) { xmlSecAssert2(xmlSecKeyDataCheckId(data, xmlSecOpenSSLKeyDataX509Id), NULL); /* TODO */ return(NULL); }
false
false
false
false
false
0
brasero_task_ctx_get_written (BraseroTaskCtx *self, gint64 *written) { BraseroTaskCtxPrivate *priv; g_return_val_if_fail (BRASERO_IS_TASK_CTX (self), BRASERO_BURN_ERR); g_return_val_if_fail (written != NULL, BRASERO_BURN_ERR); priv = BRASERO_TASK_CTX_PRIVATE (self); if (priv->track_bytes + priv->sessio...
false
false
false
false
false
0
gc_db_check_boards() { SUPPORT_OR_RETURN(FALSE); #ifdef USE_SQLITE char *zErrMsg; char **result; int rc; int nrow; int ncolumn; gboolean ret_value; rc = sqlite3_get_table(gcompris_db, BOARDS_CHECK, &result, &nrow, &ncolumn, &zErrMsg ); if( rc!=SQLITE_OK ){ g_error("SQL er...
false
false
false
false
false
0
i40e_diag_eeprom_test(struct i40e_hw *hw) { i40e_status ret_code; u16 reg_val; /* read NVM control word and if NVM valid, validate EEPROM checksum*/ ret_code = i40e_read_nvm_word(hw, I40E_SR_NVM_CONTROL_WORD, &reg_val); if (!ret_code && ((reg_val & I40E_SR_CONTROL_WORD_1_MASK) == BIT(I40E_SR_CONTROL_WO...
false
false
false
false
false
0
credentials_received (TpStreamTubeChannel *self, GSocketConnection *conn, guchar byte) { SigWaitingConn *sig; ConnWaitingSig *c; c = conn_waiting_sig_new (conn, byte); sig = find_sig_for_conn (self, c); if (sig == NULL) { DEBUG ("Can't identify the connection, wait for NewRemoteConnection ...
false
false
false
false
false
0
do_part_del (const char *device, int partnum) { int r; CLEANUP_FREE char *err = NULL; if (partnum <= 0) { reply_with_error ("partition number must be >= 1"); return -1; } char partnum_str[16]; snprintf (partnum_str, sizeof partnum_str, "%d", partnum); udev_settle (); r = commandf (NULL, &err...
false
false
false
false
false
0
sbitmap_ones (bmap) sbitmap bmap; { unsigned int last_bit; memset ((PTR) bmap->elms, -1, bmap->bytes); last_bit = bmap->n_bits % SBITMAP_ELT_BITS; if (last_bit) bmap->elms[bmap->size - 1] = (SBITMAP_ELT_TYPE)-1 >> (SBITMAP_ELT_BITS - last_bit); }
false
false
false
false
false
0
UT_UTF8String_sprintf(const char * inFormat, ...) { UT_String str (""); va_list args; va_start (args, inFormat); UT_String_vprintf (str, inFormat, args); va_end (args); // create & return a validated UTF-8 string based on the input return UT_UTF8String(str.c_str()); }
false
false
false
false
false
0
traverse(struct Node *node, int first, int second) { if ((right == 1 && left == 1) || !node) return NULL; struct Node *l = node->left, *r = node->right; if (l) { if (l->value != first && l->value != second) l = traverse(l, first, second); else left++; ...
false
false
false
false
false
0
CheckConnection(void) { bool OK; OK = ConnectionUp(); if (!OK) { if (!pset.cur_cmd_interactive) { psql_error("connection to server was lost\n"); exit(EXIT_BADCONN); } fputs(_("The connection to the server was lost. Attempting reset: "), stderr); PQreset(pset.db); OK = ConnectionUp(); if (!OK)...
false
false
false
false
false
0
main(int argc, char *argv[]) { int failed = 0; int verbose = getenv("VERBOSE") != NULL; ergo_real machine_epsilon = std::numeric_limits<ergo_real>::epsilon(); printf("machine_epsilon = %g Run with env VERBOSE for more info.\n", (double)machine_epsilon); if(test_gesv(machine_epsilon*500, verbose...
false
false
false
false
false
0
xenbus_probe_device_type(struct xen_bus_type *bus, const char *type) { int err = 0; char **dir; unsigned int dir_n = 0; int i; dir = xenbus_directory(XBT_NIL, bus->root, type, &dir_n); if (IS_ERR(dir)) return PTR_ERR(dir); for (i = 0; i < dir_n; i++) { err = bus->probe(bus, type, dir[i]); if (err) bre...
false
false
false
false
false
0
main(int argc, char *argv[]) { char *prog_name = basename(argv[0]); int c, depth = INT_MAX; char *filename = NULL, *path = NULL, *expr = NULL, *delim = "\t"; struct gfs_xmlattr_ctx *ctxp = NULL; char *fpath, *attrname; gfarm_error_t e; int ret = 0; while ((c = getopt(argc, argv, "d:f:F:h?")) != -1) { switch ...
false
true
false
false
true
1
newIobject(PyObject *s) { Iobject *self; Py_buffer buf; PyObject *args; int result; args = Py_BuildValue("(O)", s); if (args == NULL) return NULL; result = PyArg_ParseTuple(args, "s*:StringIO", &buf); Py_DECREF(args); if (!result) return NULL; self = PyObject_New(Iobject, &Itype); if...
false
false
false
false
false
0
mcast_work_handler(struct work_struct *work) { struct mcast_group *group; struct mcast_member *member; struct ib_sa_multicast *multicast; int status, ret; u8 join_state; group = container_of(work, typeof(*group), work); retest: spin_lock_irq(&group->lock); while (!list_empty(&group->pending_list) || (g...
false
false
false
false
false
0