idx int64 | func string | target int64 |
|---|---|---|
398,526 | static int abbrev_cmp(const void *a, const void *b) {
const RzBinDwarfAbbrevDecl *first = a;
const RzBinDwarfAbbrevDecl *second = b;
if (first->offset > second->offset) {
return 1;
} else if (first->offset < second->offset) {
return -1;
} else {
return 0;
}
} | 0 |
229,144 | static void flush_queued_data(VirtIOSerialPort *port)
{
assert(port);
if (!virtio_queue_ready(port->ovq)) {
return;
}
do_flush_queued_data(port, port->ovq, VIRTIO_DEVICE(port->vser));
} | 0 |
281,095 | static inline int xfrm_init_path(struct xfrm_dst *path, struct dst_entry *dst,
int nfheader_len)
{
const struct xfrm_policy_afinfo *afinfo =
xfrm_policy_get_afinfo(dst->ops->family);
int err;
if (!afinfo)
return -EINVAL;
err = afinfo->init_path(path, dst, nfheader_len);
rcu_read_unlock();
return err;... | 0 |
316,970 | static int selinux_inode_rename(struct inode *old_inode, struct dentry *old_dentry,
struct inode *new_inode, struct dentry *new_dentry)
{
return may_rename(old_inode, old_dentry, new_inode, new_dentry);
} | 0 |
517,422 | static void do_home_file(HttpResponse res) {
char buf[STRLEN];
boolean_t on = true;
boolean_t header = true;
for (Service_T s = servicelist_conf; s; s = s->next_conf) {
if (s->type != Service_File)
continue;
if (header) {
... | 0 |
442,577 | to_physical(const void *ptr)
{
return (uintptr_t) ptr;
} | 0 |
402,606 | daemonize(cms_context *cms_ctx, char *certdir, int do_fork)
{
int rc = 0;
context ctx = {
.backup_cms = cms_ctx,
.priority = do_fork ? LOG_PID
: LOG_PID|LOG_PERROR,
};
ctx.backup_cms = cms_ctx;
ctx.backup_cms->log_priv = &ctx;
ctx.sd = -1;
if (getuid() != 0) {
fprintf(stderr, "pesignd must be sta... | 0 |
437,001 | static void mcba_usb_process_can(struct mcba_priv *priv,
struct mcba_usb_msg_can *msg)
{
struct can_frame *cf;
struct sk_buff *skb;
struct net_device_stats *stats = &priv->netdev->stats;
u16 sid;
skb = alloc_can_skb(priv->netdev, &cf);
if (!skb)
return;
sid = get_unaligned_be16(&msg->sid);
if (sid & M... | 0 |
318,954 | f_test_null_blob(typval_T *argvars UNUSED, typval_T *rettv)
{
rettv->v_type = VAR_BLOB;
rettv->vval.v_blob = NULL;
} | 0 |
90,876 | const std::set<GURL>& modified_origins() const { return modified_origins_; }
| 0 |
427,194 | static void lastlistfield (FuncState *fs, ConsControl *cc) {
if (cc->tostore == 0) return;
if (hasmultret(cc->v.k)) {
luaK_setmultret(fs, &cc->v);
luaK_setlist(fs, cc->t->u.info, cc->na, LUA_MULTRET);
cc->na--; /* do not count last expression (unknown number of elements) */
}
else {
if (cc->v.k... | 0 |
225,493 | NodeDef* MutableGraphView::GetOrCreateIdentityConsumingSwitch(
const OutputPort& fanin) {
// We haven't found an existing node where we can anchor the control
// dependency: add a new identity node.
string identity_name = GeneratedNameForIdentityConsumingSwitch(fanin);
NodeDef* identity_node = GetNode(ident... | 0 |
385,913 | static int do_dentry_open(struct file *f,
int (*open)(struct inode *, struct file *),
const struct cred *cred)
{
static const struct file_operations empty_fops = {};
struct inode *inode;
int error;
f->f_mode = OPEN_FMODE(f->f_flags) | FMODE_LSEEK |
FMODE_PREAD | FMODE_PWRITE;
if (unlikely(f->f_flag... | 0 |
512,803 | void Item_func_case::reorder_args(uint start)
{
/*
Reorder args, to have at first the optional CASE expression, then all WHEN
expressions, then all THEN expressions. And the optional ELSE expression
at the end.
We reorder an even number of arguments, starting from start.
*/
uint count = (arg_coun... | 0 |
400,771 | void iov_iter_xarray(struct iov_iter *i, unsigned int direction,
struct xarray *xarray, loff_t start, size_t count)
{
BUG_ON(direction & ~1);
*i = (struct iov_iter) {
.iter_type = ITER_XARRAY,
.data_source = direction,
.xarray = xarray,
.xarray_start = start,
.count = count,
.iov_offset = 0
};
} | 0 |
254,752 | njs_typed_array_compare_u32(const void *a, const void *b, void *c)
{
uint32_t au, bu;
au = *(const uint32_t *) a;
bu = *(const uint32_t *) b;
return (au > bu) - (au < bu);
} | 0 |
248,322 | DLLIMPORT cfg_validate_callback_t cfg_set_validate_func(cfg_t *cfg, const char *name, cfg_validate_callback_t vf)
{
cfg_opt_t *opt;
cfg_validate_callback_t oldvf;
opt = cfg_getopt_array(cfg->opts, cfg->flags, name);
if (!opt)
return NULL;
oldvf = opt->validcb;
opt->validcb = vf;
return oldvf;
} | 0 |
459,521 | static void stack_map_free(struct bpf_map *map)
{
struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map);
bpf_map_area_free(smap->elems);
pcpu_freelist_destroy(&smap->freelist);
bpf_map_area_free(smap);
put_callchain_buffers();
} | 0 |
468,383 | g_socket_client_set_timeout (GSocketClient *client,
guint timeout)
{
if (client->priv->timeout == timeout)
return;
client->priv->timeout = timeout;
g_object_notify (G_OBJECT (client), "timeout");
} | 0 |
438,670 | static int rpmsg_recv_single(struct virtproc_info *vrp, struct device *dev,
struct rpmsg_hdr *msg, unsigned int len)
{
struct rpmsg_endpoint *ept;
struct scatterlist sg;
bool little_endian = virtio_is_little_endian(vrp->vdev);
unsigned int msg_len = __rpmsg16_to_cpu(little_endian, msg->len);
int err;
dev... | 0 |
359,643 | community_list_set_vty (struct vty *vty, int argc, const char **argv,
int style, int reject_all_digit_name)
{
int ret;
int direct;
char *str;
/* Check the list type. */
if (strncmp (argv[1], "p", 1) == 0)
direct = COMMUNITY_PERMIT;
else if (strncmp (argv[1], "d", 1) == 0)
d... | 0 |
238,443 | static void scalar_min_max_lsh(struct bpf_reg_state *dst_reg,
struct bpf_reg_state *src_reg)
{
u64 umax_val = src_reg->umax_value;
u64 umin_val = src_reg->umin_value;
/* scalar64 calc uses 32bit unshifted bounds so must be called first */
__scalar64_min_max_lsh(dst_reg, umin_val, umax_val);
__scalar32_m... | 0 |
502,707 | long SSL_CTX_set_timeout(SSL_CTX *s, long t)
{
long l;
if (s == NULL)
return (0);
l = s->session_timeout;
s->session_timeout = t;
return (l);
} | 0 |
477,974 | static void simplestring_init_str(simplestring* string) {
string->str = (char*)malloc(SIMPLESTRING_INCR);
if(string->str) {
string->str[0] = 0;
string->len = 0;
string->size = SIMPLESTRING_INCR;
}
else {
string->size = 0;
}
} | 0 |
386,534 | void DL_Dxf::writeDimStyleOverrides(DL_WriterA& dw,
const DL_DimensionData& data) {
if (version==DL_VERSION_2000) {
dw.dxfString(1001, "ACAD");
dw.dxfString(1000, "DSTYLE");
dw.dxfString(1002, "{");
if (data.type&128) {
// custom text positio... | 0 |
481,269 | static void mlx5_fpga_conn_sq_cqe(struct mlx5_fpga_conn *conn,
struct mlx5_cqe64 *cqe, u8 status)
{
struct mlx5_fpga_dma_buf *buf, *nextbuf;
unsigned long flags;
int ix;
spin_lock_irqsave(&conn->qp.sq.lock, flags);
ix = be16_to_cpu(cqe->wqe_counter) & (conn->qp.sq.size - 1);
buf = conn->qp.sq.bufs[ix];
c... | 0 |
241,367 | void ValidateInputMatrixShapes(
OpKernelContext* context,
const TensorShapes& input_matrix_shapes) const final {
Base::ValidateSquareSolver(context, input_matrix_shapes);
} | 0 |
197,015 | GF_Err SetupWriters(MovieWriter *mw, GF_List *writers, u8 interleaving)
{
u32 i, trackCount;
TrackWriter *writer;
GF_TrackBox *trak;
GF_ISOFile *movie = mw->movie;
mw->total_samples = mw->nb_done = 0;
if (!movie->moov) return GF_OK;
trackCount = gf_list_count(movie->moov->trackList);
for (i = 0; i < trackCoun... | 1 |
261,906 | njs_string_from_char_code(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
njs_index_t is_point)
{
double num;
u_char *p, *start, *end;
ssize_t len;
int32_t code;
uint32_t cp;
uint64_t length, size;
njs... | 0 |
391,629 | void dlpar_sysfs_exit(void)
{
sysfs_remove_group(dlpar_kobj, &dlpar_attr_group);
kobject_put(dlpar_kobj);
} | 0 |
238,571 | static int check_cond_jmp_op(struct bpf_verifier_env *env,
struct bpf_insn *insn, int *insn_idx)
{
struct bpf_verifier_state *this_branch = env->cur_state;
struct bpf_verifier_state *other_branch;
struct bpf_reg_state *regs = this_branch->frame[this_branch->curframe]->regs;
struct bpf_reg_state *dst_reg, *o... | 0 |
437,289 | compile_length_string_node(Node* node, regex_t* reg)
{
int rlen, r, len, prev_len, slen, ambig;
UChar *p, *prev;
StrNode* sn;
OnigEncoding enc = reg->enc;
sn = STR_(node);
if (sn->end <= sn->s)
return 0;
ambig = NODE_STRING_IS_AMBIG(node);
p = prev = sn->s;
prev_len = enclen(enc, p);
p += pre... | 0 |
225,999 | void ctts_box_del(GF_Box *s)
{
GF_CompositionOffsetBox *ptr = (GF_CompositionOffsetBox *)s;
if (ptr->entries) gf_free(ptr->entries);
gf_free(ptr);
} | 0 |
317,278 | static int smack_socket_bind(struct socket *sock, struct sockaddr *address,
int addrlen)
{
if (sock->sk != NULL && sock->sk->sk_family == PF_INET6) {
if (addrlen < SIN6_LEN_RFC2133 ||
address->sa_family != AF_INET6)
return -EINVAL;
smk_ipv6_port_label(sock, address);
}
return 0;
} | 0 |
223,420 | static unsigned int char_get_othercase_bit(compiler_common *common, PCRE2_SPTR cc)
{
/* Detects if the character and its othercase has only 1 bit difference. */
unsigned int c, oc, bit;
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
int n;
#endif
#ifdef SUPPORT_UNICODE
if (common->utf || common->ucp)
{
... | 0 |
226,082 | #ifndef GPAC_DISABLE_ISOM_WRITE
GF_Err dvvC_box_write(GF_Box *s, GF_BitStream *bs)
{
return dvcC_box_write(s, bs); | 0 |
225,069 | setKeepalivesIdle(PGconn *conn)
{
int idle;
if (conn->keepalives_idle == NULL)
return 1;
if (!parse_int_param(conn->keepalives_idle, &idle, conn,
"keepalives_idle"))
return 0;
if (idle < 0)
idle = 0;
#ifdef PG_TCP_KEEPALIVE_IDLE
if (setsockopt(conn->sock, IPPROTO_TCP, PG_TCP_KEEPALIVE_IDLE,
... | 0 |
234,238 | add_abbrev_attr (unsigned long attribute,
unsigned long form,
dwarf_signed_vma implicit_const,
abbrev_list * list)
{
abbrev_attr *attr;
attr = (abbrev_attr *) xmalloc (sizeof (*attr));
attr->attribute = attribute;
attr->form = form;
attr->implicit_const = implicit_const;
a... | 0 |
226,289 |
void sgpd_box_del(GF_Box *a)
{
GF_SampleGroupDescriptionBox *p = (GF_SampleGroupDescriptionBox *)a;
while (gf_list_count(p->group_descriptions)) {
void *ptr = gf_list_last(p->group_descriptions);
sgpd_del_entry(p->grouping_type, ptr);
gf_list_rem_last(p->group_descriptions);
}
gf_list_del(p->group_descriptio... | 0 |
242,613 | Status GetBuffer(OpKernelContext* ctx, const NodeDef& ndef, Buffer** buf) {
auto rm = ctx->resource_manager();
ContainerInfo cinfo;
// Lambda for creating the Staging Area
auto create_fn = [&ndef](Buffer** ret) -> Status {
int64_t capacity;
int64_t memory_limit;
TF_RETURN_IF_ERROR(GetNodeAttr(ndef,... | 0 |
413,587 | static RList *recurse(RCore *core, RAnalBlock *from, RAnalBlock *dest) {
recurse_bb (core, from->jump, dest);
recurse_bb (core, from->fail, dest);
/* same for all calls */
// TODO: RAnalBlock must contain a linked list of calls
return NULL;
} | 0 |
247,576 | TEST_P(SslSocketTest, GetUriWithUriSan) {
const std::string client_ctx_yaml = R"EOF(
common_tls_context:
tls_certificates:
certificate_chain:
filename: "{{ test_rundir }}/test/extensions/transport_sockets/tls/test_data/san_uri_cert.pem"
private_key:
filename: "{{ test_rundir }}/test/... | 0 |
314,509 | PJ_DEF(unsigned) pjmedia_sdp_media_remove_all_attr(pjmedia_sdp_media *m,
const char *name)
{
return pjmedia_sdp_attr_remove_all(&m->attr_count, m->attr, name);
} | 0 |
281,146 | static int xfrm_policy_flo_check(struct flow_cache_object *flo)
{
struct xfrm_policy *pol = container_of(flo, struct xfrm_policy, flo);
return !pol->walk.dead;
} | 0 |
281,158 | static struct hlist_head *policy_hash_direct(struct net *net,
const xfrm_address_t *daddr,
const xfrm_address_t *saddr,
unsigned short family, int dir)
{
unsigned int hmask = net->xfrm.policy_bydst[dir].hmask;
unsigned int hash;
u8 dbits;
u8 sbits;
__get_hash_thresh(net, family, dir,... | 0 |
281,156 | void xfrm_policy_unregister_afinfo(const struct xfrm_policy_afinfo *afinfo)
{
struct dst_ops *dst_ops = afinfo->dst_ops;
int i;
for (i = 0; i < ARRAY_SIZE(xfrm_policy_afinfo); i++) {
if (xfrm_policy_afinfo[i] != afinfo)
continue;
RCU_INIT_POINTER(xfrm_policy_afinfo[i], NULL);
break;
}
synchronize_rcu();... | 0 |
247,727 | const std::string& expectedPeerCertChain() const { return expected_peer_cert_chain_; } | 0 |
259,246 | static int mov_rewrite_dvd_sub_extradata(AVStream *st)
{
char buf[256] = {0};
uint8_t *src = st->codecpar->extradata;
int i, ret;
if (st->codecpar->extradata_size != 64)
return 0;
if (st->codecpar->width > 0 && st->codecpar->height > 0)
snprintf(buf, sizeof(buf), "size: %dx%d\n",
... | 0 |
234,197 | display_debug_types (struct dwarf_section *section, void *file)
{
return process_debug_info (section, file, section->abbrev_sec, false, true);
} | 0 |
404,732 | int close_fd_get_file(unsigned int fd, struct file **res)
{
struct files_struct *files = current->files;
int ret;
spin_lock(&files->file_lock);
ret = __close_fd_get_file(fd, res);
spin_unlock(&files->file_lock);
return ret;
} | 0 |
211,650 | dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
{
struct dev_data *dev = fd->private_data;
ssize_t value, length = len;
unsigned total;
u32 tag;
char *kbuf;
spin_lock_irq(&dev->lock);
if (dev->state > STATE_DEV_OPENED) {
value = ep0_write(fd, buf, len, ptr);
spin_unlock... | 1 |
226,400 |
void prhd_box_del(GF_Box *s)
{
gf_free(s); | 0 |
402,605 | do_shutdown(context *ctx, int nsockets, struct pollfd *pollfds)
{
unlink(SOCKPATH);
unlink(PIDFILE);
for (int i = 0; i < ctx->ntokennames; i++)
free(ctx->tokennames[i]);
if (ctx->tokennames)
free(ctx->tokennames);
ctx->backup_cms->log(ctx->backup_cms, ctx->priority|LOG_NOTICE,
"pesignd exiting (pid %d)", g... | 0 |
513,081 | virtual longlong val_time_packed(THD *thd)
{
return Time(thd, this, Time::Options_cmp(thd)).to_packed();
} | 0 |
283,752 | static void zynq_slcr_reset_init(Object *obj, ResetType type)
{
ZynqSLCRState *s = ZYNQ_SLCR(obj);
int i;
DB_PRINT("RESET\n");
s->regs[R_LOCKSTA] = 1;
/* 0x100 - 0x11C */
s->regs[R_ARM_PLL_CTRL] = 0x0001A008;
s->regs[R_DDR_PLL_CTRL] = 0x0001A008;
s->regs[R_IO_PLL_CTRL] = 0x0001A... | 0 |
317,169 | static struct inode_security_struct *inode_security(struct inode *inode)
{
__inode_security_revalidate(inode, NULL, true);
return selinux_inode(inode);
} | 0 |
308,205 | static int fastrpc_invoke_send(struct fastrpc_session_ctx *sctx,
struct fastrpc_invoke_ctx *ctx,
u32 kernel, uint32_t handle)
{
struct fastrpc_channel_ctx *cctx;
struct fastrpc_user *fl = ctx->fl;
struct fastrpc_msg *msg = &ctx->msg;
cctx = fl->cctx;
msg->pid = fl->tgid;
msg->tid = current->p... | 0 |
352,968 | UUIDValidate(
Syntax *syntax,
struct berval *in )
{
int i;
if( in->bv_len != 36 ) {
return LDAP_INVALID_SYNTAX;
}
for( i=0; i<36; i++ ) {
switch(i) {
case 8:
case 13:
case 18:
case 23:
if( in->bv_val[i] != '-' ) {
return LDAP_INVALID_SYNTAX;
}
break;
default:
if( !ASCII_HE... | 0 |
387,765 | Method* InstanceKlass::find_method(const Array<Method*>* methods,
const Symbol* name,
const Symbol* signature) {
return InstanceKlass::find_method_impl(methods,
name,
... | 0 |
466,171 | static int em_bsr(struct x86_emulate_ctxt *ctxt)
{
u8 zf;
__asm__ ("bsr %2, %0; setz %1"
: "=r"(ctxt->dst.val), "=q"(zf)
: "r"(ctxt->src.val));
ctxt->eflags &= ~X86_EFLAGS_ZF;
if (zf) {
ctxt->eflags |= X86_EFLAGS_ZF;
/* Disable writeback. */
ctxt->dst.type = OP_NONE;
}
return X86EMUL_CONTINUE;
} | 0 |
369,930 | static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int buflen)
{
int error = -EACCES;
struct inode *inode = dentry->d_inode;
struct path path;
/* Are we allowed to snoop on the tasks file descriptors? */
if (!proc_fd_access_allowed(inode))
goto out;
error = PROC_I(inode)->op.proc_get_l... | 0 |
359,603 | community_direct_str (int direct)
{
switch (direct)
{
case COMMUNITY_DENY:
return "deny";
case COMMUNITY_PERMIT:
return "permit";
default:
return "unknown";
}
} | 0 |
224,591 | Status MaxPool3DGradShape(shape_inference::InferenceContext* c) {
return UnchangedShapeWithRank(c, 5);
} | 0 |
463,126 | static char *get_token(struct parse_state *state, const char *extra)
{
char *token;
char *p;
token = tok_next(&state->tok);
if (!token) {
parse_error(state, "invalid annotation attributes");
return NULL;
}
/* check the token */
if (extra == NULL)
extra = "";
for... | 0 |
318,957 | assert_equalfile(typval_T *argvars)
{
char_u buf1[NUMBUFLEN];
char_u buf2[NUMBUFLEN];
int called_emsg_before = called_emsg;
char_u *fname1 = tv_get_string_buf_chk(&argvars[0], buf1);
char_u *fname2 = tv_get_string_buf_chk(&argvars[1], buf2);
garray_T ga;
FILE *fd1;
FILE *fd2;
char l... | 0 |
361,754 | static inline void em28xx_set_xclk_i2c_speed(struct em28xx *dev)
{
const struct em28xx_board *board = &em28xx_boards[dev->model];
u8 xclk = board->xclk, i2c_speed = board->i2c_speed;
/*
* Those are the default values for the majority of boards
* Use those values if not specified otherwise at boards entry
*/
... | 0 |
259,182 | static void mov_estimate_video_delay(MOVContext *c, AVStream* st)
{
MOVStreamContext *msc = st->priv_data;
FFStream *const sti = ffstream(st);
int ctts_ind = 0;
int ctts_sample = 0;
int64_t pts_buf[MAX_REORDER_DELAY + 1]; // Circular buffer to sort pts.
int buf_start = 0;
int j, r, num_swaps... | 0 |
248,323 | DLLIMPORT int cfg_free_value(cfg_opt_t *opt)
{
if (!opt) {
errno = EINVAL;
return CFG_FAIL;
}
if (opt->comment && !is_set(CFGF_RESET, opt->flags)) {
free(opt->comment);
opt->comment = NULL;
}
if (opt->values) {
unsigned int i;
for (i = 0; i < opt->nvalues; i++) {
if (opt->type == CFGT_STR) {
... | 0 |
254,001 | static void v4l2loopback_create_sysfs(struct video_device *vdev)
{
int res = 0;
#define V4L2_SYSFS_CREATE(x) res = device_create_file(&vdev->dev, &dev_attr_##x); if (res < 0) break
if (!vdev)
return;
do {
V4L2_SYSFS_CREATE(format);
V4L2_SYSFS_CREATE(buffers);
V4L2_SYSFS_CREATE(max_openers);
/* ... */
... | 0 |
225,402 | static void pix_format_set_size(struct v4l2_pix_format *f,
const struct v4l2l_format *fmt,
unsigned int width, unsigned int height)
{
f->width = width;
f->height = height;
if (fmt->flags & FORMAT_FLAGS_PLANAR) {
f->bytesperline = width; /* Y plane */
f->sizeimage = (width * height * fmt->depth) >> 3;
}... | 0 |
487,611 | asmlinkage long sys_getpriority(int which, int who)
{
struct task_struct *g, *p;
struct user_struct *user;
long niceval, retval = -ESRCH;
struct pid *pgrp;
if (which > 2 || which < 0)
return -EINVAL;
read_lock(&tasklist_lock);
switch (which) {
case PRIO_PROCESS:
if (who)
p = find_task_by_pid(who);
... | 0 |
356,719 | void Statement::Work_Bind(napi_env e, void* data) {
STATEMENT_INIT(Baton);
STATEMENT_MUTEX(mtx);
sqlite3_mutex_enter(mtx);
stmt->Bind(baton->parameters);
sqlite3_mutex_leave(mtx);
} | 0 |
226,048 | GF_Err hmhd_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_HintMediaHeaderBox *ptr = (GF_HintMediaHeaderBox *)s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u16(bs, ptr->maxPDUSize);
gf_bs_write_u16(bs, ptr->avgPDUSize);
gf_bs_write_u32(bs, ptr->maxBitrate);
gf_bs_write_u32(bs, ptr->... | 0 |
343,227 | int pureftpd_start(int argc, char *argv[], const char *home_directory_)
{
#ifndef NO_GETOPT_LONG
int option_index = 0;
#endif
int fodder;
int bypass_ipv6 = 0;
struct passwd *pw;
(void) home_directory_;
#ifdef NON_ROOT_FTP
home_directory = home_directory_;
#endif
client_init_reply_buf();
#i... | 0 |
484,712 | uint32_t mobi_buffer_get_varlen_dec(MOBIBuffer *buf, size_t *len) {
return _buffer_get_varlen(buf, len, -1);
} | 0 |
374,044 | static bool check_buffer(RBinFile *bf, RBuffer *b) {
ut8 buf[4];
r_buf_read_at (b, 0, buf, sizeof (buf));
return !memcmp (buf, "\x02\xff\x01\xff", 4);
} | 0 |
417,109 | void PlayerGeneric::setSampleShift(mp_sint32 shift)
{
sampleShift = shift;
if (mixer)
mixer->setSampleShift(shift);
} | 0 |
259,155 | static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
int i;
int64_t creation_time;
int version = avio_r8(pb); /* version */
avio_rb24(pb); /* flags */
if (version == 1) {
creation_time = avio_rb64(pb);
avio_rb64(pb);
} else {
creation_time = avio_rb32... | 0 |
482,472 | addBackwardRuleWithSingleCell(const FileInfo *file, widechar cell,
TranslationTableOffset ruleOffset, TranslationTableRule *rule,
TranslationTableHeader **table) {
/* direction = 1, rule->dotslen = 1 */
TranslationTableCharacter *dots;
if (rule->opcode == CTO_SwapCc || rule->opcode == CTO_Repeated)
return; /* ... | 0 |
437,337 | add_rel_addr(regex_t* reg, int addr)
{
RelAddrType ra = (RelAddrType )addr;
BB_ADD(reg, &ra, SIZE_RELADDR);
return 0;
} | 0 |
225,849 |
GF_Err txtc_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_TextConfigBox *ptr = (GF_TextConfigBox*)s;
if ((u32)ptr->size >= (u32)0xFFFFFFFF) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Invalid size %llu in txtc box\n", ptr->size));
return GF_ISOM_INVALID_FILE;
}
ptr->config = (char *)gf_malloc(sizeof(cha... | 0 |
508,332 | check_and_update_routine_version(THD *thd, Sroutine_hash_entry *rt,
sp_head *sp)
{
ulong spc_version= sp_cache_version();
/* sp is NULL if there is no such routine. */
ulong version= sp ? sp->sp_cache_version() : spc_version;
/*
If the version in the parse tree is stale,
... | 0 |
512,417 | void Item_cond::neg_arguments(THD *thd)
{
List_iterator<Item> li(list);
Item *item;
while ((item= li++)) /* Apply not transformation to the arguments */
{
Item *new_item= item->neg_transformer(thd);
if (!new_item)
{
if (!(new_item= new (thd->mem_root) Item_func_not(thd, item)))
return; /... | 0 |
508,860 | int my_wc_mb_utf8_with_escape(CHARSET_INFO *cs, my_wc_t escape, my_wc_t wc,
uchar *str, uchar *end)
{
DBUG_ASSERT(escape > 0);
if (str + 1 >= end)
return MY_CS_TOOSMALL2; // Not enough space, need at least two bytes.
*str= (uchar)escape;
int cnvres= my_charset_utf8_handler.wc_... | 0 |
359,478 | DEFUN (clear_ip_bgp_all,
clear_ip_bgp_all_cmd,
"clear ip bgp *",
CLEAR_STR
IP_STR
BGP_STR
"Clear all peers\n")
{
if (argc == 1)
return bgp_clear_vty (vty, argv[0], 0, 0, clear_all, BGP_CLEAR_SOFT_NONE, NULL);
return bgp_clear_vty (vty, NULL, 0, 0, clear_all, BGP_CL... | 0 |
310,094 | decode_xterm_1005(SCREEN *sp, MEVENT * eventp)
{
char kbuf[80];
size_t grabbed;
size_t limit = (sizeof(kbuf) - 1);
unsigned coords[2];
bool result;
coords[0] = 0;
coords[1] = 0;
# if USE_PTHREADS_EINTR
# if USE_WEAK_SYMBOLS
if ((pthread_self) && (pthread_kill) && (pthread_equal))
# e... | 0 |
398,530 | RZ_API ut64 rz_bin_dwarf_line_header_get_spec_op_advance_pc(const RzBinDwarfLineHeader *header, ut8 opcode) {
rz_return_val_if_fail(header, 0);
if (!header->line_range) {
// to dodge division by zero
return 0;
}
ut8 adj_opcode = rz_bin_dwarf_line_header_get_adj_opcode(header, opcode);
return (adj_opcode / head... | 0 |
195,019 | Status ConstantFolding::EvaluateOneFoldable(const NodeDef& node,
std::vector<NodeDef>* outputs,
bool* result_too_large) {
TensorVector inputs;
TensorVector output_tensors;
auto inputs_cleanup = gtl::MakeCleanup([&inputs, &outp... | 1 |
384,127 | raptor_xml_writer_indent(raptor_xml_writer *xml_writer)
{
int num_spaces;
if(!XML_WRITER_AUTO_INDENT(xml_writer)) {
if(xml_writer->pending_newline) {
raptor_iostream_write_byte('\n', xml_writer->iostr);
xml_writer->pending_newline = 0;
if(xml_writer->current_element)
xml_writer->curr... | 0 |
263,499 | void sco_exit(void)
{
bt_procfs_cleanup(&init_net, "sco");
debugfs_remove(sco_debugfs);
hci_unregister_cb(&sco_cb);
bt_sock_unregister(BTPROTO_SCO);
proto_unregister(&sco_proto);
} | 0 |
421,394 | static void parray(int d, js_Ast *list)
{
pc('[');
while (list) {
assert(list->type == AST_LIST);
pexpi(d, COMMA, list->a);
list = list->b;
if (list)
comma();
}
pc(']');
} | 0 |
338,214 | Name WasmBinaryBuilder::getExceptionTargetName(int32_t offset) {
BYN_TRACE("getExceptionTarget " << offset << std::endl);
// We always start parsing a function by creating a block label and pushing it
// in breakStack in getBlockOrSingleton, so if a 'delegate''s target is that
// block, it does not mean it targ... | 0 |
300,747 | static void __tipc_shutdown(struct socket *sock, int error)
{
struct sock *sk = sock->sk;
struct tipc_sock *tsk = tipc_sk(sk);
struct net *net = sock_net(sk);
long timeout = msecs_to_jiffies(CONN_TIMEOUT_DEFAULT);
u32 dnode = tsk_peer_node(tsk);
struct sk_buff *skb;
/* Avoid that hi-prio shutdown msgs bypass ms... | 0 |
432,261 | int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len,
int flags, CPUWatchpoint **watchpoint)
{
#if 0
CPUWatchpoint *wp;
/* forbid ranges which are empty or run off the end of the address space */
if (len == 0 || (addr + len - 1) < addr) {
error_report("tried to s... | 0 |
411,779 | handle_get_property (GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
const gchar *interface_name,
const gchar *property_name,
GError **er... | 0 |
248,766 | static char *sanitize_cookie_path(const char *cookie_path)
{
size_t len;
char *new_path = strdup(cookie_path);
if(!new_path)
return NULL;
/* some stupid site sends path attribute with '"'. */
len = strlen(new_path);
if(new_path[0] == '\"') {
memmove((void *)new_path, (const void *)(new_path + 1), l... | 0 |
349,870 | static int hw_atl_utils_mpi_set_speed(struct aq_hw_s *self, u32 speed)
{
u32 val = aq_hw_read_reg(self, HW_ATL_MPI_CONTROL_ADR);
val = val & ~HW_ATL_MPI_SPEED_MSK;
val |= speed << HW_ATL_MPI_SPEED_SHIFT;
aq_hw_write_reg(self, HW_ATL_MPI_CONTROL_ADR, val);
return 0;
} | 0 |
222,493 | string DebugString(gtl::ArraySlice<NodeDef> instantiated_func_nodes) {
std::vector<const NodeDef*> ptrs;
for (const NodeDef& n : instantiated_func_nodes) {
ptrs.push_back(&n);
}
return Print(ptrs);
} | 0 |
384,790 | vim_isIDc(int c)
{
return (c > 0 && c < 0x100 && (g_chartab[c] & CT_ID_CHAR));
} | 0 |
336,619 | static void reds_get_spice_ticket(RedLinkInfo *link)
{
red_stream_async_read(link->stream,
(uint8_t *)&link->tiTicketing.encrypted_ticket.encrypted_data,
link->tiTicketing.rsa_size, reds_handle_ticket, link);
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.