idx int64 | func string | target int64 |
|---|---|---|
374,047 | static RBinSymbol *bin_symbol_from_symbol(RCoreSymCacheElement *element, RCoreSymCacheElementSymbol *s) {
if (!s->name && !s->mangled_name) {
return NULL;
}
RBinSymbol *sym = R_NEW0 (RBinSymbol);
if (sym) {
if (s->name && s->mangled_name) {
sym->dname = strdup (s->name);
sym->name = strdup (s->mangled_nam... | 0 |
466,146 | static int check_cr_write(struct x86_emulate_ctxt *ctxt)
{
u64 new_val = ctxt->src.val64;
int cr = ctxt->modrm_reg;
u64 efer = 0;
static u64 cr_reserved_bits[] = {
0xffffffff00000000ULL,
0, 0, 0, /* CR3 checked later */
CR4_RESERVED_BITS,
0, 0, 0,
CR8_RESERVED_BITS,
};
if (!valid_cr(cr))
return emul... | 0 |
230,119 | static json_t * get_assertion_from_session(struct config_module * config, json_t * j_params, const char * username, const char * session, int mock) {
json_t * j_query, * j_result, * j_return;
char * username_escaped, * mod_name_escaped, * username_clause, * expiration_clause;
char * session_hash;
int res;
tim... | 0 |
436,050 |
static enum hrtimer_restart io_timeout_fn(struct hrtimer *timer)
{
struct io_timeout_data *data = container_of(timer,
struct io_timeout_data, timer);
struct io_kiocb *req = data->req;
struct io_ring_ctx *ctx = req->ctx;
unsigned long flags;
spin_lock_irqsave(&ctx->completion_lock, flags);
list_del_init(&r... | 0 |
223,457 | static SLJIT_INLINE void compile_then_trap_backtrackingpath(compiler_common *common, struct backtrack_common *current)
{
DEFINE_COMPILER;
struct sljit_jump *jump;
int size;
if (CURRENT_AS(then_trap_backtrack)->then_trap)
{
common->then_trap = CURRENT_AS(then_trap_backtrack)->then_trap;
return;
}
size = CURREN... | 0 |
366,316 | static void mntput_no_expire(struct mount *mnt)
{
LIST_HEAD(list);
int count;
rcu_read_lock();
if (likely(READ_ONCE(mnt->mnt_ns))) {
/*
* Since we don't do lock_mount_hash() here,
* ->mnt_ns can change under us. However, if it's
* non-NULL, then there's a reference that won't
* be dropped until afte... | 0 |
343,133 | static struct ip_esp_hdr *esp_output_udp_encap(struct sk_buff *skb,
int encap_type,
struct esp_info *esp,
__be16 sport,
__be16 dport)
{
struct udphdr *uh;
__be32 *udpdata32;
unsigned int len;
len = skb->len + esp->tailen - skb_transport_offset(skb);
if (len + sizeof... | 0 |
359,283 | DEFUN (clear_ip_bgp_as,
clear_ip_bgp_as_cmd,
"clear ip bgp <1-65535>",
CLEAR_STR
IP_STR
BGP_STR
"Clear peers with the AS number\n")
{
return bgp_clear_vty (vty, NULL, 0, 0, clear_as, BGP_CLEAR_SOFT_NONE, argv[0]);
} | 0 |
310,323 | real_uptime(routerinfo_t *router, time_t now)
{
if (now < router->cache_info.published_on)
return router->uptime;
else
return router->uptime + (now - router->cache_info.published_on);
} | 0 |
513,229 | static inline char plugin_var_bookmark_key(uint flags)
{
return (flags & PLUGIN_VAR_TYPEMASK) |
(flags & PLUGIN_VAR_MEMALLOC ? BOOKMARK_MEMALLOC : 0);
} | 0 |
225,986 |
static void *sgpd_parse_entry(u32 grouping_type, GF_BitStream *bs, s32 bytes_in_box, u32 entry_size, u32 *total_bytes)
{
Bool null_size_ok = GF_FALSE;
GF_DefaultSampleGroupDescriptionEntry *def_ptr;
switch (grouping_type) {
case GF_ISOM_SAMPLE_GROUP_ROLL:
case GF_ISOM_SAMPLE_GROUP_PROL:
{
GF_RollRecoveryEntry... | 0 |
508,327 | bool No_such_table_error_handler::safely_trapped_errors()
{
/*
If m_unhandled_errors != 0, something else, unanticipated, happened,
so the error is not trapped but returned to the caller.
Multiple ER_NO_SUCH_TABLE can be raised in case of views.
*/
return ((m_handled_errors > 0) && (m_unhandled_errors... | 0 |
247,573 | TEST_P(SslSocketTest, ClientSessionResumptionDisabledTls12) {
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 }}/tes... | 0 |
293,521 | PJ_DEF(void) pj_scan_get_quote( pj_scanner *scanner,
int begin_quote, int end_quote,
pj_str_t *out)
{
char beg = (char)begin_quote;
char end = (char)end_quote;
pj_scan_get_quotes(scanner, &beg, &end, 1, out);
} | 0 |
316,966 | static void selinux_ipc_getsecid(struct kern_ipc_perm *ipcp, u32 *secid)
{
struct ipc_security_struct *isec = selinux_ipc(ipcp);
*secid = isec->sid;
} | 0 |
383,369 | gdImageColorAllocate (gdImagePtr im, int r, int g, int b)
{
return gdImageColorAllocateAlpha (im, r, g, b, gdAlphaOpaque);
} | 0 |
200,695 | 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... | 1 |
261,946 | njs_reserved(const uint32_t *reserve, uint32_t byte)
{
return ((reserve[byte >> 5] & ((uint32_t) 1 << (byte & 0x1f))) != 0);
} | 0 |
316,989 | static int smack_inode_getsecurity(struct user_namespace *mnt_userns,
struct inode *inode, const char *name,
void **buffer, bool alloc)
{
struct socket_smack *ssp;
struct socket *sock;
struct super_block *sbp;
struct inode *ip = (struct inode *)inode;
struct smack_known *isp;
if (strcmp(name, XATTR... | 0 |
262,013 | Proto_FreeRequest(ProtoRequest *req)
{
if (NULL == req) {
return;
}
#if VGAUTH_PROTO_TRACE
g_free(req->rawData);
#endif
switch (req->reqType) {
case PROTO_REQUEST_UNKNOWN:
// partial/empty request -- no-op
break;
case PROTO_REQUEST_SESSION_REQ:
g_free(req->reqData.sessionReq.... | 0 |
224,226 | R_API RIOBank *r_io_bank_new(const char *name) {
r_return_val_if_fail (name, NULL);
RIOBank *bank = R_NEW0 (RIOBank);
if (!bank) {
return NULL;
}
bank->name = strdup (name);
bank->submaps = r_crbtree_new (free);
if (!bank->submaps) {
free (bank);
return NULL;
}
bank->maprefs = r_list_newf (free);
if (!b... | 0 |
453,015 | int nft_offload_init(void)
{
return register_netdevice_notifier(&nft_offload_netdev_notifier);
} | 0 |
359,391 | peer_timers_set_vty (struct vty *vty, const char *ip_str,
const char *keep_str, const char *hold_str)
{
int ret;
struct peer *peer;
u_int32_t keepalive;
u_int32_t holdtime;
peer = peer_and_group_lookup_vty (vty, ip_str);
if (! peer)
return CMD_WARNING;
VTY_GET_INTEGER_RANGE ("K... | 0 |
264,212 | static void vnc_dpy_switch(DisplayChangeListener *dcl,
DisplaySurface *surface)
{
VncDisplay *vd = container_of(dcl, VncDisplay, dcl);
VncState *vs;
vnc_abort_display_jobs(vd);
/* server surface */
qemu_pixman_image_unref(vd->server);
vd->ds = surface;
vd->server... | 0 |
318,964 | f_assert_equal(typval_T *argvars, typval_T *rettv)
{
rettv->vval.v_number = assert_equal_common(argvars, ASSERT_EQUAL);
} | 0 |
413,657 | static bool printAnalPaths(RCoreAnalPaths *p, PJ *pj) {
RListIter *iter;
RAnalBlock *path;
if (pj) {
pj_a (pj);
} else {
r_cons_printf ("pdb @@= ");
}
r_list_foreach (p->path, iter, path) {
if (pj) {
pj_n (pj, path->addr);
} else {
r_cons_printf ("0x%08"PFMT64x" ", path->addr);
}
}
if(pj) {
... | 0 |
432,330 | void flatview_unref(FlatView *view)
{
view->ref--;
if (view->ref <= 0) {
flatview_destroy(view);
}
} | 0 |
300,737 | int tipc_dump_start(struct netlink_callback *cb)
{
return __tipc_dump_start(cb, sock_net(cb->skb->sk));
} | 0 |
369,170 |
static void io_apoll_task_func(struct io_kiocb *req, bool *locked)
{
struct io_ring_ctx *ctx = req->ctx;
int ret;
ret = io_poll_check_events(req, *locked);
if (ret > 0)
return;
io_poll_remove_entries(req);
spin_lock(&ctx->completion_lock);
hash_del(&req->hash_node);
spin_unlock(&ctx->completion_lock);
if... | 0 |
436,075 | static bool __io_file_supports_async(struct file *file, int rw)
{
umode_t mode = file_inode(file)->i_mode;
if (S_ISBLK(mode)) {
if (IS_ENABLED(CONFIG_BLOCK) &&
io_bdev_nowait(I_BDEV(file->f_mapping->host)))
return true;
return false;
}
if (S_ISSOCK(mode))
return true;
if (S_ISREG(mode)) {
if (IS_... | 0 |
281,166 | static void xfrm_bundle_flo_delete(struct flow_cache_object *flo)
{
struct xfrm_dst *xdst = container_of(flo, struct xfrm_dst, flo);
struct dst_entry *dst = &xdst->u.dst;
/* Mark DST_OBSOLETE_DEAD to fail the next xfrm_dst_check() */
dst->obsolete = DST_OBSOLETE_DEAD;
dst_release_immediate(dst);
} | 0 |
424,517 | static void PresentationContext_unref(PresentationContext* presentation)
{
VideoClientContextPriv* priv;
MAPPED_GEOMETRY* geometry;
if (!presentation)
return;
if (InterlockedDecrement(&presentation->refCounter) != 0)
return;
geometry = presentation->geometry;
if (geometry)
{
geometry->MappedGeometryUpda... | 0 |
512,997 | Item_direct_ref(THD *thd, TABLE_LIST *view_arg, Item **item,
const LEX_CSTRING *field_name_arg,
bool alias_name_used_arg= FALSE):
Item_ref(thd, view_arg, item, field_name_arg,
alias_name_used_arg)
{} | 0 |
371,426 | PHP_FUNCTION( msgfmt_format )
{
zval *args;
MSG_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oa",
&object, MessageFormatter_ce_ptr, &args ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
"msgfmt_format: unable to... | 0 |
413,643 | static bool is_fcn_traced(RDebugTrace *traced, RAnalFunction *fcn) {
int tag = traced->tag;
RListIter *iter;
RDebugTracepoint *trace;
r_list_foreach (traced->traces, iter, trace) {
if (!trace->tag || (tag & trace->tag)) {
if (r_anal_function_contains (fcn, trace->addr)) {
r_cons_printf ("\ntraced: %d\n", ... | 0 |
242,612 | void Compute(OpKernelContext* ctx) override {
Buffer* buf = nullptr;
OP_REQUIRES_OK(ctx, GetBuffer(ctx, def(), &buf));
core::ScopedUnref scope(buf);
buf->Clear();
} | 0 |
309,923 | npush(int x)
{
if (TPS(stack_ptr) < STACKSIZE) {
TPS(stack)[TPS(stack_ptr)].num_type = TRUE;
TPS(stack)[TPS(stack_ptr)].data.num = x;
TPS(stack_ptr)++;
} else {
DEBUG(2, ("npush: stack overflow: %s", _nc_visbuf(TPS(tparam_base))));
_nc_tparm_err++;
}
} | 0 |
312,514 | unload_dummy_buffer(buf_T *buf, char_u *dirname_start)
{
if (curbuf != buf) // safety check
{
close_buffer(NULL, buf, DOBUF_UNLOAD, FALSE, TRUE);
// When autocommands/'autochdir' option changed directory: go back.
restore_start_dir(dirname_start);
}
} | 0 |
244,224 | GF_Box *fdsa_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_HintSample, GF_ISOM_BOX_TYPE_FDSA);
if (!tmp) return NULL;
tmp->packetTable = gf_list_new();
tmp->hint_subtype = GF_ISOM_BOX_TYPE_FDP_STSD;
return (GF_Box*)tmp;
} | 0 |
255,934 | Status ShapeRefiner::ConstantPartialShape(
InferenceContext* target_context, const Node* node, int dst_idx,
ShapeHandle* result, shape_inference::InferenceContext* outer_context) {
const Edge* input_edge;
TF_RETURN_IF_ERROR(node->input_edge(dst_idx, &input_edge));
InferenceContext* src_context = GetConte... | 0 |
244,006 | GF_Err dfla_box_size(GF_Box *s)
{
GF_FLACConfigBox *ptr = (GF_FLACConfigBox *) s;
ptr->size += ptr->dataSize;
return GF_OK;
} | 0 |
508,906 | TABLE_LIST* st_select_lex_node::get_table_list() { return 0; } | 0 |
300,833 | int tipc_sk_dump(struct sock *sk, u16 dqueues, char *buf)
{
int i = 0;
size_t sz = (dqueues) ? SK_LMAX : SK_LMIN;
u32 conn_type, conn_instance;
struct tipc_sock *tsk;
struct publication *p;
bool tsk_connected;
if (!sk) {
i += scnprintf(buf, sz, "sk data: (null)\n");
return i;
}
tsk = tipc_sk(sk);
tsk_co... | 0 |
512,968 | Item_string(THD *thd, const char *name_par, const char *str, size_t length,
CHARSET_INFO *cs, Derivation dv= DERIVATION_COERCIBLE)
:Item_literal(thd)
{
str_value.set_or_copy_aligned(str, length, cs);
fix_from_value(dv, Metadata(&str_value));
set_name(thd, name_par,safe_strlen(name_par),... | 0 |
387,764 | static void print_vtable(intptr_t* start, int len, outputStream* st) {
for (int i = 0; i < len; i++) {
intptr_t e = start[i];
st->print("%d : " INTPTR_FORMAT, i, e);
if (MetaspaceObj::is_valid((Metadata*)e)) {
st->print(" ");
((Metadata*)e)->print_value_on(st);
}
st->cr();
}
} | 0 |
338,111 | void WasmBinaryBuilder::readTags() {
BYN_TRACE("== readTags\n");
size_t numTags = getU32LEB();
BYN_TRACE("num: " << numTags << std::endl);
for (size_t i = 0; i < numTags; i++) {
BYN_TRACE("read one\n");
getInt8(); // Reserved 'attribute' field
auto typeIndex = getU32LEB();
wasm.addTag(Builder::m... | 0 |
196,578 | yank_copy_line(struct block_def *bd, long y_idx, int exclude_trailing_space)
{
char_u *pnew;
if (exclude_trailing_space)
bd->endspaces = 0;
if ((pnew = alloc(bd->startspaces + bd->endspaces + bd->textlen + 1))
== NULL)
return FAIL;
y_current->y_array[y_idx] = pnew;
vim_memset(pnew, ... | 1 |
511,472 | bool open_table(THD *thd, TABLE_LIST *table_list, Open_table_context *ot_ctx)
{
TABLE *table;
const char *key;
uint key_length;
const char *alias= table_list->alias.str;
uint flags= ot_ctx->get_flags();
MDL_ticket *mdl_ticket;
TABLE_SHARE *share;
uint gts_flags;
bool from_share= false;
#ifdef WITH_PAR... | 0 |
281,642 | void CLASS kodak_radc_load_raw()
{
static const char src[] = {
1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8,
1,0, 2,1, 3,3, 4,4, 5,2, 6,7, 7,6, 8,5, 8,8,
2,1, 2,3, 3,0, 3,2, 3,4, 4,6, 5,5, 6,7, 6,8,
2,0, 2,1, 2,3, 3,2, 4,4, 5,6, 6,7, 7,5, 7,8,
2,1, 2,4, 3,0, 3,2, 3,3, 4,7, 5,5, 6,6, 6,8,
2,3, 3,1, 3... | 0 |
265,053 | promptpath(char *p, int npath, int tilde)
{
char *modp = p;
Nameddir nd;
if (tilde && ((nd = finddir(p))))
modp = tricat("~", nd->node.nam, p + strlen(nd->dir));
if (npath) {
char *sptr;
if (npath > 0) {
for (sptr = modp + strlen(modp); sptr > modp; sptr--) {
if (*sptr == '/' && !--npath) {
... | 0 |
432,704 | static void ipa_draw_text(wmfAPI * API, wmfDrawText_t * draw_text)
{
double
angle = 0, /* text rotation angle */
bbox_height, /* bounding box height */
bbox_width, /* bounding box width */
pointsize = 0; /* pointsize to output font with desired height */
ExceptionInfo
*exception... | 0 |
383,319 | gdLayerOverlay (int dst, int src)
{
int a1, a2;
a1 = gdAlphaMax - gdTrueColorGetAlpha(dst);
a2 = gdAlphaMax - gdTrueColorGetAlpha(src);
return ( ((gdAlphaMax - a1*a2/gdAlphaMax) << 24) +
(gdAlphaOverlayColor( gdTrueColorGetRed(src), gdTrueColorGetRed(dst), gdRedMax ) << 16) +
(gdAlphaOverlayColor( gdTrueColorGe... | 0 |
508,892 | bool st_select_lex::handle_derived(LEX *lex, uint phases)
{
return lex->handle_list_of_derived(table_list.first, phases);
} | 0 |
384,680 | send_newstyle_option_reply_info_str (uint32_t option, uint32_t reply,
uint16_t info, const char *str,
size_t len)
{
GET_CONN;
struct nbd_fixed_new_option_reply fixed_new_option_reply;
struct nbd_fixed_new_option_reply_info_name_or_desc name... | 0 |
276,983 | virtual AP4_Result GetSize(AP4_LargeSize& size) { size = m_Size; return AP4_SUCCESS; } | 0 |
369,415 |
static __cold int io_register_restrictions(struct io_ring_ctx *ctx,
void __user *arg, unsigned int nr_args)
{
struct io_uring_restriction *res;
size_t size;
int i, ret;
/* Restrictions allowed only if rings started disabled */
if (!(ctx->flags & IORING_SETUP_R_DISABLED))
return -EBADFD;
/* We allow o... | 0 |
232,956 | static CURLcode gzip_init_writer(struct Curl_easy *data,
struct contenc_writer *writer)
{
struct zlib_params *zp = (struct zlib_params *) &writer->params;
z_stream *z = &zp->z; /* zlib state structure */
if(!writer->downstream)
return CURLE_WRITE_ERROR;
/* Initialize z... | 0 |
474,430 | ObjectGetHierarchy(
OBJECT *object // IN :object
)
{
if(object->attributes.spsHierarchy)
{
return TPM_RH_OWNER;
}
else if(object->attributes.epsHierarchy)
{
return TPM_RH_ENDORSEMENT;
}
else if(object->attributes.ppsHierarchy)
{
return TPM_RH_PLATFORM;
}
e... | 0 |
226,403 | void traf_box_del(GF_Box *s)
{
GF_TrackFragmentBox *ptr = (GF_TrackFragmentBox *)s;
if (ptr == NULL) return;
if (ptr->sub_samples) gf_list_del(ptr->sub_samples);
gf_list_del(ptr->TrackRuns);
if (ptr->sampleGroups) gf_list_del(ptr->sampleGroups);
if (ptr->sampleGroupsDescription) gf_list_del(ptr->sampleGroupsDescr... | 0 |
264,229 | static void framebuffer_update_request(VncState *vs, int incremental,
int x_position, int y_position,
int w, int h)
{
int i;
const size_t width = surface_width(vs->vd->ds) / VNC_DIRTY_PIXELS_PER_BIT;
const size_t height = surface_... | 0 |
344,227 | static void collectvalidlines (lua_State *L, Closure *f) {
if (noLuaClosure(f)) {
setnilvalue(s2v(L->top));
api_incr_top(L);
}
else {
int i;
TValue v;
const Proto *p = f->l.p;
int currentline = p->linedefined;
Table *t = luaH_new(L); /* new table to store active lines */
sethvalue... | 0 |
220,226 | Node* Graph::AddNode(NodeDef node_def, Status* status) {
const OpRegistrationData* op_reg_data;
status->Update(ops_.LookUp(node_def.op(), &op_reg_data));
if (!status->ok()) return nullptr;
DataTypeVector inputs;
DataTypeVector outputs;
status->Update(
InOutTypesForNode(node_def, op_reg_data->op_def, ... | 0 |
226,096 | GF_Box *mvhd_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_MovieHeaderBox, GF_ISOM_BOX_TYPE_MVHD);
tmp->preferredRate = (1<<16);
tmp->preferredVolume = (1<<8);
tmp->matrixA = (1<<16);
tmp->matrixD = (1<<16);
tmp->matrixW = (1<<30);
tmp->nextTrackID = 1;
return (GF_Box *)tmp;
} | 0 |
369,266 |
static __cold void io_sqd_update_thread_idle(struct io_sq_data *sqd)
{
struct io_ring_ctx *ctx;
unsigned sq_thread_idle = 0;
list_for_each_entry(ctx, &sqd->ctx_list, sqd_list)
sq_thread_idle = max(sq_thread_idle, ctx->sq_thread_idle);
sqd->sq_thread_idle = sq_thread_idle; | 0 |
450,428 | static bool vnc_check_pageflip(DisplaySurface *s1,
DisplaySurface *s2)
{
return (s1 != NULL &&
s2 != NULL &&
surface_width(s1) == surface_width(s2) &&
surface_height(s1) == surface_height(s2) &&
surface_format(s1) == surface_format(s2));... | 0 |
273,400 | explicit LSTMBlockCellGradOp(OpKernelConstruction* ctx) : OpKernel(ctx) {
OP_REQUIRES_OK(ctx, ctx->GetAttr("use_peephole", &use_peephole_));
} | 0 |
487,628 | void groups_free(struct group_info *group_info)
{
if (group_info->blocks[0] != group_info->small_block) {
int i;
for (i = 0; i < group_info->nblocks; i++)
free_page((unsigned long)group_info->blocks[i]);
}
kfree(group_info);
} | 0 |
90,234 | ~NetworkLibraryImpl() {
network_manager_observers_.Clear();
if (network_manager_monitor_)
DisconnectPropertyChangeMonitor(network_manager_monitor_);
data_plan_observers_.Clear();
if (data_plan_monitor_)
DisconnectDataPlanUpdateMonitor(data_plan_monitor_);
STLDeleteValues(&network_obser... | 0 |
482,691 | gst_flxdec_sink_event_handler (GstPad * pad, GstObject * parent,
GstEvent * event)
{
GstFlxDec *flxdec;
gboolean ret;
flxdec = GST_FLXDEC (parent);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEGMENT:
{
GstSegment segment;
gst_event_copy_segment (event, &segment);
if (segme... | 0 |
202,943 | l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
CallInfo *ci = L->ci;
const char *msg;
va_list argp;
luaC_checkGC(L); /* error message uses memory */
va_start(argp, fmt);
msg = luaO_pushvfstring(L, fmt, argp); /* format message */
va_end(argp);
if (isLua(ci)) /* if Lua function, add sour... | 1 |
252,335 | static void cpy4(float *dst_val, const float *src_val) {
unsigned char *dst = reinterpret_cast<unsigned char *>(dst_val);
const unsigned char *src = reinterpret_cast<const unsigned char *>(src_val);
dst[0] = src[0];
dst[1] = src[1];
dst[2] = src[2];
dst[3] = src[3];
} | 0 |
265,056 | putpromptchar(int doprint, int endchar, zattr *txtchangep)
{
char *ss, *hostnam;
int t0, arg, test, sep, j, numjobs, len;
zattr atr;
struct tm *tm;
struct timespec ts;
time_t timet;
Nameddir nd;
for (; *bv->fm && *bv->fm != endchar; bv->fm++) {
arg = 0;
if (*bv->fm == '%' && isset(PRO... | 0 |
300,770 | static int tipc_send_group_anycast(struct socket *sock, struct msghdr *m,
int dlen, long timeout)
{
struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name;
struct sock *sk = sock->sk;
struct tipc_sock *tsk = tipc_sk(sk);
struct list_head *cong_links = &tsk->cong_links;
int blks = tsk_blocks(GROUP_H_SIZE +... | 0 |
259,249 | static void mov_free_encryption_index(MOVEncryptionIndex **index) {
int i;
if (!index || !*index) return;
for (i = 0; i < (*index)->nb_encrypted_samples; i++) {
av_encryption_info_free((*index)->encrypted_samples[i]);
}
av_freep(&(*index)->encrypted_samples);
av_freep(&(*index)->auxiliar... | 0 |
462,562 | std::string controller::write_temporary_item(std::shared_ptr<rss_item> item) {
char filename[_POSIX_PATH_MAX];
snprintf(filename, sizeof(filename), "/tmp/newsbeuter-article.XXXXXX");
int fd = mkstemp(filename);
if (fd != -1) {
write_item(item, filename);
close(fd);
return std::string(filename);
} else {
re... | 0 |
513,338 | end_unique_update(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
bool end_of_records)
{
TABLE *table= join_tab->table;
int error;
DBUG_ENTER("end_unique_update");
if (end_of_records)
DBUG_RETURN(NESTED_LOOP_OK);
init_tmptable_sum_functions(join->sum_funcs);
copy_fields(join_tab->tmp_tab... | 0 |
312,579 | vgr_init_regmatch(regmmatch_T *regmatch, char_u *s)
{
// Get the search pattern: either white-separated or enclosed in //
regmatch->regprog = NULL;
if (s == NULL || *s == NUL)
{
// Pattern is empty, use last search pattern.
if (last_search_pat() == NULL)
{
emsg(_(e_no_previous_regular_expressio... | 0 |
317,202 | static int smack_add_opt(int token, const char *s, void **mnt_opts)
{
struct smack_mnt_opts *opts = *mnt_opts;
if (!opts) {
opts = kzalloc(sizeof(struct smack_mnt_opts), GFP_KERNEL);
if (!opts)
return -ENOMEM;
*mnt_opts = opts;
}
if (!s)
return -ENOMEM;
switch (token) {
case Opt_fsdefault:
if (opts... | 0 |
289,269 | static int snd_pcm_oss_set_fragment(struct snd_pcm_oss_file *pcm_oss_file, unsigned int val)
{
int err = -EINVAL, idx;
for (idx = 1; idx >= 0; --idx) {
struct snd_pcm_substream *substream = pcm_oss_file->streams[idx];
struct snd_pcm_runtime *runtime;
if (substream == NULL)
continue;
runtime = substream->... | 0 |
175,698 | WifiNetwork::WifiNetwork(const ServiceInfo* service)
: WirelessNetwork(service) {
encryption_ = service->security;
passphrase_ = SafeString(service->passphrase);
identity_ = SafeString(service->identity);
cert_path_ = SafeString(service->cert_path);
type_ = TYPE_WIFI;
}
| 0 |
310,331 | directory_caches_dir_info(or_options_t *options)
{
if (options->BridgeRelay || options->DirPort)
return 1;
if (!server_mode(options) || !advertised_server_mode())
return 0;
/* We need an up-to-date view of network info if we're going to try to
* block exit attempts from unknown relays. */
return ! ro... | 0 |
455,427 | xfs_reclaim_inodes_nr(
struct xfs_mount *mp,
int nr_to_scan)
{
/* kick background reclaimer and push the AIL */
xfs_reclaim_work_queue(mp);
xfs_ail_push_all(mp->m_ail);
return xfs_reclaim_inodes_ag(mp, SYNC_TRYLOCK | SYNC_WAIT, &nr_to_scan);
} | 0 |
512,616 | longlong val_int()
{
DBUG_ASSERT(sane());
return null_value ? 0 :
m_value.to_datetime(current_thd).to_longlong();
} | 0 |
175,690 | virtual CellularNetwork* FindCellularNetworkByPath(
const std::string& path) {
return GetWirelessNetworkByPath(cellular_networks_, path);
}
| 0 |
90,819 | int64 global_unlimited_usage() const { return global_unlimited_usage_; }
| 0 |
225,559 | void TfLiteIntArrayFree(TfLiteIntArray* a) { free(a); } | 0 |
385,877 | SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags,
umode_t, mode)
{
if (force_o_largefile())
flags |= O_LARGEFILE;
return do_sys_open(dfd, filename, flags, mode);
} | 0 |
427,801 | static void sev_flush_guest_memory(struct vcpu_svm *svm, void *va,
unsigned long len)
{
/*
* If hardware enforced cache coherency for encrypted mappings of the
* same physical page is supported, nothing to do.
*/
if (boot_cpu_has(X86_FEATURE_SME_COHERENT))
return;
/*
* If the VM Page Flush MSR is s... | 0 |
244,257 | void segr_box_del(GF_Box *s)
{
u32 i;
FDSessionGroupBox *ptr = (FDSessionGroupBox *)s;
if (ptr == NULL) return;
for (i=0; i<ptr->num_session_groups; i++) {
if (ptr->session_groups[i].group_ids) gf_free(ptr->session_groups[i].group_ids);
if (ptr->session_groups[i].channels) gf_free(ptr->session_groups[i].channel... | 0 |
226,014 | GF_Box *mdia_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_MediaBox, GF_ISOM_BOX_TYPE_MDIA);
return (GF_Box *)tmp;
} | 0 |
261,739 | size_t size() const override{
return _size;
} | 0 |
221,682 | void Socket::resetChunk() {
chunk_to_read = 0;
chunked_trailer = "";
ieof = false;
} | 0 |
294,449 | d_lite_rfc2822(VALUE self)
{
return strftimev("%a, %-d %b %Y %T %z", self, set_tmx);
} | 0 |
512,462 | Item *get_copy(THD *thd)
{ return get_item_copy<Item_ref_null_helper>(thd, this); } | 0 |
391,630 | int dlpar_sysfs_init(void)
{
int error;
dlpar_kobj = kobject_create_and_add(DLPAR_KOBJ_NAME,
&pci_slots_kset->kobj);
if (!dlpar_kobj)
return -EINVAL;
error = sysfs_create_group(dlpar_kobj, &dlpar_attr_group);
if (error)
kobject_put(dlpar_kobj);
return error;
} | 0 |
272,352 | generate_octet_string(cms_context *cms, SECItem *encoded, SECItem *original)
{
if (content_is_empty(original->data, original->len)) {
cms->log(cms, LOG_ERR, "content is empty, not encoding");
return -1;
}
if (SEC_ASN1EncodeItem(cms->arena, encoded, original,
SEC_OctetStringTemplate) == NULL)
cnreterr(-1, cm... | 0 |
294,495 | datetime_s_rfc3339(int argc, VALUE *argv, VALUE klass)
{
VALUE str, sg, opt;
rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
str = rb_str_new2("-4712-01-01T00:00:00+00:00");
case 1:
sg = INT2FIX(DEFAULT_SG);
}
{
int argc... | 0 |
221,669 | std::string Socket::getPeerIP() {
char res[INET_ADDRSTRLEN];
return inet_ntop(AF_INET,&peer_adr.sin_addr, res, sizeof(res));
} | 0 |
286,721 | SWTPM_NVRAM_GetDecryptedData(const encryptionkey *key,
unsigned char **decrypt_data,
uint32_t *decrypt_length,
const unsigned char *data,
uint32_t length,
uint16_t tag_encrypt... | 0 |
500,655 | int sftp_closedir(sftp_dir dir){
int err = SSH_NO_ERROR;
SAFE_FREE(dir->name);
if (dir->handle) {
err = sftp_handle_close(dir->sftp, dir->handle);
ssh_string_free(dir->handle);
}
/* FIXME: check server response and implement errno */
ssh_buffer_free(dir->buffer);
SAFE_FREE(dir);
return err;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.