idx int64 | func string | target int64 |
|---|---|---|
294,638 | d_lite_to_s(VALUE self)
{
return strftimev("%Y-%m-%d", self, set_tmx);
} | 0 |
450,354 | static int protocol_client_init(VncState *vs, uint8_t *data, size_t len)
{
char buf[1024];
VncShareMode mode;
int size;
mode = data[0] ? VNC_SHARE_MODE_SHARED : VNC_SHARE_MODE_EXCLUSIVE;
switch (vs->vd->share_policy) {
case VNC_SHARE_POLICY_IGNORE:
/*
* Ignore the shared flag. ... | 0 |
455,285 | bash_backward_shellword (count, key)
int count, key;
{
size_t slen;
int c, p, prev_p;
DECLARE_MBSTATE;
if (count < 0)
return (bash_forward_shellword (-count, key));
p = rl_point;
slen = rl_end;
while (count)
{
if (p == 0)
{
rl_point = 0;
return 0;
}
/* Move backward un... | 0 |
389,672 | check_for_list_or_blob_arg(typval_T *args, int idx)
{
if (args[idx].v_type != VAR_LIST && args[idx].v_type != VAR_BLOB)
{
semsg(_(e_list_or_blob_required_for_argument_nr), idx + 1);
return FAIL;
}
return OK;
} | 0 |
229,315 | void EagerKernelExecuteAsync(
EagerContext* ctx, const absl::InlinedVector<TensorHandle*, 4>& op_inputs,
const absl::optional<EagerFunctionParams>& eager_func_params,
const core::RefCountPtr<KernelAndDevice> kernel,
GraphCollector* graph_collector, CancellationManager* cancellation_manager,
TensorHa... | 0 |
508,363 | open_system_tables_for_read(THD *thd, TABLE_LIST *table_list,
Open_tables_backup *backup)
{
Query_tables_list query_tables_list_backup;
LEX *lex= thd->lex;
DBUG_ENTER("open_system_tables_for_read");
/*
Besides using new Open_tables_state for opening system tables,
we also h... | 0 |
292,212 | find_session_from_nick (char *nick, server *serv)
{
session *sess;
GSList *list = sess_list;
sess = find_dialog (serv, nick);
if (sess)
return sess;
if (serv->front_session)
{
if (userlist_find (serv->front_session, nick))
return serv->front_session;
}
if (current_sess && current_sess->server == serv)... | 0 |
450,340 | static void png_flush_data(png_structp png_ptr)
{
} | 0 |
301,015 | pcx_write_page(gx_device_printer * pdev, gp_file * file, pcx_header * phdr,
bool planar)
{
int raster = gdev_prn_raster(pdev);
uint rsize = ROUND_UP((pdev->width * phdr->bpp + 7) >> 3, 2); /* PCX format requires even */
int height = pdev->height;
int depth = pdev->color_info.depth;
ui... | 0 |
248,251 | DLLIMPORT int cfg_opt_setmulti(cfg_t *cfg, cfg_opt_t *opt, unsigned int nvalues, char **values)
{
cfg_opt_t old;
unsigned int i;
if (!opt || !nvalues) {
errno = EINVAL;
return CFG_FAIL;
}
old = *opt;
opt->nvalues = 0;
opt->values = NULL;
for (i = 0; i < nvalues; i++) {
if (cfg_setopt(cfg, opt, values[i... | 0 |
90,142 | virtual std::string GetHtmlInfo(int refresh) {
std::string output;
output.append("<html><head><title>About Network</title>");
if (refresh > 0)
output.append("<meta http-equiv=\"refresh\" content=\"" +
base::IntToString(refresh) + "\"/>");
output.append("</head><body>");
if (refresh... | 0 |
476,119 | static void __composite_unbind(struct usb_gadget *gadget, bool unbind_driver)
{
struct usb_composite_dev *cdev = get_gadget_data(gadget);
struct usb_gadget_strings *gstr = cdev->driver->strings[0];
struct usb_string *dev_str = gstr->strings;
/* composite_disconnect() must already have been called
* by the under... | 0 |
224,589 | Status ReductionShape(InferenceContext* c) {
ShapeHandle input = c->input(0);
ShapeHandle indices;
// Older versions of TensorFlow accidentally allowed higher rank tensors like
// [[1,2]] or [[1],[2]] to represent axis=[1,2].
if (c->graph_def_version() < 21) {
indices = c->input(1);
} else {
TF_RET... | 0 |
436,158 | static inline bool io_run_task_work(void)
{
if (current->task_works) {
__set_current_state(TASK_RUNNING);
task_work_run();
return true;
}
return false;
} | 0 |
508,790 | void st_select_lex::remap_tables(TABLE_LIST *derived, table_map map,
uint tablenr, SELECT_LEX *parent_lex)
{
bool first_table= TRUE;
TABLE_LIST *tl;
table_map first_map;
uint first_tablenr;
if (derived && derived->table)
{
first_map= derived->table->map;
first_table... | 0 |
369,219 | static int io_sendmsg(struct io_kiocb *req, unsigned int issue_flags)
{
struct io_async_msghdr iomsg, *kmsg;
struct socket *sock;
unsigned flags;
int min_ret = 0;
int ret;
sock = sock_from_file(req->file);
if (unlikely(!sock))
return -ENOTSOCK;
if (req_has_async_data(req)) {
kmsg = req->async_data;
} els... | 0 |
508,913 | void st_select_lex::print_limit(THD *thd,
String *str,
enum_query_type query_type)
{
SELECT_LEX_UNIT *unit= master_unit();
Item_subselect *item= unit->item;
if (item && unit->global_parameters() == this)
{
Item_subselect::subs_type subs_type= ... | 0 |
329,940 | _fill_a8_lerp_opaque_spans (void *abstract_renderer, int y, int h,
const cairo_half_open_span_t *spans, unsigned num_spans)
{
cairo_image_span_renderer_t *r = abstract_renderer;
if (num_spans == 0)
return CAIRO_STATUS_SUCCESS;
if (likely(h == 1)) {
uint8_t *d = r->u.fill.data + r->u.fill.stride*y... | 0 |
241,067 | static int do_command(cmd_request_t cmd)
{
struct booth_site *site;
struct boothc_ticket_msg reply;
struct booth_transport const *tpt;
uint32_t leader_id;
int rv;
int reply_cnt = 0, msg_logged = 0;
const char *op_str = "";
if (cmd == CMD_GRANT)
op_str = "grant";
else if (cmd == CMD_REVOKE)
op_str = "revok... | 0 |
222,871 | bool MaybeTensorProtoToShape(InferenceContext* ic,
const TensorProto& tensor_proto,
ShapeHandle* tensors_as_shapes) {
// Skip if dtype is not integer.
if (tensor_proto.dtype() != DT_INT32 && tensor_proto.dtype() != DT_INT64) {
return false;
... | 0 |
234,141 | fetch_indexed_value (dwarf_vma idx,
enum dwarf_section_display_enum sec_enum,
dwarf_vma base_address)
{
struct dwarf_section *section = &debug_displays [sec_enum].section;
if (section->start == NULL)
{
warn (_("Unable to locate %s section\n"), section->uncompressed_name);
return 0;
... | 0 |
512,767 | bool set_value(THD *thd, const Type_all_attributes *attr,
const st_value *val, const Type_handler *h)
{
value.set_handler(h); // See comments in set_param_func()
return h->Item_param_set_from_value(thd, this, attr, val);
} | 0 |
336,645 | static gboolean reds_use_client_monitors_config(RedsState *reds)
{
if (reds->qxl_instances.empty()) {
return FALSE;
}
FOREACH_QXL_INSTANCE(reds, qxl) {
if (!red_qxl_client_monitors_config(qxl, NULL))
return FALSE;
}
return TRUE;
} | 0 |
386,494 | void DL_Dxf::addPoint(DL_CreationInterface* creationInterface) {
DL_PointData d(getRealValue(10, 0.0),
getRealValue(20, 0.0),
getRealValue(30, 0.0));
creationInterface->addPoint(d);
} | 0 |
513,002 | Item *get_copy(THD *thd)
{ return get_item_copy<Item_hex_string>(thd, this); } | 0 |
261,757 | void RtmpProtocol::send_complex_S0S1S2(int schemeType,const string &digest){
//S1S2计算参考自:https://github.com/hitYangfei/golang/blob/master/rtmpserver.go
//发送S0
char handshake_head = HANDSHAKE_PLAINTEXT;
onSendRawData(obtainBuffer(&handshake_head, 1));
//S1
RtmpHandshake s1(0);
memcpy(s1.zero,... | 0 |
455,346 | execute_env_file (env_file)
char *env_file;
{
char *fn;
if (env_file && *env_file)
{
fn = expand_string_unsplit_to_string (env_file, Q_DOUBLE_QUOTES);
if (fn && *fn)
maybe_execute_file (fn, 1);
FREE (fn);
}
} | 0 |
225,889 |
GF_Err chnl_box_size(GF_Box *s)
{
GF_ChannelLayoutBox *ptr = (GF_ChannelLayoutBox *) s;
s->size += 1;
if (ptr->layout.stream_structure & 1) {
s->size += 1;
if (ptr->layout.definedLayout==0) {
u32 i;
for (i=0; i<ptr->layout.channels_count; i++) {
s->size+=1;
if (ptr->layout.layouts[i].position==126... | 0 |
233,886 | */
int php_wddx_deserialize_ex(const char *value, size_t vallen, zval *return_value)
{
wddx_stack stack;
XML_Parser parser;
st_entry *ent;
int retval;
wddx_stack_init(&stack);
parser = XML_ParserCreate((XML_Char *) "UTF-8");
XML_SetUserData(parser, &stack);
XML_SetElementHandler(parser, php_wddx_push_element... | 0 |
338,206 | static bool isIdChar(char ch) {
return (ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'Z') ||
(ch >= 'a' && ch <= 'z') || ch == '!' || ch == '#' || ch == '$' ||
ch == '%' || ch == '&' || ch == '\'' || ch == '*' || ch == '+' ||
ch == '-' || ch == '.' || ch == '/' || ch == ':' || ch == '<' |... | 0 |
259,307 | static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb,
AVStream *st, MOVStreamContext *sc)
{
uint8_t codec_name[32] = { 0 };
int64_t stsd_start;
unsigned int len;
uint32_t id = 0;
/* The first 16 bytes of the video sample description are already
* rea... | 0 |
332,363 | get_op_char(int optype)
{
return opchars[optype][0];
} | 0 |
409,479 | may_req_termresponse(void)
{
if (crv_status.tr_progress == STATUS_GET
&& can_get_termresponse()
&& starting == 0
&& *T_CRV != NUL)
{
MAY_WANT_TO_LOG_THIS;
LOG_TR(("Sending CRV request"));
out_str(T_CRV);
termrequest_sent(&crv_status);
// check for the characters now, otherwise they might be ... | 0 |
226,357 |
GF_Box *csgp_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_CompactSampleGroupBox, GF_ISOM_BOX_TYPE_CSGP);
return (GF_Box *)tmp; | 0 |
243,998 | GF_Err gitn_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
u32 i;
GroupIdToNameBox *ptr = (GroupIdToNameBox *) s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u16(bs, ptr->nb_entries);
for (i=0; i<ptr->nb_entries; i++) {
gf_bs_write_u32(bs, ptr->entries[i].... | 0 |
359,393 | DEFUN (clear_ip_bgp_as_ipv4_soft_in,
clear_ip_bgp_as_ipv4_soft_in_cmd,
"clear ip bgp <1-65535> ipv4 (unicast|multicast) soft in",
CLEAR_STR
IP_STR
BGP_STR
"Clear peers with the AS number\n"
"Address family\n"
"Address Family modifier\n"
"Address Family modi... | 0 |
445,951 | fr_window_set_password (FrWindow *window,
const char *password)
{
g_return_if_fail (window != NULL);
if (window->priv->password == password)
return;
if (window->priv->password != NULL) {
g_free (window->priv->password);
window->priv->password = NULL;
}
if ((password != NULL) && (password[0] != '\0'))... | 0 |
379,704 | R_API R_BORROW RPVector *r_anal_function_get_vars_used_at(RAnalFunction *fcn, ut64 op_addr) {
r_return_val_if_fail (fcn, NULL);
return ht_up_find (fcn->inst_vars, op_addr - fcn->addr, NULL);
} | 0 |
310,259 | list_single_server_status(routerinfo_t *desc, int is_live)
{
char buf[MAX_NICKNAME_LEN+HEX_DIGEST_LEN+4]; /* !nickname=$hexdigest\0 */
char *cp;
tor_assert(desc);
cp = buf;
if (!is_live) {
*cp++ = '!';
}
if (desc->is_valid) {
strlcpy(cp, desc->nickname, sizeof(buf)-(cp-buf));
cp += strlen(cp... | 0 |
139,214 | void OverlayWindowViews::CreateCustomControl(
std::unique_ptr<views::ControlImageButton>& control_button,
const blink::PictureInPictureControlInfo& info,
ControlPosition position) {
control_button = std::make_unique<views::ControlImageButton>(this);
controls_parent_view_->AddChildView(control_button.get... | 0 |
316,982 | static int selinux_inode_getsecurity(struct user_namespace *mnt_userns,
struct inode *inode, const char *name,
void **buffer, bool alloc)
{
u32 size;
int error;
char *context = NULL;
struct inode_security_struct *isec;
/*
* If we're not initialized yet, then we can't validate contexts, so
* ... | 0 |
512,529 | Item *get_copy(THD *thd)
{ return get_item_copy<Item_cache_date>(thd, this); } | 0 |
462,304 | pcl_inquire_readback_entity(pcl_args_t * pargs, pcl_state_t * pcs)
{
uint i = uint_arg(pargs);
int unit = pcs->location_unit;
stream st;
static const char *entity_types[] = {
"FONTS", "MACROS", "PATTERNS", "SYMBOLSETS", "FONTS EXTENDED"
};
pcl_data_storage_t storage;
int code = 0;
... | 0 |
413,846 | static void trace_method_resolution(const char* prefix,
Klass* klass,
Klass* resolved_klass,
Method* method,
bool logitables,
int index = -1... | 0 |
500,696 | unsigned int sftp_extensions_get_count(sftp_session sftp) {
if (sftp == NULL || sftp->ext == NULL) {
return 0;
}
return sftp->ext->count;
} | 0 |
338,066 | void WasmBinaryBuilder::visitSwitch(Switch* curr) {
BYN_TRACE("zz node: Switch\n");
curr->condition = popNonVoidExpression();
auto numTargets = getU32LEB();
BYN_TRACE("targets: " << numTargets << std::endl);
for (size_t i = 0; i < numTargets; i++) {
curr->targets.push_back(getBreakTarget(getU32LEB()).name... | 0 |
274,758 | int ntfs_attr_map_runlist(ntfs_attr *na, VCN vcn)
{
LCN lcn;
ntfs_attr_search_ctx *ctx;
ntfs_log_trace("Entering for inode 0x%llx, attr 0x%x, vcn 0x%llx.\n",
(unsigned long long)na->ni->mft_no, le32_to_cpu(na->type), (long long)vcn);
lcn = ntfs_rl_vcn_to_lcn(na->rl, vcn);
if (lcn >= 0 || lcn == LCN_HOLE || lcn... | 0 |
385,858 | struct file *do_file_open_root(struct dentry *dentry, struct vfsmount *mnt,
const char *name, const struct open_flags *op)
{
struct nameidata nd;
struct file *file;
struct filename filename = { .name = name };
int flags = op->lookup_flags | LOOKUP_ROOT;
nd.root.mnt = mnt;
nd.root.dentry = dentry;
if (dentry-... | 0 |
453,107 | XML_ParserCreateNS(const XML_Char *encodingName, XML_Char nsSep) {
XML_Char tmp[2] = {nsSep, 0};
return XML_ParserCreate_MM(encodingName, NULL, tmp);
} | 0 |
226,378 |
void jp2h_box_del(GF_Box *s)
{
gf_free(s); | 0 |
195,331 | Status ConcatShapeHelper(InferenceContext* c, int start_value_index,
int end_value_index, int dim_index) {
ShapeHandle unused;
TF_RETURN_IF_ERROR(c->WithRank(c->input(dim_index), 0, &unused));
const Tensor* concat_dim_t = c->input_tensor(dim_index);
if (concat_dim_t == nullptr) {
//... | 1 |
313,819 | do_nv_ident(int c1, int c2)
{
oparg_T oa;
cmdarg_T ca;
clear_oparg(&oa);
CLEAR_FIELD(ca);
ca.oap = &oa;
ca.cmdchar = c1;
ca.nchar = c2;
nv_ident(&ca);
} | 0 |
488,326 | static int unmap_mapping_range_vma(struct vm_area_struct *vma,
unsigned long start_addr, unsigned long end_addr,
struct zap_details *details)
{
unsigned long restart_addr;
int need_break;
/*
* files that support invalidating or truncating portions of the
* file from under mmaped areas must have their ->faul... | 0 |
335,429 | replace_makeprg(exarg_T *eap, char_u *p, char_u **cmdlinep)
{
char_u *new_cmdline;
char_u *program;
char_u *pos;
char_u *ptr;
int len;
int i;
/*
* Don't do it when ":vimgrep" is used for ":grep".
*/
if ((eap->cmdidx == CMD_make || eap->cmdidx == CMD_lmake
|| eap->cmdi... | 0 |
395,072 | after_updating_screen(int may_resize_shell UNUSED)
{
updating_screen = FALSE;
#ifdef FEAT_GUI
if (may_resize_shell)
gui_may_resize_shell();
#endif
#ifdef FEAT_TERMINAL
term_check_channel_closed_recently();
#endif
#ifdef HAVE_DROP_FILE
// If handle_drop() was called while updating_screen was TRUE need ... | 0 |
343,207 | static int doport3(const int protocol)
{
struct sockaddr_storage dataconn; /* his endpoint */
# ifndef NON_ROOT_FTP
static const in_port_t portlist[] = FTP_ACTIVE_SOURCE_PORTS;
const in_port_t *portlistpnt = portlist;
# else
static const in_port_t portlist[] = { 0U };
const in_port_t *portlistpnt ... | 0 |
430,377 | int seq_path_root(struct seq_file *m, const struct path *path,
const struct path *root, const char *esc)
{
char *buf;
size_t size = seq_get_buf(m, &buf);
int res = -ENAMETOOLONG;
if (size) {
char *p;
p = __d_path(path, root, buf, size);
if (!p)
return SEQ_SKIP;
res = PTR_ERR(p);
if (!IS_ERR(p)) {... | 0 |
276,444 | void Compute(OpKernelContext* context) override {
core::RefCountPtr<BoostedTreesEnsembleResource> tree_ensemble_resource;
OP_REQUIRES_OK(context, LookupResource(context, HandleFromInput(context, 0),
&tree_ensemble_resource));
tf_shared_lock l(*tree_ensemble_resou... | 0 |
448,531 | static void bgp_refresh_stalepath_timer_expire(struct thread *thread)
{
struct peer_af *paf;
paf = THREAD_ARG(thread);
afi_t afi = paf->afi;
safi_t safi = paf->safi;
struct peer *peer = paf->peer;
peer->t_refresh_stalepath = NULL;
if (peer->nsf[afi][safi])
bgp_clear_stale_route(peer, afi, safi);
if (bgp_... | 0 |
512,838 | Item** Arg_comparator::cache_converted_constant(THD *thd_arg, Item **value,
Item **cache_item,
const Type_handler *handler)
{
/*
Don't need cache if doing context analysis only.
*/
if (!thd_arg->lex->is_ps_or_view_... | 0 |
226,166 |
GF_Err paen_box_read(GF_Box *s, GF_BitStream *bs)
{
return gf_isom_box_array_read(s, bs); | 0 |
312,491 | vgr_get_auname(cmdidx_T cmdidx)
{
switch (cmdidx)
{
case CMD_vimgrep: return (char_u *)"vimgrep";
case CMD_lvimgrep: return (char_u *)"lvimgrep";
case CMD_vimgrepadd: return (char_u *)"vimgrepadd";
case CMD_lvimgrepadd: return (char_u *)"lvimgrepadd";
case CMD_grep: return (char_u *)"grep";
... | 0 |
244,070 | static GF_Err ctrn_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 i, count, flags, first_idx=0;
Bool inherit_dur, inherit_size, inherit_flags, inherit_ctso;
GF_TrunEntry *ent;
GF_TrackFragmentRunBox *ptr = (GF_TrackFragmentRunBox *)s;
flags = ptr->flags;
ptr->ctrn_flags = flags;
ptr->flags = 0;
ptr->sample_count ... | 0 |
328,828 | R_API void r_bin_java_print_code_exceptions_attr_summary(RBinJavaExceptionEntry *exc_entry) {
if (exc_entry == NULL) {
eprintf ("Attempting to print an invalid RBinJavaExceptionEntry *.\n");
return;
}
printf (" Exception Table Entry Information\n");
printf (" offset: 0x%08"PFMT64x"\n", exc_entry->file_offse... | 0 |
509,541 | int ha_maria::rnd_next(uchar *buf)
{
register_handler(file);
return maria_scan(file, buf);
} | 0 |
275,488 | njs_async_context_free(njs_vm_t *vm, njs_async_ctx_t *ctx)
{
njs_mp_free(vm->mem_pool, ctx->capability);
njs_mp_free(vm->mem_pool, ctx);
} | 0 |
309,879 | vid_puts(attr_t newmode,
NCURSES_PAIRS_T pair_arg,
void *opts GCC_UNUSED,
NCURSES_OUTC outc)
{
SetSafeOutcWrapper(outc);
return NCURSES_SP_NAME(vid_puts) (CURRENT_SCREEN,
newmode,
pair_arg,
opts,
_nc_outc_wrapper);
} | 0 |
236,189 | GF_Err twrp_box_size(GF_Box *s)
{
s->size += 1;
return GF_OK;
} | 0 |
233,859 | static int do_iff_chunk_sequence(deark *c, struct de_iffctx *ictx,
i64 pos1, i64 len, int level)
{
i64 pos;
i64 endpos;
i64 chunk_len;
struct de_fourcc saved_container_fmt4cc;
struct de_fourcc saved_container_contentstype4cc;
int ret;
if(level >= 16) { // An arbitrary recursion limit.
return 0;
}
endpos =... | 0 |
336,620 | static void reds_adjust_agent_capabilities(RedsState *reds, VDAgentMessage *message)
{
VDAgentAnnounceCapabilities *capabilities;
if (message->type != VD_AGENT_ANNOUNCE_CAPABILITIES) {
return;
}
capabilities = (VDAgentAnnounceCapabilities *) message->data;
if (!reds->config->agent_copypast... | 0 |
379,689 | static void r_anal_var_proto_free(RAnalVarProt *vp) {
if (vp) {
free (vp->name);
free (vp->type);
free (vp);
}
} | 0 |
317,126 | static int selinux_skb_peerlbl_sid(struct sk_buff *skb, u16 family, u32 *sid)
{
int err;
u32 xfrm_sid;
u32 nlbl_sid;
u32 nlbl_type;
err = selinux_xfrm_skb_sid(skb, &xfrm_sid);
if (unlikely(err))
return -EACCES;
err = selinux_netlbl_skbuff_getsid(skb, family, &nlbl_type, &nlbl_sid);
if (unlikely(err))
retur... | 0 |
220,403 | ary_shrink_capa(mrb_state *mrb, struct RArray *a)
{
mrb_int capa;
if (ARY_EMBED_P(a)) return;
capa = a->as.heap.aux.capa;
if (capa < ARY_DEFAULT_LEN * 2) return;
if (capa <= a->as.heap.len * ARY_SHRINK_RATIO) return;
do {
capa /= 2;
if (capa < ARY_DEFAULT_LEN) {
capa = ARY_DEFAULT_LEN;
... | 0 |
446,058 | 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;
int len;
long nextbits, nextdata, nbitsmask;
code_t *codep, *fr... | 0 |
487,668 | static void groups_sort(struct group_info *group_info)
{
int base, max, stride;
int gidsetsize = group_info->ngroups;
for (stride = 1; stride < gidsetsize; stride = 3 * stride + 1)
; /* nothing */
stride /= 3;
while (stride) {
max = gidsetsize - stride;
for (base = 0; base < max; base++) {
int left = ba... | 0 |
317,320 | static int smk_copy_rules(struct list_head *nhead, struct list_head *ohead,
gfp_t gfp)
{
struct smack_rule *nrp;
struct smack_rule *orp;
int rc = 0;
list_for_each_entry_rcu(orp, ohead, list) {
nrp = kmem_cache_zalloc(smack_rule_cache, gfp);
if (nrp == NULL) {
rc = -ENOMEM;
break;
}
*nrp = *orp;
... | 0 |
473,980 | expand_case_fold_string(Node* node, regex_t* reg)
{
#define THRESHOLD_CASE_FOLD_ALT_FOR_EXPANSION 8
int r, n, len, alt_num;
UChar *start, *end, *p;
Node *top_root, *root, *snode, *prev_node;
OnigCaseFoldCodeItem items[ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM];
StrNode* sn = NSTR(node);
if (NSTRING_IS_AMBIG(no... | 0 |
443,302 | eval_vars(
char_u *src, // pointer into commandline
char_u *srcstart, // beginning of valid memory for src
int *usedlen, // characters after src that are used
linenr_T *lnump, // line number for :e command, or NULL
char **errormsg, // pointer to error message
int *escaped, // return value ha... | 0 |
317,306 | static int smack_inode_setattr(struct dentry *dentry, struct iattr *iattr)
{
struct smk_audit_info ad;
int rc;
/*
* Need to allow for clearing the setuid bit.
*/
if (iattr->ia_valid & ATTR_FORCE)
return 0;
smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY);
smk_ad_setfield_u_fs_path_dentry(&ad, dentry);
r... | 0 |
413,576 | static bool isValidAddress(RCore *core, ut64 addr) {
// check if address is mapped
RIOMap* map = r_io_map_get_at (core->io, addr);
if (!map) {
return false;
}
st64 fdsz = (st64)r_io_fd_size (core->io, map->fd);
if (fdsz > 0 && map->delta > fdsz) {
return false;
}
// check if associated file is opened
RIODe... | 0 |
299,888 | readconf_rewrites(void)
{
rewrite_rule **chain = &global_rewrite_rules;
uschar *p;
while ((p = get_config_line()) != NULL)
{
rewrite_rule *next = readconf_one_rewrite(p, &rewrite_existflags, TRUE);
*chain = next;
chain = &(next->next);
}
} | 0 |
331,766 | QVectorPath::~QVectorPath()
{
if (m_hints & ShouldUseCacheHint) {
CacheEntry *e = m_cache;
while (e) {
if (e->data)
e->cleanup(e->engine, e->data);
CacheEntry *n = e->next;
delete e;
e = n;
}
}
} | 0 |
436,137 | static void io_queue_deferred(struct io_ring_ctx *ctx)
{
while (!list_empty(&ctx->defer_list)) {
struct io_defer_entry *de = list_first_entry(&ctx->defer_list,
struct io_defer_entry, list);
if (req_need_defer(de->req, de->seq))
break;
list_del_init(&de->list);
io_req_task_queue(de->req);
kfree(de);... | 0 |
369,341 |
static void io_destroy_buffers(struct io_ring_ctx *ctx)
{
int i;
for (i = 0; i < (1U << IO_BUFFERS_HASH_BITS); i++) {
struct list_head *list = &ctx->io_buffers[i];
while (!list_empty(list)) {
struct io_buffer_list *bl;
bl = list_first_entry(list, struct io_buffer_list, list);
__io_remove_buffers(ctx,... | 0 |
329,917 | _fill_xrgb32_lerp_opaque_spans (void *abstract_renderer, int y, int h,
const cairo_half_open_span_t *spans, unsigned num_spans)
{
cairo_image_span_renderer_t *r = abstract_renderer;
if (num_spans == 0)
return CAIRO_STATUS_SUCCESS;
if (likely(h == 1)) {
do {
uint8_t a = spans[0].coverage;
i... | 0 |
424,956 | static int iwl_pcie_load_cpu_sections(struct iwl_trans *trans,
const struct fw_img *image,
int cpu,
int *first_ucode_section)
{
int i, ret = 0;
u32 last_read_idx = 0;
if (cpu == 1)
*first_ucode_section = 0;
else
(*first_ucode_section)++;
for (i = *first_ucode_section; i < image-... | 0 |
328,980 | R_API char *r_bin_java_print_interfacemethodref_cp_stringify(RBinJavaCPTypeObj *obj) {
return r_str_newf ("%d.0x%04"PFMT64x ".%s.%d.%d",
obj->metas->ord, obj->file_offset + obj->loadaddr, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name,
obj->info.cp_interface.class_idx, obj->info.cp_interface.name_and_type... | 0 |
369,336 | static bool io_resubmit_prep(struct io_kiocb *req)
{
struct io_async_rw *rw = req->async_data;
if (!req_has_async_data(req))
return !io_req_prep_async(req);
iov_iter_restore(&rw->s.iter, &rw->s.iter_state);
return true;
} | 0 |
238,603 | static void mark_verifier_state_clean(struct bpf_verifier_env *env)
{
env->scratched_regs = 0U;
env->scratched_stack_slots = 0ULL;
} | 0 |
225,733 | #ifndef GPAC_DISABLE_ISOM_WRITE
GF_Err prft_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_ProducerReferenceTimeBox *ptr = (GF_ProducerReferenceTimeBox *) s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u32(bs, ptr->refTrackID);
gf_bs_write_u64(bs, ptr->ntp... | 0 |
293,531 | PJ_DEF(void) pj_scan_init( pj_scanner *scanner, char *bufstart,
pj_size_t buflen, unsigned options,
pj_syn_err_func_ptr callback )
{
PJ_CHECK_STACK();
scanner->begin = scanner->curptr = bufstart;
scanner->end = bufstart + buflen;
scanner->line = 1;
scanner->start_line = scanner->begin... | 0 |
498,093 | static char *convert_query_hexchar(char *txt)
{
int d1, d2, n;
n = strlen(txt);
if (n < 3) {
*txt = '\0';
return txt-1;
}
d1 = hextoint(*(txt + 1));
d2 = hextoint(*(txt + 2));
if (d1 < 0 || d2 < 0) {
memmove(txt, txt + 3, n - 2);
return txt-1;
} else {
*txt = d1 * 16 + d2;
memmove(txt + 1, txt + 3, ... | 0 |
459,173 | int tcf_block_get(struct tcf_block **p_block,
struct tcf_proto __rcu **p_filter_chain, struct Qdisc *q,
struct netlink_ext_ack *extack)
{
struct tcf_block_ext_info ei = {
.chain_head_change = tcf_chain_head_change_dflt,
.chain_head_change_priv = p_filter_chain,
};
WARN_ON(!p_filter_chain);
return tcf_b... | 0 |
249,515 | int processing_data(png_structp png_ptr, png_infop info_ptr, unsigned char* p,
unsigned int size) {
if (!png_ptr || !info_ptr) return 1;
if (setjmp(png_jmpbuf(png_ptr))) {
png_destroy_read_struct(&png_ptr, &info_ptr, 0);
return 1;
}
png_process_data(png_ptr, info_ptr, p, size);
r... | 0 |
220,929 | const GF_FilterRegister *mpgviddmx_register(GF_FilterSession *session)
{
return NULL;
} | 0 |
229,340 | string EscapeOrigName(const string& orig_name) {
// Replace _ with __ in the original name to avoid name conflicts.
return absl::StrReplaceAll(orig_name, {{"_", "__"}});
} | 0 |
227,038 | IRC_PROTOCOL_CALLBACK(mode)
{
char *pos_modes, *pos_modes_args, *modes_args;
int smart_filter, local_mode;
struct t_irc_channel *ptr_channel;
struct t_irc_nick *ptr_nick;
struct t_gui_buffer *ptr_buffer;
IRC_PROTOCOL_MIN_ARGS(4);
IRC_PROTOCOL_CHECK_HOST;
pos_modes = (argv[3][0] == ':')... | 0 |
359,585 | DEFUN (no_neighbor_distribute_list,
no_neighbor_distribute_list_cmd,
NO_NEIGHBOR_CMD2 "distribute-list (<1-199>|<1300-2699>|WORD) (in|out)",
NO_STR
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Filter updates to/from this neighbor\n"
"IP access-list number\n"
"IP access-list n... | 0 |
343,214 | void dositetime(void)
{
char tmp[64];
const struct tm *tm;
time_t now;
if ((now = time(NULL)) == (time_t) -1 || (tm = localtime(&now)) == NULL) {
addreply_noformat(451, "time()");
return;
}
strftime(tmp, sizeof tmp, "%Y-%m-%d %H:%M:%S", tm);
addreply_noformat(211, tmp);
} | 0 |
248,281 | DLLIMPORT cfg_validate_callback2_t cfg_set_validate_func2(cfg_t *cfg, const char *name, cfg_validate_callback2_t vf)
{
cfg_opt_t *opt;
cfg_validate_callback2_t oldvf;
opt = cfg_getopt_array(cfg->opts, cfg->flags, name);
if (!opt)
return NULL;
oldvf = opt->validcb2;
opt->validcb2 = vf;
return oldvf;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.