idx int64 | func string | target int64 |
|---|---|---|
300,780 | static bool tsk_peer_msg(struct tipc_sock *tsk, struct tipc_msg *msg)
{
struct sock *sk = &tsk->sk;
u32 self = tipc_own_addr(sock_net(sk));
u32 peer_port = tsk_peer_port(tsk);
u32 orig_node, peer_node;
if (unlikely(!tipc_sk_connected(sk)))
return false;
if (unlikely(msg_origport(msg) != peer_port))
return f... | 0 |
446,090 | static int atusb_read_subreg(struct atusb *lp,
unsigned int addr, unsigned int mask,
unsigned int shift)
{
int rc;
rc = atusb_read_reg(lp, addr);
rc = (rc & mask) >> shift;
return rc;
} | 0 |
508,311 | find_field_in_table_ref(THD *thd, TABLE_LIST *table_list,
const char *name, uint length,
const char *item_name, const char *db_name,
const char *table_name, Item **ref,
bool check_privileges, bool allow_rowid,
... | 0 |
207,753 | static size_t copy_page_to_iter_pipe(struct page *page, size_t offset, size_t bytes,
struct iov_iter *i)
{
struct pipe_inode_info *pipe = i->pipe;
struct pipe_buffer *buf;
unsigned int p_tail = pipe->tail;
unsigned int p_mask = pipe->ring_size - 1;
unsigned int i_head = i->head;
size_t off;
if (unlikely(byt... | 1 |
273,906 | static void handle_PASV(ctrl_t *ctrl, char *arg)
{
struct sockaddr_in data;
socklen_t len = sizeof(data);
char *msg, *p, buf[200];
int port;
if (do_PASV(ctrl, arg, (struct sockaddr *)&data, &len))
return;
/* Convert server IP address and port to comma separated list */
msg = strdup(ctrl->serveraddr);
if (!m... | 0 |
225,846 |
GF_Err emsg_box_size(GF_Box *s)
{
GF_EventMessageBox *ptr = (GF_EventMessageBox*) s;
ptr->size += 4;
if (ptr->version) {
ptr->size += 20;
} else {
ptr->size += 16;
}
ptr->size+=2; //1 NULL-terminated strings
if (ptr->scheme_id_uri) ptr->size += strlen(ptr->scheme_id_uri);
if (ptr->value) ptr->size += strl... | 0 |
473,965 | utf16le_code_to_mbclen(OnigCodePoint code,
OnigEncoding enc ARG_UNUSED)
{
return (code > 0xffff ? 4 : 2);
} | 0 |
513,268 | join_read_system(JOIN_TAB *tab)
{
TABLE *table= tab->table;
int error;
if (table->status & STATUS_GARBAGE) // If first read
{
if ((error= table->file->ha_read_first_row(table->record[0],
table->s->primary_key)))
{
if (error != HA_ERR_END_OF_FILE)
re... | 0 |
338,096 | bool WasmBinaryBuilder::maybeVisitSIMDReplace(Expression*& out, uint32_t code) {
SIMDReplace* curr;
switch (code) {
case BinaryConsts::I8x16ReplaceLane:
curr = allocator.alloc<SIMDReplace>();
curr->op = ReplaceLaneVecI8x16;
curr->index = getLaneIndex(16);
break;
case BinaryConsts::I1... | 0 |
207,069 | static ssize_t add_slot_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t nbytes)
{
char drc_name[MAX_DRC_NAME_LEN];
char *end;
int rc;
if (nbytes >= MAX_DRC_NAME_LEN)
return 0;
memcpy(drc_name, buf, nbytes);
end = strchr(drc_name, '\n');
if (!end)
end = &drc_name[n... | 1 |
373,542 | ipf_reassembled_list_remove(struct reassembled_pkt *rp)
/* OVS_REQUIRES(ipf_lock) */
{
ovs_list_remove(&rp->rp_list_node);
} | 0 |
415,178 | cmd_writekey (assuan_context_t ctx, char *line)
{
ctrl_t ctrl = assuan_get_pointer (ctx);
int rc;
char *keyid;
int force = has_option (line, "--force");
unsigned char *keydata;
size_t keydatalen;
if ( IS_LOCKED (ctrl) )
return gpg_error (GPG_ERR_LOCKED);
line = skip_options (line);
if (!*line)
... | 0 |
377,477 | ut64 r_coresym_cache_element_pa2va(RCoreSymCacheElement *element, ut64 pa) {
size_t i;
for (i = 0; i < element->hdr->n_segments; i++) {
RCoreSymCacheElementSegment *seg = &element->segments[i];
if (seg->size == 0) {
continue;
}
if (seg->paddr < pa && pa < seg->paddr + seg->size) {
return pa - seg->paddr... | 0 |
250,688 | DROGON_TEST(HttpFile)
{
SUBSECTION(Save)
{
HttpFileImpl file;
file.setFileName("test_file_name");
file.setFile("test", 4);
auto out = file.save("./test_uploads_dir");
CHECK(out == 0);
CHECK(filesystem::exists("./test_uploads_dir/test_file_name"));
filesy... | 0 |
437,375 | divide_look_behind_alternatives(Node* node)
{
Node *head, *np, *insert_node;
AnchorNode* an = ANCHOR_(node);
int anc_type = an->type;
head = NODE_ANCHOR_BODY(an);
np = NODE_CAR(head);
swap_node(node, head);
NODE_CAR(node) = head;
NODE_BODY(head) = np;
np = node;
while (IS_NOT_NULL(np = NODE_CDR(np... | 0 |
226,073 |
GF_Err trgr_on_child_box(GF_Box *s, GF_Box *a, Bool is_rem)
{
GF_TrackGroupBox *ptr = (GF_TrackGroupBox *)s;
BOX_FIELD_LIST_ASSIGN(groups)
return gf_list_add(ptr->groups, a); | 0 |
293,534 | PJ_DEF(void) pj_cis_del_range( pj_cis_t *cis, int cstart, int cend)
{
while (cstart != cend) {
PJ_CIS_CLR(cis, cstart);
cstart++;
}
} | 0 |
374,035 | static bool load_buffer(RBinFile *bf, void **bin_obj, RBuffer *buf, ut64 loadaddr, Sdb *sdb) {
#if 0
SYMBOLS HEADER
0 MAGIC 02ff01ff
4 VERSION 1 (little endian)
8 ffffffff
16 002b0000 01000000 { 0x2b00, 0x0000 }
24 UUID 16 bytes
40 2621 d85b 2100 2000 0000 0000 0000 0000
56 ffff ffff ffff ff7f 0c00 00... | 0 |
230,460 | na_input(void)
{
uint8_t is_llchange;
uint8_t is_router;
uint8_t is_solicited;
uint8_t is_override;
uip_lladdr_t lladdr_aligned;
LOG_INFO("Received NA from ");
LOG_INFO_6ADDR(&UIP_IP_BUF->srcipaddr);
LOG_INFO_(" to ");
LOG_INFO_6ADDR(&UIP_IP_BUF->destipaddr);
LOG_INFO_(" with target address ");
L... | 0 |
317,228 | static int selinux_mount(const char *dev_name,
const struct path *path,
const char *type,
unsigned long flags,
void *data)
{
const struct cred *cred = current_cred();
if (flags & MS_REMOUNT)
return superblock_has_perm(cred, path->dentry->d_sb,
FILESYSTEM__REMOUNT, NULL);
else
return path... | 0 |
462,405 | static rsRetVal addInstance(void __attribute__((unused)) *pVal, uchar *pNewVal)
{
instanceConf_t *inst;
DEFiRet;
CHKiRet(createInstance(&inst));
if(pNewVal == NULL || *pNewVal == '\0') {
errmsg.LogError(0, NO_ERRCODE, "imptcp: port number must be specified, listener ignored");
}
if((pNewVal == NULL) || (pNewVa... | 0 |
484,058 | START_TEST(SecureChannel_sendSymmetricMessage_invalidParameters) {
// initialize dummy message
UA_ReadRequest dummyMessage;
UA_ReadRequest_init(&dummyMessage);
UA_DataType dummyType = UA_TYPES[UA_TYPES_READREQUEST];
UA_StatusCode retval = UA_SecureChannel_sendSymmetricMessage(NULL, 42, UA_MESSAGETY... | 0 |
359,275 | DEFUN (clear_bgp_external_in_prefix_filter,
clear_bgp_external_in_prefix_filter_cmd,
"clear bgp external in prefix-filter",
CLEAR_STR
BGP_STR
"Clear all external peers\n"
"Soft reconfig inbound update\n"
"Push out prefix-list ORF and do inbound soft reconfig\n")
{
retu... | 0 |
343,149 | static void esp_free_tcp_sk(struct rcu_head *head)
{
struct esp_tcp_sk *esk = container_of(head, struct esp_tcp_sk, rcu);
sock_put(esk->sk);
kfree(esk);
} | 0 |
409,416 | report_term_error(char *error_msg, char_u *term)
{
struct builtin_term *termp;
int i;
mch_errmsg("\r\n");
if (error_msg != NULL)
{
mch_errmsg(error_msg);
mch_errmsg("\r\n");
}
mch_errmsg("'");
mch_errmsg((char *)term);
mch_errmsg(_("' not known. Available builtin terminals are:"... | 0 |
195,385 | flatpak_dir_ensure_bundle_remote (FlatpakDir *self,
GFile *file,
GBytes *extra_gpg_data,
FlatpakDecomposed **out_ref,
char **out_checksum,... | 1 |
90,821 | std::string host() const { return host_; }
| 0 |
508,344 | Locked_tables_list::unlock_locked_table(THD *thd, MDL_ticket *mdl_ticket)
{
/*
Ensure we are in locked table mode.
As this function is only called on error condition it's better
to check this condition here than in the caller.
*/
if (thd->locked_tables_mode != LTM_LOCK_TABLES)
return;
if (mdl_t... | 0 |
328,869 | R_API char *r_bin_java_resolve(RBinJavaObj *BIN_OBJ, int idx, ut8 space_bn_name_type) {
// TODO XXX FIXME add a size parameter to the str when it is passed in
RBinJavaCPTypeObj *item = NULL, *item2 = NULL;
char *class_str = NULL,
*name_str = NULL,
*desc_str = NULL,
*string_str = NULL,
*empty = "",
*cp_name = NU... | 0 |
338,058 | bool WasmBinaryBuilder::maybeVisitSIMDTernary(Expression*& out, uint32_t code) {
SIMDTernary* curr;
switch (code) {
case BinaryConsts::V128Bitselect:
curr = allocator.alloc<SIMDTernary>();
curr->op = Bitselect;
break;
case BinaryConsts::I8x16Laneselect:
curr = allocator.alloc<SIMDTer... | 0 |
319,418 | ModuleExport size_t RegisterCINImage(void)
{
MagickInfo
*entry;
entry=SetMagickInfo("CIN");
entry->decoder=(DecodeImageHandler *) ReadCINImage;
entry->encoder=(EncodeImageHandler *) WriteCINImage;
entry->magick=(IsImageFormatHandler *) IsCIN;
entry->adjoin=MagickFalse;
entry->seekable_stream=MagickTr... | 0 |
477,354 | R_API RBinJavaAttrInfo *r_bin_java_stack_map_table_attr_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz, ut64 buf_offset) {
ut32 i = 0;
ut64 offset = 0;
RBinJavaStackMapFrame *stack_frame = NULL, *new_stack_frame = NULL;
if (sz < 10) {
return NULL;
}
RBinJavaAttrInfo *attr = r_bin_java_default_attr_new (bin, buffer,... | 0 |
393,486 | static SQInteger base_assert(HSQUIRRELVM v)
{
if(SQVM::IsFalse(stack_get(v,2))){
SQInteger top = sq_gettop(v);
if (top>2 && SQ_SUCCEEDED(sq_tostring(v,3))) {
const SQChar *str = 0;
if (SQ_SUCCEEDED(sq_getstring(v,-1,&str))) {
return sq_throwerror(v, str);
... | 0 |
197,666 | njs_object_iterate_reverse(njs_vm_t *vm, njs_iterator_args_t *args,
njs_iterator_handler_t handler)
{
double idx;
int64_t i, from, to, length;
njs_int_t ret;
njs_array_t *array, *keys;
njs_value_t *entry, *value, prop, character, string_obj;
... | 1 |
213,370 | g_socket_client_connected_callback (GObject *source,
GAsyncResult *result,
gpointer user_data)
{
ConnectionAttempt *attempt = user_data;
GSocketClientAsyncConnectData *data = attempt->data;
GSList *l;
GError *error = NULL;
GProxy *proxy;
const gchar *protocol;
/* data is NULL on... | 1 |
247,691 | TEST_P(SslSocketTest, RevokedLeafCertificateOnlyLeafCRLValidation) {
// The test checks that revoked certificate will makes the validation fails even if we set
// only_verify_leaf_cert_crl to true.
//
// Trust chain contains:
// - Root authority certificate (i.e., ca_cert.pem)
// - Intermediate authority ... | 0 |
427,209 | static void singlevaraux (FuncState *fs, TString *n, expdesc *var, int base) {
if (fs == NULL) /* no more levels? */
init_exp(var, VVOID, 0); /* default is global */
else {
int v = searchvar(fs, n, var); /* look up locals at current level */
if (v >= 0) { /* found? */
if (v == VLOCAL && !base)... | 0 |
455,342 | bind_keyseq_to_unix_command (line)
char *line;
{
Keymap kmap, cmd_xmap;
char *kseq, *value;
int i, kstart;
kmap = rl_get_keymap ();
/* We duplicate some of the work done by rl_parse_and_bind here, but
this code only has to handle `"keyseq": ["]command["]' and can
generate an error for anythin... | 0 |
459,102 | __tcf_get_next_proto(struct tcf_chain *chain, struct tcf_proto *tp)
{
u32 prio = 0;
ASSERT_RTNL();
mutex_lock(&chain->filter_chain_lock);
if (!tp) {
tp = tcf_chain_dereference(chain->filter_chain, chain);
} else if (tcf_proto_is_deleting(tp)) {
/* 'deleting' flag is set and chain->filter_chain_lock was
* ... | 0 |
369,108 | static int io_epoll_ctl(struct io_kiocb *req, unsigned int issue_flags)
{
#if defined(CONFIG_EPOLL)
struct io_epoll *ie = &req->epoll;
int ret;
bool force_nonblock = issue_flags & IO_URING_F_NONBLOCK;
ret = do_epoll_ctl(ie->epfd, ie->op, ie->fd, &ie->event, force_nonblock);
if (force_nonblock && ret == -EAGAIN)
... | 0 |
317,095 | static inline u32 file_mask_to_av(int mode, int mask)
{
u32 av = 0;
if (!S_ISDIR(mode)) {
if (mask & MAY_EXEC)
av |= FILE__EXECUTE;
if (mask & MAY_READ)
av |= FILE__READ;
if (mask & MAY_APPEND)
av |= FILE__APPEND;
else if (mask & MAY_WRITE)
av |= FILE__WRITE;
} else {
if (mask & MAY_EXEC)
... | 0 |
446,114 | atusb_set_promiscuous_mode(struct ieee802154_hw *hw, const bool on)
{
struct atusb *atusb = hw->priv;
int ret;
if (on) {
ret = atusb_write_subreg(atusb, SR_AACK_DIS_ACK, 1);
if (ret < 0)
return ret;
ret = atusb_write_subreg(atusb, SR_AACK_PROM_MODE, 1);
if (ret < 0)
return ret;
} else {
ret = atus... | 0 |
238,814 | save_incsearch_state(void)
{
saved_search_match_endcol = search_match_endcol;
saved_search_match_lines = search_match_lines;
} | 0 |
261,421 | std::string thread_task_ctb_row::name() const {
char buf[100];
sprintf(buf,"ctb-row-%d",debug_startCtbRow);
return buf;
} | 0 |
244,013 | GF_Err pcmC_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_PCMConfigBox *ptr = (GF_PCMConfigBox *) s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u8(bs, ptr->format_flags);
gf_bs_write_u8(bs, ptr->PCM_sample_size);
return GF_OK;
} | 0 |
261,765 | void RtmpProtocol::sendChunkSize(uint32_t size) {
uint32_t len = htonl(size);
std::string set_chunk((char *) &len, 4);
sendRequest(MSG_SET_CHUNK, set_chunk);
_chunk_size_out = size;
} | 0 |
476,102 | void usb_composite_overwrite_options(struct usb_composite_dev *cdev,
struct usb_composite_overwrite *covr)
{
struct usb_device_descriptor *desc = &cdev->desc;
struct usb_gadget_strings *gstr = cdev->driver->strings[0];
struct usb_string *dev_str = gstr->strings;
if (covr->idVendor)
desc->idVendor = cpu_to_le1... | 0 |
262,035 | ProtoValidationTypeString(const ServiceValidationResultsType t)
{
switch (t) {
case VALIDATION_RESULTS_TYPE_NAMEPASSWORD:
return VGAUTH_USERHANDLE_TYPE_NAMEPASSWORD;
case VALIDATION_RESULTS_TYPE_SSPI:
return VGAUTH_USERHANDLE_TYPE_SSPI;
case VALIDATION_RESULTS_TYPE_SAML:
return VGAUTH_USER... | 0 |
463,195 | static int annotate_dbname_mbentry(const mbentry_t *mbentry,
char **fnamep)
{
const char *conf_fname;
if (mbentry) {
/* per-mbox database */
conf_fname = mbentry_metapath(mbentry, META_ANNOTATIONS, /*isnew*/0);
if (!conf_fname)
return IMAP_... | 0 |
404,721 | int __close_range(unsigned fd, unsigned max_fd, unsigned int flags)
{
struct task_struct *me = current;
struct files_struct *cur_fds = me->files, *fds = NULL;
if (flags & ~(CLOSE_RANGE_UNSHARE | CLOSE_RANGE_CLOEXEC))
return -EINVAL;
if (fd > max_fd)
return -EINVAL;
if (flags & CLOSE_RANGE_UNSHARE) {
int r... | 0 |
310,336 | dirserv_get_networkstatus_v2_fingerprints(smartlist_t *result,
const char *key)
{
tor_assert(result);
if (!cached_v2_networkstatus)
cached_v2_networkstatus = digestmap_new();
if (should_generate_v2_networkstatus())
generate_v2_networkstatus_opinion();
if (!st... | 0 |
297,215 | char * exif_dump_data(int *dump_free, int format, int components, int length, int motorola_intel, char *value_ptr TSRMLS_DC) /* {{{ */
{
char *dump;
int len;
*dump_free = 0;
if (format == TAG_FMT_STRING) {
return value_ptr ? value_ptr : "<no data>";
}
if (format == TAG_FMT_UNDEFINED) {
return "<undefined>\n"... | 0 |
336,542 | SPICE_GNUC_VISIBLE void spice_server_vm_start(SpiceServer *reds)
{
reds->vm_running = TRUE;
for (auto dev: reds->char_devices) {
dev->start();
}
reds_on_vm_start(reds);
} | 0 |
317,231 | static int selinux_is_sblabel_mnt(struct super_block *sb)
{
struct superblock_security_struct *sbsec = selinux_superblock(sb);
/*
* IMPORTANT: Double-check logic in this function when adding a new
* SECURITY_FS_USE_* definition!
*/
BUILD_BUG_ON(SECURITY_FS_USE_MAX != 7);
switch (sbsec->behavior) {
case SEC... | 0 |
386,587 | DL_Dxf::~DL_Dxf() {
if (vertices!=NULL) {
delete[] vertices;
}
if (knots!=NULL) {
delete[] knots;
}
if (controlPoints!=NULL) {
delete[] controlPoints;
}
if (fitPoints!=NULL) {
delete[] fitPoints;
}
if (weights!=NULL) {
delete[] weights;
}
... | 0 |
436,124 | static void io_flush_cached_locked_reqs(struct io_ring_ctx *ctx,
struct io_comp_state *cs)
{
spin_lock_irq(&ctx->completion_lock);
list_splice_init(&ctx->locked_free_list, &cs->free_list);
ctx->locked_free_nr = 0;
spin_unlock_irq(&ctx->completion_lock);
} | 0 |
236,202 | GF_Err text_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
u16 pSize;
GF_TextSampleEntryBox *ptr = (GF_TextSampleEntryBox*)s;
ISOM_DECREASE_SIZE(ptr, 8);
e = gf_isom_base_sample_entry_read((GF_SampleEntryBox *)ptr, bs);
if (e) return e;
ptr->textJustification = 1;
//some weird text entries are not QT text... | 0 |
474,072 | st_numcmp(st_data_t x, st_data_t y)
{
return x != y;
} | 0 |
250,694 | int HttpFileImpl::save(const std::string &path) const
{
assert(!path.empty());
if (fileName_.empty())
return -1;
filesystem::path fsUploadDir(utils::toNativePath(path));
if (!fsUploadDir.is_absolute() && (!fsUploadDir.has_parent_path() ||
(fsUploadDir.begi... | 0 |
512,906 | Item_func_in::eval_not_null_tables(void *opt_arg)
{
Item **arg, **arg_end;
if (Item_func_opt_neg::eval_not_null_tables(NULL))
return 1;
/* not_null_tables_cache == union(T1(e),union(T1(ei))) */
if (pred_level && negated)
return 0;
/* not_null_tables_cache = union(T1(e),intersection(T1(ei))) */
no... | 0 |
477,973 | void simplestring_init(simplestring* string) {
memset(string, 0, sizeof(simplestring));
} | 0 |
412,135 | dnsc_nonce_cache_insert(struct slabhash *cache,
const uint8_t nonce[crypto_box_HALF_NONCEBYTES],
const uint8_t magic_query[DNSCRYPT_MAGIC_HEADER_LEN],
const uint8_t pk[crypto_box_PUBLICKEYBYTES],
uint32_t hash)
{
struct ... | 0 |
273,073 | keyval_alloc(void)
{
struct keyval *kv;
kv = calloc(1, sizeof(struct keyval));
if (!kv)
{
DPRINTF(E_LOG, L_MISC, "Out of memory for keyval alloc\n");
return NULL;
}
return kv;
} | 0 |
234,211 | display_trace_info (struct dwarf_section *section, void *file)
{
return process_debug_info (section, file, section->abbrev_sec, false, true);
} | 0 |
424,935 | void iwl_pcie_apm_config(struct iwl_trans *trans)
{
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
u16 lctl;
u16 cap;
/*
* HW bug W/A for instability in PCIe bus L0S->L1 transition.
* Check if BIOS (or OS) enabled L1-ASPM on this device.
* If so (likely), disable L0S, so device moves di... | 0 |
332,384 | op_colon(oparg_T *oap)
{
stuffcharReadbuff(':');
if (oap->is_VIsual)
stuffReadbuff((char_u *)"'<,'>");
else
{
// Make the range look nice, so it can be repeated.
if (oap->start.lnum == curwin->w_cursor.lnum)
stuffcharReadbuff('.');
else
stuffnumReadbuff((long)oap->start.lnum);
if (oap->en... | 0 |
509,557 | int ha_maria::rnd_pos(uchar *buf, uchar *pos)
{
register_handler(file);
int error= maria_rrnd(file, buf, my_get_ptr(pos, ref_length));
return error;
} | 0 |
220,815 | constexpr int lut_size() {
static_assert(std::is_same<LutInT, int8_t>::value ||
std::is_same<LutInT, int16_t>::value,
"Only LUTs with int8 or int16 inputs are supported.");
return std::is_same<LutInT, int8_t>::value ? 256 : 513;
} | 0 |
316,995 | static int selinux_ib_alloc_security(void **ib_sec)
{
struct ib_security_struct *sec;
sec = kzalloc(sizeof(*sec), GFP_KERNEL);
if (!sec)
return -ENOMEM;
sec->sid = current_sid();
*ib_sec = sec;
return 0;
} | 0 |
270,408 | static bool ok_inflater_dynamic_block_header(ok_inflater *inflater) {
if (!ok_inflater_load_bits(inflater, 14)) {
return false;
} else {
inflater->num_literal_codes = (int)ok_inflater_read_bits(inflater, 5) + 257;
inflater->num_distance_codes = (int)ok_inflater_read_bits(inflater, 5) + 1... | 0 |
401,588 | urandom_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
{
unsigned long flags;
static int maxwarn = 10;
if (!crng_ready() && maxwarn > 0) {
maxwarn--;
if (__ratelimit(&urandom_warning))
pr_notice("%s: uninitialized urandom read (%zd bytes read)\n",
current->comm, nbytes);
spin_... | 0 |
314,760 | cdf_read_dir(const cdf_info_t *info, const cdf_header_t *h,
const cdf_sat_t *sat, cdf_dir_t *dir)
{
size_t i, j;
size_t ss = CDF_SEC_SIZE(h), ns, nd;
char *buf;
cdf_secid_t sid = h->h_secid_first_directory;
ns = cdf_count_chain(sat, sid, ss);
if (ns == (size_t)-1)
return -1;
nd = ss / CDF_DIRECTORY_SIZE;... | 0 |
222,511 | const FunctionDef* FunctionLibraryDefinition::GetAttrImpl(
const NodeDef& ndef) const {
if (ndef.op() != kGradientOp) {
// If 'ndef' calls a function and the function's def has the attr,
// returns it.
return Find(ndef.op());
}
// If ndef is SymbolicGradient[f=Foo], we use Foo's gradient or
// ... | 0 |
513,176 | void plugin_opt_set_limits(struct my_option *options,
const struct st_mysql_sys_var *opt)
{
options->sub_size= 0;
switch (opt->flags & (PLUGIN_VAR_TYPEMASK |
PLUGIN_VAR_UNSIGNED | PLUGIN_VAR_THDLOCAL)) {
/* global system variables */
case PLUGIN_VAR_INT:
O... | 0 |
207,762 | negotiate_handshake_newstyle_options (void)
{
GET_CONN;
struct nbd_new_option new_option;
size_t nr_options;
bool list_seen = false;
uint64_t version;
uint32_t option;
uint32_t optlen;
struct nbd_export_name_option_reply handshake_finish;
const char *optname;
uint64_t exportsize;
struct backend *b... | 1 |
445,990 | _archive_operation_started (FrWindow *window,
FrAction action)
{
GFile *archive;
char *message;
window->priv->action = action;
_fr_window_start_activity_mode (window);
#ifdef DEBUG
debug (DEBUG_INFO, "%s [START] (FR::Window)\n", action_names[action]);
#endif
archive = window->priv->pd_last_archive;
i... | 0 |
336,017 | static int sr9700_get_eeprom_len(struct net_device *netdev)
{
return SR_EEPROM_LEN;
} | 0 |
289,244 | static int snd_pcm_oss_open(struct inode *inode, struct file *file)
{
int err;
char task_name[32];
struct snd_pcm *pcm;
struct snd_pcm_oss_file *pcm_oss_file;
struct snd_pcm_oss_setup setup[2];
int nonblock;
wait_queue_entry_t wait;
err = nonseekable_open(inode, file);
if (err < 0)
return err;
pcm = snd_l... | 0 |
430,460 | int ovs_nla_put_key(const struct sw_flow_key *swkey,
const struct sw_flow_key *output, int attr, bool is_mask,
struct sk_buff *skb)
{
int err;
struct nlattr *nla;
nla = nla_nest_start_noflag(skb, attr);
if (!nla)
return -EMSGSIZE;
err = __ovs_nla_put_key(swkey, output, is_mask, skb);
if (err)
ret... | 0 |
230,979 | mrb_vm_run(mrb_state *mrb, const struct RProc *proc, mrb_value self, mrb_int stack_keep)
{
const mrb_irep *irep = proc->body.irep;
mrb_value result;
struct mrb_context *c = mrb->c;
ptrdiff_t cioff = c->ci - c->cibase;
mrb_int nregs = irep->nregs;
if (!c->stbase) {
stack_init(mrb);
}
if (stack_keep ... | 0 |
338,150 | void WasmBinaryBuilder::processNames() {
for (auto* func : functions) {
wasm.addFunction(func);
}
for (auto& global : globals) {
wasm.addGlobal(std::move(global));
}
for (auto& table : tables) {
wasm.addTable(std::move(table));
}
for (auto& segment : elementSegments) {
wasm.addElementSegme... | 0 |
299,901 | readconf_readname(uschar *name, int len, uschar *s)
{
int p = 0;
while (isspace(*s)) s++;
if (isalpha(*s))
{
while (isalnum(*s) || *s == '_')
{
if (p < len-1) name[p++] = *s;
s++;
}
}
name[p] = 0;
while (isspace(*s)) s++;
return s;
} | 0 |
225,991 | GF_Box *mfhd_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_MovieFragmentHeaderBox, GF_ISOM_BOX_TYPE_MFHD);
return (GF_Box *)tmp;
} | 0 |
195,565 | String string_number_format(double d, int dec,
const String& dec_point,
const String& thousand_sep) {
char *tmpbuf = nullptr, *resbuf;
char *s, *t; /* source, target */
char *dp;
int integral;
int tmplen, reslen=0;
int count=0;
int is_negative=0;
... | 1 |
455,420 | xfs_inode_free_cowblocks(
struct xfs_inode *ip,
int flags,
void *args)
{
struct xfs_eofblocks *eofb = args;
struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, XFS_COW_FORK);
int match;
int ret = 0;
if (!xfs_prep_free_cowblocks(ip, ifp))
return 0;
if (eofb) {
if (eofb->eof_flags & XFS_EOF_FLAGS_UNION)
m... | 0 |
225,709 |
GF_Err pcrb_box_read(GF_Box *s,GF_BitStream *bs)
{
u32 i;
GF_PcrInfoBox *ptr = (GF_PcrInfoBox*) s;
ISOM_DECREASE_SIZE(ptr, 4);
ptr->subsegment_count = gf_bs_read_u32(bs);
if ((u64)ptr->subsegment_count > ptr->size / 8 || (u64)ptr->subsegment_count > (u64)SIZE_MAX/sizeof(u64)) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CON... | 0 |
413,820 | void LinkResolver::runtime_resolve_interface_method(CallInfo& result,
const methodHandle& resolved_method,
Klass* resolved_klass,
Handle recv,
... | 0 |
432,309 | void *qemu_map_ram_ptr(struct uc_struct *uc, RAMBlock *ram_block, ram_addr_t addr)
{
RAMBlock *block = ram_block;
if (block == NULL) {
block = qemu_get_ram_block(uc, addr);
addr -= block->offset;
}
return ramblock_ptr(block, addr);
} | 0 |
455,318 | initialize_readline ()
{
rl_command_func_t *func;
char kseq[2];
if (bash_readline_initialized)
return;
rl_terminal_name = get_string_value ("TERM");
rl_instream = stdin;
rl_outstream = stderr;
/* Allow conditional parsing of the ~/.inputrc file. */
rl_readline_name = "Bash";
/* Add bindable na... | 0 |
512,821 | void Item_func_like::turboBM_compute_good_suffix_shifts(int *suff)
{
turboBM_compute_suffixes(suff);
int *end = bmGs + pattern_len;
int *k;
for (k = bmGs; k < end; k++)
*k = pattern_len;
int tmp;
int i;
int j = 0;
const int plm1 = pattern_len - 1;
for (i = plm1; i > -1; i--)
{
if ... | 0 |
462,419 | closeSess(ptcpsess_t *pSess)
{
int sock;
DEFiRet;
if(pSess->compressionMode >= COMPRESS_STREAM_ALWAYS)
doZipFinish(pSess);
sock = pSess->sock;
CHKiRet(removeEPollSock(sock, pSess->epd));
close(sock);
pthread_mutex_lock(&pSess->pLstn->pSrv->mutSessLst);
/* finally unlink session from structures */
if(pSes... | 0 |
245,158 | lock_tables_maybe(MYSQL *connection, int timeout, int retry_count)
{
if (tables_locked || opt_lock_ddl_per_table) {
return(true);
}
if (have_backup_locks) {
return lock_tables_for_backup(connection, timeout, retry_count);
}
if (have_lock_wait_timeout) {
char query[200];
ut_snprintf(query, sizeof(query),... | 0 |
301,498 | score_comp_sal(suginfo_T *su)
{
langp_T *lp;
char_u badsound[MAXWLEN];
int i;
suggest_T *stp;
suggest_T *sstp;
int score;
int lpi;
if (ga_grow(&su->su_sga, su->su_ga.ga_len) == FAIL)
return;
// Use the sound-folding of the first language that supports it.
for (lpi = 0; ... | 0 |
432,171 | static inline uint64_t memory_region_shift_write_access(uint64_t *value,
signed shift,
uint64_t mask)
{
uint64_t tmp;
if (shift >= 0) {
tmp = (*value >> shift) & mask;
} else {
tm... | 0 |
346,438 | source_callback(char_u *fname, void *cookie)
{
(void)do_source(fname, FALSE, DOSO_NONE, cookie);
} | 0 |
90,811 | UpdateModifiedTimeTask(
QuotaManager* manager,
const GURL& origin,
StorageType type,
base::Time modified_time)
: DatabaseTaskBase(manager),
origin_(origin),
type_(type),
modified_time_(modified_time) {}
| 0 |
440,902 | VAuditF(const char *f, va_list args)
{
char *prefix;
char buf[1024];
int len;
static char oldbuf[1024];
prefix = AuditPrefix();
len = vsnprintf(buf, sizeof(buf), f, args);
if (len == oldlen && strcmp(buf, oldbuf) == 0) {
/* Message already seen */
nrepeat++;
}
else ... | 0 |
249,981 | GF_Err WriteSample(MovieWriter *mw, u32 size, u64 offset, u8 isEdited, GF_BitStream *bs, u32 nb_samp)
{
GF_DataMap *map;
u32 bytes;
if (!size) return GF_OK;
if (size>mw->alloc_size) {
mw->buffer = (char*)gf_realloc(mw->buffer, size);
mw->alloc_size = size;
}
if (!mw->buffer) return GF_OUT_OF_MEM;
if (isE... | 0 |
246,685 | u32 parse_dsap(char *arg_val, u32 opt)
{
dump_saps = atoi(arg_val);
dump_saps_mode = opt;
return 0;
} | 0 |
310,047 | _nc_color_content(SCREEN *sp, int color, int *r, int *g, int *b)
{
int result = ERR;
int maxcolors;
T((T_CALLED("color_content(%p,%d,%p,%p,%p)"),
(void *) sp,
color,
(void *) r,
(void *) g,
(void *) b));
if (sp == 0)
returnCode(result);
maxcolors = MaxColors;
... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.