idx int64 | func string | target int64 |
|---|---|---|
353,160 | bool SplashOutputDev::tilingBitmapSrc(void *data, SplashColorPtr colorLine,
unsigned char *alphaLine) {
TilingSplashOutBitmap *imgData = (TilingSplashOutBitmap *)data;
if (imgData->y == imgData->bitmap->getHeight()) {
imgData->repeatY--;
if (imgData->repeatY == 0)
... | 0 |
225,498 | bool MutableGraphView::AddFaninInternal(NodeDef* node,
const OutputPort& fanin) {
int num_regular_fanins =
NumFanins(*node, /*include_controlling_nodes=*/false);
bool input_is_control = IsOutputPortControlling(fanin);
bool can_dedup_control_with_regular_input =
... | 0 |
255,787 | void Compute(OpKernelContext* ctx) override {
try {
const Tensor& input = ctx->input(kInputTensorIndex);
OP_REQUIRES(
ctx, input.dims() == 4,
errors::InvalidArgument("Current RequantizePerChannel operator"
"supports 4D tensors only."));
cons... | 0 |
383,340 | gdImageSetThickness (gdImagePtr im, int thickness)
{
im->thick = thickness;
} | 0 |
445,931 | fr_window_folder_tree_drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
guint info,
guint time,
gpointer user_data)
{
FrWindow *window = user_data;
GList *file_list;
char *uri;
GF... | 0 |
210,636 | static void mkiss_close(struct tty_struct *tty)
{
struct mkiss *ax;
write_lock_irq(&disc_data_lock);
ax = tty->disc_data;
tty->disc_data = NULL;
write_unlock_irq(&disc_data_lock);
if (!ax)
return;
/*
* We have now ensured that nobody can start using ap from now on, but
* we have to wait for all existing... | 1 |
401,493 | static ssize_t _extract_entropy(struct entropy_store *r, void *buf,
size_t nbytes, int fips)
{
ssize_t ret = 0, i;
__u8 tmp[EXTRACT_SIZE];
unsigned long flags;
while (nbytes) {
extract_buf(r, tmp);
if (fips) {
spin_lock_irqsave(&r->lock, flags);
if (!memcmp(tmp, r->last_data, EXTRACT_SIZE))
pani... | 0 |
226,194 | void elng_box_del(GF_Box *s)
{
GF_ExtendedLanguageBox *ptr = (GF_ExtendedLanguageBox *)s;
if (ptr == NULL) return;
if (ptr->extended_language) gf_free(ptr->extended_language);
gf_free(ptr);
} | 0 |
226,383 |
GF_Box *jp2h_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_J2KHeaderBox, GF_ISOM_BOX_TYPE_JP2H);
return (GF_Box *)tmp; | 0 |
477,975 | void simplestring_addn(simplestring* target, const char* source, size_t add_len) {
size_t newsize = target->size, incr = 0;
if(target && source) {
if(!target->str) {
simplestring_init_str(target);
}
if((SIZE_MAX - add_len) < target->len || (SIZE_MAX - add_len - 1) < target->len) {
... | 0 |
455,352 | operate_and_get_next (count, c)
int count, c;
{
int where;
/* Accept the current line. */
rl_newline (1, c);
/* Find the current line, and find the next line to use. */
where = rl_explicit_arg ? count : where_history ();
if (HISTORY_FULL () || (where >= history_length - 1) || rl_explicit_arg)
sa... | 0 |
333,037 | post2nfa(int *postfix, int *end, int nfa_calc_size)
{
int *p;
int mopen;
int mclose;
Frag_T *stack = NULL;
Frag_T *stackp = NULL;
Frag_T *stack_end = NULL;
Frag_T e1;
Frag_T e2;
Frag_T e;
nfa_state_T *s;
nfa_state_T *s1;
nfa_state_T *matchstate;
nfa_state_T *ret = ... | 0 |
332,390 | cursor_pos_info(dict_T *dict)
{
char_u *p;
char_u buf1[50];
char_u buf2[40];
linenr_T lnum;
varnumber_T byte_count = 0;
varnumber_T bom_count = 0;
varnumber_T byte_count_cursor = 0;
varnumber_T char_count = 0;
varnumber_T char_count_cursor = 0;
varnumber_T word_count = 0;
va... | 0 |
513,048 | static int cmp_row_type(Item* item1, Item* item2)
{
uint n= item1->cols();
if (item2->check_cols(n))
return 1;
for (uint i=0; i<n; i++)
{
if (item2->element_index(i)->check_cols(item1->element_index(i)->cols()) ||
(item1->element_index(i)->result_type() == ROW_RESULT &&
cmp_row_type(ite... | 0 |
240,296 | get_y_current(void)
{
return y_current;
} | 0 |
512,284 | bool Item_func_regexp_instr::fix_fields(THD *thd, Item **ref)
{
re.set_recursion_limit(thd);
return Item_int_func::fix_fields(thd, ref);
} | 0 |
294,418 | cmp_dd(VALUE self, VALUE other)
{
get_d2(self, other);
{
VALUE a_nth, b_nth,
a_sf, b_sf;
int a_jd, b_jd,
a_df, b_df;
m_canonicalize_jd(self, adat);
m_canonicalize_jd(other, bdat);
a_nth = m_nth(adat);
b_nth = m_nth(bdat);
if (f_eqeq_p(a_nth, b_nth)) {
a_jd = m_jd(adat);
b_jd = m_jd(... | 0 |
175,778 | CallbackList& unlimited_callbacks() { return unlimited_callbacks_; }
| 0 |
226,074 | #ifndef GPAC_DISABLE_ISOM_WRITE
GF_Err sbgp_box_write(GF_Box *s, GF_BitStream *bs)
{
u32 i;
GF_Err e;
GF_SampleGroupBox *p = (GF_SampleGroupBox*)s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u32(bs, p->grouping_type);
if (p->version==1)
gf_bs_write_u32(bs, p->grouping_type_parameter);
g... | 0 |
369,226 |
static __cold bool io_uring_try_cancel_iowq(struct io_ring_ctx *ctx)
{
struct io_tctx_node *node;
enum io_wq_cancel cret;
bool ret = false;
mutex_lock(&ctx->uring_lock);
list_for_each_entry(node, &ctx->tctx_list, ctx_node) {
struct io_uring_task *tctx = node->task->io_uring;
/*
* io_wq will stay alive wh... | 0 |
238,549 | static bool type_is_rdonly_mem(u32 type)
{
return type & MEM_RDONLY;
} | 0 |
391,668 | bool is_deferred_open_async(const void *ptr)
{
const struct deferred_open_record *state = (const struct deferred_open_record *)ptr;
return state->async_open;
} | 0 |
445,965 | fr_window_history_add (FrWindow *window,
const char *path)
{
if ((window->priv->history_current == NULL) || (g_strcmp0 (path, window->priv->history_current->data) != 0)) {
GList *scan;
GList *new_current = NULL;
/* search the path in the history */
for (scan = window->pr... | 0 |
312,479 | free_efm_list(efm_T **efm_first)
{
efm_T *efm_ptr;
for (efm_ptr = *efm_first; efm_ptr != NULL; efm_ptr = *efm_first)
{
*efm_first = efm_ptr->next;
vim_regfree(efm_ptr->prog);
vim_free(efm_ptr);
}
fmt_start = NULL;
} | 0 |
430,358 | seq_hlist_start_percpu(struct hlist_head __percpu *head, int *cpu, loff_t pos)
{
struct hlist_node *node;
for_each_possible_cpu(*cpu) {
hlist_for_each(node, per_cpu_ptr(head, *cpu)) {
if (pos-- == 0)
return node;
}
}
return NULL;
} | 0 |
389,722 | check_for_opt_dict_arg(typval_T *args, int idx)
{
return (args[idx].v_type == VAR_UNKNOWN
|| check_for_dict_arg(args, idx) != FAIL);
} | 0 |
246,464 | const char *r_bin_wasm_get_function_name(RBinWasmObj *bin, ut32 idx) {
if (!(bin && bin->g_names)) {
return NULL;
};
RListIter *iter;
RBinWasmCustomNameEntry *nam;
r_list_foreach (bin->g_names, iter, nam) {
if (nam->type == R_BIN_WASM_NAMETYPE_Function) {
const char *n = r_id_storage_get (nam->func->names,... | 0 |
521,472 | bool writeDirectoryEntry (OutputStream& target)
{
target.writeInt (0x02014b50);
target.writeShort (symbolicLink ? 0x0314 : 0x0014);
writeFlagsAndSizes (target);
target.writeShort (0); // comment length
target.writeShort (0); // start disk num
target.writeSh... | 0 |
232,961 | void Curl_unencode_cleanup(struct Curl_easy *data)
{
(void) data;
} | 0 |
343,308 | void setprocessname(const char * const title)
{
#ifndef NO_PROCNAME_CHANGE
# ifdef HAVE_SETPROCTITLE
setproctitle("-%s", title);
# elif defined(__linux__)
if (argv0 != NULL && argv_lth > strlen(title) - 2) {
memset(argv0[0], 0, argv_lth);
strncpy(argv0[0], title, argv_lth - 2);
argv0[1] ... | 0 |
316,973 | static int selinux_inode_copy_up_xattr(const char *name)
{
/* The copy_up hook above sets the initial context on an inode, but we
* don't then want to overwrite it by blindly copying all the lower
* xattrs up. Instead, we have to filter out SELinux-related xattrs.
*/
if (strcmp(name, XATTR_NAME_SELINUX) == 0)
... | 0 |
359,654 | DEFUN (no_bgp_fast_external_failover,
no_bgp_fast_external_failover_cmd,
"no bgp fast-external-failover",
NO_STR
BGP_STR
"Immediately reset session if a link to a directly connected external peer goes down\n")
{
struct bgp *bgp;
bgp = vty->index;
bgp_flag_set (bgp, BGP_FLAG_NO_... | 0 |
297,212 | static int exif_process_unicode(image_info_type *ImageInfo, xp_field_type *xp_field, int tag, char *szValuePtr, int ByteCount TSRMLS_DC)
{
xp_field->tag = tag;
xp_field->value = NULL;
/* XXX this will fail again if encoding_converter returns on error something different than SIZE_MAX */
if (zend_multibyte_encodin... | 0 |
498,623 | upsample (guchar *dest,
const guchar *src,
guint width,
guint bytes,
guint alpha)
{
guint x;
for (x = 0; x < width; x++)
{
dest[0] = ((src[1] << 1) & 0xf8);
dest[0] += (dest[0] >> 5);
dest[1] = ((src[0] & 0xe0) >> 2) + (... | 0 |
436,115 | static int io_openat2(struct io_kiocb *req, unsigned int issue_flags)
{
struct open_flags op;
struct file *file;
bool nonblock_set;
bool resolve_nonblock;
int ret;
ret = build_open_flags(&req->open.how, &op);
if (ret)
goto err;
nonblock_set = op.open_flag & O_NONBLOCK;
resolve_nonblock = req->open.how.resol... | 0 |
256,420 | PJ_DEF(void) pjmedia_rtcp_rx_rtcp( pjmedia_rtcp_session *sess,
const void *pkt,
pj_size_t size)
{
pj_uint8_t *p, *p_end;
p = (pj_uint8_t*)pkt;
p_end = p + size;
while (p < p_end) {
pjmedia_rtcp_common *common;
unsigned len;
if (p + sizeof(pjmedia_rtcp_common) > p_end) {
TRACE_((s... | 0 |
292,243 | set_default_modes (server *serv)
{
char modes[8];
modes[0] = '+';
modes[1] = '\0';
if (prefs.hex_irc_wallops)
strcat (modes, "w");
if (prefs.hex_irc_servernotice)
strcat (modes, "s");
if (prefs.hex_irc_invisible)
strcat (modes, "i");
if (prefs.hex_irc_hidehost)
strcat (modes, "x");
if (modes[1] != '\... | 0 |
244,152 | void svhd_box_del(GF_Box *s)
{
GF_SphericalVideoInfoBox *ptr = (GF_SphericalVideoInfoBox *)s;
if (ptr->string) gf_free(ptr->string);
gf_free(s);
} | 0 |
294,583 | h_trunc(VALUE h, VALUE *fr)
{
VALUE rh;
if (wholenum_p(h)) {
rh = to_integer(h);
*fr = INT2FIX(0);
}
else {
rh = f_idiv(h, INT2FIX(1));
*fr = f_mod(h, INT2FIX(1));
*fr = f_quo(*fr, INT2FIX(24));
}
return rh;
} | 0 |
404,702 | int __receive_fd(struct file *file, int __user *ufd, unsigned int o_flags)
{
int new_fd;
int error;
error = security_file_receive(file);
if (error)
return error;
new_fd = get_unused_fd_flags(o_flags);
if (new_fd < 0)
return new_fd;
if (ufd) {
error = put_user(new_fd, ufd);
if (error) {
put_unused_f... | 0 |
301,355 | static int vfswrap_setxattr(struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags)
{
return setxattr(path, name, value, size, flags);
} | 0 |
486,823 | static unsigned get_bit(const uint8_t *mac, unsigned bit)
{
unsigned byte;
byte = mac[bit / 8];
byte >>= (bit & 0x7);
byte &= 1;
return byte;
} | 0 |
220,398 | join_ary(mrb_state *mrb, mrb_value ary, mrb_value sep, mrb_value list)
{
mrb_int i;
mrb_value result, val, tmp;
/* check recursive */
for (i=0; i<RARRAY_LEN(list); i++) {
if (mrb_obj_equal(mrb, ary, RARRAY_PTR(list)[i])) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "recursive array join");
}
}
mrb_ary... | 0 |
387,859 | static int binary_search(const Array<Method*>* methods, const Symbol* name) {
int len = methods->length();
// methods are sorted, so do binary search
int l = 0;
int h = len - 1;
while (l <= h) {
int mid = (l + h) >> 1;
Method* m = methods->at(mid);
assert(m->is_method(), "must be method");
int... | 0 |
210,090 | cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
uint32_t offs, cdf_property_info_t **info, size_t *count, size_t *maxcount)
{
const cdf_section_header_t *shp;
cdf_section_header_t sh;
const uint8_t *p, *q, *e;
size_t i, o4, nelements, j, slen, left;
cdf_property_info_t *inp;
if (offs >... | 1 |
247,527 | TEST_P(SslSocketTest, FailedClientCertificateHashAndSpkiVerificationNoClientCertificate) {
envoy::config::listener::v3::Listener listener;
envoy::config::listener::v3::FilterChain* filter_chain = listener.add_filter_chains();
envoy::extensions::transport_sockets::tls::v3::DownstreamTlsContext tls_context;
envoy... | 0 |
221,137 | void ResetTextConfig(GF_TextConfig *desc)
{
GF_List *bck;
while (gf_list_count(desc->sample_descriptions)) {
GF_TextSampleDescriptor *sd = (GF_TextSampleDescriptor *)gf_list_get(desc->sample_descriptions, 0);
gf_list_rem(desc->sample_descriptions, 0);
gf_odf_del_tx3g(sd);
}
bck = desc->sample_descriptions;
m... | 0 |
369,325 |
static int io_register_rsrc_update(struct io_ring_ctx *ctx, void __user *arg,
unsigned size, unsigned type)
{
struct io_uring_rsrc_update2 up;
if (size != sizeof(up))
return -EINVAL;
if (copy_from_user(&up, arg, sizeof(up)))
return -EFAULT;
if (!up.nr || up.resv || up.resv2)
return -EINVAL;
return _... | 0 |
317,163 | static int smack_inode_notifysecctx(struct inode *inode, void *ctx, u32 ctxlen)
{
return smack_inode_setsecurity(inode, XATTR_SMACK_SUFFIX, ctx,
ctxlen, 0);
} | 0 |
359,567 | DEFUN (bgp_redistribute_ipv6_metric_rmap,
bgp_redistribute_ipv6_metric_rmap_cmd,
"redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD",
"Redistribute information from another routing protocol\n"
"Connected\n"
"Kernel routes\n"
"Open Shurtest ... | 0 |
238,647 | static bool stacksafe(struct bpf_verifier_env *env, struct bpf_func_state *old,
struct bpf_func_state *cur, struct bpf_id_pair *idmap)
{
int i, spi;
/* walk slots of the explored stack and ignore any additional
* slots in the current stack, since explored(safe) state
* didn't use them
*/
for (i = 0; i... | 0 |
387,590 | int snd_ctl_get_preferred_subdevice(struct snd_card *card, int type)
{
struct snd_ctl_file *kctl;
int subdevice = -1;
unsigned long flags;
read_lock_irqsave(&card->ctl_files_rwlock, flags);
list_for_each_entry(kctl, &card->ctl_files, list) {
if (kctl->pid == task_pid(current)) {
subdevice = kctl->preferred_s... | 0 |
313,137 | testCleanupImages(void)
{
VIR_FREE(qemuimg);
VIR_FREE(absraw);
VIR_FREE(absqcow2);
VIR_FREE(abswrap);
VIR_FREE(absqed);
VIR_FREE(absdir);
VIR_FREE(abslink2);
if (chdir(abs_builddir) < 0) {
fprintf(stderr, "unable to return to correct directory, refusing to "
"cle... | 0 |
401,535 | void add_timer(struct timer_list *timer)
{
BUG_ON(timer_pending(timer));
__mod_timer(timer, timer->expires, MOD_TIMER_NOTPENDING);
} | 0 |
401,552 | static void do_numa_crng_init(struct work_struct *work)
{
int i;
struct crng_state *crng;
struct crng_state **pool;
pool = kcalloc(nr_node_ids, sizeof(*pool), GFP_KERNEL|__GFP_NOFAIL);
for_each_online_node(i) {
crng = kmalloc_node(sizeof(struct crng_state),
GFP_KERNEL | __GFP_NOFAIL, i);
spin_lock_ini... | 0 |
343,217 | static void updatepidfile(void)
{
int fd;
char buf[42];
size_t buf_len;
if (SNCHECK(snprintf(buf, sizeof buf, "%lu\n",
(unsigned long) getpid()), sizeof buf)) {
return;
}
if (unlink(pid_file) != 0 && errno != ENOENT) {
return;
}
if ((fd = open(pi... | 0 |
226,029 |
void gitn_box_del(GF_Box *s)
{
u32 i;
GroupIdToNameBox *ptr = (GroupIdToNameBox *)s;
if (ptr == NULL) return;
if (ptr->entries) {
for (i=0; i<ptr->nb_entries; i++) {
if (ptr->entries[i].name) gf_free(ptr->entries[i].name);
}
gf_free(ptr->entries);
}
gf_free(ptr); | 0 |
294,588 | sec_to_ns(VALUE s)
{
if (safe_mul_p(s, SECOND_IN_NANOSECONDS))
return LONG2FIX(FIX2LONG(s) * SECOND_IN_NANOSECONDS);
return f_mul(s, INT2FIX(SECOND_IN_NANOSECONDS));
} | 0 |
226,081 | void edts_box_del(GF_Box *s)
{
gf_free(s);
} | 0 |
308,163 | static int fastrpc_dma_buf_attach(struct dma_buf *dmabuf,
struct dma_buf_attachment *attachment)
{
struct fastrpc_dma_buf_attachment *a;
struct fastrpc_buf *buffer = dmabuf->priv;
int ret;
a = kzalloc(sizeof(*a), GFP_KERNEL);
if (!a)
return -ENOMEM;
ret = dma_get_sgtable(buffer->dev, &a->sgt, buffer->vi... | 0 |
344,766 | sock_set_v6only(int s)
{
#if defined(IPV6_V6ONLY) && !defined(__OpenBSD__)
int on = 1;
debug3("%s: set socket %d IPV6_V6ONLY", __func__, s);
if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) == -1)
error("setsockopt IPV6_V6ONLY: %s", strerror(errno));
#endif
} | 0 |
417,131 | bool PlayerGeneric::getPowerOfTwoCompensationFlag() const
{
return compensateBufferFlag;
} | 0 |
369,274 |
static int io_ring_add_registered_fd(struct io_uring_task *tctx, int fd,
int start, int end)
{
struct file *file;
int offset;
for (offset = start; offset < end; offset++) {
offset = array_index_nospec(offset, IO_RINGFD_REG_MAX);
if (tctx->registered_rings[offset])
continue;
file = fget(fd);
if... | 0 |
445,997 | _remove_files_begin (SaveData *save_data,
gpointer user_data)
{
LoadData *load_data = LOAD_DATA (save_data);
RemoveData *remove_data = user_data;
fr_archive_progress_set_total_files (load_data->archive, remove_data->n_files_to_remove);
fr_archive_progress_set_total_bytes (load_data->archive,
FR_ARCHI... | 0 |
234,745 | void btrfs_free_device(struct btrfs_device *device)
{
WARN_ON(!list_empty(&device->post_commit_list));
rcu_string_free(device->name);
extent_io_tree_release(&device->alloc_state);
bio_put(device->flush_bio);
btrfs_destroy_dev_zone_info(device);
kfree(device);
} | 0 |
244,088 | GF_Box *chnl_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_ChannelLayoutBox, GF_ISOM_BOX_TYPE_CHNL);
return (GF_Box *)tmp;
} | 0 |
301,345 | static ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size)
{
return flistxattr(fsp->fh->fd, list, size);
} | 0 |
459,192 | int tcf_block_get_ext(struct tcf_block **p_block, struct Qdisc *q,
struct tcf_block_ext_info *ei,
struct netlink_ext_ack *extack)
{
struct net *net = qdisc_net(q);
struct tcf_block *block = NULL;
int err;
if (ei->block_index)
/* block_index not 0 means the shared block is requested */
block = t... | 0 |
264,684 | lexer_compare_identifier_to_chars (const uint8_t *left_p, /**< left identifier */
const uint8_t *right_p, /**< right identifier string */
size_t size) /**< byte size of the two identifiers */
{
uint8_t utf8_buf[6];
do
{
if (*left_p == *rig... | 0 |
343,281 | static int fortune(void)
{
int fd;
char *buf;
char *bufpnt;
char *bufend;
struct stat st;
off_t gl;
char *fortunepnt;
char fortune[2048];
if (fortunes_file == NULL || *fortunes_file == 0) {
return 0;
}
if ((fd = open(fortunes_file, O_RDONLY)) == -1) {
logfile... | 0 |
462,232 | PJ_DEF(pj_status_t) pj_stun_sockaddr_attr_create(pj_pool_t *pool,
int attr_type,
pj_bool_t xor_ed,
const pj_sockaddr_t *addr,
unsigned addr_len,
pj_stun_sockaddr_attr **p_attr)
{
pj_stun_sockaddr_attr *attr;
PJ_ASSERT_RETURN(pool && p_attr, PJ_EINVAL);
attr = PJ_POOL_ZALL... | 0 |
244,100 | GF_Err clap_box_size(GF_Box *s)
{
s->size += 32;
return GF_OK;
} | 0 |
211,110 | LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
{
static const char module[] = "LZWDecodeCompat";
LZWCodecState *sp = DecoderState(tif);
char *op = (char*) op0;
long occ = (long) occ0;
char *tp;
unsigned char *bp;
int code, nbits;
long nextbits, nextdata, nbitsmask;
code_t *codep, *free_entp, *... | 1 |
139,241 | void OverlayWindowViews::SetAlwaysHidePlayPauseButton(bool is_visible) {
always_hide_play_pause_button_ = !is_visible;
}
| 0 |
398,517 | static size_t parse_opcodes(const ut8 *obuf,
size_t len, const RzBinDwarfLineHeader *hdr, RzVector *ops_out,
RzBinDwarfSMRegisters *regs, RZ_NULLABLE RzBinSourceLineInfoBuilder *bob, RZ_NULLABLE RzBinDwarfDebugInfo *info,
RZ_NULLABLE RzBinDwarfLineFileCache fnc, bool big_endian, ut8 target_addr_size) {
const ut8 *b... | 0 |
462,308 | status_fonts_extended(stream * s, pcl_state_t * pcs,
pcl_data_storage_t storage)
{
return status_do_fonts(s, pcs, storage, true);
} | 0 |
229,287 | void cql_server::response::write_value(std::optional<query::result_bytes_view> value)
{
if (!value) {
write_int(-1);
return;
}
write_int(value->size_bytes());
using boost::range::for_each;
for_each(*value, [&] (bytes_view fragment) {
_body.write(fragment);
});
} | 0 |
317,216 | static int selinux_socket_create(int family, int type,
int protocol, int kern)
{
const struct task_security_struct *tsec = selinux_cred(current_cred());
u32 newsid;
u16 secclass;
int rc;
if (kern)
return 0;
secclass = socket_type_to_security_class(family, type, protocol);
rc = socket_sockcreate_sid(tsec... | 0 |
455,425 | xfs_inode_alloc(
struct xfs_mount *mp,
xfs_ino_t ino)
{
struct xfs_inode *ip;
/*
* if this didn't occur in transactions, we could use
* KM_MAYFAIL and return NULL here on ENOMEM. Set the
* code up to do this anyway.
*/
ip = kmem_zone_alloc(xfs_inode_zone, KM_SLEEP);
if (!ip)
return NULL;
if (inode_in... | 0 |
90,217 | virtual EthernetNetwork* ethernet_network() { return ethernet_; }
| 0 |
521,464 | ZipFile::Builder::Builder() {}
| 0 |
473,870 | utf16be_mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* fold,
OnigEncoding enc)
{
const UChar* p = *pp;
if (ONIGENC_IS_ASCII_CODE(*(p+1)) && *p == 0) {
p++;
#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
... | 0 |
318,106 | static int rsi_usb_host_intf_write_pkt(struct rsi_hw *adapter,
u8 *pkt,
u32 len)
{
u32 queueno = ((pkt[1] >> 4) & 0x7);
u8 endpoint;
endpoint = ((queueno == RSI_WIFI_MGMT_Q || queueno == RSI_WIFI_DATA_Q ||
queueno == RSI_COEX_Q) ? WLAN_EP : BT_EP);
return rsi_write_multiple(adapter,
... | 0 |
386,525 | void DL_Dxf::writeHatchEdge(DL_WriterA& dw,
const DL_HatchEdgeData& data) {
if (data.type<1 || data.type>4) {
printf("WARNING: unsupported hatch edge type: %d", data.type);
}
dw.dxfInt(72, data.type);
switch (data.type) {
// line:
case 1:
dw.dxfReal... | 0 |
244,165 | GF_Err fdsa_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_HintSample *ptr = (GF_HintSample *) s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
e = gf_isom_box_array_write(s, ptr->packetTable, bs);
if (e) return e;
if (ptr->extra_data) {
e = gf_isom_box_write((GF_... | 0 |
381,877 | int8_t udf_next_aext(struct inode *inode, struct extent_position *epos,
struct kernel_lb_addr *eloc, uint32_t *elen, int inc)
{
int8_t etype;
unsigned int indirections = 0;
while ((etype = udf_current_aext(inode, epos, eloc, elen, inc)) ==
(EXT_NEXT_EXTENT_ALLOCDESCS >> 30)) {
udf_pblk_t block;
... | 0 |
376,678 | load_image (const gchar *filename,
GError **error)
{
gchar *name;
gint fd;
BrushHeader bh;
guchar *brush_buf = NULL;
gint32 image_ID;
gint32 layer_ID;
GimpParasite *parasite;
GimpDrawable *drawable;
GimpPix... | 0 |
261,397 | void read_coding_quadtree(thread_context* tctx,
int x0, int y0,
int log2CbSize,
int ctDepth)
{
logtrace(LogSlice,"- read_coding_quadtree %d;%d cbsize:%d depth:%d POC:%d\n",x0,y0,1<<log2CbSize,ctDepth,tctx->img->PicOrderCntVal);
de265_ima... | 0 |
405,378 | xfrm_policy_inexact_alloc_chain(struct xfrm_pol_inexact_bin *bin,
struct xfrm_policy *policy, u8 dir)
{
struct xfrm_pol_inexact_node *n;
struct net *net;
net = xp_net(policy);
lockdep_assert_held(&net->xfrm.xfrm_policy_lock);
if (xfrm_policy_inexact_insert_use_any_list(policy))
return &bin->hhead;
if (xf... | 0 |
387,796 | Method* InstanceKlass::find_method(const Symbol* name,
const Symbol* signature) const {
return find_method_impl(name, signature, find_overpass, find_static, find_private);
} | 0 |
273,052 | uuid_make(char *str)
{
uuid_t uu;
uuid_generate_random(uu);
uuid_unparse_upper(uu, str);
} | 0 |
516,254 | static bool virtio_net_set_vnet_endian(VirtIODevice *vdev, NetClientState *ncs,
int queues, bool enable)
{
int i;
for (i = 0; i < queues; i++) {
if (virtio_net_set_vnet_endian_one(vdev, ncs[i].peer, enable) < 0 &&
enable) {
while (--i >= 0)... | 0 |
215,312 | asmlinkage long sys_setrlimit(unsigned int resource, struct rlimit __user *rlim)
{
struct rlimit new_rlim, *old_rlim;
unsigned long it_prof_secs;
int retval;
if (resource >= RLIM_NLIMITS)
return -EINVAL;
if (copy_from_user(&new_rlim, rlim, sizeof(*rlim)))
return -EFAULT;
if (new_rlim.rlim_cur > new_rlim.rlim... | 1 |
273,087 | safe_snreplace(char *s, size_t sz, const char *pattern, const char *replacement)
{
char *ptr;
char *src;
char *dst;
size_t num;
if (!s)
return -1;
if (!pattern || !replacement)
return 0;
size_t p_len = strlen(pattern);
size_t r_len = strlen(replacement);
size_t s_len = strlen(s) + 1; // Inc... | 0 |
522,354 | static void ScaWrd(GmfMshSct *msh, void *ptr)
{
#ifdef WITH_GMF_AIO
if(read(msh->FilDes, ptr, WrdSiz) != WrdSiz)
#else
if(fread(ptr, WrdSiz, 1, msh->hdl) != 1)
#endif
longjmp(msh->err, -26);
if(msh->cod != 1)
SwpWrd((char *)ptr, WrdSiz);
} | 0 |
502,713 | SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket)
{
SSL_SESSION *dest;
dest = OPENSSL_malloc(sizeof(*src));
if (dest == NULL) {
goto err;
}
memcpy(dest, src, sizeof(*dest));
#ifndef OPENSSL_NO_KRB5
dest->krb5_client_princ_len = dest->krb5_client_princ_len;
if (src->krb5_cl... | 0 |
317,021 | static int selinux_inode_permission(struct inode *inode, int mask)
{
const struct cred *cred = current_cred();
u32 perms;
bool from_access;
bool no_block = mask & MAY_NOT_BLOCK;
struct inode_security_struct *isec;
u32 sid;
struct av_decision avd;
int rc, rc2;
u32 audited, denied;
from_access = mask & MAY_ACC... | 0 |
307,848 | ciEnv::ciEnv(Arena* arena) : _ciEnv_arena(mtCompiler) {
ASSERT_IN_VM;
// Set up ciEnv::current immediately, for the sake of ciObjectFactory, etc.
CompilerThread* current_thread = CompilerThread::current();
assert(current_thread->env() == NULL, "must be");
current_thread->set_env(this);
assert(ciEnv::curren... | 0 |
259,171 | static int build_open_gop_key_points(AVStream *st)
{
int k;
int sample_id = 0;
uint32_t cra_index;
MOVStreamContext *sc = st->priv_data;
if (st->codecpar->codec_id != AV_CODEC_ID_HEVC || !sc->sync_group_count)
return 0;
/* Build an unrolled index of the samples */
sc->sample_offset... | 0 |
390,630 | ProcXkbListComponents(ClientPtr client)
{
DeviceIntPtr dev;
xkbListComponentsReply rep;
unsigned len;
int status;
unsigned char * str;
XkbSrvListInfoRec list;
REQUEST(xkbListComponentsReq);
REQUEST_AT_LEAST_SIZE(xkbListComponentsReq);
if (!(client->xkbClientFlags&_XkbClie... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.