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
getTrackFilenames(const FXIntList & tracks,FXStringList & files){ files.no(tracks.no()); for (int i=0;i<tracks.no();i++){ files[i]=db->getTrackFilename(tracks[i]); } }
false
false
false
false
false
0
btd_event_request_pin(bdaddr_t *sba, bdaddr_t *dba, gboolean secure) { struct btd_adapter *adapter; struct btd_device *device; char pin[17]; ssize_t pinlen; gboolean display = FALSE; if (!get_adapter_and_device(sba, dba, &adapter, &device, TRUE)) return -ENODEV; memset(pin, 0, sizeof(pin)); pinlen = btd_ada...
true
true
false
false
false
1
gnome_keyring_store_password_sync (const GnomeKeyringPasswordSchema* schema, const gchar *keyring, const gchar *display_name, const gchar *password, ...) { GnomeKeyringAttributeList *attributes; GnomeKeyringResult res; guint32 item_id; va_list args; g_return_val_if_fail (schema,...
false
false
false
false
false
0
symlink_ancestry (struct file_link *flink) { int ancestry = 0; while (!IS_ROOT_FILE_LINK (flink)) { if (flink->fl_flags & FL_SYM_LINK) return ancestry; ancestry++; flink = flink->fl_parent; } return PATH_MAX; }
false
false
false
false
false
0
AO_free_large(char * p) { AO_t sz = ((AO_t *)p)[-1]; if (munmap(p - ALIGNMENT, (size_t)sz) != 0) abort(); /* Programmer error. Not really async-signal-safe, but ... */ }
false
false
false
false
false
0
_destroy_next_stream_data (RBPlayerGst *player) { if (player->priv->next_stream_data && player->priv->next_stream_data_destroy) { player->priv->next_stream_data_destroy (player->priv->next_stream_data); } player->priv->next_stream_data = NULL; player->priv->next_stream_data_destroy = NULL; }
false
false
false
false
false
0
pform_set_port_type(const struct vlltype&li, list<perm_string>*names, svector<PExpr*>*range, bool signed_flag, NetNet::PortType pt, svector<named_pexpr_t*>*attr) { for (list<perm_string>::iterator cur = names->begin() ; cur != names->end() ; cur ++ ) { perm_string txt = *cur; p...
false
false
false
false
false
0
dev_show_unique_id(struct device *dev, struct device_attribute *attr, char *buf) { drive_info_struct *drv = to_drv(dev); struct ctlr_info *h = to_hba(drv->dev.parent); __u8 sn[16]; unsigned long flags; int ret = 0; spin_lock_irqsave(&h->lock, flags); if (h->busy_configuring) ret = -EBUSY; else me...
false
true
false
false
false
1
glusterd3_1_brick_op_cbk (struct rpc_req *req, struct iovec *iov, int count, void *myframe) { gd1_mgmt_brick_op_rsp rsp = {0}; int ret = -1; int32_t op_ret = -1; glusterd_op_sm_event_type_t event_type...
false
false
true
true
false
1
ov6650_reset(struct i2c_client *client) { int ret; dev_dbg(&client->dev, "reset\n"); ret = ov6650_reg_rmw(client, REG_COMA, COMA_RESET, 0); if (ret) dev_err(&client->dev, "An error occurred while entering soft reset!\n"); return ret; }
false
false
false
false
false
0
SProcAuListBuckets(ClientPtr client) { char n; REQUEST(auReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(auReq); /* not EXACT */ SwapBucketAttributes(&stuff[1]); return (*AuProcVector[stuff->reqType]) (client); }
false
false
false
false
false
0
sgmlDecl(SgmlDeclEvent *event) { currentLocation_ = event->location(); sd_ = event->sdPointer(); syntax_ = event->instanceSyntaxPointer(); arcBase_ = sd_->execToInternal("ArcBase"); syntax_->generalSubstTable()->subst(arcBase_); is10744_ = sd_->execToInternal("IS10744"); Boolean atStart = 1; for (size_t...
false
false
false
false
false
0
__qla2x00_marker(struct scsi_qla_host *vha, struct req_que *req, struct rsp_que *rsp, uint16_t loop_id, uint64_t lun, uint8_t type) { mrk_entry_t *mrk; struct mrk_entry_24xx *mrk24 = NULL; struct qla_hw_data *ha = vha->hw; scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); req = ha->req_q_map[0]; mrk ...
false
false
false
false
false
0
finish_output () { if (paginate_flag && outfile != 0 && outfile != stdout) { #ifdef PR_PROGRAM int wstatus, w; if (ferror (outfile)) fatal ("write error"); # if ! HAVE_FORK wstatus = pclose (outfile); # else /* HAVE_FORK */ if (fclose (outfile) != 0) pfatal_with_name ("write error"); ...
true
true
false
false
true
1
g_mime_header_list_clear (GMimeHeaderList *headers) { GMimeHeader *header, *next; g_return_if_fail (headers != NULL); header = (GMimeHeader *) headers->list.head; while (header->next) { next = header->next; g_mime_header_free (header); header = next; } g_hash_table_remove_all (headers->hash); list_in...
false
false
false
false
false
0
xmlSecOpenSSLKeyDataX509DebugDump(xmlSecKeyDataPtr data, FILE* output) { X509* cert; xmlSecSize size, pos; xmlSecAssert(xmlSecKeyDataCheckId(data, xmlSecOpenSSLKeyDataX509Id)); xmlSecAssert(output != NULL); fprintf(output, "=== X509 Data:\n"); cert = xmlSecOpenSSLKeyDataX509GetKeyCert(data); ...
false
false
false
false
false
0
InsertPointer(G_Synset ss, Pointer p) { /* insert at beginning of list */ if (ss->ptrs) p->pnext = ss->ptrs; ss->ptrs = p; }
false
false
false
false
false
0
soap_out_wsa__EndpointReferenceType(struct soap *soap, const char *tag, int id, const struct wsa__EndpointReferenceType *a, const char *type) { const char *soap_tmp_PortType = a->PortType ? soap_QName2s(soap, *a->PortType) : NULL; if (a->__anyAttribute) soap_set_attr(soap, "-anyAttribute", a->__anyAttribute, 1); (...
false
false
false
false
false
0
export_really (GtkWidget *widget, export_format_t *xp) { gboolean rc; xp->uri = gtk_file_chooser_get_filename (xp->picker); GnomeVFSResult result; result = gnome_vfs_create (&xp->handle, xp->uri, GNOME_VFS_OPEN_WRITE, FALSE, 0644); if (GNOME_VFS_OK != result) { char *msg = g_strdup_printf (_("File ...
false
false
false
false
false
0
HDLC_irq(struct bchannel *bch, u32 stat) { struct fritzcard *fc = bch->hw; int len, fs; u32 rmlMask; struct hdlc_hw *hdlc; hdlc = &fc->hdlc[(bch->nr - 1) & 1]; pr_debug("%s: ch%d stat %#x\n", fc->name, bch->nr, stat); if (fc->type == AVM_FRITZ_PCIV2) { rmlMask = HDLC_STAT_RML_MASK_V2; fs = HDLC_FIFO_SIZE_...
false
false
false
false
false
0
CheckDirectives() { struct Directive *tmp; int ii, ret, good; ret = 1; for (tmp = directives; tmp->name; tmp++) { if ((tmp->flag == D_REQUIRED) || (tmp->flag == D_NORUNTIME)) { for (ii = 0; ii < PARAM_MAX; ii++) { if (!tmp->param[ii].type) break; good = 1; switch (tmp->param[ii].typ...
false
false
false
false
false
0
totem_fullscreen_motion_notify (GdFullscreenFilter *filter, TotemFullscreen *fs) { gint64 motion_delay; gint64 curr; curr = g_get_monotonic_time (); /* Only after FULLSCREEN_MOTION_NUM_EVENTS motion events, in FULLSCREEN_MOTION_TIME milliseconds will we show the popups */ motion_delay = (curr - fs-...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__eda__StringList_OnEdit(struct __ecereNameSpace__ecere__com__Class * class, struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * dataBox, struct __ecereNameSpace__ecere__com__Instance * obsolete, int x, int y, int w, int h, void * userData)...
false
false
false
false
false
0
copyLiteralArray(Expressions *oldelems) { if (!oldelems) return oldelems; CtfeStatus::numArrayAllocs++; Expressions *newelems = new Expressions(); newelems->setDim(oldelems->dim); for (size_t i = 0; i < oldelems->dim; i++) (*newelems)[i] = copyLiteral((*oldelems)[i]); return newe...
false
false
false
false
false
0
cTagKind (const tagType type) { cKind result = CK_UNDEFINED; switch (type) { case TAG_CLASS: result = CK_CLASS; break; case TAG_ENUM: result = CK_ENUMERATION; break; case TAG_ENUMERATOR: result = CK_ENUMERATOR; break; case TAG_FUNCTION: result = CK_FUNCTION; break; case TAG_LOCAL: ...
false
false
false
false
false
0
push ( unsigned char base_ ) { unsigned int bits = CHAR2BIT.FIELD[ base_ ]; Node *child_of_root; SearchParameter *new_parameter; if ( bits & 1 ) { child_of_root = root->child[ 2 ]; // 2 = A if ( child_of_root != NULL ) { new_parameter = new SearchParameter; ...
false
false
false
false
false
0
lookup_all_contacts (ContactsContext *context) { GPtrArray *contacts = g_ptr_array_new (); guint i; for (i = 0; i < context->handles->len; i++) { TpContact *contact = _tp_connection_lookup_contact (context->connection, g_array_index (context->handles, TpHandle, i)); if (contact != NULL)...
false
false
false
false
false
0
wlc_phy_tbl_init_nphy(struct brcms_phy *pi) { uint idx = 0; u8 antswctrllut; if (pi->phy_init_por) wlc_phy_static_table_download_nphy(pi); if (NREV_GE(pi->pubpi.phy_rev, 7)) { antswctrllut = CHSPEC_IS2G(pi->radio_chanspec) ? pi->srom_fem2g.antswctrllut : pi->srom_fem5g. antswctrllut; s...
false
false
false
false
false
0
resync_sensitive( EgeSelectOneAction* act ) { GSList* proxies = gtk_action_get_proxies( GTK_ACTION(act) ); while ( proxies ) { if ( GTK_IS_TOOL_ITEM(proxies->data) ) { /* Search for the things we built up in create_tool_item() */ GList* children = gtk_container_get_children( GTK_...
false
false
false
false
false
0
test_checkout_tree__can_checkout_and_remove_directory(void) { cl_assert_equal_i(false, git_path_isdir("./testrepo/ab/")); /* Checkout brach "subtrees" and update HEAD, so that HEAD matches the * current working tree */ cl_git_pass(git_revparse_single(&g_object, g_repo, "subtrees")); cl_git_pass(git_checkout_tr...
false
false
false
false
false
0
exec_mailcap_test_cmd(char *cmd) { #ifdef _WINDOWS return((WinExec(cmd, SW_SHOWMINNOACTIVE) < 32) ? 1 : 0); #else PIPE_S *syspipe; return((syspipe = open_system_pipe(cmd, NULL, NULL, PIPE_SILENT, 0, pipe_callback, NULL)) ? close_system_pipe(&syspipe, NULL, pipe_callback) : -1); #endif }
false
false
false
false
true
1
match_sni(const string &host) { if (!ssl_enabled || !ssl || httpd_config::cfile.size() < 2) return 0; const char *sni = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name); if (!sni) return 0; return strcasecmp(sni, host.c_str()) == 0 ? 1 : -1; }
false
false
false
false
false
0
eval_conditional_assignment(HSCPRC * hp, HSCATTR * dest) { STRPTR nw = infgetw(hp->inpf); STRPTR attr_val = NULL; D(fprintf(stderr, DHL " conditional assignment\n")); if (nw) { /* temp. attribute to store name of source attribute if it * is specified with an expression */ HSCATTR *tmp_...
false
false
false
false
false
0
addrclip_free_copy_list( GList *copyList ) { GList *node; node = copyList; while( node ) { AddrClip_EMail *em = node->data; em->original = NULL; em->copy = NULL; g_free( em ); em = NULL; node = g_list_next( node ); } }
false
false
false
false
false
0
do_auth_check (GSLockPlug *plug) { GError *error; gboolean res; error = NULL; gs_lock_plug_disable_prompt (plug); gs_lock_plug_set_busy (plug); res = gs_auth_verify_user (g_get_user_name (), g_getenv ("DISPLAY"), auth_message_handler, plug, &error); gs_debug ("...
false
false
false
false
false
0
io_open (lua_State *L) { const char *filename = luaL_checkstring(L, 1); const char *mode = luaL_optstring(L, 2, "r"); LStream *p = newfile(L); int i = 0; /* check whether 'mode' matches '[rwa]%+?b?' */ if (!(mode[i] != '\0' && strchr("rwa", mode[i++]) != NULL && (mode[i] != '+' || ++i) && /* skip if...
false
false
false
false
true
1
save_size_changed_prompt(long msgno, int flags) { int ret; char prompt[100]; static int remember_the_yes = 0; static int possible_corruption = 0; static ESCKEY_S save_size_opts[] = { {'y', 'y', "Y", "Yes"}, {'n', 'n', "N", "No"}, {'a', 'a', "A", "yes to All"}, {-1, 0, NULL, NULL} }; if(...
false
false
false
false
false
0
setupWidget(QWidget *widget, KConfigSkeletonItem *item) { QVariant minValue = item->minValue(); if (minValue.isValid()) { // Only q3datetimeedit is using this property we can remove it if we stop supporting Qt3Support if (widget->metaObject()->indexOfProperty("minValue") != -1) widget->setProperty(...
false
false
false
false
false
0
print_char(char ch, std::ostream& out) { switch (ch) { case '<': out << "&lt;"; break; case '>': out << "&gt;"; break; case '&': out << "&amp;"; break; case '"': out << "&quot;"; break; default: out << ch; break; ...
false
false
false
false
false
0
plugin_initialize(struct hub_config* config, struct hub_info* hub) { int ret; hub->plugins->loaded = list_create(); if (!hub->plugins->loaded) return -1; if (config) { if (!*config->file_plugins) return 0; ret = file_read_lines(config->file_plugins, hub, &plugin_parse_line); if (ret == -1) { lis...
false
false
false
false
false
0
dhcp_subclass_set_value (omapi_object_t *h, omapi_object_t *id, omapi_data_string_t *name, omapi_typed_data_t *value) { if (h -> type != dhcp_type_subclass) return DHCP_R_INVALIDARG; return class_set_value(h, id, name, value); }
false
false
false
false
false
0
prune_partition_set(const TABLE *table, part_id_range *part_spec) { int last_partition= -1; uint i; partition_info *part_info= table->part_info; DBUG_ENTER("prune_partition_set"); for (i= part_spec->start_part; i <= part_spec->end_part; i++) { if (bitmap_is_set(&(part_info->used_partitions), i)) { ...
false
false
false
false
false
0
Run() { while (keep_going_) { OS::Sleep(sleep_ms_); StackGuard::Preempt(); } }
false
false
false
false
false
0
latex2e_write_file_header(GsfOutput *output, Sheet *sheet, GnmRange const *range) { gboolean is_landscape = FALSE, use_utf8; GtkPageOrientation orient = print_info_get_paper_orientation (sheet->print_info); is_landscape = (orient == GTK_PAGE_ORIENTATION_LANDSCAPE || orient == GTK_PAGE_ORIENTATION_REVERSE_LANDSCA...
false
false
false
false
false
0
user_info_access(Credentials *cr, char *uri, char *remote_addr, char *remote_host) { char *p; Ds ds; Vfs_conf *conf; Vfs_handle *h; if (cr == NULL || cr->auth_style & AUTH_STYLE_ADMIN) return; ds_init(&ds); ds_asprintf(&ds, "<acs"); ds_asprintf(&ds, " ident=\"%s\"", auth_identity_from_credential...
true
true
false
false
true
1
cs_diag_storemsg(CS_CONTEXT *context, CS_CLIENTMSG *message) { struct cs_diag_msg **curptr; CS_INT msg_count = 0; tdsdump_log(TDS_DBG_FUNC, "cs_diag_storemsg(%p, %p)\n", context, message); curptr = &(context->msgstore); /* if we already have a list of messages, */ /* go to the end of the list... */ ...
false
true
false
false
false
1
format_message(long int msgno, ENVELOPE *env, struct mail_bodystruct *body, HANDLE_S **handlesp, int flgs, gf_io_t pc) { char *decode_err = NULL; HEADER_S h; int width; clear_cur_embedded_color(); if(!(flgs & FM_DISPLAY)) flgs |= FM_NOINDENT; width = (flgs & FM_DISPLA...
false
false
false
false
false
0
paintEvent(QPaintEvent * /*event*/) { QPainter painter(this); float sectorSize, woffset, hoffset; CalculateOffsets(sectorSize, woffset, hoffset); // Draw the black background painter.setRenderHint(QPainter::Antialiasing); painter.setPen(Qt::black); painter.setBrush(Qt::black); painter....
false
false
false
false
false
0
free_zend_constant(zend_constant *c) { if (!(c->flags & CONST_PERSISTENT)) { zval_dtor(&c->value); } str_free(c->name); }
false
false
false
false
false
0
mei_me_pg_is_enabled(struct mei_device *dev) { struct mei_me_hw *hw = to_me_hw(dev); u32 reg = mei_me_mecsr_read(dev); if (hw->d0i3_supported) return true; if ((reg & ME_PGIC_HRA) == 0) goto notsupported; if (!dev->hbm_f_pg_supported) goto notsupported; return true; notsupported: dev_dbg(dev->dev, "pg...
false
false
false
false
false
0
gst_base_sink_set_blocksize (GstBaseSink * sink, guint blocksize) { g_return_if_fail (GST_IS_BASE_SINK (sink)); GST_OBJECT_LOCK (sink); sink->priv->blocksize = blocksize; GST_LOG_OBJECT (sink, "set blocksize to %u", blocksize); GST_OBJECT_UNLOCK (sink); }
false
false
false
false
false
0
read_position_from_inputdev (int *x, int *y, int *z, double *utime) { struct input_event ev; int len, done = 0; *utime = 0; while (1) { len = read(hdaps_input_fd, &ev, sizeof(struct input_event)); if (len < 0) { printlog(stderr, "ERROR: failed reading from input device: /dev/input/event%d (%s).", hdaps_inpu...
false
false
false
false
false
0
__txn_remove_fe_watermark(txn, db) DB_TXN *txn; DB *db; { DB *db_tmp; if (txn == NULL || !F_ISSET(txn, TXN_BULK)) return; TAILQ_FOREACH(db_tmp, &txn->femfs, felink) { if (db_tmp == db) { __clear_fe_watermark(txn, db); break; } } }
false
false
false
false
false
0
setRange(const Range& range) { if (range == *this) return; Range old = *this; Range::setRange(range); DEBUG_CHILD_OVERLAP }
false
false
false
false
false
0
warn_dots(char *modname) { if (!strcmp(modname+strlen(modname)-3,"...")) errormsg(Warning, "Module name <<%s>> isn't completed as in web", modname); }
false
false
false
false
false
0
stable_node_chain_remove_range(struct stable_node *stable_node, unsigned long start_pfn, unsigned long end_pfn, struct rb_root *root) { struct stable_node *dup; struct hlist_node *hlist_safe; if (!is_stable_node_chain(stable_node)) { VM_BUG_ON(is_stable_node_dup(stable_node)); return sta...
false
false
false
false
false
0
PrintRecExpr1 ( Expr expr ) { Expr tmp; /* temporary variable */ UInt i; /* loop variable */ for ( i = 1; i <= SIZE_EXPR(expr)/(2*sizeof(Expr)); i++ ) { /* print an ordinary record name ...
false
false
false
false
false
0
variantToUci(const QString& str) { if (str.isEmpty() || str == "standard") return QString(); if (str == "fischerandom") return "UCI_Chess960"; if (str == "caparandom") return "UCI_CapaRandom"; QString tmp = QString("UCI_%1").arg(str); tmp[4] = tmp.at(4).toUpper(); return tmp; }
false
false
false
false
false
0
declareVars(pair<int, list<RefPortugolAST> >& prims) { list<RefPortugolAST>::iterator it; for(it = prims.second.begin(); it != prims.second.end(); ++it) { if(!evalVariableRedeclaration(currentScope, (*it))) { stable.declareVar(currentScope, (*it)->getText(), (*it)->getLine(), prims.first); } } }
false
false
false
false
false
0
looks_like_ip(const char *ipstr) { if (ap_strchr_c(ipstr, ':')) { /* definitely not a hostname; assume it is intended to be an IPv6 address */ return 1; } /* simple IPv4 address string check */ while ((*ipstr == '.') || apr_isdigit(*ipstr)) ipstr++; return (*ipstr == '\0'); ...
true
true
false
false
false
1
ProcessXMP() { // Some versions of gcc can't tolerate goto's across declarations. // *** Better yet, avoid this cruft with self-cleaning objects. #define CleanupAndExit \ { \ bool openForUpdate = XMP_OptionIsSet ( this->parent->openFlags, kXMPFiles_OpenForUpdate ); \ if ( ! openForUpd...
false
false
false
false
false
0
deallocMembers() { MemberMap::iterator it(m_members.begin()), end(m_members.end()); for (; it != end; ++it) { clever_delref(it->second.value); } }
false
false
false
false
false
0
ReadArbdb(NA_Alignment *dataset, bool marked, AP_filter *filter, GapCompression compress, bool cutoff_stop_codon) { GBDATA *gb_species_data; GBDATA *gb_species; /*ARB_NT END*/ dataset->gb_main = GLOBAL_gb_main; /* Alignment choosen ? */ gb_species_data = GB_entry(dataset->gb_main,"species_dat...
false
false
false
false
true
1
sigShutdownHandler(int sig) { char *msg; switch (sig) { case SIGINT: msg = "Received SIGINT scheduling shutdown..."; break; case SIGTERM: msg = "Received SIGTERM scheduling shutdown..."; break; default: msg = "Received shutdown signal, scheduling shutdown..."...
false
false
false
false
false
0
ufshcd_enable_intr(struct ufs_hba *hba, u32 intrs) { u32 set = ufshcd_readl(hba, REG_INTERRUPT_ENABLE); if (hba->ufs_version == UFSHCI_VERSION_10) { u32 rw; rw = set & INTERRUPT_MASK_RW_VER_10; set = rw | ((set ^ intrs) & intrs); } else { set |= intrs; } ufshcd_writel(hba, set, REG_INTERRUPT_ENABLE); }
false
false
false
false
false
0
heapvar_map_eq (const void *p1, const void *p2) { const struct heapvar_map *h1 = (const struct heapvar_map *)p1; const struct heapvar_map *h2 = (const struct heapvar_map *)p2; return (h1->map.base.from == h2->map.base.from && h1->offset == h2->offset); }
false
false
false
false
false
0
HPDF_EncryptDict_Validate (HPDF_EncryptDict dict) { HPDF_Obj_Header *header = (HPDF_Obj_Header *)dict; HPDF_PTRACE((" HPDF_EncryptDict_Validate\n")); if (!dict || !dict->attr) return HPDF_FALSE; if (header->obj_class != (HPDF_OCLASS_DICT | HPDF_OSUBCLASS_ENCRYPT)) return HPDF_FALSE;...
false
false
false
false
false
0
secret_schema_ref (SecretSchema *schema) { SecretSchema *result; gint i; g_return_val_if_fail (schema != NULL, NULL); /* If it's static, then copy it */ if (g_atomic_int_get (&schema->reserved) > 0) { g_atomic_int_inc (&schema->reserved); result = schema; } else { result = g_slice_new0 (SecretSchema); r...
false
false
false
false
false
0
wm8988_set_dai_sysclk(struct snd_soc_dai *codec_dai, int clk_id, unsigned int freq, int dir) { struct snd_soc_codec *codec = codec_dai->codec; struct wm8988_priv *wm8988 = snd_soc_codec_get_drvdata(codec); switch (freq) { case 11289600: case 18432000: case 22579200: case 36864000: wm8988->sysclk_constraints...
false
false
false
false
false
0
importClass(source,c) Module source; Class c; { Class clash=addClass(c); if (nonNull(clash) && clash!=c /* See importName() comment. */ && cclass(c).mod != cclass(clash).mod ) { /* Hmm..don't quite understand why we need to record the clash on both the class values here..*/ cclass(c).cla...
false
false
false
false
false
0
Get(uint32_t index) { i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); ON_BAILOUT(isolate, "v8::Object::Get()", return Local<v8::Value>()); ENTER_V8(isolate); i::Handle<i::JSObject> self = Utils::OpenHandle(this); EXCEPTION_PREAMBLE(isolate); i::Handle<i::Object> result = i::GetElement(self, ind...
false
false
false
false
false
0
deleteDesc(int desc) { int32 fid; if ((fid = Hopen(he_file, DFACC_WRITE, 0)) == (int32) NULL) { HEprint(stderr, 0); return FAIL; } if (Hdeldd(fid, he_desc[desc].tag, he_desc[desc].ref) == FAIL) { HEprint(stderr, 0); return FAIL; } r...
false
false
false
false
false
0
parse_permmap_class(apol_policy_t * p, FILE * fp, size_t num_perms, apol_permmap_class_t * pc) { char line[APOL_LINE_SZ], perm_name[APOL_LINE_SZ], *line_ptr = NULL; size_t perms_read = 0; int retval = 0; while (fgets(line, sizeof(line), fp) != NULL && perms_read < num_perms) { char mapid; int perm_weight, new_...
true
true
false
false
true
1
gt_spacepeak_init(void) { gt_assert(!peaklogger); peaklogger = gt_malloc(sizeof (GtSpacepeakLogger)); peaklogger->current = gt_ma_get_space_current(); peaklogger->max = 0; peaklogger->mutex = gt_mutex_new(); }
false
false
false
false
false
0
test_keys( ELG_secret_key *sk, unsigned int nbits ) { ELG_public_key pk; MPI test = mpi_alloc( 0 ); MPI out1_a = mpi_alloc ( mpi_nlimb_hint_from_nbits (nbits) ); MPI out1_b = mpi_alloc ( mpi_nlimb_hint_from_nbits (nbits) ); MPI out2 = mpi_alloc ( mpi_nlimb_hint_from_nbits (nbits) ); pk.p = sk...
false
false
false
false
false
0
iwl_pcie_send_hcmd_sync(struct iwl_trans *trans, struct iwl_host_cmd *cmd) { struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); int cmd_idx; int ret; IWL_DEBUG_INFO(trans, "Attempting to send sync command %s\n", get_cmd_string(trans_pcie, cmd->id)); if (WARN(test_and_set_bit(STA...
false
false
false
false
false
0
itpackdcopy_(integer *n, doublereal *dx, integer *incx, doublereal *dy, integer *incy) { /* Local variables */ static integer i, m, ix, iy, ns; /* COPY DOUBLE PRECISION DX TO DOUBLE PRECISION DY. */ if (*n <= 0) return 0; if (*incx == *incy) { if (*incx < 1) goto L...
false
false
false
false
false
0
cirrus_encoder_init(struct drm_device *dev) { struct drm_encoder *encoder; struct cirrus_encoder *cirrus_encoder; cirrus_encoder = kzalloc(sizeof(struct cirrus_encoder), GFP_KERNEL); if (!cirrus_encoder) return NULL; encoder = &cirrus_encoder->base; encoder->possible_crtcs = 0x1; drm_encoder_init(dev, encod...
false
false
false
false
false
0
pv_approximation(val1, val2) double val1, val2; { if (val1 < val2 - EPSILON) return 0; if (val1 > val2 + EPSILON) return 0; return 1; }
false
false
false
false
false
0
save(YAML::Emitter& out, ConstFileTransformRcPtr t) { out << YAML::VerbatimTag("FileTransform"); out << YAML::Flow << YAML::BeginMap; out << YAML::Key << "src" << YAML::Value << t->getSrc(); const char * cccid = t->getCCCId(); if(cccid && *cccid) ...
false
false
false
false
false
0
GetAddress(const char* addrName) { static hsMutex addrMutex; addrMutex.lock(); hostent* host = gethostbyname(addrName); unsigned long numAddr = 0; if (host != NULL && host->h_addr_list != NULL) numAddr = ntohl(*(unsigned long*)host->h_addr_list[0]); addrMutex.unlock(); return numAddr...
false
false
false
false
false
0
category_compare (EContact *contact1, EContact *contact2) { const gchar *categories1, *categories2; gboolean equal; categories1 = e_contact_get_const (contact1, E_CONTACT_CATEGORIES); categories2 = e_contact_get_const (contact2, E_CONTACT_CATEGORIES); if (categories1 && categories2) equal = !...
false
false
false
false
false
0
HandleDebugSpellModsCommand(char* args) { char* typeStr = ExtractLiteralArg(&args); if (!typeStr) return false; Opcodes opcode; if (strncmp(typeStr, "flat", strlen(typeStr)) == 0) opcode = SMSG_SET_FLAT_SPELL_MODIFIER; else if (strncmp(typeStr, "pct", strlen(typeStr)) == 0) ...
false
false
false
false
false
0
SPF_server_get_default_explanation(SPF_server_t *spf_server, SPF_request_t *spf_request, SPF_response_t *spf_response, char **bufp, size_t *buflenp) { SPF_errcode_t err; SPF_macro_t *spf_macro; spf_macro = spf_server->explanation; if (spf_macro != NULL) { err = SPF_record_expand_data(spf_se...
false
true
false
false
false
1
hostap_ap_tx_cb_assoc(struct sk_buff *skb, int ok, void *data) { struct ap_data *ap = data; struct net_device *dev = ap->local->dev; struct ieee80211_hdr *hdr; u16 status; __le16 *pos; struct sta_info *sta = NULL; char *txt = NULL; if (ap->local->hostapd) { dev_kfree_skb(skb); return; } hdr = (struct ie...
false
false
false
false
false
0
ndmp_4to9_execute_cdb_request ( ndmp4_execute_cdb_request *request4, ndmp9_execute_cdb_request *request9) { int n_error = 0; u_long len; char * p; switch (request4->flags) { case 0: request9->data_dir = NDMP9_SCSI_DATA_DIR_NONE; break; case NDMP4_SCSI_DATA_IN: request9->data_dir = NDMP9_SCSI_DATA_D...
false
false
false
false
false
0
decode_cb_compound4res(struct xdr_stream *xdr, struct nfs4_cb_compound_hdr *hdr) { u32 length; __be32 *p; p = xdr_inline_decode(xdr, 4 + 4); if (unlikely(p == NULL)) goto out_overflow; hdr->status = be32_to_cpup(p++); /* Ignore the tag */ length = be32_to_cpup(p++); p = xdr_inline_decode(xdr, length + ...
false
false
false
false
false
0
matrixTranspose(matrix *pOut, const matrix *pM) { matrix tmp; int i; for(i = 0; i < 16; i++) { tmp.m[i] = pM->m[ i / 4 + (i % 4) * 4 ]; } memcpy(pOut, &tmp, sizeof(matrix)); return pOut; }
false
false
false
false
false
0
setValue(const char* key, const QVariant& value) { if (!value.isValid()) return removeValue(key); d->m_values.insert(key, value); return true; }
false
false
false
false
false
0
dump_variable_length_record_log(int msg_flags) { uint32_t idx, log_first_idx, log_next_idx, log_buf_len; ulong log_buf; char *logptr, *logbuf, *log_struct_name; if (INVALID_SIZE(log)) { if (STRUCT_EXISTS("printk_log")) { /* * In kernel 3.11 the log structure name was renamed * from log to printk_log. ...
false
false
false
false
false
0
_load_jobs(uint16_t rpc_version, Buf buffer, char *cluster_name, uint32_t rec_cnt) { char *insert = NULL, *format = NULL; local_job_t object; int i = 0; xstrfmtcat(insert, "insert into \"%s_%s\" (%s", cluster_name, job_table, job_req_inx[0]); xstrcat(format, "('%s'"); for(i=1; i<JOB_REQ_COUNT; i++) { x...
false
false
false
false
false
0
getStats() { std::ostringstream os; //Lock countLock(pmtxCount); time_t time_now; time(&time_now); //upTime = (double) (time_now - serverStartTime) / 3600; upTime = (time_now - serverStartTime); //countLock.get(); computeStreamRates() ; os << setiosflags(ios::showpoint | ...
false
false
false
false
false
0
find(NodeImpl::Id id, const PrefixName& prefix, bool nsAware) const { //kDebug() << "In find:" << getPrintableName(id) << "[" << prefix.toString() << prefix.id() << "]" << nsAware << endl; //kDebug() << "m_attrs.size()" << m_attrs.size() << endl; unsigned len = m_attrs.size(); for (unsigned i = 0; i < l...
false
false
false
false
false
0
CuspPlacidus(deg, FF, fNeg) real deg, FF; bool fNeg; { real LO, R1, XS, X; int i; R1 = is.RA+RFromD(deg); X = fNeg ? 1.0 : -1.0; /* Looping 10 times is arbitrary, but it's what other programs do. */ for (i = 1; i <= 10; i++) { /* This formula works except at 0 latitude (AA == 0.0). */ XS = X*RSin...
false
false
false
false
false
0
xml_parse_merge_fields (xmlNodePtr node, glLabel *label) { gchar *string; glMerge *merge; gl_debug (DEBUG_XML, "START"); string = lgl_xml_get_prop_string (node, "type", NULL); merge = gl_merge_new (string); g_free (string); if (merge) { string = lgl_xml_get_prop_s...
false
false
false
false
false
0
increment_structure_members_entry(symbol_kind kind, int entry, Var_table *v, Array_table *a) { Var_table *vpt; Array_table *apt; for (vpt = v; vpt != NULL; vpt = vpt->next) { if (vpt->members != NULL) { increment_op_entry_list(kind, entry, vpt->members);...
false
false
false
false
false
0
avcodec_register(AVCodec *codec) { AVCodec **p; avcodec_init(); p = &first_avcodec; while (*p != NULL) p = &(*p)->next; *p = codec; codec->next = NULL; }
false
false
false
false
false
0
unlock_resource(int lockid) { int status; struct lock_wait lwait; if (default_ls == NULL) { errno = -ENOTCONN; return -1; } pthread_cond_init(&lwait.cond, NULL); pthread_mutex_init(&lwait.mutex, NULL); pthread_mutex_lock(&lwait.mutex); status = dlm_unlock(lockid, 0, &lwait.lksb,...
false
false
false
false
false
0
SetFrame(VirtualFrame* new_frame, RegisterFile* non_frame_registers) { RegisterFile saved_counts; if (has_valid_frame()) { frame_->DetachFromCodeGenerator(); // The remaining register reference counts are the non-frame ones. allocator_->SaveTo(&saved_counts); } if (new_...
false
false
false
false
false
0
add(int days, time_t start, time_t end) { if (tod.days == 0xff) { // NB: 0xff means initialized by constructure tod.days = days; tod.start = start; tod.end = end; } else { _tod* t = new _tod(days, start, end); _tod** tpp; for (tpp = &tod.next; *tpp; tpp = &(*tpp)->next) ; *tpp = t; } }
false
false
false
false
false
0