idx int64 | func string | target int64 |
|---|---|---|
248,236 | static char *strndup(const char *s, size_t n)
{
char *r;
r = malloc(n + 1);
if (!r)
return NULL;
strncpy(r, s, n);
r[n] = 0;
return r;
} | 0 |
238,390 | njs_function_native_frame(njs_vm_t *vm, njs_function_t *function,
const njs_value_t *this, const njs_value_t *args, njs_uint_t nargs,
njs_bool_t ctor)
{
size_t size;
njs_uint_t n;
njs_value_t *value, *bound;
njs_native_frame_t *frame;
size = NJS_NATIVE_FRAME_S... | 0 |
236,187 | void diST_box_del(GF_Box *s)
{
GF_DIMSScriptTypesBox *p = (GF_DIMSScriptTypesBox *)s;
if (p->content_script_types) gf_free(p->content_script_types);
gf_free(p);
} | 0 |
243,989 | void trgr_box_del(GF_Box *s)
{
GF_TrackGroupBox *ptr = (GF_TrackGroupBox *)s;
if (ptr == NULL) return;
gf_list_del(ptr->groups);
gf_free(ptr);
} | 0 |
344,759 | put_u16(void *vp, u_int16_t v)
{
u_char *p = (u_char *)vp;
p[0] = (u_char)(v >> 8) & 0xff;
p[1] = (u_char)v & 0xff;
} | 0 |
217,556 | MagickExport MagickBooleanType CloneImageProperties(Image *image,
const Image *clone_image)
{
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
assert(clone_image != (... | 0 |
286,731 | SWTPM_NVRAM_StoreData_Intern(const unsigned char *data,
uint32_t length,
uint32_t tpm_number,
const char *name,
TPM_BOOL encrypt /* encrypt if key is set */)
{
TPM_RESULT rc = 0;
unsign... | 0 |
198,374 | void Compute(OpKernelContext* ctx) override {
const Tensor* x_tensor = nullptr;
OP_REQUIRES_OK(ctx, ctx->input("x", &x_tensor));
const Tensor* cs_prev_tensor = nullptr;
OP_REQUIRES_OK(ctx, ctx->input("cs_prev", &cs_prev_tensor));
const Tensor* h_prev_tensor = nullptr;
OP_REQUIRES_OK(ctx, ctx... | 1 |
90,779 | GetPersistentHostQuotaTask(
QuotaManager* manager,
const std::string& host,
HostQuotaCallback* callback)
: DatabaseTaskBase(manager),
host_(host),
quota_(-1),
callback_(callback) {
}
| 0 |
273,922 | static void handle_ABOR(ctrl_t *ctrl, char *arg)
{
DBG("Aborting any current transfer ...");
if (do_abort(ctrl))
send_msg(ctrl->sd, "426 Connection closed; transfer aborted.\r\n");
send_msg(ctrl->sd, "226 Closing data connection.\r\n");
} | 0 |
310,315 | add_fingerprint_to_dir(const char *nickname, const char *fp,
authdir_config_t *list)
{
char *fingerprint;
char d[DIGEST_LEN];
router_status_t *status;
tor_assert(nickname);
tor_assert(fp);
tor_assert(list);
fingerprint = tor_strdup(fp);
tor_strstrip(fingerprint, " ");
if (base1... | 0 |
254,891 | DepsTracker::State GroupFromFirstDocumentTransformation::addDependencies(DepsTracker* deps) const {
for (auto&& expr : _accumulatorExprs) {
expr.second->addDependencies(deps);
}
// This stage will replace the entire document with a new document, so any existing fields
// will be replaced and ca... | 0 |
294,683 | equal_gen(VALUE self, VALUE other)
{
get_d1(self);
if (k_numeric_p(other))
return f_eqeq_p(m_real_local_jd(dat), other);
else if (k_date_p(other))
return f_eqeq_p(m_real_local_jd(dat), f_jd(other));
return rb_num_coerce_cmp(self, other, id_eqeq_p);
} | 0 |
390,555 | XkbComputeGetGeometryReplySize( XkbGeometryPtr geom,
xkbGetGeometryReply * rep,
Atom name)
{
int len;
if (geom!=NULL) {
len= XkbSizeCountedString(geom->label_font);
len+= XkbSizeGeomProperties(geom);
len+= XkbSizeGeomColors(geom);
len+= XkbSizeGeomShapes(geom);
len+= XkbSizeGeomSections(geom);
len... | 0 |
389,705 | clear_tv(typval_T *varp)
{
if (varp != NULL)
{
switch (varp->v_type)
{
case VAR_FUNC:
func_unref(varp->vval.v_string);
// FALLTHROUGH
case VAR_STRING:
VIM_CLEAR(varp->vval.v_string);
break;
case VAR_PARTIAL:
partial_unref(varp->vval.v_partial);
varp->vval.v_partial = NULL;
break;
... | 0 |
484,809 | static u16 xennet_select_queue(struct net_device *dev, struct sk_buff *skb,
struct net_device *sb_dev)
{
unsigned int num_queues = dev->real_num_tx_queues;
u32 hash;
u16 queue_idx;
/* First, check if there is only one queue */
if (num_queues == 1) {
queue_idx = 0;
} else {
hash = skb_get_hash(skb);... | 0 |
248,335 | static void cfg_indent(FILE *fp, int indent)
{
while (indent--)
fprintf(fp, " ");
} | 0 |
512,664 | bool in_vector::find(Item *item)
{
uchar *result=get_value(item);
if (!result || !used_count)
return false; // Null value
uint start,end;
start=0; end=used_count-1;
while (start != end)
{
uint mid=(start+end+1)/2;
int res;
if ((res=(*compare)(collation, base+mid*size, result)) == 0)
... | 0 |
195,409 |
void gitn_box_del(GF_Box *s)
{
u32 i;
GroupIdToNameBox *ptr = (GroupIdToNameBox *)s;
if (ptr == NULL) return;
for (i=0; i<ptr->nb_entries; i++) {
if (ptr->entries[i].name) gf_free(ptr->entries[i].name);
}
if (ptr->entries) gf_free(ptr->entries);
gf_free(ptr); | 1 |
217,459 | Result ZipFile::uncompressEntry (int index, const File& targetDirectory, bool shouldOverwriteFiles)
{
auto* zei = entries.getUnchecked (index);
#if JUCE_WINDOWS
auto entryPath = zei->entry.filename;
#else
auto entryPath = zei->entry.filename.replaceCharacter ('\\', '/');
#endif
if (... | 1 |
513,093 | With_subquery_cache(): m_with_subquery(false) { } | 0 |
344,742 | colon(char *cp)
{
int flag = 0;
if (*cp == ':') /* Leading colon is part of file name. */
return NULL;
if (*cp == '[')
flag = 1;
for (; *cp; ++cp) {
if (*cp == '@' && *(cp+1) == '[')
flag = 1;
if (*cp == ']' && *(cp+1) == ':' && flag)
return (cp+1);
if (*cp == ':' && !flag)
return (cp);
if (... | 0 |
512,796 | bool Item_func_like::turboBM_matches(const char* text, int text_len) const
{
int bcShift;
int turboShift;
int shift = pattern_len;
int j = 0;
int u = 0;
CHARSET_INFO *cs= cmp_collation.collation;
const int plm1= pattern_len - 1;
const int tlmpl= text_len - pattern_len;
/* Searching */
if ... | 0 |
300,751 | static bool tipc_sockaddr_is_sane(struct sockaddr_tipc *addr)
{
if (addr->family != AF_TIPC)
return false;
if (addr->addrtype == TIPC_SERVICE_RANGE)
return (addr->addr.nameseq.lower <= addr->addr.nameseq.upper);
return (addr->addrtype == TIPC_SERVICE_ADDR ||
addr->addrtype == TIPC_SOCKET_ADDR);
} | 0 |
484,709 | void mobi_buffer_free(MOBIBuffer *buf) {
if (buf == NULL) { return; }
if (buf->data != NULL) {
free(buf->data);
}
free(buf);
} | 0 |
281,149 | void xfrm_audit_policy_add(struct xfrm_policy *xp, int result, bool task_valid)
{
struct audit_buffer *audit_buf;
audit_buf = xfrm_audit_start("SPD-add");
if (audit_buf == NULL)
return;
xfrm_audit_helper_usrinfo(task_valid, audit_buf);
audit_log_format(audit_buf, " res=%u", result);
xfrm_audit_common_policyinf... | 0 |
369,267 |
static __cold bool io_cancel_ctx_cb(struct io_wq_work *work, void *data)
{
struct io_kiocb *req = container_of(work, struct io_kiocb, work);
return req->ctx == data; | 0 |
508,804 | void st_select_lex::init_query()
{
st_select_lex_node::init_query();
table_list.empty();
top_join_list.empty();
join_list= &top_join_list;
embedding= 0;
leaf_tables_prep.empty();
leaf_tables.empty();
item_list.empty();
min_max_opt_list.empty();
join= 0;
having= prep_having= where= prep_where= 0;
... | 0 |
241,047 | static int read_authkey()
{
int fd;
booth_conf->authkey[0] = '\0';
fd = open(booth_conf->authfile, O_RDONLY);
if (fd < 0) {
log_error("cannot open %s: %s",
booth_conf->authfile, strerror(errno));
return -1;
}
if (fstat(fd, &booth_conf->authstat) < 0) {
log_error("cannot stat authentication file %s (%d):... | 0 |
313,845 | end_visual_mode()
{
end_visual_mode_keep_button();
reset_held_button();
} | 0 |
466,121 | static int em_mul_ex(struct x86_emulate_ctxt *ctxt)
{
u8 ex = 0;
emulate_1op_rax_rdx(ctxt, "mul", ex);
return X86EMUL_CONTINUE;
} | 0 |
338,161 | void WasmBinaryWriter::writeExports() {
if (wasm->exports.size() == 0) {
return;
}
BYN_TRACE("== writeexports\n");
auto start = startSection(BinaryConsts::Section::Export);
o << U32LEB(wasm->exports.size());
for (auto& curr : wasm->exports) {
BYN_TRACE("write one\n");
writeInlineString(curr->nam... | 0 |
198,692 | int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type,
struct xfrm_migrate *m, int num_migrate,
struct xfrm_kmaddress *k, struct net *net,
struct xfrm_encap_tmpl *encap)
{
int i, err, nx_cur = 0, nx_new = 0;
struct xfrm_policy *pol = NULL;
struct xfrm_state *x, *xc;
struct xfrm_state *x_cur[XFR... | 1 |
90,108 | virtual void AddNetworkObserver(const std::string& service_path,
NetworkObserver* observer) {
DCHECK(observer);
if (!EnsureCrosLoaded())
return;
NetworkObserverMap::iterator iter = network_observers_.find(service_path);
NetworkObserverList* oblist;
if (iter ... | 0 |
459,511 | static int __init stack_map_init(void)
{
int cpu;
struct stack_map_irq_work *work;
for_each_possible_cpu(cpu) {
work = per_cpu_ptr(&up_read_work, cpu);
init_irq_work(&work->irq_work, do_up_read);
}
return 0;
} | 0 |
355,640 | fill_evalarg_from_eap(evalarg_T *evalarg, exarg_T *eap, int skip)
{
init_evalarg(evalarg);
evalarg->eval_flags = skip ? 0 : EVAL_EVALUATE;
if (eap != NULL)
{
evalarg->eval_cstack = eap->cstack;
if (getline_equal(eap->getline, eap->cookie, getsourceline))
{
evalarg->eval_getline = eap->getline;
... | 0 |
351,183 | static double shp_length (SHPObject *feat) {
double length = 0.0;
if (feat->nParts == 0) {
length = length2d_polyline(feat->nVertices, feat->padfX, feat->padfY);
}
else {
for (int part = 0; part < feat->nParts; part++) {
int n;
if (part < feat->nParts - 1) {
n = feat->panPartStart[part+1] -... | 0 |
369,375 |
void __io_uring_cancel(bool cancel_all)
{
io_uring_cancel_generic(cancel_all, NULL); | 0 |
234,841 | int btrfs_map_sblock(struct btrfs_fs_info *fs_info, enum btrfs_map_op op,
u64 logical, u64 *length,
struct btrfs_bio **bbio_ret)
{
return __btrfs_map_block(fs_info, op, logical, length, bbio_ret, 0, 1);
} | 0 |
400,112 | void LogHandler::setupStdoutLogger() {
el::Logger *stdoutLogger = el::Loggers::getLogger("stdout");
// Easylogging configurations
el::Configurations stdoutConf;
stdoutConf.setToDefault();
// Values are always std::string
stdoutConf.setGlobally(el::ConfigurationType::Format, "%msg");
stdoutConf.setGlobally... | 0 |
336,129 | static struct ip6_tnl *ip6gre_tunnel_find(struct net *net,
const struct __ip6_tnl_parm *parms,
int type)
{
const struct in6_addr *remote = &parms->raddr;
const struct in6_addr *local = &parms->laddr;
__be32 key = parms->i_key;
int link = parms->link;
struct ip6_tnl *t;
struct ip6_tnl __rcu **tp;
... | 0 |
505,657 | void smtp_command_parser_deinit(struct smtp_command_parser **_parser)
{
struct smtp_command_parser *parser = *_parser;
i_stream_unref(&parser->data);
i_free(parser->state.cmd_name);
i_free(parser->state.cmd_params);
i_free(parser->error);
i_stream_unref(&parser->input);
i_free(parser);
*_parser = NULL;
} | 0 |
261,957 | njs_string_object_validate(njs_vm_t *vm, njs_value_t *object)
{
njs_int_t ret;
if (njs_slow_path(njs_is_null_or_undefined(object))) {
njs_type_error(vm, "cannot convert undefined to object");
return NJS_ERROR;
}
if (njs_slow_path(!njs_is_string(object))) {
ret = njs_value_to_s... | 0 |
281,089 | bool xfrm_selector_match(const struct xfrm_selector *sel, const struct flowi *fl,
unsigned short family)
{
switch (family) {
case AF_INET:
return __xfrm4_selector_match(sel, fl);
case AF_INET6:
return __xfrm6_selector_match(sel, fl);
}
return false;
} | 0 |
473,850 | is_allowed_reverse_match(const UChar* s, const UChar* end, OnigEncoding enc ARG_UNUSED)
{
const UChar c = *s;
if (c <= 0x7e || c == 0x8e || c == 0x8f)
return TRUE;
else
return FALSE;
} | 0 |
234,869 | static inline void btrfs_end_bbio(struct btrfs_bio *bbio, struct bio *bio)
{
bio->bi_private = bbio->private;
bio->bi_end_io = bbio->end_io;
bio_endio(bio);
btrfs_put_bbio(bbio);
} | 0 |
248,277 | DLLIMPORT cfg_t *cfg_opt_gettsec(cfg_opt_t *opt, const char *title)
{
long int i;
if (!opt || !title) {
errno = EINVAL;
return NULL;
}
if (!is_set(CFGF_TITLE, opt->flags)) {
errno = EINVAL;
return NULL;
}
i = cfg_opt_gettsecidx(opt, title);
if (i >= 0)
return cfg_opt_getnsec(opt, i);
errno = ENOEN... | 0 |
307,867 | char *ciEnv::name_buffer(int req_len) {
if (_name_buffer_len < req_len) {
if (_name_buffer == NULL) {
_name_buffer = (char*)arena()->Amalloc(sizeof(char)*req_len);
_name_buffer_len = req_len;
} else {
_name_buffer =
(char*)arena()->Arealloc(_name_buffer, _name_buffer_len, req_len);
... | 0 |
387,757 | bool InstanceKlass::has_redefined_this_or_super() const {
const Klass* klass = this;
while (klass != NULL) {
if (InstanceKlass::cast(klass)->has_been_redefined()) {
return true;
}
klass = klass->super();
}
return false;
} | 0 |
299,896 | readconf_retries(void)
{
retry_config **chain = &retries;
retry_config *next;
uschar *p;
while ((p = get_config_line()) != NULL)
{
retry_rule **rchain;
uschar *pp, *error;
next = store_get(sizeof(retry_config));
next->next = NULL;
*chain = next;
chain = &(next->next);
next->basic_errno = next->more_er... | 0 |
247,756 | Integer RWFunction::ApplyFunction(const Integer &in) const
{
DoQuickSanityCheck();
Integer out = in.Squared()%m_n;
const word r = 12;
// this code was written to handle both r = 6 and r = 12,
// but now only r = 12 is used in P1363
const word r2 = r/2;
const word r3a = (16 + 5 - r) % 16; // n%16 could be 5 or 1... | 0 |
101,668 | void WebProcessProxy::didDestroyFrame(uint64_t frameID)
{
ASSERT(isGoodKey<WebFrameProxyMap>(frameID));
m_frameMap.remove(frameID);
}
| 0 |
512,824 | Item_equal::Item_equal(THD *thd, const Type_handler *handler,
Item *f1, Item *f2, bool with_const_item):
Item_bool_func(thd), eval_item(0), cond_false(0), cond_true(0),
context_field(NULL), link_equal_fields(FALSE),
m_compare_handler(handler),
m_compare_collation(f2->collation.collation)
... | 0 |
369,245 |
static int io_sqe_buffer_register(struct io_ring_ctx *ctx, struct iovec *iov,
struct io_mapped_ubuf **pimu,
struct page **last_hpage)
{
struct io_mapped_ubuf *imu = NULL;
struct vm_area_struct **vmas = NULL;
struct page **pages = NULL;
unsigned long off, start, end, ubuf;
size_t size;
int ret, pret, ... | 0 |
310,175 | has_colors(void)
{
return NCURSES_SP_NAME(has_colors) (CURRENT_SCREEN);
} | 0 |
225,036 | setKeepalivesCount(PGconn *conn)
{
int count;
if (conn->keepalives_count == NULL)
return 1;
if (!parse_int_param(conn->keepalives_count, &count, conn,
"keepalives_count"))
return 0;
if (count < 0)
count = 0;
#ifdef TCP_KEEPCNT
if (setsockopt(conn->sock, IPPROTO_TCP, TCP_KEEPCNT,
(char *) &... | 0 |
236,145 | GF_Err gppc_box_size(GF_Box *s)
{
GF_3GPPConfigBox *ptr = (GF_3GPPConfigBox *)s;
s->size += 5;
if (!ptr->cfg.type) {
switch (ptr->type) {
case GF_ISOM_BOX_TYPE_D263:
ptr->cfg.type = GF_ISOM_SUBTYPE_3GP_H263;
break;
case GF_ISOM_BOX_TYPE_DAMR:
ptr->cfg.type = GF_ISOM_SUBTYPE_3GP_AMR;
break;
case ... | 0 |
200,163 | static int elo_probe(struct hid_device *hdev, const struct hid_device_id *id)
{
struct elo_priv *priv;
int ret;
struct usb_device *udev;
if (!hid_is_usb(hdev))
return -EINVAL;
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
INIT_DELAYED_WORK(&priv->work, elo_work);
udev = interface_... | 1 |
473,886 | utf32be_get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
OnigEncoding enc)
{
return onigenc_unicode_get_case_fold_codes_by_str(enc,
flag, p, end, items);
} | 0 |
101,658 | void WebProcessProxy::addMessageReceiver(CoreIPC::StringReference messageReceiverName, uint64_t destinationID, CoreIPC::MessageReceiver* messageReceiver)
{
m_messageReceiverMap.addMessageReceiver(messageReceiverName, destinationID, messageReceiver);
}
| 0 |
401,574 | void add_disk_randomness(struct gendisk *disk)
{
if (!disk || !disk->random)
return;
/* first major is 1, so we get >= 0x200 here */
add_timer_randomness(disk->random, 0x100 + disk_devt(disk));
trace_add_disk_randomness(disk_devt(disk), ENTROPY_BITS(&input_pool));
} | 0 |
508,316 | set_new_item_local_context(THD *thd, Item_ident *item, TABLE_LIST *table_ref)
{
Name_resolution_context *context;
if (!(context= new (thd->mem_root) Name_resolution_context))
return TRUE;
context->init();
context->first_name_resolution_table=
context->last_name_resolution_table= table_ref;
item->conte... | 0 |
509,545 | int ha_maria::index_prev(uchar * buf)
{
DBUG_ASSERT(inited == INDEX);
register_handler(file);
int error= maria_rprev(file, buf, active_index);
return error;
} | 0 |
338,106 | Name WasmBinaryBuilder::escape(Name name) {
bool allIdChars = true;
for (const char* p = name.str; allIdChars && *p; p++) {
allIdChars = isIdChar(*p);
}
if (allIdChars) {
return name;
}
// encode name, if at least one non-idchar (per WebAssembly spec) was found
std::string escaped;
for (const ch... | 0 |
210,910 | win_redr_status(win_T *wp, int ignore_pum UNUSED)
{
int row;
char_u *p;
int len;
int fillchar;
int attr;
int this_ru_col;
static int busy = FALSE;
// It's possible to get here recursively when 'statusline' (indirectly)
// invokes ":redrawstatus". Simply ignore the call then.
... | 1 |
292,150 | LinkInfo::LinkInfo(const constantPoolHandle& pool, int index, TRAPS) {
// resolve klass
_resolved_klass = pool->klass_ref_at(index, CHECK);
// Get name, signature, and static klass
_name = pool->name_ref_at(index);
_signature = pool->signature_ref_at(index);
_tag = pool->tag_ref_at(... | 0 |
101,656 | void WebProcessProxy::addBackForwardItem(uint64_t itemID, const String& originalURL, const String& url, const String& title, const CoreIPC::DataReference& backForwardData)
{
MESSAGE_CHECK_URL(originalURL);
MESSAGE_CHECK_URL(url);
WebBackForwardListItemMap::AddResult result = m_backForwardListItemMap.add(it... | 0 |
281,082 | __xfrm_policy_lookup(struct net *net, const struct flowi *fl, u16 family, u8 dir)
{
#ifdef CONFIG_XFRM_SUB_POLICY
struct xfrm_policy *pol;
pol = xfrm_policy_lookup_bytype(net, XFRM_POLICY_TYPE_SUB, fl, family, dir);
if (pol != NULL)
return pol;
#endif
return xfrm_policy_lookup_bytype(net, XFRM_POLICY_TYPE_MAIN, ... | 0 |
386,514 | void DL_Dxf::writeXRecord(DL_WriterA& dw, int handle, const std::string& value) {
dw.dxfString( 0, "XRECORD");
dw.dxfHex(5, handle);
dw.dxfHex(330, appDictionaryHandle);
dw.dxfString(100, "AcDbXrecord");
dw.dxfInt(280, 1);
dw.dxfString(1000, value);
} | 0 |
513,360 | create_distinct_group(THD *thd, Ref_ptr_array ref_pointer_array,
ORDER *order_list, List<Item> &fields,
List<Item> &all_fields,
bool *all_order_by_fields_used)
{
List_iterator<Item> li(fields);
Item *item;
Ref_ptr_array orig_ref_pointer_array= ref_pointer_array;... | 0 |
314,512 | PJ_DEF(unsigned) pjmedia_sdp_attr_remove_all(unsigned *count,
pjmedia_sdp_attr *attr_array[],
const char *name)
{
unsigned i, removed = 0;
pj_str_t attr_name;
PJ_ASSERT_RETURN(count && attr_array && name, PJ_EINVAL);
PJ_ASSERT_RETURN(*count <= PJMEDIA_MAX_SDP_ATTR, PJ_ETOOMANY);
... | 0 |
286,719 | SWTPM_CheckHash(const unsigned char *in, uint32_t in_length,
unsigned char **out, uint32_t *out_length)
{
TPM_RESULT rc = 0;
unsigned char *dest = NULL;
unsigned char hashbuf[SHA256_DIGEST_LENGTH];
const unsigned char *data = &in[sizeof(hashbuf)];
uint32_t data_length = in_length - s... | 0 |
202,719 | struct sctp_chunk *sctp_make_strreset_req(
const struct sctp_association *asoc,
__u16 stream_num, __be16 *stream_list,
bool out, bool in)
{
__u16 stream_len = stream_num * sizeof(__u16);
struct sctp_strreset_outreq outreq;
struct sctp_strreset_inreq inreq;
struct sctp_chunk *retval;
__u16 outlen, in... | 1 |
210,834 | LogFilePrep(const char *fname, const char *backup, const char *idstring)
{
char *logFileName = NULL;
if (asprintf(&logFileName, fname, idstring) == -1)
FatalError("Cannot allocate space for the log file name\n");
if (backup && *backup) {
struct stat buf;
if (!stat(logFileName, &bu... | 1 |
291,828 | static void destroy_cm(struct rtrs_clt_con *con)
{
rdma_destroy_id(con->c.cm_id);
con->c.cm_id = NULL;
} | 0 |
389,704 | eval_env_var(char_u **arg, typval_T *rettv, int evaluate)
{
char_u *string = NULL;
int len;
int cc;
char_u *name;
int mustfree = FALSE;
++*arg;
name = *arg;
len = get_env_len(arg);
if (evaluate)
{
if (len == 0)
return FAIL; // invalid empty name
cc = name[len];
name[... | 0 |
294,538 | d_lite_plus(VALUE self, VALUE other)
{
int try_rational = 1;
get_d1(self);
again:
switch (TYPE(other)) {
case T_FIXNUM:
{
VALUE nth;
long t;
int jd;
nth = m_nth(dat);
t = FIX2LONG(other);
if (DIV(t, CM_PERIOD)) {
nth = f_add(nth, INT2FIX(DIV(t, CM_PERIOD)));
t = ... | 0 |
289,287 | static void snd_pcm_oss_proc_init(struct snd_pcm *pcm)
{
int stream;
for (stream = 0; stream < 2; ++stream) {
struct snd_info_entry *entry;
struct snd_pcm_str *pstr = &pcm->streams[stream];
if (pstr->substream_count == 0)
continue;
entry = snd_info_create_card_entry(pcm->card, "oss", pstr->proc_root);
if... | 0 |
225,418 | static int vidioc_s_fmt_cap(struct file *file, void *priv,
struct v4l2_format *fmt)
{
return vidioc_try_fmt_cap(file, priv, fmt);
} | 0 |
402,614 | get_password_passthrough(PK11SlotInfo *slot UNUSED,
PRBool retry, void *arg)
{
if (retry || !arg)
return NULL;
char *ret = strdup(arg);
if (!ret)
err(1, "Could not allocate memory");
return ret;
} | 0 |
301,352 | static int vfswrap_asys_int_recv(struct tevent_req *req, int *err)
{
struct vfswrap_asys_state *state = tevent_req_data(
req, struct vfswrap_asys_state);
if (tevent_req_is_unix_error(req, err)) {
return -1;
}
*err = state->err;
return state->ret;
} | 0 |
436,121 | static void io_req_complete_failed(struct io_kiocb *req, long res)
{
req_set_fail(req);
io_put_req(req);
io_req_complete_post(req, res, 0);
} | 0 |
328,818 | R_API RList *retrieve_all_method_access_string_and_value(void) {
return retrieve_all_access_string_and_value (METHOD_ACCESS_FLAGS);
} | 0 |
244,140 | GF_Err extr_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_ExtraDataBox *ptr = (GF_ExtraDataBox *)s;
e = gf_isom_box_parse((GF_Box**) &ptr->feci, bs);
if (e) return e;
if (!ptr->feci || ptr->feci->size > ptr->size) return GF_ISOM_INVALID_MEDIA;
ptr->data_length = (u32) (ptr->size - ptr->feci->size);
ptr->... | 0 |
228,444 | String WddxPacket::packet_end() {
if (!m_packetClosed) {
if (m_manualPacketCreation) {
m_packetString.append("</struct>");
}
m_packetString.append("</data></wddxPacket>");
}
m_packetClosed = true;
return m_packetString.detach();
} | 0 |
459,183 | void tcf_block_netif_keep_dst(struct tcf_block *block)
{
struct tcf_block_owner_item *item;
block->keep_dst = true;
list_for_each_entry(item, &block->owner_list, list)
tcf_block_owner_netif_keep_dst(block, item->q,
item->binder_type);
} | 0 |
512,898 | bool excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred)
{
for (uint i= 0; i < arg_count; i++)
{
if (args[i]->const_item())
continue;
if (!args[i]->excl_dep_on_in_subq_left_part(subq_pred))
return false;
}
return true;
} | 0 |
387,873 | bool InstanceKlass::is_same_or_direct_interface(Klass *k) const {
// Verify direct super interface
if (this == k) return true;
assert(k->is_interface(), "should be an interface class");
for (int i = 0; i < local_interfaces()->length(); i++) {
if (local_interfaces()->at(i) == k) {
return true;
}
... | 0 |
207,068 | static ssize_t remove_slot_store(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t nbytes)
{
char drc_name[MAX_DRC_NAME_LEN];
int rc;
char *end;
if (nbytes >= MAX_DRC_NAME_LEN)
return 0;
memcpy(drc_name, buf, nbytes);
end = strchr(drc_name, '\n');
if (!end)
end = &drc_na... | 1 |
440,885 | LogVHdrMessageVerb(MessageType type, int verb, const char *msg_format,
va_list msg_args, const char *hdr_format, va_list hdr_args)
{
const char *type_str;
char buf[1024];
const size_t size = sizeof(buf);
Bool newline;
size_t len = 0;
int (*vprintf_func)(char *, int, const char... | 0 |
403,478 | int __init ecryptfs_init_kthread(void)
{
int rc = 0;
mutex_init(&ecryptfs_kthread_ctl.mux);
init_waitqueue_head(&ecryptfs_kthread_ctl.wait);
INIT_LIST_HEAD(&ecryptfs_kthread_ctl.req_list);
ecryptfs_kthread = kthread_run(&ecryptfs_threadfn, NULL,
"ecryptfs-kthread");
if (IS_ERR(ecryptfs_kthread)) {
r... | 0 |
346,462 | do_source_ext(
char_u *fname,
int check_other, // check for .vimrc and _vimrc
int is_vimrc, // DOSO_ value
int *ret_sid UNUSED,
exarg_T *eap,
int clearvars UNUSED)
{
source_cookie_T cookie;
char_u *p;
char_u *fname_exp;
char_u *firstline = NULL;
... | 0 |
343,158 | int esp6_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp)
{
u8 *tail;
int nfrags;
int esph_offset;
struct page *page;
struct sk_buff *trailer;
int tailen = esp->tailen;
unsigned int allocsz;
if (x->encap) {
int err = esp6_output_encap(x, skb, esp);
if (err < 0)
return err;
... | 0 |
427,244 | static int funcname (LexState *ls, expdesc *v) {
/* funcname -> NAME {fieldsel} [':' NAME] */
int ismethod = 0;
singlevar(ls, v);
while (ls->t.token == '.')
fieldsel(ls, v);
if (ls->t.token == ':') {
ismethod = 1;
fieldsel(ls, v);
}
return ismethod;
} | 0 |
230,632 | void derive_spatial_luma_vector_prediction(base_context* ctx,
de265_image* img,
const slice_segment_header* shdr,
int xC,int yC,int nCS,int xP,int yP,
... | 0 |
221,684 | int Socket::getPort() {
return my_port;
} | 0 |
376,339 | add_signers (CamelCipherValidity *validity,
const GString *signers)
{
CamelInternetAddress *address;
gint i, count;
g_return_if_fail (validity != NULL);
if (!signers || !signers->str || !*signers->str)
return;
address = camel_internet_address_new ();
g_return_if_fail (address != NULL);
count =... | 0 |
336,571 | RedChannel *reds_find_channel(RedsState *reds, uint32_t type, uint32_t id)
{
for (auto channel: reds->channels) {
if (channel->type() == type && channel->id() == id) {
return channel.get();
}
}
return NULL;
} | 0 |
245,709 | static int add_xtinyproxy_header (struct conn_s *connptr)
{
assert (connptr && connptr->server_fd >= 0);
return write_message (connptr->server_fd,
"X-Tinyproxy: %s\r\n", connptr->client_ip_addr);
} | 0 |
249,984 | GF_Err DoWriteMeta(GF_ISOFile *file, GF_MetaBox *meta, GF_BitStream *bs, Bool Emulation, u64 baseOffset, u64 *mdatSize)
{
GF_ItemExtentEntry *entry;
u64 maxExtendOffset, maxExtendSize;
u32 i, j, count;
maxExtendOffset = 0;
maxExtendSize = 0;
if (mdatSize) *mdatSize = 0;
if (!meta->item_locations) return GF_OK;
... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.