idx
int64
func
string
target
int64
246,746
static u32 do_write_udp() { GF_Err e; GF_Socket *sock = gf_sk_new(GF_SOCK_TYPE_UDP); u16 port = 2345; char *sep = strrchr(udp_dest, ':'); if (sep) { sep[0] = 0; port = atoi(sep+1); } e = gf_sk_bind( sock, "127.0.0.1", 0, udp_dest, port, 0); if (sep) sep[0] = ':'; if (e) { M4_LOG(GF_LOG_ERROR, ("Failed to...
0
353,008
hashIter( HASH_CONTEXT *HASHcontext, unsigned char *HASHdigest, unsigned char *value, int len) { HASH_CONTEXT ctx = *HASHcontext; HASH_Update( &ctx, value, len ); HASH_Final( HASHdigest, &ctx ); }
0
317,192
static int selinux_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { const struct cred *cred = current_cred(); int error = 0; switch (cmd) { case FIONREAD: case FIBMAP: case FIGETBSZ: case FS_IOC_GETFLAGS: case FS_IOC_GETVERSION: error = file_has_perm(cred, file, FILE__GETATTR); ...
0
359,311
DEFUN (no_bgp_redistribute_ipv4_metric, no_bgp_redistribute_ipv4_metric_cmd, "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>", NO_STR "Redistribute information from another routing protocol\n" "Connected\n" "Kernel routes\n" "Open Shurtest Path ...
0
197,057
int HttpFileImpl::save(const std::string &path) const { assert(!path.empty()); if (fileName_.empty()) return -1; filesystem::path fsPath(utils::toNativePath(path)); if (!fsPath.is_absolute() && (!fsPath.has_parent_path() || (fsPath.begin()->string() != "." && fsPath.begin()->str...
1
463,080
static void sungem_mmio_greg_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { SunGEMState *s = opaque; if (!(addr < 0x20) && !(addr >= 0x1000 && addr <= 0x1010)) { qemu_log_mask(LOG_GUEST_ERROR, "Write to unknown GREG register 0x%"...
0
444,909
mtab_unusable(void) { struct stat mstat; if(lstat(_PATH_MOUNTED, &mstat)) return errno; else if (S_ISLNK(mstat.st_mode)) return EMLINK; return 0; }
0
180,233
v8::Handle<v8::Value> V8ThrowException::createReferenceError(v8::Isolate* isolate, const String& message) { return v8::Exception::ReferenceError(v8String(isolate, message.isNull() ? "Reference error" : message)); }
0
430,416
int ovs_nla_put_mask(const struct sw_flow *flow, struct sk_buff *skb) { return ovs_nla_put_key(&flow->key, &flow->mask->key, OVS_FLOW_ATTR_MASK, true, skb); }
0
234,868
static struct btrfs_fs_devices *find_fsid_with_metadata_uuid( struct btrfs_super_block *disk_super) { struct btrfs_fs_devices *fs_devices; /* * Handle scanned device having completed its fsid change but * belonging to a fs_devices that was created by first scanning * a device which didn't have its fsid/me...
0
261,427
int check_CTB_available(const de265_image* img, int xC,int yC, int xN,int yN) { // check whether neighbor is outside of frame if (xN < 0 || yN < 0) { return 0; } if (xN >= img->get_sps().pic_width_in_luma_samples) { return 0; } if (yN >= img->get_sps().pic_height_in_luma_samples) { ret...
0
359,318
DEFUN (neighbor_timers, neighbor_timers_cmd, NEIGHBOR_CMD2 "timers <0-65535> <0-65535>", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "BGP per neighbor timers\n" "Keepalive interval\n" "Holdtime\n") { return peer_timers_set_vty (vty, argv[0], argv[1], argv[2]); }
0
224,542
Status DatasetIteratorShape(shape_inference::InferenceContext* c) { shape_inference::ShapeHandle unused; TF_RETURN_IF_ERROR(c->WithRank(c->input(0), 0, &unused)); std::vector<PartialTensorShape> output_shapes; TF_RETURN_IF_ERROR(c->GetAttr("output_shapes", &output_shapes)); const int output_shapes_size = outp...
0
468,354
g_socket_client_set_tls_validation_flags (GSocketClient *client, GTlsCertificateFlags flags) { if (client->priv->tls_validation_flags != flags) { client->priv->tls_validation_flags = flags; g_object_notify (G_OBJECT (client), "tls-validation-flags"); } }
0
318,097
static int usb_ulp_read_write(struct rsi_hw *adapter, u16 addr, u32 data, u16 len_in_bits) { int ret; ret = rsi_usb_master_reg_write (adapter, RSI_GSPI_DATA_REG1, ((addr << 6) | ((data >> 16) & 0xffff)), 2); if (ret < 0) return ret; ret = rsi_usb_master_reg_write(adapter, RSI_GSPI_DATA_REG0, ...
0
369,284
static int io_madvise_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { #if defined(CONFIG_ADVISE_SYSCALLS) && defined(CONFIG_MMU) if (sqe->ioprio || sqe->buf_index || sqe->off || sqe->splice_fd_in) return -EINVAL; if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; req->madvise.addr...
0
256,402
static int bio_map_user_iov(struct request *rq, struct iov_iter *iter, gfp_t gfp_mask) { unsigned int max_sectors = queue_max_hw_sectors(rq->q); struct bio *bio; int ret; int j; if (!iov_iter_count(iter)) return -EINVAL; bio = bio_kmalloc(gfp_mask, iov_iter_npages(iter, BIO_MAX_VECS)); if (!bio) return -...
0
366,219
static void *copy_mount_options(const void __user * data) { char *copy; unsigned left, offset; if (!data) return NULL; copy = kmalloc(PAGE_SIZE, GFP_KERNEL); if (!copy) return ERR_PTR(-ENOMEM); left = copy_from_user(copy, data, PAGE_SIZE); /* * Not all architectures have an exact copy_from_user(). Reso...
0
425,259
static Image *ReadMETAImage(const ImageInfo *image_info, ExceptionInfo *exception) { Image *buff, *image; MagickBooleanType status; StringInfo *profile; size_t length; void *blob; /* Open file containing binary metadata */ assert(image_info != (const ImageInfo *) NULL)...
0
508,855
void LEX::restore_backup_query_tables_list(Query_tables_list *backup) { this->destroy_query_tables_list(); this->set_query_tables_list(backup); }
0
263,301
void test_urldecode(const char *v1, const char *v2) { char *v = strdup(v1); _q_urldecode(v); ASSERT_EQUAL_STR(v, v2); free(v); }
0
313,859
v_swap_corners(int cmdchar) { pos_T old_cursor; colnr_T left, right; if (cmdchar == 'O' && VIsual_mode == Ctrl_V) { old_cursor = curwin->w_cursor; getvcols(curwin, &old_cursor, &VIsual, &left, &right); curwin->w_cursor.lnum = VIsual.lnum; coladvance(left); VIsual = curwin->w_cursor; curwin->w_cu...
0
413,692
R_API RAnalOp* r_core_anal_op(RCore *core, ut64 addr, int mask) { int len; ut8 buf[32]; ut8 *ptr; r_return_val_if_fail (core, NULL); if (addr == UT64_MAX) { return NULL; } RAnalOp *op = R_NEW0 (RAnalOp); if (!op) { return NULL; } int delta = (addr - core->offset); int minopsz = 8; if (delta > 0 && delt...
0
462,099
static MagickBooleanType WriteGIFImage(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { int c; ImageInfo *write_info; MagickBooleanType status; MagickOffsetType scene; RectangleInfo page; register ssize_t i; register unsigned char *q; size_t ...
0
411,907
router_add_exit_policy(routerinfo_t *router, directory_token_t *tok) { addr_policy_t *newe; newe = router_parse_addr_policy(tok); if (!newe) return -1; if (! router->exit_policy) router->exit_policy = smartlist_create(); if (((tok->tp == K_ACCEPT6 || tok->tp == K_REJECT6) && tor_addr_family(&n...
0
246,748
static u32 parse_meta_args(char *opts, MetaActionType act_type) { MetaAction *meta; metas = gf_realloc(metas, sizeof(MetaAction) * (nb_meta_act + 1)); if (!metas) return 2; meta = &metas[nb_meta_act]; nb_meta_act ++; memset(meta, 0, sizeof(MetaAction)); meta->act_type = act_type; meta->trackID = 0; meta->roo...
0
462,570
void controller::write_item(std::shared_ptr<rss_item> item, std::ostream& ostr) { std::vector<std::pair<LineType, std::string>> lines; std::vector<linkpair> links; // not used std::string title(_("Title: ")); title.append(item->title()); lines.push_back(std::make_pair(LineType::wrappable, title)); std::string a...
0
281,122
static int flow_to_policy_dir(int dir) { if (XFRM_POLICY_IN == FLOW_DIR_IN && XFRM_POLICY_OUT == FLOW_DIR_OUT && XFRM_POLICY_FWD == FLOW_DIR_FWD) return dir; switch (dir) { default: case FLOW_DIR_IN: return XFRM_POLICY_IN; case FLOW_DIR_OUT: return XFRM_POLICY_OUT; case FLOW_DIR_FWD: return XFR...
0
310,308
new_cached_dir(char *s, time_t published) { cached_dir_t *d = tor_malloc_zero(sizeof(cached_dir_t)); d->refcnt = 1; d->dir = s; d->dir_len = strlen(s); d->published = published; if (tor_gzip_compress(&(d->dir_z), &(d->dir_z_len), d->dir, d->dir_len, ZLIB_METHOD)) { log_warn(LD_BU...
0
484,799
static int netfront_tx_slot_available(struct netfront_queue *queue) { return (queue->tx.req_prod_pvt - queue->tx.rsp_cons) < (NET_TX_RING_SIZE - XEN_NETIF_NR_SLOTS_MIN - 1); }
0
208,680
R_API void r_core_anal_esil(RCore *core, const char *str, const char *target) { bool cfg_anal_strings = r_config_get_i (core->config, "anal.strings"); bool emu_lazy = r_config_get_i (core->config, "emu.lazy"); bool gp_fixed = r_config_get_i (core->config, "anal.gpfixed"); RAnalEsil *ESIL = core->anal->esil; ut64 r...
1
459,522
BPF_CALL_3(bpf_get_stackid_pe, struct bpf_perf_event_data_kern *, ctx, struct bpf_map *, map, u64, flags) { struct perf_event *event = ctx->event; struct perf_callchain_entry *trace; bool kernel, user; __u64 nr_kernel; int ret; /* perf_sample_data doesn't have callchain, use bpf_get_stackid */ if (!(event->...
0
336,126
static int __init ip6gre_init(void) { int err; pr_info("GRE over IPv6 tunneling driver\n"); err = register_pernet_device(&ip6gre_net_ops); if (err < 0) return err; err = inet6_add_protocol(&ip6gre_protocol, IPPROTO_GRE); if (err < 0) { pr_info("%s: can't add protocol\n", __func__); goto add_proto_failed;...
0
508,774
bool init_read_record_idx(READ_RECORD *info, THD *thd, TABLE *table, bool print_error, uint idx, bool reverse) { int error= 0; DBUG_ENTER("init_read_record_idx"); empty_record(table); bzero((char*) info,sizeof(*info)); info->thd= thd; info->table= table; info->record= table->rec...
0
195,334
GF_Err iloc_box_read(GF_Box *s, GF_BitStream *bs) { u32 item_count, extent_count, i, j; GF_ItemLocationBox *ptr = (GF_ItemLocationBox *)s; ISOM_DECREASE_SIZE(ptr, 2) ptr->offset_size = gf_bs_read_int(bs, 4); ptr->length_size = gf_bs_read_int(bs, 4); ptr->base_offset_size = gf_bs_read_int(bs, 4); if (ptr->versio...
1
221,075
OpTypeConstructor UnaryGeneric(FullTypeId t) { return [t](OpDef* op_def) { FullTypeDef* tdef = op_def->mutable_output_arg(0)->mutable_experimental_full_type(); tdef->set_type_id(t); FullTypeDef* arg = tdef->add_args(); arg->set_type_id(TFT_ANY); return Status::OK(); }; }
0
206,025
gpg_ctx_add_recipient (struct _GpgCtx *gpg, const gchar *keyid) { if (gpg->mode != GPG_CTX_MODE_ENCRYPT && gpg->mode != GPG_CTX_MODE_EXPORT) return; if (!gpg->recipients) gpg->recipients = g_ptr_array_new (); g_ptr_array_add (gpg->recipients, g_strdup (keyid)); }
1
337,814
int sctp_verify_init(struct net *net, const struct sctp_endpoint *ep, const struct sctp_association *asoc, enum sctp_cid cid, struct sctp_init_chunk *peer_init, struct sctp_chunk *chunk, struct sctp_chunk **errp) { union sctp_params param; bool has_cookie = false; int result; /* Check for miss...
0
244,253
GF_Err lsr1_box_size(GF_Box *s) { u32 pos=0; GF_LASeRSampleEntryBox *ptr = (GF_LASeRSampleEntryBox *)s; s->size += 8; gf_isom_check_position(s, (GF_Box *)ptr->lsr_config, &pos); return GF_OK; }
0
90,856
void GetLRUOrigin(StorageType type) { lru_origin_ = GURL(); quota_manager_->GetLRUOrigin(type, callback_factory_.NewCallback(&QuotaManagerTest::DidGetLRUOrigin)); }
0
175,784
const QuotaTableEntries& quota_entries() const { return quota_entries_; }
0
313,780
normal_search( cmdarg_T *cap, int dir, char_u *pat, int opt, // extra flags for do_search() int *wrapped) { int i; searchit_arg_T sia; #ifdef FEAT_SEARCH_EXTRA pos_T prev_cursor = curwin->w_cursor; #endif cap->oap->motion_type = MCHAR; cap->oap->inclusive = FALSE; cap->...
0
359,269
DEFUN (no_router_bgp, no_router_bgp_cmd, "no router bgp <1-65535>", NO_STR ROUTER_STR BGP_STR AS_STR) { as_t as; struct bgp *bgp; const char *name = NULL; VTY_GET_INTEGER_RANGE ("AS", as, argv[0], 1, 65535); if (argc == 2) name = argv[1]; /* Lookup bgp struct...
0
248,314
DLLIMPORT const char *cfg_opt_getstr(cfg_opt_t *opt) { return cfg_opt_getnstr(opt, 0); }
0
349,278
static void squashfs_stat(char *source) { time_t mkfs_time = (time_t) sBlk.s.mkfs_time; struct tm *t = use_localtime ? localtime(&mkfs_time) : gmtime(&mkfs_time); char *mkfs_str = asctime(t); long long xattr_ids = read_xattr_ids(); if(xattr_ids == -1) EXIT_UNSQUASH("File system corruption detected\n"); p...
0
225,087
Status CheckOpDeprecation(const OpDef& op_def, int graph_def_version) { if (op_def.has_deprecation()) { const OpDeprecation& dep = op_def.deprecation(); if (graph_def_version >= dep.version()) { return errors::Unimplemented( "Op ", op_def.name(), " is not available in GraphDef version ", ...
0
289,266
static int _snd_pcm_hw_param_setinteger(struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var) { int changed; changed = snd_interval_setinteger(hw_param_interval(params, var)); if (changed > 0) { params->cmask |= 1 << var; params->rmask |= 1 << var; } return changed; }
0
294,655
dt_lite_jisx0301(int argc, VALUE *argv, VALUE self) { long n = 0; rb_check_arity(argc, 0, 1); if (argc >= 1) n = NUM2LONG(argv[0]); return rb_str_append(d_lite_jisx0301(self), iso8601_timediv(self, n)); }
0
232,319
static GF_Err gf_isom_full_box_read(GF_Box *ptr, GF_BitStream *bs) { if (ptr->registry->max_version_plus_one) { GF_FullBox *self = (GF_FullBox *) ptr; ISOM_DECREASE_SIZE(ptr, 4) self->version = gf_bs_read_u8(bs); self->flags = gf_bs_read_u24(bs); } return GF_OK;
0
369,109
static int io_async_cancel_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; if (unlikely(req->flags & (REQ_F_FIXED_FILE | REQ_F_BUFFER_SELECT))) return -EINVAL; if (sqe->ioprio || sqe->off || sqe->len || sqe->cancel_flags || ...
0
216,126
kssl_keytab_is_available(KSSL_CTX *kssl_ctx) { krb5_context krb5context = NULL; krb5_keytab krb5keytab = NULL; krb5_keytab_entry entry; krb5_principal princ = NULL; krb5_error_code krb5rc = KRB5KRB_ERR_GENERIC; int rc = 0; if ((krb5rc = krb5_init_context(&kr...
1
293,550
PJ_DEF(void) pj_cis_add_alpha(pj_cis_t *cis) { pj_cis_add_range( cis, 'a', 'z'+1); pj_cis_add_range( cis, 'A', 'Z'+1); }
0
309,916
lookup_user_capability(const char *name) { struct user_table_entry const *result = 0; if (*name != 'k') { result = _nc_find_user_entry(name); } return result; }
0
231,015
BaseType_t xQueueRemoveFromSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) { BaseType_t xReturn; Queue_t * const pxQueueOrSemaphore = ( Queue_t * ) xQueueOrSemaphore; if( pxQueueOrSemaphore->pxQueueSetContainer != xQu...
0
234,199
init_dwarf_regnames_riscv (void) { dwarf_regnames = NULL; dwarf_regnames_count = 8192; dwarf_regnames_lookup_func = regname_internal_riscv; }
0
225,768
GF_Err mhap_box_write(GF_Box *s, GF_BitStream *bs) { u32 i; GF_Err e; GF_MHACompatibleProfilesBox *ptr = (GF_MHACompatibleProfilesBox *) s; e = gf_isom_box_write_header(s, bs); if (e) return e; gf_bs_write_u8(bs, ptr->num_profiles); for (i=0; i<ptr->num_profiles; i++) { gf_bs_write_u8(bs, ptr->compat_profile...
0
259,715
static json_t * check_attestation_android_safetynet(json_t * j_params, cbor_item_t * auth_data, cbor_item_t * att_stmt, const unsigned char * client_data) { json_t * j_error = json_array(), * j_return; unsigned char pubkey_export[1024] = {0}, cert_export[32] = {0}, cert_export_b64[64], client_data_hash[32], * nonce...
0
318,973
test_gui_tabmenu_event(dict_T *args UNUSED) { # ifdef FEAT_GUI_TABLINE int tabnr; int item; if (dict_find(args, (char_u *)"tabnr", -1) == NULL || dict_find(args, (char_u *)"item", -1) == NULL) return FALSE; tabnr = (int)dict_get_number(args, (char_u *)"tabnr"); item = (int)dict_get_number(a...
0
139,231
bool OverlayWindowViews::IsActive() const { return views::Widget::IsActive(); }
0
234,153
process_cu_tu_index (struct dwarf_section *section, int do_display) { unsigned char *phdr = section->start; unsigned char *limit = phdr + section->size; unsigned char *phash; unsigned char *pindex; unsigned char *ppool; unsigned int version; unsigned int ncols = 0; unsigned int nused; unsigned int nsl...
0
508,803
void LEX::free_arena_for_set_stmt() { DBUG_ENTER("LEX::free_arena_for_set_stmt"); if (!arena_for_set_stmt) return; DBUG_PRINT("info", ("mem_root: %p arena: %p", arena_for_set_stmt->mem_root, arena_for_set_stmt)); arena_for_set_stmt->free_items(); delete(arena_f...
0
220,857
inline int SubscriptToIndex(const NdArrayDesc<8>& desc, int indexes[8]) { return indexes[0] * desc.strides[0] + indexes[1] * desc.strides[1] + indexes[2] * desc.strides[2] + indexes[3] * desc.strides[3] + indexes[4] * desc.strides[4] + indexes[5] * desc.strides[5] + indexes[6] * desc.stride...
0
430,394
void ovs_match_init(struct sw_flow_match *match, struct sw_flow_key *key, bool reset_key, struct sw_flow_mask *mask) { memset(match, 0, sizeof(*match)); match->key = key; match->mask = mask; if (reset_key) memset(key, 0, sizeof(*key)); if (mask) { memset(&mask->key, 0, sizeof(mask->key)); ...
0
512,242
Item_cache_str(THD *thd, const Item *item): Item_cache(thd, item->type_handler()), value(0), is_varbinary(item->type() == FIELD_ITEM && Item_cache_str::field_type() == MYSQL_TYPE_VARCHAR && !((const Item_field *) item)->field->has_charset()) { collation.set(const_cast<D...
0
278,266
tabstop_set(char_u *var, int **array) { int valcount = 1; int t; char_u *cp; if (var[0] == NUL || (var[0] == '0' && var[1] == NUL)) { *array = NULL; return OK; } for (cp = var; *cp != NUL; ++cp) { if (cp == var || cp[-1] == ',') { char_u *end; if (strtol((char *...
0
282,871
int rsi_send_bgscan_probe_req(struct rsi_common *common, struct ieee80211_vif *vif) { struct cfg80211_scan_request *scan_req = common->hwscan; struct rsi_bgscan_probe *bgscan; struct sk_buff *skb; struct sk_buff *probereq_skb; u16 frame_len = sizeof(*bgscan); size_t ssid_len = 0; u8 *ssid = NULL; rsi_...
0
409,424
set_color_count(int nr) { char_u nr_colors[20]; // string for number of colors t_colors = nr; if (t_colors > 1) sprintf((char *)nr_colors, "%d", t_colors); else *nr_colors = NUL; set_string_option_direct((char_u *)"t_Co", -1, nr_colors, OPT_FREE, 0); }
0
474,452
ObjectGetNameAlg( OBJECT *object // IN: handle of the object ) { return object->publicArea.nameAlg; }
0
231,533
send_fd (const int sock, const int fd) { struct msghdr msg = {0}; union { struct cmsghdr hdr; char buf[CMSG_SPACE (sizeof (int))]; } cmsgbuf = {0}; struct cmsghdr *cmsg; struct iovec vec; char ch = 'A'; ssize_t n; msg.msg_control = &cmsgbuf.buf; msg.msg_controllen = sizeof (cmsgbuf....
0
275,972
int uECC_sign(const uint8_t *private_key, const uint8_t *message_hash, unsigned hash_size, uint8_t *signature, uECC_Curve curve) { uECC_word_t k[uECC_MAX_WORDS]; uECC_word_t tries; for (tries = 0; tries < uECC_RNG_MAX_TRIES; ++tries) { if (!uE...
0
273,874
static void handle_NLST(ctrl_t *ctrl, char *arg) { list(ctrl, arg, 1); }
0
512,788
longlong val_int() { return longlong_from_hex_hybrid(str_value.ptr(), str_value.length()); }
0
349,901
static int hw_atl_utils_soft_reset_rbl(struct aq_hw_s *self) { u32 gsr, val, rbl_status; int k; aq_hw_write_reg(self, 0x404, 0x40e1); aq_hw_write_reg(self, 0x3a0, 0x1); aq_hw_write_reg(self, 0x32a8, 0x0); /* Alter RBL status */ aq_hw_write_reg(self, 0x388, 0xDEAD); /* Cleanup SPI */ val = aq_hw_read_reg(sel...
0
312,540
get_mef_name(void) { char_u *p; char_u *name; static int start = -1; static int off = 0; #ifdef HAVE_LSTAT stat_T sb; #endif if (*p_mef == NUL) { name = vim_tempname('e', FALSE); if (name == NULL) emsg(_(e_cant_get_temp_file_name)); return name; } for (p = p_mef; *p; ++p) ...
0
238,531
static void scalar32_min_max_sub(struct bpf_reg_state *dst_reg, struct bpf_reg_state *src_reg) { s32 smin_val = src_reg->s32_min_value; s32 smax_val = src_reg->s32_max_value; u32 umin_val = src_reg->u32_min_value; u32 umax_val = src_reg->u32_max_value; if (signed_sub32_overflows(dst_reg->s32_min_value, smax_...
0
261,958
njs_string_base64(njs_vm_t *vm, njs_value_t *value, const njs_str_t *src) { size_t length; njs_str_t dst; length = njs_encode_base64_length(src, &dst.length); if (njs_slow_path(dst.length == 0)) { vm->retval = njs_string_empty; return NJS_OK; } dst.start = njs_string_allo...
0
393,479
static SQInteger base_setroottable(HSQUIRRELVM v) { SQObjectPtr o = v->_roottable; if(SQ_FAILED(sq_setroottable(v))) return SQ_ERROR; v->Push(o); return 1; }
0
294,665
date_s_test_all(VALUE klass) { if (date_s_test_civil(klass) == Qfalse) return Qfalse; if (date_s_test_ordinal(klass) == Qfalse) return Qfalse; if (date_s_test_commercial(klass) == Qfalse) return Qfalse; if (date_s_test_weeknum(klass) == Qfalse) return Qfalse; if (date_s_test_nth_kday(klass) == Q...
0
418,794
ins_mousescroll(int dir) { pos_T tpos; win_T *old_curwin = curwin, *wp; int did_scroll = FALSE; tpos = curwin->w_cursor; if (mouse_row >= 0 && mouse_col >= 0) { int row, col; row = mouse_row; col = mouse_col; // find the window at the pointer coordinates wp = mouse_find_win(&row, &col,...
0
273,411
Tensor UnalignedSlice(const Tensor& t, int pos) const { Tensor res; // CHECK should never fail here, since the number of elements must match CHECK(res.CopyFrom(t.Slice(pos, pos + 1), {t.dim_size(1), t.dim_size(2)})); return res; }
0
359,287
zebra_route_char(u_int zroute) { return zroute_lookup(zroute)->chr; }
0
291,770
static void rtrs_clt_rdma_done(struct ib_cq *cq, struct ib_wc *wc) { struct rtrs_clt_con *con = to_clt_con(wc->qp->qp_context); struct rtrs_clt_path *clt_path = to_clt_path(con->c.path); u32 imm_type, imm_payload; bool w_inval = false; int err; if (wc->status != IB_WC_SUCCESS) { if (wc->status != IB_WC_WR_FLUS...
0
383,375
gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int a) { int i; if (im->trueColor) { return gdTrueColorAlpha (r, g, b, a); } for (i = 0; (i < (im->colorsTotal)); i++) { if (im->open[i]) { continue; } if ((im->red[i] == r) && (im->green[i] == g) && (im->blue[i] ...
0
221,481
add_exports (GPtrArray *env_array, const ExportData *exports, gsize n_exports) { int i; for (i = 0; i < n_exports; i++) { if (exports[i].val) g_ptr_array_add (env_array, g_strdup_printf ("%s=%s", exports[i].env, exports[i].val)); } }
0
294,494
valid_civil_p(VALUE y, int m, int d, double sg, VALUE *nth, int *ry, int *rm, int *rd, int *rjd, int *ns) { double style = guess_style(y, sg); int r; if (style == 0) { int jd; r = c_valid_civil_p(FIX2INT(y), m, d, sg, rm, rd, &jd, ns); if (!r) return 0; decode_jd(INT2FIX(jd),...
0
301,431
static ssize_t vfswrap_fgetxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size) { return fgetxattr(fsp->fh->fd, name, value, size); }
0
486,832
static void gem_reset(DeviceState *d) { int i; CadenceGEMState *s = CADENCE_GEM(d); const uint8_t *a; uint32_t queues_mask = 0; DB_PRINT("\n"); /* Set post reset register values */ memset(&s->regs[0], 0, sizeof(s->regs)); s->regs[GEM_NWCFG] = 0x00080000; s->regs[GEM_NWSTATUS] = 0x0...
0
221,654
bool Socket::readyForOutput() { //if (!isssl) { return BaseSocket::readyForOutput(); //} //cant do this on a blocking ssl socket as far as i can work out //return true; }
0
317,225
static int smack_watch_key(struct key *key) { struct smk_audit_info ad; struct smack_known *tkp = smk_of_current(); int rc; if (key == NULL) return -EINVAL; /* * If the key hasn't been initialized give it access so that * it may do so. */ if (key->security == NULL) return 0; /* * This should not occ...
0
197,262
void Compute(OpKernelContext* ctx) override { const Tensor& a = ctx->input(0); const Tensor& b = ctx->input(1); OP_REQUIRES(ctx, TensorShapeUtils::IsMatrix(a.shape()), errors::InvalidArgument("a is not a matrix")); OP_REQUIRES(ctx, TensorShapeUtils::IsMatrix(b.shape()), ...
1
369,240
static void io_req_complete_failed(struct io_kiocb *req, s32 res) { req_set_fail(req); io_req_complete_post(req, res, io_put_kbuf(req, IO_URING_F_UNLOCKED)); }
0
344,803
strcmp_maybe_null(const char *a, const char *b) { if ((a == NULL && b != NULL) || (a != NULL && b == NULL)) return 0; if (a != NULL && strcmp(a, b) != 0) return 0; return 1; }
0
345,215
int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list) { int err = 0, err1, i; struct uni_pagedir *p, *q; struct unipair *unilist, *plist; if (!ct) return 0; unilist = vmemdup_user(list, ct * sizeof(struct unipair)); if (IS_ERR(unilist)) return PTR_ERR(unilist); console_lock(); /...
0
448,912
int ZEXPORT inflate(strm, flush) z_streamp strm; int flush; { struct inflate_state FAR *state; z_const unsigned char FAR *next; /* next input */ unsigned char FAR *put; /* next output */ unsigned have, left; /* available input and output */ unsigned long hold; /* bit buffer */ ...
0
226,040
GF_Err fpar_box_size(GF_Box *s) { FilePartitionBox *ptr = (FilePartitionBox *)s; ptr->size += 13 + (ptr->version ? 8 : 4); if (ptr->scheme_specific_info) ptr->size += strlen(ptr->scheme_specific_info); ptr->size+= ptr->nb_entries * 6; return GF_OK;
0
458,920
find_start_comment(int ind_maxcomment) // XXX { pos_T *pos; char_u *line; char_u *p; int cur_maxcomment = ind_maxcomment; for (;;) { pos = findmatchlimit(NULL, '*', FM_BACKWARD, cur_maxcomment); if (pos == NULL) break; // Check if the comment start we found is inside a string. // If ...
0
432,152
createRandomCursorExecutor(const CollectionPtr& coll, const boost::intrusive_ptr<ExpressionContext>& expCtx, long long sampleSize, long long numRecords, boost::optional<BucketUnpacker> bucketUnpacker) { Opera...
0
486,806
static inline uint64_t tx_desc_get_buffer(CadenceGEMState *s, uint32_t *desc) { uint64_t ret = desc[0]; if (s->regs[GEM_DMACFG] & GEM_DMACFG_ADDR_64B) { ret |= (uint64_t)desc[2] << 32; } return ret; }
0
401,507
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; timer_base_lock_expiry(base); raw_spin_lock_irq(&base->lock); /* * timer_base::must_forward_clk must be cleared before running * timers so that any ti...
0
317,356
static int selinux_sctp_bind_connect(struct sock *sk, int optname, struct sockaddr *address, int addrlen) { int len, err = 0, walk_size = 0; void *addr_buf; struct sockaddr *addr; struct socket *sock; if (!selinux_policycap_extsockclass()) return 0; /* Process one or more addresses that may ...
0