idx int64 | func string | target int64 |
|---|---|---|
317,285 | static int selinux_perf_event_read(struct perf_event *event)
{
struct perf_event_security_struct *perfsec = event->security;
u32 sid = current_sid();
return avc_has_perm(&selinux_state, sid, perfsec->sid,
SECCLASS_PERF_EVENT, PERF_EVENT__READ, NULL);
} | 0 |
359,533 | DEFUN (no_neighbor_filter_list,
no_neighbor_filter_list_cmd,
NO_NEIGHBOR_CMD2 "filter-list WORD (in|out)",
NO_STR
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Establish BGP filters\n"
"AS path access-list name\n"
"Filter incoming routes\n"
"Filter outgoing routes\n")
{... | 0 |
247,556 | TestUtilOptionsV2& setExpectedProtocolVersion(const std::string& expected_protocol_version) {
expected_protocol_version_ = expected_protocol_version;
return *this;
} | 0 |
484,795 | static int netfront_probe(struct xenbus_device *dev,
const struct xenbus_device_id *id)
{
int err;
struct net_device *netdev;
struct netfront_info *info;
netdev = xennet_create_dev(dev);
if (IS_ERR(netdev)) {
err = PTR_ERR(netdev);
xenbus_dev_fatal(dev, err, "creating netdev");
return err;
}
info = ... | 0 |
383,324 | gdImageCharUp (gdImagePtr im, gdFontPtr f,
int x, int y, int c, int color)
{
int cx, cy;
int px, py;
int fline;
cx = 0;
cy = 0;
#ifdef CHARSET_EBCDIC
c = ASC (c);
#endif /*CHARSET_EBCDIC */
if ((c < f->offset) || (c >= (f->offset + f->nchars)))
{
return;
}
fline = (c - f->offset) *... | 0 |
247,657 | bool DefaultCertValidator::matchSubjectAltName(
X509* cert, const std::vector<SanMatcherPtr>& subject_alt_name_matchers) {
bssl::UniquePtr<GENERAL_NAMES> san_names(
static_cast<GENERAL_NAMES*>(X509_get_ext_d2i(cert, NID_subject_alt_name, nullptr, nullptr)));
if (san_names == nullptr) {
return false;
... | 0 |
328,837 | R_API char *r_bin_java_print_name_and_type_cp_stringify(RBinJavaCPTypeObj *obj) {
ut32 size = 255, consumed = 0;
char *value = malloc (size);
if (value) {
memset (value, 0, size);
consumed = snprintf (value, size, "%d.0x%04"PFMT64x ".%s.%d.%d",
obj->metas->ord, obj->file_offset + obj->loadaddr, ((RBinJavaCPTy... | 0 |
242,265 | static int PamConversationCallback(int num_msg,
#if defined(__sun)
struct pam_message** msgm,
#else
const struct pam_message** msgm,
#endif
struct pam_response** response,
void* ap... | 0 |
222,668 | char *get_socket_path(const char *_token)
{
char *path;
char *token = xstrdup(_token);
for (char *c = token; *c; c++) {
if (*c == '/' || *c == '.')
*c = '=';
}
xasprintf(&path, TMATE_WORKDIR "/sessions/%s", token);
free(token);
return path;
} | 0 |
333,054 | sub_equal(regsub_T *sub1, regsub_T *sub2)
{
int i;
int todo;
linenr_T s1;
linenr_T s2;
char_u *sp1;
char_u *sp2;
todo = sub1->in_use > sub2->in_use ? sub1->in_use : sub2->in_use;
if (REG_MULTI)
{
for (i = 0; i < todo; ++i)
{
if (i < sub1->in_use)
s1 = sub1->list.multi[i].... | 0 |
231,736 | TEST_F(QuicServerTransportTest, TestRegisterPMTUZeroBlackholeDetection) {
server->handleKnobParams(
{{static_cast<uint64_t>(
TransportKnobParamId::ZERO_PMTU_BLACKHOLE_DETECTION),
1}});
EXPECT_TRUE(server->getConn().d6d.noBlackholeDetection);
} | 0 |
450,328 | static void vnc_refresh(DisplayChangeListener *dcl)
{
VncDisplay *vd = container_of(dcl, VncDisplay, dcl);
VncState *vs, *vn;
int has_dirty, rects = 0;
if (QTAILQ_EMPTY(&vd->clients)) {
update_displaychangelistener(&vd->dcl, VNC_REFRESH_INTERVAL_MAX);
return;
}
graphic_hw_updat... | 0 |
261,923 | njs_string_prototype_split(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
njs_index_t unused)
{
size_t size;
uint32_t limit;
njs_int_t ret;
njs_utf8_t utf8;
njs_bool_t undefined;
njs_value_t *this, *separator, *value;
njs_value_t ... | 0 |
232,311 | GF_ISOFile *gf_isom_new_movie()
{
GF_ISOFile *mov = (GF_ISOFile*)gf_malloc(sizeof(GF_ISOFile));
if (mov == NULL) {
gf_isom_set_last_error(NULL, GF_OUT_OF_MEM);
return NULL;
}
memset(mov, 0, sizeof(GF_ISOFile));
/*init the boxes*/
mov->TopBoxes = gf_list_new();
if (!mov->TopBoxes) {
gf_isom_set_last_error(... | 0 |
213,076 | static void compile_xclass_matchingpath(compiler_common *common, PCRE2_SPTR cc, jump_list **backtracks)
{
DEFINE_COMPILER;
jump_list *found = NULL;
jump_list **list = (cc[0] & XCL_NOT) == 0 ? &found : backtracks;
sljit_uw c, charoffset, max = 256, min = READ_CHAR_MAX;
struct sljit_jump *jump = NULL;
PCRE2_SPTR ccbegin;... | 1 |
384,181 | static int nf_tables_addchain(struct nft_ctx *ctx, u8 family, u8 genmask,
u8 policy, u32 flags,
struct netlink_ext_ack *extack)
{
const struct nlattr * const *nla = ctx->nla;
struct nft_stats __percpu *stats = NULL;
struct nft_table *table = ctx->table;
struct nft_base_chain *basechain;
struct ne... | 0 |
223,471 | static void do_utfreadnewline_invalid(compiler_common *common)
{
/* Slow decoding a UTF-8 character, specialized for newlines.
TMP1 contains the first byte of the character (>= 0xc0). Return
char value in TMP1. */
DEFINE_COMPILER;
struct sljit_label *loop;
struct sljit_label *skip_start;
struct sljit_label *three_byte_... | 0 |
234,190 | display_debug_info (struct dwarf_section *section, void *file)
{
return process_debug_info (section, file, section->abbrev_sec, false, false);
} | 0 |
401,500 | static void timers_update_migration(void)
{
if (sysctl_timer_migration && tick_nohz_active)
static_branch_enable(&timers_migration_enabled);
else
static_branch_disable(&timers_migration_enabled);
} | 0 |
476,126 | static int len_ext_prop(struct usb_configuration *c, int interface)
{
struct usb_function *f;
struct usb_os_desc *d;
int j, res;
res = 10; /* header length */
f = c->interface[interface];
for (j = 0; j < f->os_desc_n; ++j) {
if (interface != f->os_desc_table[j].if_id)
continue;
d = f->os_desc_table[j].os_... | 0 |
216,654 | auth_request_get_var_expand_table_full(const struct auth_request *auth_request,
auth_request_escape_func_t *escape_func,
unsigned int *count)
{
const unsigned int auth_count =
N_ELEMENTS(auth_request_var_expand_static_tab);
struct var_expand_table *tab, *ret_tab;
const char *orig_user, *auth_... | 1 |
455,389 | xfs_iget(
xfs_mount_t *mp,
xfs_trans_t *tp,
xfs_ino_t ino,
uint flags,
uint lock_flags,
xfs_inode_t **ipp)
{
xfs_inode_t *ip;
int error;
xfs_perag_t *pag;
xfs_agino_t agino;
/*
* xfs_reclaim_inode() uses the ILOCK to ensure an inode
* doesn't get freed while it's being referenced during a
* radix t... | 0 |
250,680 | string_view HttpFile::getFileExtension() const
{
return implPtr_->getFileExtension();
} | 0 |
432,323 | static RAMBlock *qemu_get_ram_block(struct uc_struct *uc, ram_addr_t addr)
{
RAMBlock *block;
block = uc->ram_list.mru_block;
if (block && addr - block->offset < block->max_length) {
return block;
}
RAMBLOCK_FOREACH(block) {
if (addr - block->offset < block->max_length) {
... | 0 |
275,933 | static void apply_z(uECC_word_t * X1,
uECC_word_t * Y1,
const uECC_word_t * const Z,
uECC_Curve curve) {
uECC_word_t t1[uECC_MAX_WORDS];
uECC_vli_modSquare_fast(t1, Z, curve); /* z^2 */
uECC_vli_modMult_fast(X1, X1, t1, curve); /* x1 * z^2 */
... | 0 |
200,305 | pcx_write_rle(const byte * from, const byte * end, int step, gp_file * file)
{ /*
* The PCX format theoretically allows encoding runs of 63
* identical bytes, but some readers can't handle repetition
* counts greater t... | 1 |
349,888 | int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self,
struct hw_atl_utils_fw_rpc **rpc)
{
struct aq_hw_atl_utils_fw_rpc_tid_s sw;
struct aq_hw_atl_utils_fw_rpc_tid_s fw;
int err = 0;
do {
sw.val = aq_hw_read_reg(self, HW_ATL_RPC_CONTROL_ADR);
self->rpc_tid = sw.tid;
err = readx_poll_timeout_atomic(hw_... | 0 |
247,095 | GF_Err gf_fs_set_separators(GF_FilterSession *session, const char *separator_set)
{
if (!session) return GF_BAD_PARAM;
if (separator_set && (strlen(separator_set)<5)) return GF_BAD_PARAM;
if (separator_set) {
session->sep_args = separator_set[0];
session->sep_name = separator_set[1];
session->sep_frag = separ... | 0 |
207,804 | void update_process_times(int user_tick)
{
struct task_struct *p = current;
/* Note: this timer irq context must be accounted for as well. */
account_process_tick(p, user_tick);
run_local_timers();
rcu_sched_clock_irq(user_tick);
#ifdef CONFIG_IRQ_WORK
if (in_irq())
irq_work_tick();
#endif
scheduler_tick();
... | 1 |
338,209 | void WasmBinaryBuilder::visitGlobalSet(GlobalSet* curr) {
BYN_TRACE("zz node: GlobalSet\n");
auto index = getU32LEB();
if (index < globalImports.size()) {
auto* import = globalImports[index];
curr->name = import->name;
} else {
Index adjustedIndex = index - globalImports.size();
if (adjustedInde... | 0 |
503,874 | SCM_DEFINE (scm_readdir, "readdir", 1, 0, 0,
(SCM port),
"Return (as a string) the next directory entry from the directory stream\n"
"@var{port}. If there is no remaining entry to be read then the\n"
"end of file object is returned.")
#define FUNC_NAME s_scm_readdir
{
struct dirent_or_dirent64 *r... | 0 |
101,666 | void WebProcessProxy::didClearPluginSiteData(uint64_t callbackID)
{
m_context->pluginSiteDataManager()->didClearSiteData(callbackID);
}
| 0 |
432,300 | static void flatviews_init(struct uc_struct *uc)
{
if (uc->flat_views) {
return;
}
uc->flat_views = g_hash_table_new_full(NULL, NULL, NULL,
(GDestroyNotify) flatview_unref);
if (!uc->empty_view) {
uc->empty_view = generate_memory_topology(uc, NULL... | 0 |
225,049 | pqDropServerData(PGconn *conn)
{
PGnotify *notify;
pgParameterStatus *pstatus;
/* Forget pending notifies */
notify = conn->notifyHead;
while (notify != NULL)
{
PGnotify *prev = notify;
notify = notify->next;
free(prev);
}
conn->notifyHead = conn->notifyTail = NULL;
pqFreeCommandQueue(conn->cmd_qu... | 0 |
256,953 | string TraceString(const OpKernelContext& ctx, bool verbose) const override {
string op = profiler::TraceMeOp(name_view(), type_string_view());
string equation = strings::StrCat("(", equation_, ")");
if (verbose) {
string shape = ShapeTraceString(ctx);
if (!shape.empty()) {
return prof... | 0 |
498,092 | void cgit_print_error_page(int code, const char *msg, const char *fmt, ...)
{
va_list ap;
ctx.page.expires = ctx.cfg.cache_dynamic_ttl;
ctx.page.status = code;
ctx.page.statusmsg = msg;
cgit_print_http_headers();
cgit_print_docstart();
cgit_print_pageheader();
va_start(ap, fmt);
cgit_vprint_error(fmt, ap);
va... | 0 |
326,110 | use_multibytecode(int c)
{
return has_mbyte && (*mb_char2len)(c) > 1
&& (re_multi_type(peekchr()) != NOT_MULTI
|| (enc_utf8 && utf_iscomposing(c)));
} | 0 |
225,390 | static void vm_open(struct vm_area_struct *vma)
{
struct v4l2l_buffer *buf;
MARK();
buf = vma->vm_private_data;
buf->use_count++;
} | 0 |
328,955 | R_API RBinJavaBootStrapMethod *r_bin_java_bootstrap_method_new(ut8 *buffer, ut64 sz, ut64 buf_offset) {
RBinJavaBootStrapArgument *bsm_arg = NULL;
ut32 i = 0;
ut64 offset = 0;
RBinJavaBootStrapMethod *bsm = R_NEW0 (RBinJavaBootStrapMethod);
if (!bsm) {
// TODO eprintf failed to allocate bytes for bootstrap_metho... | 0 |
513,216 | sys_var *find_sys_var(THD *thd, const char *str, size_t length)
{
return find_sys_var_ex(thd, str, length, false, false);
} | 0 |
512,956 | longlong val_int()
{
return to_datetime(current_thd).to_longlong();
} | 0 |
224,465 | static void ttxt_dom_progress(void *cbk, u64 cur_samp, u64 count)
{
GF_TXTIn *ctx = (GF_TXTIn *)cbk;
ctx->end = count;
} | 0 |
513,096 | void set_geometry_type(uint type)
{
DBUG_ASSERT(type <= m_geometry_type_unknown);
m_geometry_type= type;
} | 0 |
282,857 | static bool rsi_map_rates(u16 rate, int *offset)
{
int kk;
for (kk = 0; kk < ARRAY_SIZE(rsi_mcsrates); kk++) {
if (rate == mcs[kk]) {
*offset = kk;
return false;
}
}
for (kk = 0; kk < ARRAY_SIZE(rsi_rates); kk++) {
if (rate == rsi_rates[kk].bitrate / 5) {
*offset = kk;
break;
}
}
return true;... | 0 |
508,826 | void st_select_lex_node::include_global(st_select_lex_node **plink)
{
if ((link_next= *plink))
link_next->link_prev= &link_next;
link_prev= plink;
*plink= this;
} | 0 |
424,945 | static int iwl_trans_pcie_clear_persistence_bit(struct iwl_trans *trans)
{
u32 hpm, wprot;
switch (trans->trans_cfg->device_family) {
case IWL_DEVICE_FAMILY_9000:
wprot = PREG_PRPH_WPROT_9000;
break;
case IWL_DEVICE_FAMILY_22000:
wprot = PREG_PRPH_WPROT_22000;
break;
default:
return 0;
}
hpm = iwl_re... | 0 |
413,653 | R_API void r_core_anal_coderefs(RCore *core, ut64 addr) {
RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, addr, -1);
if (fcn) {
const char *me = fcn->name;
RListIter *iter;
RAnalRef *ref;
RList *refs = r_anal_function_get_refs (fcn);
r_cons_printf ("agn %s\n", me);
r_list_foreach (refs, iter, ref) {
... | 0 |
508,925 | void st_select_lex::collect_grouping_fields(THD *thd)
{
grouping_tmp_fields.empty();
List_iterator<Item> li(join->fields_list);
Item *item= li++;
for (uint i= 0; i < master_unit()->derived->table->s->fields; i++, (item=li++))
{
for (ORDER *ord= join->group_list; ord; ord= ord->next)
{
if ((*ord... | 0 |
310,019 | show_tty_change(TTY * old_settings,
TTY * new_settings,
const char *name,
int which,
unsigned def)
{
unsigned older, newer;
char *p;
newer = new_settings->c_cc[which];
older = old_settings->c_cc[which];
if (older == newer && older == def)
return;
(void) fprintf(stderr, "%s %s ", name... | 0 |
225,674 |
GF_Box *pasp_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_PixelAspectRatioBox, GF_ISOM_BOX_TYPE_PASP);
return (GF_Box *)tmp; | 0 |
267,859 | Status ModularFrameDecoder::DecodeQuantTable(
size_t required_size_x, size_t required_size_y, BitReader* br,
QuantEncoding* encoding, size_t idx,
ModularFrameDecoder* modular_frame_decoder) {
JXL_RETURN_IF_ERROR(F16Coder::Read(br, &encoding->qraw.qtable_den));
if (encoding->qraw.qtable_den < kAlmostZero... | 0 |
384,907 | gen_expand_wildcards(
int num_pat, // number of input patterns
char_u **pat, // array of input patterns
int *num_file, // resulting number of files
char_u ***file, // array of resulting files
int flags) // EW_* flags
{
int i;
garray_T ga;
char_u *p;
static int recursive = F... | 0 |
474,063 | onig_error_code_to_str(s, code, va_alist)
UChar* s;
int code;
va_dcl
#endif
{
UChar *p, *q;
OnigErrorInfo* einfo;
size_t len;
int is_over;
UChar parbuf[MAX_ERROR_PAR_LEN];
va_list vargs;
va_init_list(vargs, code);
switch (code) {
case ONIGERR_UNDEFINED_NAME_REFERENCE:
case ONIGERR_UNDEFINED_... | 0 |
362,306 | static int usb_audio_suspend(struct usb_interface *intf, pm_message_t message)
{
struct snd_usb_audio *chip = usb_get_intfdata(intf);
struct snd_usb_stream *as;
struct usb_mixer_interface *mixer;
struct list_head *p;
if (chip == (void *)-1L)
return 0;
chip->autosuspended = !!PMSG_IS_AUTO(message);
if (!chip-... | 0 |
481,795 | int qh_register_handler(const char *name, const char *description, unsigned int options, qh_handler handler)
{
struct query_handler *qh = NULL;
int result = 0;
if (name == NULL) {
logit(NSLOG_RUNTIME_ERROR, TRUE, "qh: Failed to register handler with no name\n");
return -1;
}
if (handler == NULL) {
logit(NS... | 0 |
275,986 | uECC_VLI_API void uECC_vli_nativeToBytes(uint8_t *bytes,
int num_bytes,
const uECC_word_t *native) {
wordcount_t i;
for (i = 0; i < num_bytes; ++i) {
unsigned b = num_bytes - 1 - i;
bytes[i] = native[b / uECC_WORD_... | 0 |
438,666 | static void rpmsg_upref_sleepers(struct virtproc_info *vrp)
{
/* support multiple concurrent senders */
mutex_lock(&vrp->tx_lock);
/* are we the first sleeping context waiting for tx buffers ? */
if (atomic_inc_return(&vrp->sleepers) == 1)
/* enable "tx-complete" interrupts before dozing off */
virtqueue_enabl... | 0 |
244,245 | GF_Err proj_type_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_ProjectionTypeBox *ptr = (GF_ProjectionTypeBox *)s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
if (ptr->type==GF_ISOM_BOX_TYPE_CBMP) {
gf_bs_write_u32(bs, ptr->layout);
gf_bs_write_u32(bs, ptr->padding);
}
else if (ptr->type==GF... | 0 |
225,852 |
GF_Box *trgt_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_TrackGroupTypeBox, GF_ISOM_BOX_TYPE_TRGT);
return (GF_Box *)tmp; | 0 |
310,065 | usage(void)
{
static const char *msg[] =
{
"Usage: dots_termcap [options]"
,""
,"Options:"
," -T TERM override $TERM"
#if HAVE_USE_ENV
," -e allow environment $LINES / $COLUMNS"
#endif
," -f use tigetnum rather than <term.h> mapping"
," -m SIZE set margin (default: 2)"
," -r SECS self-int... | 0 |
294,724 | f_kind_of_p(VALUE x, VALUE c)
{
return rb_obj_is_kind_of(x, c);
} | 0 |
229,312 | cql_server::connection::process_on_shard(::shared_ptr<messages::result_message::bounce_to_shard> bounce_msg, uint16_t stream, fragmented_temporary_buffer::istream is,
service::client_state& cs, service_permit permit, tracing::trace_state_ptr trace_state, Process process_fn) {
return _server.container().invo... | 0 |
274,692 | callbacks_drawingarea_motion_notify_event (GtkWidget *widget, GdkEventMotion *event)
{
int x, y;
GdkModifierType state;
if (event->is_hint)
gdk_window_get_pointer (event->window, &x, &y, &state);
else {
x = event->x;
y = event->y;
state = event->state;
}
switch (screen.state) {
case IN_MOVE: {
i... | 0 |
205,736 | static inline void fuse_make_bad(struct inode *inode)
{
set_bit(FUSE_I_BAD, &get_fuse_inode(inode)->state);
} | 1 |
274,752 | int ntfs_attr_map_whole_runlist(ntfs_attr *na)
{
VCN next_vcn, last_vcn, highest_vcn;
ntfs_attr_search_ctx *ctx;
ntfs_volume *vol = na->ni->vol;
ATTR_RECORD *a;
int ret = -1;
int not_mapped;
ntfs_log_enter("Entering for inode %llu, attr 0x%x.\n",
(unsigned long long)na->ni->mft_no, le32_to_cpu(na->type... | 0 |
195,340 | void Compute(OpKernelContext *ctx) override {
const Tensor *indices_t, *values_t, *shape_t, *dense_t;
OP_REQUIRES_OK(ctx, ctx->input("sp_indices", &indices_t));
OP_REQUIRES_OK(ctx, ctx->input("sp_values", &values_t));
OP_REQUIRES_OK(ctx, ctx->input("sp_shape", &shape_t));
OP_REQUIRES_OK(ctx, ctx->... | 1 |
513,080 | bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
} | 0 |
336,130 | static void __net_exit ip6gre_exit_net(struct net *net)
{
LIST_HEAD(list);
rtnl_lock();
ip6gre_destroy_tunnels(net, &list);
unregister_netdevice_many(&list);
rtnl_unlock();
} | 0 |
275,510 | njs_vm_memory_pool(njs_vm_t *vm)
{
return vm->mem_pool;
} | 0 |
195,091 | llvm::Optional<Value> simplifyBroadcast(ShapeComponentAnalysis& analysis,
ValueRange shapes, Location loc,
OpBuilder* builder) {
// First find the input shape with the largest rank.
SmallVector<ArrayRef<ShapeComponentAnalysis::SymbolicE... | 1 |
364,756 | tagstack_push_item(
win_T *wp,
char_u *tagname,
int cur_fnum,
int cur_match,
pos_T mark,
int fnum,
char_u *user_data)
{
taggy_T *tagstack = wp->w_tagstack;
int idx = wp->w_tagstacklen; // top of the stack
// if the tagstack is full: remove the oldest entry
if (idx >= TAGSTACKSIZE)
{
tagst... | 0 |
506,440 | static struct auth_request *mech_rpa_auth_new(void)
{
struct rpa_auth_request *request;
pool_t pool;
pool = pool_alloconly_create(MEMPOOL_GROWING"rpa_auth_request", 2048);
request = p_new(pool, struct rpa_auth_request, 1);
request->pool = pool;
request->phase = 0;
request->auth_request.pool = pool;
return &re... | 0 |
463,197 | static int annotation_set_todb(annotate_state_t *state,
struct annotate_entry_list *entry,
int maywrite)
{
int r = 0;
if (entry->have_shared)
r = write_entry(state->mailbox, state->uid,
entry->name, "",
... | 0 |
377,482 | void r_coresym_cache_element_free(RCoreSymCacheElement *element) {
if (!element) {
return;
}
size_t i;
if (element->segments) {
for (i = 0; i < element->hdr->n_segments; i++) {
r_coresym_cache_element_segment_fini (&element->segments[i]);
}
}
if (element->sections) {
for (i = 0; i < element->hdr->n_sec... | 0 |
484,729 | void mobi_buffer_resize(MOBIBuffer *buf, const size_t newlen) {
unsigned char *tmp = realloc(buf->data, newlen);
if (tmp == NULL) {
debug_print("%s", "Buffer allocation failed\n");
buf->error = MOBI_MALLOC_FAILED;
return;
}
buf->data = tmp;
buf->maxlen = newlen;
if (buf->... | 0 |
385,925 | static inline int check_sticky(struct inode *dir, struct inode *inode)
{
kuid_t fsuid = current_fsuid();
if (!(dir->i_mode & S_ISVTX))
return 0;
if (uid_eq(inode->i_uid, fsuid))
return 0;
if (uid_eq(dir->i_uid, fsuid))
return 0;
return !inode_capable(inode, CAP_FOWNER);
} | 0 |
413,862 | void LinkResolver::resolve_handle_call(CallInfo& result,
const LinkInfo& link_info,
TRAPS) {
// JSR 292: this must be an implicitly generated method MethodHandle.invokeExact(*...) or similar
Klass* resolved_klass = link_info.resolved_kla... | 0 |
281,053 | static const void *xfrm_get_dst_nexthop(const struct dst_entry *dst,
const void *daddr)
{
const struct dst_entry *path = dst->path;
for (; dst != path; dst = dst->child) {
const struct xfrm_state *xfrm = dst->xfrm;
if (xfrm->props.mode == XFRM_MODE_TRANSPORT)
continue;
if (xfrm->type->flags & XFRM_TYP... | 0 |
293,525 | PJ_DEF(void) pj_cis_add_num(pj_cis_t *cis)
{
pj_cis_add_range( cis, '0', '9'+1);
} | 0 |
225,118 | uint64 RepeatedAttrDefHash(
const protobuf::RepeatedPtrField<OpDef::AttrDef>& a) {
// Insert AttrDefs into map to deterministically sort by name
std::map<string, const OpDef::AttrDef*> a_set;
for (const OpDef::AttrDef& def : a) {
a_set[def.name()] = &def;
}
// Iterate and combines hashes of keys and v... | 0 |
383,331 | gdImageColorDeallocate (gdImagePtr im, int color)
{
if (im->trueColor)
{
return;
}
/* Mark it open. */
im->open[color] = 1;
} | 0 |
205,734 | static pyc_object *get_complex_object(RzBinPycObj *pyc, RzBuffer *buffer) {
pyc_object *ret = NULL;
bool error = false;
ut32 size = 0;
ut32 n1 = 0;
ut32 n2 = 0;
ret = RZ_NEW0(pyc_object);
if (!ret) {
return NULL;
}
if ((pyc->magic_int & 0xffff) <= 62061) {
n1 = get_ut8(buffer, &error);
} else {
n1 = g... | 1 |
398,539 | static inline RzBinDwarfLocRange *create_loc_range(ut64 start, ut64 end, RzBinDwarfBlock *block) {
RzBinDwarfLocRange *range = RZ_NEW0(RzBinDwarfLocRange);
if (range) {
range->start = start;
range->end = end;
range->expression = block;
}
return range;
} | 0 |
223,424 | static void compile_assert_backtrackingpath(compiler_common *common, struct backtrack_common *current)
{
DEFINE_COMPILER;
PCRE2_SPTR cc = current->cc;
PCRE2_UCHAR bra = OP_BRA;
struct sljit_jump *brajump = NULL;
SLJIT_ASSERT(*cc != OP_BRAMINZERO);
if (*cc == OP_BRAZERO)
{
bra = *cc;
cc++;
}
if (bra == OP_BRAZ... | 0 |
256,413 | static void parse_rtcp_fb(pjmedia_rtcp_session *sess,
const void *pkt,
pj_size_t size)
{
unsigned cnt = 1;
pjmedia_rtcp_fb_nack nack[1];
//pjmedia_rtcp_fb_sli sli[1];
//pjmedia_rtcp_fb_rpsi rpsi;
pjmedia_event ev;
pj_timestamp ts_now;
pj_get_timestamp(&ts_now);
if (pjmedia_rt... | 0 |
259,252 | static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
MOVStreamContext *sc;
int ret;
st = avformat_new_stream(c->fc, NULL);
if (!st) return AVERROR(ENOMEM);
st->id = -1;
sc = av_mallocz(sizeof(MOVStreamContext));
if (!sc) return AVERROR(ENOMEM);
st-... | 0 |
390,622 | ProcXkbSetMap(ClientPtr client)
{
DeviceIntPtr dev;
char * tmp;
int rc;
REQUEST(xkbSetMapReq);
REQUEST_AT_LEAST_SIZE(xkbSetMapReq);
if (!(client->xkbClientFlags&_XkbClientInitialized))
return BadAccess;
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
... | 0 |
294,369 | d_lite_zero(VALUE x)
{
return INT2FIX(0);
} | 0 |
317,144 | static void smack_task_getsecid_subj(struct task_struct *p, u32 *secid)
{
struct smack_known *skp = smk_of_task_struct_subj(p);
*secid = skp->smk_secid;
} | 0 |
438,671 | static int rpmsg_probe(struct virtio_device *vdev)
{
vq_callback_t *vq_cbs[] = { rpmsg_recv_done, rpmsg_xmit_done };
static const char * const names[] = { "input", "output" };
struct virtqueue *vqs[2];
struct virtproc_info *vrp;
struct virtio_rpmsg_channel *vch = NULL;
struct rpmsg_device *rpdev_ns, *rpdev_ctrl;
... | 0 |
238,598 | static void mark_stack_slot_scratched(struct bpf_verifier_env *env, u32 spi)
{
env->scratched_stack_slots |= 1ULL << spi;
} | 0 |
474,458 | IsObjectPresent(
TPMI_DH_OBJECT handle // IN: handle to be checked
)
{
UINT32 slotIndex = handle - TRANSIENT_FIRST;
// Since the handle is just an index into the array that is zero based, any
// handle value outsize of the range of:
// TRANSIENT_FIRST -- (TRANSIENT_FIRST + MAX_... | 0 |
440,876 | LogWrite(int verb, const char *f, ...)
{
va_list args;
va_start(args, f);
LogVWrite(verb, f, args);
va_end(args);
} | 0 |
301,379 | static int vfswrap_statvfs(struct vfs_handle_struct *handle, const char *path, vfs_statvfs_struct *statbuf)
{
return sys_statvfs(path, statbuf);
} | 0 |
225,631 |
void proj_type_box_del(GF_Box *s)
{
gf_free(s); | 0 |
421,398 | const char *jsP_aststring(enum js_AstType type)
{
if (type < nelem(astname)-1)
return astname[type];
return "<unknown>";
} | 0 |
259,184 | static int mov_read_schm(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
MOVStreamContext *sc;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams-1];
sc = st->priv_data;
if (sc->pseudo_stream_id != 0) {
av_log(c->fc, AV_LOG_ERROR, "schm box... | 0 |
211,461 | parse_cmd_address(exarg_T *eap, char **errormsg, int silent)
{
int address_count = 1;
linenr_T lnum;
int need_check_cursor = FALSE;
int ret = FAIL;
// Repeat for all ',' or ';' separated addresses.
for (;;)
{
eap->line1 = eap->line2;
eap->line2 = default_address(eap);
eap->cmd = skipw... | 1 |
430,417 | static int __parse_flow_nlattrs(const struct nlattr *attr,
const struct nlattr *a[],
u64 *attrsp, bool log, bool nz)
{
const struct nlattr *nla;
u64 attrs;
int rem;
attrs = *attrsp;
nla_for_each_nested(nla, attr, rem) {
u16 type = nla_type(nla);
int expected_len;
if (type > OVS_KEY_ATTR_MAX) {
O... | 0 |
300,822 | static int tipc_release(struct socket *sock)
{
struct sock *sk = sock->sk;
struct tipc_sock *tsk;
/*
* Exit if socket isn't fully initialized (occurs when a failed accept()
* releases a pre-allocated child socket that was never used)
*/
if (sk == NULL)
return 0;
tsk = tipc_sk(sk);
lock_sock(sk);
trace... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.