Dataset Viewer
Auto-converted to Parquet Duplicate
func
stringlengths
1
484k
⌀
cwe
stringclasses
2 values
hash
stringlengths
64
64
static int tun_net_xmit(struct sk_buff *skb, struct net_device *dev) { struct tun_struct *tun = netdev_priv(dev); DBG(KERN_INFO "%s: tun_net_xmit %d\n", tun->dev->name, skb->len); /* Drop packet if interface is not attached */ if (!tun->tfile) goto drop; /* Drop if the filter does not like it. * This is a n...
other
41b8a772c9691444d0150addeebf3064eea1e113a1c58d5899242e32ae97c9a2
void CBINDInstallDlg::ReadInstallFileList() { std::ifstream fl(m_currentDir + "\\InstallFiles"); if (!fl) { throw(Exception(IDS_FILE_BAD, "InstallFiles", "can't open")); } while (!fl.eof()) { std::string line; getline(fl, line); if (line.empty()) continue; if (line[0] == '#') continue; // zip -l a...
other
1587f67b8c585fe3ff1406a71272b917e3ca52ef708576f920c73adfa771c230
explicit SparseBincountOp(OpKernelConstruction* ctx) : OpKernel(ctx) { OP_REQUIRES_OK(ctx, ctx->GetAttr("binary_output", &binary_output_)); }
other
9dab2c084c9f08bac2a92a263ae9e8b581eb303eff2b1d906c344ec35e16b07e
static int btrfs_dev_replace_kthread(void *data) { struct btrfs_fs_info *fs_info = data; struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; u64 progress; int ret; progress = btrfs_dev_replace_progress(fs_info); progress = div_u64(progress, 10); btrfs_info_in_rcu(fs_info, "continuing dev_replace fr...
other
174945adcacdae6baea4e192da0bc3bff95d4797417037ccda04ece02f02d969
md_is_html_block_end_condition(MD_CTX* ctx, OFF beg, OFF* p_end) { switch(ctx->html_block_type) { case 1: { OFF off = beg; while(off < ctx->size && !ISNEWLINE(off)) { if(CH(off) == _T('<')) { if(md_ascii_case_eq(STR(off), _T("</script>")...
other
c48b761025ee56e16f38841062cc7750bb6b2db7819d7193217c9edc7ca938ca
u64 gf_isom_get_unused_box_bytes(GF_ISOFile *movie) { u64 size = unused_bytes; u32 i, count; if (!movie) return 0; count = gf_list_count(movie->TopBoxes); for (i=0; i<count; i++) { GF_Box *b = gf_list_get(movie->TopBoxes, i); size += box_unused_bytes(b); } return size; }
other
5f4cc9f112d0a66bac94796c226118e9ce713a099fec2a72a95a94c33a9ef191
xmlRegCopyAtom(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom) { xmlRegAtomPtr ret; ret = (xmlRegAtomPtr) xmlMalloc(sizeof(xmlRegAtom)); if (ret == NULL) { xmlRegexpErrMemory(ctxt, "copying atom"); return(NULL); } memset(ret, 0, sizeof(xmlRegAtom)); ret->type = atom->type; ret->quant = atom...
other
aa793bb28a34f13ba347419b68dff9a1bf286c2c2aa3551e75c10a9547c2b3a6
void fx_DataView_prototype_setBigInt64(txMachine* the) { fx_DataView_prototype_set(the, 8, fxBigIntCoerce, fxBigInt64Setter); }
other
72751798ad47aba068bb7cc9a2daf9437d5090eecd7d94e309571a67761b3b9f
int oauth2_try_parse_jwt(const struct oauth2_settings *set, const char *token, ARRAY_TYPE(oauth2_field) *fields, bool *is_jwt_r, const char **error_r) { const char *const *blobs = t_strsplit(token, "."); int ret; i_assert(set->key_dict != NULL); /* we don't know if it's JWT token yet */ *is_jwt_r = FALSE...
other
b76da525c1da23c397e26d90e1e772afef4e914a05d70f2da13e7f8bbcb442b6
void Display::slotHelperFinished(Auth::HelperExitStatus status) { // Don't restart greeter and display server unless sddm-helper exited // with an internal error or the user session finished successfully, // we want to avoid greeter from restarting when an authentication // error hap...
other
156625e72c67dfef0a6e599a149e09e69ea212ccbfee9bc23a8ee64c36cf3141
long get_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, unsigned long nr_pages, unsigned int gup_flags, struct page **pages, struct vm_area_struct **vmas, int *locked) { return 0; }
other
7813f94e6081645baf4885b8d2eab766281b765b3a3a78475e0699cc0951a673
alist_init(alist_T *al) { ga_init2(&al->al_ga, (int)sizeof(aentry_T), 5); }
other
b9bfa76f09bf5f6e0c2f037f2d6fed63a940ed9f78cab043df802c0b62e101ab
static int dvb_usb_adapter_exit(struct dvb_usb_device *d) { int n; for (n = 0; n < d->num_adapters_initialized; n++) { dvb_usb_adapter_frontend_exit(&d->adapter[n]); dvb_usb_adapter_dvb_exit(&d->adapter[n]); dvb_usb_adapter_stream_exit(&d->adapter[n]); kfree(d->adapter[n].priv); } d->num_adapters_initializ...
other
76f84d3627201e3a1bec4efdd6e7501c8497b52bee7688143e31a15a156b39cd
asmlinkage long sys_setfsuid(uid_t uid) { int old_fsuid; old_fsuid = current->fsuid; if (security_task_setuid(uid, (uid_t)-1, (uid_t)-1, LSM_SETID_FS)) return old_fsuid; if (uid == current->uid || uid == current->euid || uid == current->suid || uid == current->fsuid || capable(CAP_SETUID)) { if (ui...
other
b404a26394db6f57d37fecfcc6016718849e081ba7de1df3194d8f5f986eb1d4
static bool create_import_key_private_data(TPM2B_PRIVATE *private, TPMI_ALG_HASH parent_name_alg, TPM2B_MAX_BUFFER *encrypted_duplicate_sensitive, TPM2B_DIGEST *outer_hmac) { //UINT16 hash_size = tpm2_alg_util_get_hash_size(ctx.name_alg); UINT16 parent_hash_size = tpm2_alg_util_get_hash...
other
9dc46982326630e89720dae48aaf59bc0c58c5c7e1f77484f9e43c423d36dc6e
void Http2Stream::RefreshState(const FunctionCallbackInfo<Value>& args) { Http2Stream* stream; ASSIGN_OR_RETURN_UNWRAP(&stream, args.Holder()); Debug(stream, "refreshing state"); CHECK_NOT_NULL(stream->session()); AliasedFloat64Array& buffer = stream->session()->http2_state()->stream_state_buffer; ...
other
7d4eec6bc7b3b7416a33e10f2d369f041ea7028212d6ba29c0777b8a73f2ebe8
css_rightmost_descendant(struct cgroup_subsys_state *pos) { struct cgroup_subsys_state *last, *tmp; cgroup_assert_mutex_or_rcu_locked(); do { last = pos; /* ->prev isn't RCU safe, walk ->next till the end */ pos = NULL; css_for_each_child(tmp, last) pos = tmp; } while (pos); return last; }
other
ddd2bbe52ce82dffdf638bbd3c0ff97b0dc0553b1c3cc780a3ade129541b291d
GF_Err irot_box_dump(GF_Box *a, FILE * trace) { GF_ImageRotationBox *ptr = (GF_ImageRotationBox *)a; if (!a) return GF_BAD_PARAM; gf_isom_box_dump_start(a, "ImageRotationBox", trace); gf_fprintf(trace, "angle=\"%d\">\n", (ptr->angle*90)); gf_isom_box_dump_done("ImageRotationBox", a, trace); return GF_OK; }
other
7758495a295dc1112dd02b73bae50ca2eb93062509322a2cbbae91555c19ae11
static struct sock *__udp4_lib_mcast_demux_lookup(struct net *net, __be16 loc_port, __be32 loc_addr, __be16 rmt_port, __be32 rmt_addr, int dif) { struct sock *sk, *result; struct hlist_nulls_node *node; unsigned short hnum = ntohs(loc_port); unsigned int count, slot = udp_hashfn(net, hnum, u...
other
e8bbbd1724898f6c73cfebc55ae1358a087ec6c2cae47b43b2246430ff7be440
int X509V3_add_value_uchar(const char *name, const unsigned char *value, STACK_OF(CONF_VALUE) **extlist) { return x509v3_add_len_value(name, (const char *)value, value != NULL ? strlen((const char *)value) : 0, extlist); }
other
1e10dce03f5dd85b150d067578c01594f2d0779ed113e492f66e93f922326283
static void cmd_parse_lsub (IMAP_DATA* idata, char* s) { char buf[STRING]; char errstr[STRING]; BUFFER err, token; ciss_url_t url; IMAP_LIST list; if (idata->cmddata && idata->cmdtype == IMAP_CT_LIST) { /* caller will handle response itself */ cmd_parse_list (idata, s); return; } if (!op...
other
00ea61a34a3f3e8ee909ba8140c786022e905cc4b6c63a2fb5dcda88d9e98254
static void enlistcheck(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) { FontView *fv = (FontView *) GDrawGetUserData(gw); int i, gid; SplineFont *sf = fv->b.sf; EncMap *map = fv->b.map; int anyglyphs = false; for ( i=map->enccount-1; i>=0 ; --i ) if ( fv->b.selected[i] && (gid=map->map[...
other
7f37b097fc9f4080bd98cb1a70e88efc993f2719564a8d89129b5d6ad207a811
mwifiex_uap_bss_param_prepare(u8 *tlv, void *cmd_buf, u16 *param_size) { struct host_cmd_tlv_dtim_period *dtim_period; struct host_cmd_tlv_beacon_period *beacon_period; struct host_cmd_tlv_ssid *ssid; struct host_cmd_tlv_bcast_ssid *bcast_ssid; struct host_cmd_tlv_channel_band *chan_band; struct host_cmd_tlv_frag...
other
c2450176da986603df5ae63239d2914408042cb920da110f1eed7667259e9afd
void wc_ecc_fp_free(void) { #ifndef WOLFSSL_SP_MATH #ifndef HAVE_THREAD_LS if (initMutex == 0) { wc_InitMutex(&ecc_fp_lock); initMutex = 1; } if (wc_LockMutex(&ecc_fp_lock) == 0) { #endif /* HAVE_THREAD_LS */ wc_ecc_fp_free_cache(); #ifndef HAVE_THREAD_LS wc_UnLockMutex(&ecc_fp...
other
c10f9765e786150a0033ac23eeeafa4d532983db3c5cfec92e7622c74d4b9ee4
miniwget(const char * url, int * size, unsigned int scope_id) { unsigned short port; char * path; /* protocol://host:port/chemin */ char hostname[MAXHOSTNAMELEN+1]; *size = 0; if(!parseURL(url, hostname, &port, &path, &scope_id)) return NULL; #ifdef DEBUG printf("parsed url : hostname='%s' port=%hu path='%s' s...
other
a767e3be70471bf84db6fe7893181c2321fc3b3f1b68f066367fe917ac259f49
find_file_in_path_option( char_u *ptr, // file name int len, // length of file name int options, int first, // use count'th matching file name char_u *path_option, // p_path or p_cdpath int find_what, // FINDFILE_FILE, _DIR or _BOTH char_u *rel_fname, // file name we are looking relat...
other
864bca8304320260e334626bd37da80a56964d262b8a4d3985bcce4849636695
test_pointer(void) { plain(); symbol_ptr(); kernel_ptr(); struct_resource(); addr(); escaped_str(); hex_string(); mac(); ip(); uuid(); dentry(); struct_va_format(); struct_clk(); bitmap(); netdev_features(); flags(); }
other
5f7db62240408934458bd81c0c291d8bce90d4d4a29745223f68802033a4ac29
static int ceph_x_proc_ticket_reply(struct ceph_auth_client *ac, struct ceph_crypto_key *secret, void *buf, void *end) { void *p = buf; u8 reply_struct_v; u32 num; int ret; ceph_decode_8_safe(&p, end, reply_struct_v, bad); if (reply_struct_v != 1) return -EINVAL; ceph_decode_32_safe(&p, end, ...
other
369734102e89102a45281e377fab17889163bf672d96e8396768121676f62035
MagickPrivate MagickBooleanType DelegateComponentGenesis(void) { if (delegate_semaphore == (SemaphoreInfo *) NULL) delegate_semaphore=AcquireSemaphoreInfo(); return(MagickTrue); }
other
6c8872be91cb3a4ad748581c53d284c3ee64a878a871a2dcadb10672093f3e92
bool shouldMergeSlashes() const override { return true; }
other
95cb630f8d7e441876f9521bab27efef119575f89e5ede61db61a21c419e1f58
njs_generator_init(njs_generator_t *generator, njs_str_t *file, njs_int_t depth, njs_bool_t runtime) { njs_memzero(generator, sizeof(njs_generator_t)); njs_queue_init(&generator->stack); generator->file = *file; generator->depth = depth; generator->runtime = runtime; return NJS_OK; }
other
f1c2350de43ca0ce72e0675609f09daa3502438f3c02672c8fc7cc3db800b5da
static int rtp_packetize_mp4a_latm( sout_stream_id_sys_t *id, block_t *in ) { int i_max = rtp_mtu (id) - 2; /* payload max in one packet */ int latmhdrsize = in->i_buffer / 0xff + 1; int i_count = ( in->i_buffer + i_max - 1 ) / i_max; uint8_t *p_data = in->p_buffer, *p_header...
other
5ec936ad11cec59a3db5033064b60a060785e0ae31f193efb5d3fc63e34ddc26
void free_task(struct task_struct *tsk) { prop_local_destroy_single(&tsk->dirties); free_thread_info(tsk->stack); rt_mutex_debug_task_free(tsk); free_task_struct(tsk); }
other
482175429da1564593d200bdeb6fe5344e5d106f5686e6368b07e2138cbdac65
GF_Err dvvC_box_size(GF_Box *s) { return dvcC_box_size(s);
other
718993b879cdd706789d93e84710df7cbf83b8eeb91dc85f856ca8596e61bab9
static void addrconf_sysctl_register(struct inet6_dev *idev, struct ipv6_devconf *p) { int i; struct net_device *dev = idev ? idev->dev : NULL; struct addrconf_sysctl_table *t; char *dev_name = NULL; t = kmalloc(sizeof(*t), GFP_KERNEL); if (t == NULL) return; memcpy(t, &addrconf_sysctl, sizeof(*t)); for (i=0...
other
62c0ff4f0cb746c2474e82a273e1e23348417ffa29d636cd25842616884e9ff4
netlink_kernel_release(struct sock *sk) { if (sk == NULL || sk->sk_socket == NULL) return; sock_release(sk->sk_socket); }
other
109b7b4cef86047cadcf62d1791e5e13358284c66f162fcc9534e0980a811efb
CImg<T>& rotate_object3d(const float x, const float y, const float z, const float w, const bool is_quaternion=false) { return get_rotate_object3d(x,y,z,w,is_quaternion).move_to(*this); }
other
e93308642da6257e48a214ed166f9235f0ea848916ac5532c2d18ba51b9c2ef7
static void sock_def_write_space(struct sock *sk) { struct socket_wq *wq; rcu_read_lock(); /* Do not wake up a writer until he can make "significant" * progress. --DaveM */ if ((atomic_read(&sk->sk_wmem_alloc) << 1) <= sk->sk_sndbuf) { wq = rcu_dereference(sk->sk_wq); if (skwq_has_sleeper(wq)) wake_up...
other
97f126b8e6a6764df9631e208ac32c5cce4fdaf6f4cf7e8629529b3474aa4343
repodata_setpos_kv(Repodata *data, KeyValue *kv) { Pool *pool = data->repo->pool; if (!kv) pool_clear_pos(pool); else { pool->pos.repo = data->repo; pool->pos.repodataid = data - data->repo->repodata; pool->pos.dp = (unsigned char *)kv->str - data->incoredata; pool->pos.schema = kv...
other
b571e1af97eb772feb6c5d648641a491032422e985b78212ea5d4ec7ff048956
_zip_read_eocd(zip_buffer_t *buffer, zip_uint64_t buf_offset, unsigned int flags, zip_error_t *error) { zip_cdir_t *cd; zip_uint64_t i, nentry, size, offset, eocd_offset; if (_zip_buffer_left(buffer) < EOCDLEN) { zip_error_set(error, ZIP_ER_INCONS, 0); return NULL; } eocd_offset = _zip_buffer_of...
other
1de462cf0533f99f2e9ecd8d4b0bea5b30c9ddc5a301d7968a11f4531e88596d
ebews_set_notes (ESoapMessage *msg, EContact *contact) { gchar *notes = e_contact_get (contact, E_CONTACT_NOTE); if (!notes) return; e_ews_message_write_string_parameter_with_attribute (msg, "Body", NULL, notes, "BodyType", "Text"); g_free (notes); }
other
fc79ad65eb78285a5c13349554648d7020a62406ce1a27f9e3be9e8b7c4ef454
static int apply_restrict_namespaces(const Unit *u, const ExecContext *c) { assert(u); assert(c); if (!exec_context_restrict_namespaces_set(c)) return 0; if (skip_seccomp_unavailable(u, "RestrictNamespaces=")) return 0; return seccomp_restrict_n...
other
6c4fc0ec6edacdca664a150bf4d0a66fcb3c75d9fb307332200d529e564f124d
bool IsSupported(const NodeDef* node) const override { return IsConj(*node) || IsTranspose(*node) || IsConjugateTranspose(*node); }
other
85da7f3a1c0b504d50e26c6e05153212030d38d4649580c72ce667e73c06f580
struct xfrm_policy *xfrm_policy_byid(struct net *net, u32 mark, u8 type, int dir, u32 id, int delete, int *err) { struct xfrm_policy *pol, *ret; struct hlist_head *chain; *err = -ENOENT; if (xfrm_policy_id2dir(id) != dir) return NULL; *err = 0; spin_lock_bh(&net->xfrm.xfrm_policy_lock); chain = net-...
other
e166751dd4f848ba41e09e5a34120c737b7f5ab3f7d03dd24f30015d487c5f77
Status RoleGraph::deleteRole(const RoleName& role) { if (!roleExists(role)) { return Status(ErrorCodes::RoleNotFound, mongoutils::str::stream() << "Role: " << role.getFullName() << " does not exist"); } if (isBuiltinRole(role)) { ...
other
d4a528601075a8eb5ef2a2d405ef96c59d10c3f917ba28a72ac46cd676c1edff
bytes_repr(PyObject *op) { return PyBytes_Repr(op, 1); }
other
53226392bb74085dad3b45accda31306f1f78b364d2648f9f1f76cf73ae560a4
PackLinuxElf32::elf_has_dynamic(unsigned int key) const { Elf32_Dyn const *dynp= dynseg; if (dynp) for (; Elf32_Dyn::DT_NULL!=dynp->d_tag; ++dynp) if (get_te32(&dynp->d_tag)==key) { return dynp; } return nullptr; }
other
143f15318d12c33ef68043eb3b43e2fa1899dc9339678f9af108acc6ab0737ed
*/ static int io_uring_add_task_file(struct io_ring_ctx *ctx, struct file *file) { struct io_uring_task *tctx = current->io_uring; int ret; if (unlikely(!tctx)) { ret = io_uring_alloc_task_context(current, ctx); if (unlikely(ret)) return ret; tctx = current->io_uring; } if (tctx->last != file) { void ...
other
bb9db7352bf19207d74c1d52616edc6d1bfaa710c50525b3f1d6970a0b6d3501
add_groups_to_credentials (int client_fd, DBusCredentials *credentials, dbus_gid_t primary) { #if defined(__linux__) && defined(SO_PEERGROUPS) _DBUS_STATIC_ASSERT (sizeof (gid_t) <= sizeof (dbus_gid_t)); gid_t *buf = NULL; socklen_t len = 10...
other
6f1c1e708611a1193b3d977b67c892384588d0495ae8b6bab1ad569b26d15421
static void warn_dirty_buffer(struct buffer_head *bh) { char b[BDEVNAME_SIZE]; printk(KERN_WARNING "JBD2: Spotted dirty metadata buffer (dev = %s, blocknr = %llu). " "There's a risk of filesystem corruption in case of system " "crash.\n", bdevname(bh->b_bdev, b), (unsigned long long)b...
other
b8573090c3e686fb0a94a1f16f437579401482704c059f4da3d1da65f0af18c2
static int check_mtab(const char *progname, const char *devname, const char *dir) { if (check_newline(progname, devname) || check_newline(progname, dir)) return EX_USAGE; return 0; }
other
96995ff21f49d8fc6b7dce187d3ac3d8286da441dbee399852d9ce6d656202b6
static int get_options(int *argc, char ***argv) { int ho_error; if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option))) exit(ho_error); if (debug_info_flag) my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO; if (debug_check_flag) my_end_arg= MY_CHECK_ERROR; if (enclosed && opt_enclos...
other
93c6b169760b05fc4566fa6f4ba19af58399e1785a3c290e4979505379e32cdf
NO_INLINE JsVar *jspeFactor() { if (lex->tk==LEX_ID) { JsVar *a = jspGetNamedVariable(jslGetTokenValueAsString()); JSP_ASSERT_MATCH(LEX_ID); #ifndef SAVE_ON_FLASH if (lex->tk==LEX_TEMPLATE_LITERAL) jsExceptionHere(JSET_SYNTAXERROR, "Tagged template literals not supported"); else if (lex->tk==LEX...
other
36429d851579ef393cf116653ec8233b1aac066d410eedccdb5fa20b9d36a6e9
virSecuritySELinuxRestoreHostLabel(virSCSIVHostDevice *dev G_GNUC_UNUSED, const char *file, void *opaque) { virSecurityManager *mgr = opaque; return virSecuritySELinuxRestoreFileLabel(mgr, file, true); }
other
9ae501b251fba58c965c5e066c9a701c22601521ce347a1c79e9afd32e14158b
int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) { int n, ret; unsigned int i, b, bl; if (ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) { ret = ctx->cipher->do_cipher(ctx, out, NULL, 0); if (ret < 0) return 0; else *outl = ret; ...
other
854c35479dc43a2d48d8b22339d22ad6787d72a8a5befa295276c994686b25aa
rndr_footnotes(struct buf *ob, const struct buf *text, void *opaque) { struct html_renderopt *options = opaque; if (ob->size) bufputc(ob, '\n'); BUFPUTSL(ob, "<div class=\"footnotes\">\n"); bufputs(ob, USE_XHTML(options) ? "<hr/>\n" : "<hr>\n"); BUFPUTSL(ob, "<ol>\n"); if (text) bufput(ob, text->data, text->...
other
4b76c0f9336ce9a513903ec9fe338bf9ea64c27984686eec832cc19202005f24
static MagickBooleanType WriteBMPImage(const ImageInfo *image_info,Image *image) { BMPInfo bmp_info; BMPSubtype bmp_subtype; const char *option; const StringInfo *profile; MagickBooleanType have_color_info, status; MemoryInfo *pixel_info; MagickOffsetType scene; re...
BOF
a4ec5e9e82197575041382d9e7a626fadef1aae1f1b52647a343de8eb65a7f9d
static inline void io_tw_lock(struct io_ring_ctx *ctx, bool *locked) { if (!*locked) { mutex_lock(&ctx->uring_lock); *locked = true; } }
other
eae9574bfd7b7710b6f29fb13f464459df291103475ae826791c87c26e03d5c7
void kernel_sigaction(int sig, __sighandler_t action) { spin_lock_irq(&current->sighand->siglock); current->sighand->action[sig - 1].sa.sa_handler = action; if (action == SIG_IGN) { sigset_t mask; sigemptyset(&mask); sigaddset(&mask, sig); flush_sigqueue_mask(&mask, &current->signal->shared_pending); flu...
other
4e4b2b6a752e009915a15a9a77e903cbf44ae757c4c2173e35197411fabbf2ce
TEST(ComparisonsTest, EqualBool) { ComparisonOpModel model({1, 1, 1, 4}, {1, 1, 1, 4}, TensorType_BOOL, BuiltinOperator_EQUAL); model.PopulateTensor<bool>(model.input1(), {true, false, true, false}); model.PopulateTensor<bool>(model.input2(), {true, true, false, false}); model.Invoke()...
other
1de6fdc3afcb4616bf86f98a2549f3480be84b30adeb28aaa29b9b2abfdc2782
static void fib6_flush_trees(struct net *net) { int new_sernum = fib6_new_sernum(net); __fib6_clean_all(net, NULL, new_sernum, NULL, false); }
other
3712f87101d54877a1bef81240d5d83694a749348fdd5f1fe267c7ed1c94e7f9
static struct sk_buff *l2cap_sock_alloc_skb_cb(struct l2cap_chan *chan, unsigned long len, int nb) { struct sk_buff *skb; int err; l2cap_chan_unlock(chan); skb = bt_skb_send_alloc(chan->sk, len, nb, &err); l2cap_chan_lock(chan); if (!skb) return ERR_PTR(err); return skb; }
other
416b2a5e633c5ea6b95fbe607e7d54f79ef6de1f169ee805347179b2cf773ce4
get_priority(vector_t *strvec, const char *process) { int priority; if (vector_size(strvec) < 2) { report_config_error(CONFIG_GENERAL_ERROR, "No %s process priority specified", process); return 0; } if (!read_int_strvec(strvec, 1, &priority, -20, 19, true)) { report_config_error(CONFIG_GENERAL_ERROR, "Inval...
other
d3d6d4a50f42e01abb381d16843edf4f17cf4b0da111c24b030a836bcebf610a
static void MYSQLND_METHOD(mysqlnd_protocol, init_change_auth_response_packet)(struct st_mysqlnd_packet_change_auth_response *packet) { DBG_ENTER("mysqlnd_protocol::init_change_auth_response_packet"); memset(packet, 0, sizeof(*packet)); packet->header.m = &packet_methods[PROT_CHANGE_AUTH_RESP_PACKET]; DBG_VOID_RETU...
other
c6d88771575dae54e0cb0baf86d8be9c133a3ebd996931688e3f9fcea15e9fe7
CImg<T>& closing(const unsigned int s) { return closing(s,s,s); }
other
5ec1bd6a9fb044bddc126662277f79a5787b7525a8a57270687382af931a6eb0
int Field_temporal_with_date::store(longlong nr, bool unsigned_val) { int error; MYSQL_TIME ltime; longlong tmp; THD *thd= get_thd(); ErrConvInteger str(nr, unsigned_val); tmp= number_to_datetime(nr, 0, &ltime, sql_mode_for_dates(thd), &error); return store_TIME_with_warning(&ltime, &str, error, tmp != ...
other
15676b7709aa8b186b7199b1ec947419d3bc81e52ef5299330ae7f8a841c782d
static inline void __run_timers(struct timer_base *base) { struct hlist_head heads[LVL_DEPTH]; int levels; if (!time_after_eq(jiffies, base->clk)) return; spin_lock_irq(&base->lock); while (time_after_eq(jiffies, base->clk)) { levels = collect_expired_timers(base, heads); base->clk++; while (levels--)...
other
60a25ca8b9b2a843574601253b8f7f26ae9df9e81bbe24ad217b689d0adcd262
proto_register_protocol(const char *name, const char *short_name, const char *filter_name) { protocol_t *protocol; header_field_info *hfinfo; /* * Make sure there's not already a protocol with any of those * names. Crash if there is, as that's an error in the code * or an inappropriate plugin. * This si...
other
31aa2e01c03f68183d7ff4aafb16b6f7f4e11fc44be429f06485c8e9dc348de9
static int __init floppy_setup(char *str) { int i; int param; int ints[11]; str = get_options(str, ARRAY_SIZE(ints), ints); if (str) { for (i = 0; i < ARRAY_SIZE(config_params); i++) { if (strcmp(str, config_params[i].name) == 0) { if (ints[0]) param = ints[1]; else param = config_params[i]...
other
ef4214820c900669eb782918b4816b2ad5d3cbbe4c836012b42b0a8eff710f86
//! Return the sinc of a given value. inline double sinc(const double x) { return x?std::sin(x)/x:1;
other
720c670f231a3d6fdbe3e50a037a071fde2760fcb7c2316f15b2861a36d55f41
int unregister_die_notifier(struct notifier_block *nb) { return atomic_notifier_chain_unregister(&powerpc_die_chain, nb); }
other
7b1af7d68c53324ecc36f241b7d7579671db58675f5ae19bdc582fe2e7941d7a
static uint64_t virtio_net_bad_features(VirtIODevice *vdev) { uint64_t features = 0; /* Linux kernel 2.6.25. It understood MAC (as everyone must), * but also these: */ virtio_add_feature(&features, VIRTIO_NET_F_MAC); virtio_add_feature(&features, VIRTIO_NET_F_CSUM); virtio_add_feature(&featur...
other
0789c95dcc6262be8c3e2b51e51583a84d9c0b4dd5e868b8ce702d24aae05024
void btrfs_mapping_tree_free(struct btrfs_mapping_tree *tree) { struct extent_map *em; while (1) { write_lock(&tree->map_tree.lock); em = lookup_extent_mapping(&tree->map_tree, 0, (u64)-1); if (em) remove_extent_mapping(&tree->map_tree, em); write_unlock(&tree->map_tree.lock); if (!em) break; /* on...
other
72b5d1c222c5d3e275b69c29a5f60245d2f45ee6cb05865da3bbe7251057c7e8
list_one_var_a( char *prefix, char_u *name, int type, char_u *string, int *first) // when TRUE clear rest of screen and set to FALSE { // don't use msg() or msg_attr() to avoid overwriting "v:statusmsg" msg_start(); msg_puts(prefix); if (name != NULL) // "a:" vars don't have a nam...
other
43c4ea75d2716c96e6fdb8eb28eaa84bd99102bacb2580b4bc8b66f78c0b8ab3
static int readOHDRHeaderMessageDataFill1or2(struct READER *reader) { int spaceAllocationTime = fgetc(reader->fhd); int fillValueWriteTime = fgetc(reader->fhd); int fillValueDefined = fgetc(reader->fhd); if (spaceAllocationTime < 0 || fillValueWriteTime < 0 || fillValueDefined < 0) return MYSOFA_READ_ERROR...
other
3be2bed846d9fddd74f8c195a66f9ec587ae3f8813686dbf87f67fef56f0ce05
static void decode_register_operand(struct operand *op, struct decode_cache *c, int inhibit_bytereg) { unsigned reg = c->modrm_reg; int highbyte_regs = c->rex_prefix == 0; if (!(c->d & ModRM)) reg = (c->b & 7) | ((c->rex_prefix & 1) << 3); op->type = OP_REG; if ((c->d & ByteOp) && !inhibit_byter...
other
369c1a1907cd3fc5804fee36cc99bf1ecc5988fcc53505564e32d792db586409
static int uvc_parse_standard_control(struct uvc_device *dev, const unsigned char *buffer, int buflen) { struct usb_device *udev = dev->udev; struct uvc_entity *unit, *term; struct usb_interface *intf; struct usb_host_interface *alts = dev->intf->cur_altsetting; unsigned int i, n, p, len; u16 type; switch (buf...
other
3efbbad402c7e21d7353b89cdffc98211a00ef5570d6fa0bb221c90341f14fd0
static int fts3EvalIncrPhraseNext( Fts3Cursor *pCsr, /* FTS Cursor handle */ Fts3Phrase *p, /* Phrase object to advance to next docid */ u8 *pbEof /* OUT: Set to 1 if EOF */ ){ int rc = SQLITE_OK; Fts3Doclist *pDL = &p->doclist; Fts3Table *pTab = (Fts3Tab...
other
e32f77f769acc4cd6e5f1b2426c074d38a77cae3592e4fdc13729bfe8cfb317b
static int convert_ctx_accesses(struct verifier_env *env) { struct bpf_insn *insn = env->prog->insnsi; int insn_cnt = env->prog->len; struct bpf_insn insn_buf[16]; struct bpf_prog *new_prog; u32 cnt; int i; enum bpf_access_type type; if (!env->prog->aux->ops->convert_ctx_access) return 0; for (i = 0; i < i...
other
6393b4f356f27ca566f631188cd0927583f9c8e29ad289578d1c17b631d628b5
**/ double variance_noise(const unsigned int variance_method=2) const { if (is_empty()) throw CImgInstanceException(_cimg_instance "variance_noise(): Empty instance.", cimg_instance); const ulongT siz = size(); if...
other
d5ec82628a92163c6b732c7c3ba64f71b1b584da4a44793a00273628230a6d48
static PHP_RINIT_FUNCTION(libxml) { if (_php_libxml_per_request_initialization) { /* report errors via handler rather than stderr */ xmlSetGenericErrorFunc(NULL, php_libxml_error_handler); xmlParserInputBufferCreateFilenameDefault(php_libxml_input_buffer_create_filename); xmlOutputBufferCreateFilenameDefault(p...
other
06e65f84927d95b88850ae55bdfaf7ed88b8406b690ac7ae0865b634fcf6fc2e
scanner_seek (parser_context_t *context_p) /**< context */ { const uint8_t *source_p = context_p->source_p; scanner_info_t *prev_p; if (context_p->skipped_scanner_info_p != NULL) { JERRY_ASSERT (context_p->skipped_scanner_info_p->source_p != NULL); context_p->skipped_scanner_info_end_p->next_p = conte...
other
a96dec2b5cbc8f2067b36550ddeb16b5594620a6cea6ff4fc75f8e06169bb216
get_one_sourceline(source_cookie_T *sp) { garray_T ga; int len; int c; char_u *buf; #ifdef USE_CRNL int has_cr; // CR-LF found #endif int have_read = FALSE; // use a growarray to store the sourced line ga_init2(&ga, 1, 250); // Loop until there is a finished line (or end...
BOF
3d4ba08edb6f451cf3d3425844f530a276307b9eaa50f20e20879e5b75805e20
const CImg<T>& _save_pnk(std::FILE *const file, const char *const filename) const { if (!file && !filename) throw CImgArgumentException(_cimg_instance "save_pnk(): Specified filename is (null).", cimg_instance); if (is_empt...
other
68fd1926a74aab7d221e03ce801f09276ea2ee7bc382afb122c23476bf090ae0
void PacketReader::copyRecord(vector<unsigned char>& dest, uint16_t len) { dest.resize(len); if(!len) return; for(uint16_t n=0;n<len;++n) { dest.at(n)=d_content.at(d_pos++); } }
other
c57f86533196221c061ebb53de62c6224413028eb0c60d64859ef5af7cff7fb6
struct kern_ipc_perm *ipc_obtain_object_idr(struct ipc_ids *ids, int id) { struct kern_ipc_perm *out; int lid = ipcid_to_idx(id); out = idr_find(&ids->ipcs_idr, lid); if (!out) return ERR_PTR(-EINVAL); return out; }
other
406ce121f2889d094fb16249354a89ab876312295528ed8a76e15207eba6578c
static void gen_leave(DisasContext *s) { TCGMemOp d_ot = mo_pushpop(s, s->dflag); TCGMemOp a_ot = mo_stacksize(s); gen_lea_v_seg(s, a_ot, cpu_regs[R_EBP], R_SS, -1); gen_op_ld_v(s, d_ot, cpu_T0, cpu_A0); tcg_gen_addi_tl(cpu_T1, cpu_regs[R_EBP], 1 << d_ot); gen_op_mov_reg_v(d_ot, R_EBP, cpu_T0...
other
961cf91a8ddaa90d53ec5cf3d61c4aa465f5a3afeffc76e0d0d55e2fd0d4671b
static int bpf_fd_pass(struct file *file, u32 sid) { struct bpf_security_struct *bpfsec; struct bpf_prog *prog; struct bpf_map *map; int ret; if (file->f_op == &bpf_map_fops) { map = file->private_data; bpfsec = map->security; ret = avc_has_perm(&selinux_state, sid, bpfsec->sid, SECCLASS_BPF, ...
other
5f5c297a123805e4e331da5bce530d8110792fa7c8edcfcbfa458ba64284b861
AP_DECLARE(const char *) ap_get_server_banner(void) { return server_banner ? server_banner : AP_SERVER_BASEVERSION; }
other
8fa83a4c00b8ef33534ded99946f534a5c9a25b0873550a2629084006bbef73f
ofputil_put_ofp16_port(const struct ofputil_phy_port *pp, struct ofpbuf *b) { struct ofp16_port *op; struct ofp14_port_desc_prop_ethernet *eth; ofpbuf_prealloc_tailroom(b, sizeof *op + sizeof *eth); op = ofpbuf_put_zeros(b, sizeof *op); op->port_no = ofputil_port_to_ofp11(pp->port_no); op->len...
other
dffe746761ff4e703927880fd60da0d1af1d4ebda9a06bf893fcffb391f81645
archive_write_disk_vtable(void) { static struct archive_vtable av; static int inited = 0; if (!inited) { av.archive_close = _archive_write_disk_close; av.archive_filter_bytes = _archive_write_disk_filter_bytes; av.archive_free = _archive_write_disk_free; av.archive_write_header = _archive_write_disk_header;...
other
4e4542a78db783990321f9f96fa179be9ddb6a0f991bcb3c547dcc3526581a47
static int xhci_try_complete_packet(XHCITransfer *xfer) { if (xfer->packet.status == USB_RET_ASYNC) { trace_usb_xhci_xfer_async(xfer); xfer->running_async = 1; xfer->running_retry = 0; xfer->complete = 0; return 0; } else if (xfer->packet.status == USB_RET_NAK) { ...
other
ad852577d8c51151b4147507b51cbb1d6ac11d469468eb77e026d2735e4a9e50
static void des3_1_encrypt(struct ssh_cipher_struct *cipher, void *in, void *out, unsigned long len) { gcry_cipher_encrypt(cipher->key[0], out, len, in, len); gcry_cipher_decrypt(cipher->key[1], in, len, out, len); gcry_cipher_encrypt(cipher->key[2], out, len, in, len); }
other
8a4acbd4472df7f348501a4119a2f75b95050781f9d7b35c829629f86c227936
int ConnectionImpl::onFrameSend(const nghttp2_frame* frame) { // The nghttp2 library does not cleanly give us a way to determine whether we received invalid // data from our peer. Sometimes it raises the invalid frame callback, and sometimes it does not. // In all cases however it will attempt to send a GOAWAY fr...
other
92e0fdb4e738c1046bf04b29eb91118b22e1b4fb49a945805d168f19bb8a6139
static void MP4_FreeBox_String( MP4_Box_t *p_box ) { FREENULL( p_box->data.p_string->psz_text ); }
other
dfda05d201bb799329e0207cc83104663c5874706b13797618cdd584e671aa2a
static inline void set_pmd(pmd_t *pmdp, pmd_t pmd) { pmdval_t val = native_pmd_val(pmd); if (sizeof(pmdval_t) > sizeof(long)) PVOP_VCALL3(mmu.set_pmd, pmdp, val, (u64)val >> 32); else PVOP_VCALL2(mmu.set_pmd, pmdp, val); }
other
54ccf400da56b892bfa86de6823913980dff72b499eaef0dbf1bd2344e4844dc
void OSDService::complete_split(const set<spg_t> &pgs) { Mutex::Locker l(in_progress_split_lock); for (set<spg_t>::const_iterator i = pgs.begin(); i != pgs.end(); ++i) { dout(10) << __func__ << ": Completing split on pg " << *i << dendl; assert(!pending_splits.count(*i)); assert(in_progres...
other
86e50dfe9d6b913071db752b928e38fa92b0ecb397a0cd621a41a45de8655149
art_pdf_knockout_composite_pixel_alpha_16(uint16_t *gs_restrict backdrop, uint16_t tos_shape, uint16_t *gs_restrict dst, const uint16_t *gs_restrict src, int n_chan, gs_blend_mode_t blend_mode, const pdf14_nonseparable_blending_procs_t * pblend_procs, ...
other
359aa10b2293faf59ffc6d4782b531d99ba9533bcd1007faca53891ad6eb2e16
bool val_bool() { my_decimal decimal_value; my_decimal *val= val_decimal(&decimal_value); return val ? !my_decimal_is_zero(val) : 0; }
other
0eb9c6992cb40fe8d612dbecd9aee75e604efe4f107e62d47ba673d5aa242396
static long btrfs_ioctl_scrub_cancel(struct btrfs_fs_info *fs_info) { if (!capable(CAP_SYS_ADMIN)) return -EPERM; return btrfs_scrub_cancel(fs_info); }
other
101a5cbf2f825b6270400ff62b7a7af981df5b521bee5eaa16eb4eb3a7761bac
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
1