idx int64 | func string | target int64 |
|---|---|---|
489,212 | static int hfsplus_fill_cat_thread(struct super_block *sb,
hfsplus_cat_entry *entry, int type,
u32 parentid, struct qstr *str)
{
entry->type = cpu_to_be16(type);
entry->thread.reserved = 0;
entry->thread.parentID = cpu_to_be32(parentid);
hfsplus_asc2uni(sb, &entry->thread.nodeName, str->name, str->len... | 0 |
270,382 | static int ok_inflater_decode_length(ok_inflater *inflater, int value) {
if (value < 8) {
return value + 3;
} else {
int len = OK_INFLATER_LENGTH_TABLE[value];
unsigned int extra_bits = (unsigned int)((value >> 2) - 1);
if (extra_bits <= 5) {
if (!ok_inflater_load_bit... | 0 |
445,934 | archive_add_ready_for_conversion_cb (GObject *source_object,
GAsyncResult *result,
gpointer user_data)
{
ConvertData *cdata = user_data;
FrWindow *window = cdata->window;
GError *error = NULL;
fr_archive_operation_finish (FR_ARCHIVE (source_object), result, &error);
_fr_window... | 0 |
224,224 | R_API void r_io_bank_drain(RIO *io, const ut32 bankid) {
r_return_if_fail (io);
RIOBank *bank = r_io_bank_get (io, bankid);
if (!bank) {
return;
}
bank->last_used = NULL;
RRBNode *node = r_crbtree_first_node (bank->submaps);
RRBNode *next = NULL;
while (node) {
next = r_rbnode_next (node);
if (next) {
... | 0 |
225,662 | GF_Box *ctts_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_CompositionOffsetBox, GF_ISOM_BOX_TYPE_CTTS);
return (GF_Box *) tmp;
} | 0 |
463,135 | static void annotation_get_pop3showafter(annotate_state_t *state,
struct annotate_entry_list *entry)
{
struct mailbox *mailbox = state->mailbox;
char valuebuf[RFC3501_DATETIME_MAX+1];
struct buf value = BUF_INITIALIZER;
assert(mailbox);
if (mailbox->i.pop3_... | 0 |
512,950 | bool is_string() const { return m_type == DYN_COL_STRING; } | 0 |
230,615 | void derive_temporal_luma_vector_prediction(base_context* ctx,
de265_image* img,
const slice_segment_header* shdr,
int xP,int yP,
int nPbW,int n... | 0 |
227,036 | IRC_PROTOCOL_CALLBACK(728)
{
struct t_irc_channel *ptr_channel;
struct t_gui_buffer *ptr_buffer;
struct t_irc_modelist *ptr_modelist;
time_t datetime;
const char *nick_address;
char str_number[64];
IRC_PROTOCOL_MIN_ARGS(6);
ptr_channel = irc_channel_search (server, argv[3]);
ptr_bu... | 0 |
448,559 | static int bgp_collision_detect(struct peer *new, struct in_addr remote_id)
{
struct peer *peer;
/*
* Upon receipt of an OPEN message, the local system must examine
* all of its connections that are in the OpenConfirm state. A BGP
* speaker may also examine connections in an OpenSent state if it
* knows the... | 0 |
317,063 | static int smack_ipc_permission(struct kern_ipc_perm *ipp, short flag)
{
struct smack_known **blob = smack_ipc(ipp);
struct smack_known *iskp = *blob;
int may = smack_flags_to_may(flag);
struct smk_audit_info ad;
int rc;
#ifdef CONFIG_AUDIT
smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_IPC);
ad.a.u.ipc_id = ipp->id... | 0 |
430,420 | static int validate_vlan_from_nlattrs(const struct sw_flow_match *match,
u64 key_attrs, bool inner,
const struct nlattr **a, bool log)
{
__be16 tci = 0;
if (!((key_attrs & (1 << OVS_KEY_ATTR_ETHERNET)) &&
(key_attrs & (1 << OVS_KEY_ATTR_ETHERTYPE)) &&
eth_type_vlan(nla_get_be16(a[O... | 0 |
442,794 | static void GetStr(char **string,
char *value)
{
if(*string)
free(*string);
if(value)
*string = strdup(value);
else
*string = NULL;
} | 0 |
437,007 | static int mcba_usb_start(struct mcba_priv *priv)
{
struct net_device *netdev = priv->netdev;
int err, i;
mcba_init_ctx(priv);
for (i = 0; i < MCBA_MAX_RX_URBS; i++) {
struct urb *urb = NULL;
u8 *buf;
dma_addr_t buf_dma;
/* create a URB, and a buffer for it */
urb = usb_alloc_urb(0, GFP_KERNEL);
if (... | 0 |
255,761 | add_if_prefix_matches(lookup_state_t *state,
const sorted_pattern_t *prefix,
const svn_stringbuf_t *segment)
{
node_t *node = prefix->node;
if ( node->segment.len <= segment->len
&& !memcmp(node->segment.data, segment->data, node->segment.len))
add_next_node(s... | 0 |
238,482 | struct btf *bpf_get_btf_vmlinux(void)
{
if (!btf_vmlinux && IS_ENABLED(CONFIG_DEBUG_INFO_BTF)) {
mutex_lock(&bpf_verifier_lock);
if (!btf_vmlinux)
btf_vmlinux = btf_parse_vmlinux();
mutex_unlock(&bpf_verifier_lock);
}
return btf_vmlinux;
} | 0 |
343,283 | static int _dlmap_read(DLHandler * const dlhandler)
{
ssize_t readnb;
if (dlhandler->dlmap_size > dlhandler->sizeof_map) {
abort();
}
if (dlhandler->dlmap_size <= (size_t) 0U) {
return 0;
}
if (dlhandler->dlmap_pos != dlhandler->dlmap_fdpos) {
do {
if (lseek(... | 0 |
339,718 | static Bigint *lshift(Bigint *b, int k)
{
int i, k1, n, n1;
Bigint *b1;
ULong *x, *x1, *xe, z;
#ifdef Pack_32
n = k >> 5;
#else
n = k >> 4;
#endif
k1 = b->k;
n1 = n + b->wds + 1;
for(i = b->maxwds; n1 > i; i <<= 1) {
k1++;
}
b1 = Balloc(k1);
x1 = b1->x;
for(i = 0; i < n; i++) {
*x1++ = 0;
}
x = b->x;... | 0 |
225,801 | GF_Err mvex_box_write(GF_Box *s, GF_BitStream *bs)
{
return gf_isom_box_write_header(s, bs);
} | 0 |
512,614 | With_sum_func_cache(const Item *a)
:m_with_sum_func(a->with_sum_func())
{ } | 0 |
509,534 | void _ma_check_print_info(HA_CHECK *param, const char *fmt, ...)
{
va_list args;
DBUG_ENTER("_ma_check_print_info");
va_start(args, fmt);
_ma_check_print_msg(param, MA_CHECK_INFO, fmt, args);
va_end(args);
DBUG_VOID_RETURN;
} | 0 |
273,915 | static void handle_RMD(ctrl_t *ctrl, char *arg)
{
handle_DELE(ctrl, arg);
} | 0 |
310,113 | legal_tab_list(const char *tab_list)
{
bool result = TRUE;
if (tab_list != 0 && *tab_list != '\0') {
if (comma_is_needed(tab_list)) {
int n, ch;
for (n = 0; tab_list[n] != '\0'; ++n) {
ch = UChar(tab_list[n]);
if (!(isdigit(ch) || ch == ',' || ch == '+')) {
fprintf(stderr,
"%s: unex... | 0 |
281,144 | static void xfrm_audit_common_policyinfo(struct xfrm_policy *xp,
struct audit_buffer *audit_buf)
{
struct xfrm_sec_ctx *ctx = xp->security;
struct xfrm_selector *sel = &xp->selector;
if (ctx)
audit_log_format(audit_buf, " sec_alg=%u sec_doi=%u sec_obj=%s",
ctx->ctx_alg, ctx->ctx_doi, ctx->ctx_str);
s... | 0 |
366,196 | bool __is_local_mountpoint(struct dentry *dentry)
{
struct mnt_namespace *ns = current->nsproxy->mnt_ns;
struct mount *mnt;
bool is_covered = false;
down_read(&namespace_sem);
lock_ns_list(ns);
list_for_each_entry(mnt, &ns->list, mnt_list) {
if (mnt_is_cursor(mnt))
continue;
is_covered = (mnt->mnt_mountpo... | 0 |
244,215 | GF_Box *bloc_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_BaseLocationBox, GF_ISOM_BOX_TYPE_BLOC);
return (GF_Box *)tmp;
} | 0 |
486,794 | static void gem_update_int_status(CadenceGEMState *s)
{
int i;
qemu_set_irq(s->irq[0], !!s->regs[GEM_ISR]);
for (i = 1; i < s->num_priority_queues; ++i) {
qemu_set_irq(s->irq[i], !!s->regs[GEM_INT_Q1_STATUS + i - 1]);
}
} | 0 |
230,279 | njs_array_handler_index_of(njs_vm_t *vm, njs_iterator_args_t *args,
njs_value_t *entry, int64_t n)
{
if (njs_values_strict_equal(args->argument, entry)) {
njs_set_number(&vm->retval, n);
return NJS_DONE;
}
return NJS_OK;
} | 0 |
326,921 | static u32 vidtv_s302m_write_frame(struct vidtv_encoder *e,
u16 sample)
{
struct vidtv_s302m_ctx *ctx = e->ctx;
struct vidtv_s302m_frame_16 f = {};
u32 nbytes = 0;
/* from ffmpeg: see s302enc.c */
u8 vucf = ctx->frame_index == 0 ? 0x10 : 0;
f.data[0] = sample & 0xFF;
f.data[1] = (sample & 0xFF00) >> 8... | 0 |
502,659 | BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
{
int i, j;
BIO *out = NULL, *btmp = NULL, *etmp = NULL, *bio = NULL;
unsigned char *tmp = NULL;
X509_ALGOR *xa;
ASN1_OCTET_STRING *data_body = NULL;
const EVP_MD *evp_md;
const EVP_CIPHER *evp_cipher = NULL;
EVP_... | 0 |
430,422 | static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,
const struct sw_flow_key *key,
struct sw_flow_actions **sfa,
__be16 eth_type, __be16 vlan_tci,
u32 mpls_label_count, bool log)
{
u8 mac_proto = ovs_key_mac_proto(key);
const struct nlattr *a;
int rem, err;
nla_for... | 0 |
253,532 | static int smb3_fiemap(struct cifs_tcon *tcon,
struct cifsFileInfo *cfile,
struct fiemap_extent_info *fei, u64 start, u64 len)
{
unsigned int xid;
struct file_allocated_range_buffer in_data, *out_data;
u32 out_data_len;
int i, num, rc, flags, last_blob;
u64 next;
rc = fiemap_prep(d_inode(cfile-... | 0 |
139,233 | bool OverlayWindowViews::IsVisible() const {
return views::Widget::IsVisible();
}
| 0 |
225,114 | string DefaultAttrStr(const OpDef::AttrDef& attr) {
if (!attr.has_default_value()) return "no default";
return SummarizeAttrValue(attr.default_value());
} | 0 |
436,119 | static void __io_complete_rw(struct io_kiocb *req, long res, long res2,
unsigned int issue_flags)
{
int cflags = 0;
if (req->rw.kiocb.ki_flags & IOCB_WRITE)
kiocb_end_write(req);
if (res != req->result) {
if ((res == -EAGAIN || res == -EOPNOTSUPP) &&
io_rw_should_reissue(req)) {
req->flags |= R... | 0 |
248,755 | static void remove_expired(struct CookieInfo *cookies)
{
struct Cookie *co, *nx;
curl_off_t now = (curl_off_t)time(NULL);
unsigned int i;
/*
* If the earliest expiration timestamp in the jar is in the future we can
* skip scanning the whole jar and instead exit early as there won't be any
* cookies to... | 0 |
343,179 | static void *esp_alloc_tmp(struct crypto_aead *aead, int nfrags, int seqihlen)
{
unsigned int len;
len = seqihlen;
len += crypto_aead_ivsize(aead);
if (len) {
len += crypto_aead_alignmask(aead) &
~(crypto_tfm_ctx_alignment() - 1);
len = ALIGN(len, crypto_tfm_ctx_alignment());
}
len += sizeof(stru... | 0 |
274,720 | callbacks_display_object_properties_clicked (GtkButton *button, gpointer user_data)
{
gint index = callbacks_get_selected_row_index ();
guint i;
if (index < 0 || selection_length (&screen.selectionInfo) == 0) {
interface_show_alert_dialog(_("No object is currently selected"),
_("Objects must be selected using ... | 0 |
336,141 | static void ip6gre_dellink(struct net_device *dev, struct list_head *head)
{
struct net *net = dev_net(dev);
struct ip6gre_net *ign = net_generic(net, ip6gre_net_id);
if (dev != ign->fb_tunnel_dev)
unregister_netdevice_queue(dev, head);
} | 0 |
247,540 | void configureServerAndExpiredClientCertificate(
envoy::config::listener::v3::Listener& listener,
envoy::extensions::transport_sockets::tls::v3::UpstreamTlsContext& client,
const OptionalServerConfig& server_config) {
envoy::config::listener::v3::FilterChain* filter_chain = listener.add_filter_chains();
... | 0 |
269,317 | static av_always_inline void snow_interleave_line_footer(int * i, IDWTELEM * low, IDWTELEM * high){
for (; (*i)>=0; (*i)-=2){
low[(*i)+1] = high[(*i)>>1];
low[*i] = low[(*i)>>1];
}
} | 0 |
230,624 | void derive_combined_bipredictive_merging_candidates(const base_context* ctx,
const slice_segment_header* shdr,
PBMotion* inout_mergeCandList,
int* inout_numMerg... | 0 |
247,144 | u32 gf_fs_get_filters_count(GF_FilterSession *session)
{
return session ? gf_list_count(session->filters) : 0;
} | 0 |
512,692 | longlong Item_func_between::val_int_cmp_time()
{
THD *thd= current_thd;
longlong value= args[0]->val_time_packed(thd), a, b;
if ((null_value= args[0]->null_value))
return 0;
a= args[1]->val_time_packed(thd);
b= args[2]->val_time_packed(thd);
return val_int_cmp_int_finalize(value, a, b);
} | 0 |
228,442 | static String HHVM_FUNCTION(wddx_packet_end, const Resource& packet_id) {
return cast<WddxPacket>(packet_id)->packet_end();
} | 0 |
359,247 | DEFUN (ip_community_list_name_expanded,
ip_community_list_name_expanded_cmd,
"ip community-list expanded WORD (deny|permit) .LINE",
IP_STR
COMMUNITY_LIST_STR
"Add an expanded community-list entry\n"
"Community list name\n"
"Specify community to reject\n"
"Specify ... | 0 |
234,728 | bool btrfs_pinned_by_swapfile(struct btrfs_fs_info *fs_info, void *ptr)
{
struct btrfs_swapfile_pin *sp;
struct rb_node *node;
spin_lock(&fs_info->swapfile_pins_lock);
node = fs_info->swapfile_pins.rb_node;
while (node) {
sp = rb_entry(node, struct btrfs_swapfile_pin, node);
if (ptr < sp->ptr)
node = node-... | 0 |
376,682 | void ZRLE_DECODE (const Rect& r, rdr::InStream* is,
rdr::ZlibInStream* zis,
const PixelFormat& pf, ModifiablePixelBuffer* pb)
{
int length = is->readU32();
zis->setUnderlying(is, length);
Rect t;
PIXEL_T buf[64 * 64];
for (t.tl.y = r.tl.y; t.tl.y < r.br.y; t.tl.y += 64) {
... | 0 |
336,144 | static inline bool ip6gre_tnl_addr_conflict(const struct ip6_tnl *t,
const struct ipv6hdr *hdr)
{
return ipv6_addr_equal(&t->parms.raddr, &hdr->saddr);
} | 0 |
463,136 | EXPORTED void freestrlist(struct strlist *l)
{
struct strlist *n;
while (l) {
n = l->next;
free(l->s);
if (l->p) charset_freepat(l->p);
free((char *)l);
l = n;
}
} | 0 |
223,417 | static PCRE2_SPTR compile_simple_assertion_matchingpath(compiler_common *common, PCRE2_UCHAR type, PCRE2_SPTR cc, jump_list **backtracks)
{
DEFINE_COMPILER;
int length;
struct sljit_jump *jump[4];
#ifdef SUPPORT_UNICODE
struct sljit_label *label;
#endif /* SUPPORT_UNICODE */
switch(type)
{
case OP_SOD:
if (HAS_V... | 0 |
513,148 | static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref rc,
uint state_mask= PLUGIN_IS_READY |
PLUGIN_IS_UNINITIALIZED |
PLUGIN_IS_DELETED)
{
st_plugin_int *pi= plugin_ref... | 0 |
409,443 | invoke_tgetent(char_u *tbuf, char_u *term)
{
int i;
// Note: Valgrind may report a leak here, because the library keeps one
// buffer around that we can't ever free.
i = TGETENT(tbuf, term);
if (i < 0 // -1 is always an error
# ifdef TGETENT_ZERO_ERR
|| i == 0 // sometimes zero is... | 0 |
253,638 | smb2_cached_lease_break(struct work_struct *work)
{
struct cached_fid *cfid = container_of(work,
struct cached_fid, lease_break);
close_cached_dir_lease(cfid);
} | 0 |
232,331 | GF_EdtsEntry *CreateEditEntry(u64 EditDuration, u64 MediaTime, u32 MediaRate, u8 EditMode)
{
GF_EdtsEntry *ent;
ent = (GF_EdtsEntry*)gf_malloc(sizeof(GF_EdtsEntry));
if (!ent) return NULL;
switch (EditMode) {
case GF_ISOM_EDIT_EMPTY:
ent->mediaRate = 0x10000;
ent->mediaTime = -1;
break;
case GF_ISOM_EDIT... | 0 |
210,303 | static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
double
bounding_height,
bounding_width,
image_height,
image_height_inch,
image_width,
image_width_inch,
resolution_y,
resolution_x,
units_per_inch;
float
wmf_width,
wmf_height;
Image
... | 1 |
395,086 | redraw_win_later(
win_T *wp,
int type)
{
if (!exiting && wp->w_redr_type < type)
{
wp->w_redr_type = type;
if (type >= NOT_VALID)
wp->w_lines_valid = 0;
if (must_redraw < type) // must_redraw is the maximum of all windows
must_redraw = type;
}
} | 0 |
224,993 | PQsetErrorContextVisibility(PGconn *conn, PGContextVisibility show_context)
{
PGContextVisibility old;
if (!conn)
return PQSHOW_CONTEXT_ERRORS;
old = conn->show_context;
conn->show_context = show_context;
return old;
} | 0 |
359,514 | peer_unsuppress_map_unset_vty (struct vty *vty, const char *ip_str, afi_t afi,
safi_t safi)
{
int ret;
struct peer *peer;
peer = peer_and_group_lookup_vty (vty, ip_str);
if (! peer)
return CMD_WARNING;
ret = peer_unsuppress_map_unset (peer, afi, safi);
return bgp_vty_return (vty, ret);
} | 0 |
455,423 | xfs_iflag_for_tag(
int tag)
{
switch (tag) {
case XFS_ICI_EOFBLOCKS_TAG:
return XFS_IEOFBLOCKS;
case XFS_ICI_COWBLOCKS_TAG:
return XFS_ICOWBLOCKS;
default:
ASSERT(0);
return 0;
}
} | 0 |
196,276 | lsquic_qeh_settings (struct qpack_enc_hdl *qeh, unsigned max_table_size,
unsigned dyn_table_size, unsigned max_risked_streams, int server)
{
enum lsqpack_enc_opts enc_opts;
assert(qeh->qeh_flags & QEH_INITIALIZED);
if (qeh->qeh_flags & QEH_HAVE_SETTINGS)
{
LSQ_WARN("settings alrea... | 1 |
90,761 | void DidGetHostUsage(const std::string& host,
StorageType type,
int64 usage) {
DCHECK_EQ(host_, host);
DCHECK_EQ(type_, type);
host_usage_ = usage;
CheckCompleted();
}
| 0 |
262,006 | int Curl_conncache_init(struct conncache *connc, int size)
{
/* allocate a new easy handle to use when closing cached connections */
connc->closure_handle = curl_easy_init();
if(!connc->closure_handle)
return 1; /* bad */
Curl_hash_init(&connc->hash, size, Curl_hash_str,
Curl_str_key_compa... | 0 |
274,764 | static s64 ntfs_attr_pread_i(ntfs_attr *na, const s64 pos, s64 count, void *b)
{
s64 br, to_read, ofs, total, total2, max_read, max_init;
ntfs_volume *vol;
runlist_element *rl;
u16 efs_padding_length;
/* Sanity checking arguments is done in ntfs_attr_pread(). */
if ((na->data_flags & ATTR_COMPRESSION_MASK) && ... | 0 |
90,870 | void SetUp() {
ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
mock_special_storage_policy_ = new MockSpecialStoragePolicy;
quota_manager_ = new QuotaManager(
false /* is_incognito */,
data_dir_.path(),
MessageLoopProxy::current(),
MessageLoopProxy::current(),
mock_sp... | 0 |
222,921 | bool operator()(const Handle& h1, const Handle& h2) const {
return h1.SameHandle(h2);
} | 0 |
331,784 | static void qpaintengineex_moveTo(qreal x, qreal y, void *data) {
((StrokeHandler *) data)->pts.add(x);
((StrokeHandler *) data)->pts.add(y);
((StrokeHandler *) data)->types.add(QPainterPath::MoveToElement);
} | 0 |
270,394 | ok_png ok_png_read(FILE *file, ok_png_decode_flags decode_flags) {
return ok_png_read_with_allocator(file, decode_flags, OK_PNG_DEFAULT_ALLOCATOR, NULL);
} | 0 |
247,724 | TEST_P(SslSocketTest, ClientSessionResumptionEnabledTls12) {
const std::string server_ctx_yaml = R"EOF(
common_tls_context:
tls_params:
tls_minimum_protocol_version: TLSv1_0
tls_maximum_protocol_version: TLSv1_2
tls_certificates:
certificate_chain:
filename: "{{ test_rundir }}/test... | 0 |
246,698 | u32 parse_cryp(char *arg_val, u32 opt)
{
open_edit = GF_TRUE;
if (!opt) {
crypt = 1;
drm_file = arg_val;
open_edit = GF_TRUE;
return 0;
}
crypt = 2;
if (arg_val && get_file_type_by_ext(arg_val) != 1) {
drm_file = arg_val;
return 0;
}
return 3;
} | 0 |
313,801 | nv_ctrlo(cmdarg_T *cap)
{
if (VIsual_active && VIsual_select)
{
VIsual_select = FALSE;
may_trigger_modechanged();
showmode();
restart_VIsual_select = 2; // restart Select mode later
}
else
{
cap->count1 = -cap->count1;
nv_pcmark(cap);
}
} | 0 |
299,891 | readconf_find_option(void *p)
{
int i;
router_instance *r;
transport_instance *t;
for (i = 0; i < optionlist_config_size; i++)
if (p == optionlist_config[i].value) return US optionlist_config[i].name;
for (r = routers; r != NULL; r = r->next)
{
router_info *ri = r->info;
for (i = 0; i < ri->options_count[0]; ... | 0 |
225,017 | PQconninfo(PGconn *conn)
{
PQExpBufferData errorBuf;
PQconninfoOption *connOptions;
if (conn == NULL)
return NULL;
/*
* We don't actually report any errors here, but callees want a buffer,
* and we prefer not to trash the conn's errorMessage.
*/
initPQExpBuffer(&errorBuf);
if (PQExpBufferDataBroken(erro... | 0 |
275,985 | uECC_VLI_API uECC_word_t uECC_vli_sub(uECC_word_t *result,
const uECC_word_t *left,
const uECC_word_t *right,
wordcount_t num_words) {
uECC_word_t borrow = 0;
wordcount_t i;
for (i = 0; i < num_... | 0 |
249,982 | GF_Err gf_isom_write_compressed_box(GF_ISOFile *mov, GF_Box *root_box, u32 repl_type, GF_BitStream *bs, u32 *box_csize)
{
#ifdef GPAC_DISABLE_ZLIB
return GF_NOT_SUPPORTED;
#else
GF_Err e;
GF_BitStream *comp_bs = gf_bs_new(NULL, 0, GF_BITSTREAM_WRITE);
e = gf_isom_box_write(root_box, comp_bs);
if (!e) {
u8 *box_... | 0 |
270,767 | static int check_passwd(unsigned char *passwd, size_t length)
{
struct digest *d = NULL;
unsigned char *passwd1_sum;
unsigned char *passwd2_sum;
int ret = 0;
int hash_len;
if (IS_ENABLED(CONFIG_PASSWD_CRYPTO_PBKDF2)) {
hash_len = PBKDF2_LENGTH;
} else {
d = digest_alloc(PASSWD_SUM);
if (!d) {
pr_err("N... | 0 |
222,923 | std::string StringifyShapeHandle(ShapeHandle s) {
auto* ic = inference_context.get();
if (ic->RankKnown(s)) {
std::vector<std::string> vals;
for (int i = 0; i < ic->Rank(s); i++) {
DimensionHandle d = ic->Dim(s, i);
if (ic->ValueKnown(d) && ic->Value(d) == kUnknownDim... | 0 |
265,420 | static std::string getDescription(const std::string &fulltext, int line)
{
if (line < 1) return "";
unsigned int start = 0;
for (; start<fulltext.length() ; ++start) {
if (line <= 1) break;
if (fulltext[start] == '\n') line--;
}
// not a valid description
if (fulltext.compare(start, 2, "//") != 0) return ""... | 0 |
459,112 | static int tc_setup_offload_act(struct tc_action *act,
struct flow_action_entry *entry,
u32 *index_inc)
{
#ifdef CONFIG_NET_CLS_ACT
if (act->ops->offload_act_setup)
return act->ops->offload_act_setup(act, entry, index_inc, true);
else
return -EOPNOTSUPP;
#else
return 0;
#endif
} | 0 |
351,180 | static double area2d_polygon (int n, const double *x, const double *y) {
double area = 0;
for (int i = 1; i < n; i++) {
area += (x[i-1] + x[i]) * (y[i] - y[i-1]);
}
return area / 2.0;
} | 0 |
265,432 | TfLiteStatus Gather(TfLiteContext* context, const TfLiteGatherParams& params,
const TfLiteTensor* input, const TfLiteTensor* positions,
TfLiteTensor* output) {
const PositionsT* indexes = GetTensorData<PositionsT>(positions);
bool indices_has_only_positive_elements = true;
... | 0 |
223,387 | static SLJIT_INLINE void match_script_run_common(compiler_common *common, int private_data_ptr, backtrack_common *parent)
{
DEFINE_COMPILER;
SLJIT_ASSERT(TMP1 == SLJIT_R0 && STR_PTR == SLJIT_R1);
OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
#ifdef SUPPORT_UNICODE
sljit_emit_icall(compiler, SLJIT_C... | 0 |
241,073 | static void client_dead(int ci)
{
struct client *c = clients + ci;
if (c->fd != -1) {
log_debug("removing client %d", c->fd);
close(c->fd);
}
c->fd = -1;
c->workfn = NULL;
if (c->msg) {
free(c->msg);
c->msg = NULL;
c->offset = 0;
}
pollfds[ci].fd = -1;
} | 0 |
326,614 | archive_write_disk_set_acls(struct archive *a, int fd, const char *name,
struct archive_acl *abstract_acl, __LA_MODE_T mode)
{
(void)a; /* UNUSED */
(void)fd; /* UNUSED */
(void)name; /* UNUSED */
(void)abstract_acl; /* UNUSED */
(void)mode; /* UNUSED */
return (ARCHIVE_OK);
} | 0 |
462,409 | processDataRcvd(ptcpsess_t *const __restrict__ pThis,
char **buff,
const int buffLen,
struct syslogTime *stTime,
const time_t ttGenTime,
multi_submit_t *pMultiSub,
unsigned *const __restrict__ pnMsgs)
{
DEFiRet;
char c = **buff;
int octatesToCopy, octatesToDiscard;
if(pThis->inputState == eAtStrtFram) {
if... | 0 |
443,160 | int jfs_write_inode(struct inode *inode, struct writeback_control *wbc)
{
int wait = wbc->sync_mode == WB_SYNC_ALL;
if (inode->i_nlink == 0)
return 0;
/*
* If COMMIT_DIRTY is not set, the inode isn't really dirty.
* It has been committed since the last change, but was still
* on the dirty inode list.
*/
... | 0 |
195,063 | GF_Err mpgviddmx_process(GF_Filter *filter)
{
GF_MPGVidDmxCtx *ctx = gf_filter_get_udta(filter);
GF_FilterPacket *pck, *dst_pck;
u64 byte_offset;
s64 vosh_start = -1;
s64 vosh_end = -1;
GF_Err e;
char *data;
u8 *start;
u32 pck_size;
s32 remain;
//always reparse duration
if (!ctx->duration.num)
mpgviddmx_... | 1 |
442,815 | static void warnf(struct Configurable *config, const char *fmt, ...)
{
if(!(config->conf & CONF_MUTE)) {
va_list ap;
int len;
char *ptr;
char print_buffer[256];
va_start(ap, fmt);
va_start(ap, fmt);
len = vsnprintf(print_buffer, sizeof(print_buffer), fmt, ap);
va_end(ap);
ptr = p... | 0 |
236,204 | GF_Err href_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 len;
GF_TextHyperTextBox*ptr = (GF_TextHyperTextBox*)s;
ISOM_DECREASE_SIZE(ptr, 6) //including 2 length fields
ptr->startcharoffset = gf_bs_read_u16(bs);
ptr->endcharoffset = gf_bs_read_u16(bs);
len = gf_bs_read_u8(bs);
if (len) {
ISOM_DECREASE_SIZE(ptr, ... | 0 |
373,541 | ipf_is_first_v6_frag(ovs_be16 ip6f_offlg)
{
if (!(ip6f_offlg & IP6F_OFF_MASK) &&
ip6f_offlg & IP6F_MORE_FRAG) {
return true;
}
return false;
} | 0 |
90,232 | virtual const WifiNetworkVector& wifi_networks() const {
return wifi_networks_;
}
| 0 |
252,436 | inline void outputBits(int nBits, long long bits, long long &c, int &lc,
char *&out) {
c <<= nBits;
lc += nBits;
c |= bits;
while (lc >= 8) *out++ = static_cast<char>((c >> (lc -= 8)));
} | 0 |
233,938 | void validateUnionWithCollectionlessPipeline(
const boost::optional<std::vector<mongo::BSONObj>>& pipeline) {
uassert(ErrorCodes::FailedToParse,
"$unionWith stage without explicit collection must have a pipeline with $documents as "
"first stage",
pipeline && pipeline->size()... | 0 |
328,827 | R_API RBinJavaElementValue *r_bin_java_element_value_new(ut8 *buffer, ut64 sz, ut64 buf_offset) {
ut32 i = 0;
ut64 offset = 0;
if (sz < 8) {
return NULL;
}
RBinJavaElementValue *element_value = R_NEW0 (RBinJavaElementValue);
if (!element_value) {
return NULL;
}
RBinJavaElementValuePair *evps = NULL;
elemen... | 0 |
274,660 | static void aperture_state_report (gerbv_net_t *net,
gerbv_image_t *img, gerbv_project_t *prj)
{
gerbv_layertype_t layer_type = img->layertype;
gboolean show_length = FALSE;
gboolean aperture_is_valid = FALSE;
double x, y, len = 0;
if (net->aperture > 0)
aperture_is_valid = TRUE;
switch (net->aperture_stat... | 0 |
366,310 | void mark_mounts_for_expiry(struct list_head *mounts)
{
struct mount *mnt, *next;
LIST_HEAD(graveyard);
if (list_empty(mounts))
return;
namespace_lock();
lock_mount_hash();
/* extract from the expiration list every vfsmount that matches the
* following criteria:
* - only referenced by its parent vfsmount... | 0 |
508,802 | Lex_input_stream::unescape(CHARSET_INFO *cs, char *to,
const char *str, const char *end,
int sep)
{
return my_unescape(cs, to, str, end, sep, m_thd->backslash_escapes());
} | 0 |
512,919 | my_decimal *val_decimal(my_decimal *to)
{
return update_null() ? 0 : cached_time.to_decimal(to);
} | 0 |
489,160 | sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type, void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *asconf_ack = arg;
struct sctp_chunk *last_asconf = asoc->addip_last_asconf;
struct sctp_chunk *abort;
s... | 0 |
238,823 | cmdline_search_stat(
int dirc,
pos_T *pos,
pos_T *cursor_pos,
int show_top_bot_msg,
char_u *msgbuf,
int recompute,
int maxcount,
long timeout)
{
searchstat_T stat;
update_search_stat(dirc, pos, cursor_pos, &stat, recompute, maxcount,
timeout);
if (stat.cur ... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.