idx int64 | func string | target int64 |
|---|---|---|
412,330 | static Sdb *get_sdb(RzBinFile *bf) {
RzBinObject *o = bf->o;
if (!o) {
return NULL;
}
QnxObj *qo = o->bin_obj;
return qo ? qo->kv : NULL;
} | 0 |
197,239 | void Compute(OpKernelContext* ctx) override {
try {
const Tensor& input = ctx->input(kInputTensorIndex);
const Tensor& input_min_vec = ctx->input(kInputMinVecIndex);
float* input_min_vec_data = (float*)const_cast<void*>(
static_cast<const void*>(input_min_vec.flat<float>().data()));
... | 1 |
401,564 | static __u32 get_reg(struct fast_pool *f, struct pt_regs *regs)
{
__u32 *ptr = (__u32 *) regs;
unsigned int idx;
if (regs == NULL)
return 0;
idx = READ_ONCE(f->reg_idx);
if (idx >= sizeof(struct pt_regs) / sizeof(__u32))
idx = 0;
ptr += idx++;
WRITE_ONCE(f->reg_idx, idx);
return *ptr;
} | 0 |
291,838 | static int rtrs_clt_ib_dev_init(struct rtrs_ib_dev *dev)
{
if (!(dev->ib_dev->attrs.device_cap_flags &
IB_DEVICE_MEM_MGT_EXTENSIONS)) {
pr_err("Memory registrations not supported.\n");
return -ENOTSUPP;
}
return 0;
} | 0 |
225,448 | static ssize_t attr_show_format(struct device *cd,
struct device_attribute *attr, char *buf)
{
/* gets the current format as "FOURCC:WxH@f/s", e.g. "YUYV:320x240@1000/30" */
struct v4l2_loopback_device *dev = v4l2loopback_cd2dev(cd);
const struct v4l2_fract *tpf;
char buf4cc[5], buf_fps[32];
if (!dev || !dev-... | 0 |
294,471 | datetime_s_httpdate(int argc, VALUE *argv, VALUE klass)
{
VALUE str, sg, opt;
rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
str = rb_str_new2("Mon, 01 Jan -4712 00:00:00 GMT");
case 1:
sg = INT2FIX(DEFAULT_SG);
}
{
int... | 0 |
462,257 | PJ_DEF(pj_status_t) pj_stun_msg_add_attr(pj_stun_msg *msg,
pj_stun_attr_hdr *attr)
{
PJ_ASSERT_RETURN(msg && attr, PJ_EINVAL);
PJ_ASSERT_RETURN(msg->attr_count < PJ_STUN_MAX_ATTR, PJ_ETOOMANY);
msg->attr[msg->attr_count++] = attr;
return PJ_SUCCESS;
} | 0 |
195,389 | bool RepeatedAttrDefEqual(
const protobuf::RepeatedPtrField<OpDef::AttrDef>& a1,
const protobuf::RepeatedPtrField<OpDef::AttrDef>& a2) {
std::unordered_map<string, const OpDef::AttrDef*> a1_set;
for (const OpDef::AttrDef& def : a1) {
DCHECK(a1_set.find(def.name()) == a1_set.end())
<< "AttrDef na... | 1 |
484,747 | static void xennet_get_ethtool_stats(struct net_device *dev,
struct ethtool_stats *stats, u64 * data)
{
void *np = netdev_priv(dev);
int i;
for (i = 0; i < ARRAY_SIZE(xennet_stats); i++)
data[i] = atomic_read((atomic_t *)(np + xennet_stats[i].offset));
} | 0 |
277,481 | uint32_t mobi_get_orth_entry_offset(const MOBIIndexEntry *entry) {
uint32_t entry_startpos;
MOBI_RET ret = mobi_get_indxentry_tagvalue(&entry_startpos, entry, INDX_TAG_ORTH_POSITION);
if (ret != MOBI_SUCCESS) {
return MOBI_NOTSET;
}
return entry_startpos;
} | 0 |
252,443 | static int rleUncompress(int inLength, int maxLength, const signed char in[],
char out[]) {
char *outStart = out;
while (inLength > 0) {
if (*in < 0) {
int count = -(static_cast<int>(*in++));
inLength -= count + 1;
// Fixes #116: Add bounds check to in buffer.
... | 0 |
424,923 | void iwl_pcie_apm_stop_master(struct iwl_trans *trans)
{
int ret;
/* stop device's busmaster DMA activity */
iwl_set_bit(trans, trans->trans_cfg->csr->addr_sw_reset,
BIT(trans->trans_cfg->csr->flag_stop_master));
ret = iwl_poll_bit(trans, trans->trans_cfg->csr->addr_sw_reset,
BIT(trans->trans_cfg->csr... | 0 |
310,265 | format_versions_list(config_line_t *ln)
{
smartlist_t *versions;
char *result;
versions = smartlist_create();
for ( ; ln; ln = ln->next) {
smartlist_split_string(versions, ln->value, ",",
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
}
sort_version_list(versions, 1);
result = sma... | 0 |
234,715 | void __exit btrfs_cleanup_fs_uuids(void)
{
struct btrfs_fs_devices *fs_devices;
while (!list_empty(&fs_uuids)) {
fs_devices = list_entry(fs_uuids.next,
struct btrfs_fs_devices, fs_list);
list_del(&fs_devices->fs_list);
free_fs_devices(fs_devices);
}
} | 0 |
400,101 | PipeSocketHandler::PipeSocketHandler() {} | 0 |
313,560 | void rose_del_loopback_node(const rose_address *address)
{
struct rose_node *rose_node;
spin_lock_bh(&rose_node_list_lock);
rose_node = rose_node_list;
while (rose_node != NULL) {
if ((rose_node->mask == 10) &&
(rosecmpm(address, &rose_node->address, 10) == 0) &&
rose_node->loopback)
break;
ros... | 0 |
312,418 | vgr_jump_to_match(
qf_info_T *qi,
int forceit,
int *redraw_for_dummy,
buf_T *first_match_buf,
char_u *target_dir)
{
buf_T *buf;
buf = curbuf;
qf_jump(qi, 0, 0, forceit);
if (buf != curbuf)
// If we jumped to another buffer redrawing will already be
// taken care of.
*redraw_fo... | 0 |
211,699 | glob (const char *pattern, int flags, int (*errfunc) (const char *, int),
glob_t *pglob)
{
const char *filename;
char *dirname = NULL;
size_t dirlen;
int status;
size_t oldcount;
int meta;
int dirname_modified;
int malloc_dirname = 0;
glob_t dirs;
int retval = 0;
size_t alloca_used = 0;
i... | 1 |
222,570 | Status GetOpGradientCreator(const string& op, Creator* creator) {
auto fac = GetOpGradFactory();
auto iter = fac->find(op);
if (iter == fac->end()) {
return errors::NotFound("No gradient defined for op: ", op);
}
*creator = iter->second;
return Status::OK();
} | 0 |
509,487 | static int table2maria(TABLE *table_arg, data_file_type row_type,
MARIA_KEYDEF **keydef_out,
MARIA_COLUMNDEF **recinfo_out, uint *records_out,
MARIA_CREATE_INFO *create_info)
{
uint i, j, recpos, minpos, fieldpos, temp_length, length;
enum ha_base... | 0 |
366,167 | static struct mountpoint *unhash_mnt(struct mount *mnt)
{
struct mountpoint *mp;
mnt->mnt_parent = mnt;
mnt->mnt_mountpoint = mnt->mnt.mnt_root;
list_del_init(&mnt->mnt_child);
hlist_del_init_rcu(&mnt->mnt_hash);
hlist_del_init(&mnt->mnt_mp_list);
mp = mnt->mnt_mp;
mnt->mnt_mp = NULL;
return mp;
} | 0 |
418,776 | get_fpos_of_mouse(pos_T *mpos)
{
win_T *wp;
int row = mouse_row;
int col = mouse_col;
if (row < 0 || col < 0) // check if it makes sense
return IN_UNKNOWN;
// find the window where the row is in
wp = mouse_find_win(&row, &col, FAIL_POPUP);
if (wp == NULL)
return IN_UNKNOWN;
// win... | 0 |
348,436 | static unsigned short calc_crc_flex(unsigned char *cp, int size)
{
unsigned short crc = 0xffff;
while (size--)
crc = (crc << 8) ^ crc_flex_table[((crc >> 8) ^ *cp++) & 0xff];
return crc;
} | 0 |
450,817 | is_dir (char const *filename, int flags, glob_t const *pglob)
{
struct stat st;
struct_stat64 st64;
return (__glibc_unlikely (flags & GLOB_ALTDIRFUNC)
? pglob->gl_stat (filename, &st) == 0 && S_ISDIR (st.st_mode)
: __stat64 (filename, &st64) == 0 && S_ISDIR (st64.st_mode));
} | 0 |
246,432 | static void free_import_entry(RBinWasmImportEntry *entry) {
if (entry) {
free (entry->module_str);
free (entry->field_str);
free (entry);
}
} | 0 |
448,555 | void bgp_notify_send(struct peer *peer, uint8_t code, uint8_t sub_code)
{
bgp_notify_send_with_data(peer, code, sub_code, NULL, 0);
} | 0 |
254,063 | query_string(std::string params, bool url = true):
url_(std::move(params))
{
if (url_.empty())
return;
key_value_pairs_.resize(MAX_KEY_VALUE_PAIRS_COUNT);
int count = qs_parse(&url_[0], &key_value_pairs_[0], MAX_KEY_VALUE_PAIRS_COUNT, url);... | 0 |
384,904 | vim_isodigit(int c)
{
return (c >= '0' && c <= '7');
} | 0 |
522,330 | int APIF77(gmfstatkwd)( int64_t *MshIdx, int *KwdIdx, int *NmbTyp,
int *SolSiz, int *TypTab, int *deg, int *NmbNod)
{
if(!strcmp(GmfKwdFmt[ *KwdIdx ][2], "hr"))
return(GmfStatKwd(*MshIdx, *KwdIdx, NmbTyp, SolSiz, TypTab, deg, NmbNod));
else if(!strcmp(GmfKwdFmt[ *KwdIdx ][2], "sr"))... | 0 |
264,243 | static void vnc_write_pixels_generic(VncState *vs,
void *pixels1, int size)
{
uint8_t buf[4];
if (VNC_SERVER_FB_BYTES == 4) {
uint32_t *pixels = pixels1;
int n, i;
n = size >> 2;
for (i = 0; i < n; i++) {
vnc_convert_pixel(vs, buf... | 0 |
317,003 | static int smack_sem_semctl(struct kern_ipc_perm *isp, int cmd)
{
int may;
switch (cmd) {
case GETPID:
case GETNCNT:
case GETZCNT:
case GETVAL:
case GETALL:
case IPC_STAT:
case SEM_STAT:
case SEM_STAT_ANY:
may = MAY_READ;
break;
case SETVAL:
case SETALL:
case IPC_RMID:
case IPC_SET:
may = MAY_READW... | 0 |
219,030 | Status ConstantFolding::SimplifyTile(const GraphProperties& properties,
bool use_shape_info,
GraphDef* optimized_graph, NodeDef* node) {
Tensor multiplies;
if (use_shape_info && IsTile(*node) &&
GetTensorFromConstNode(node->input(1), &m... | 0 |
214,124 | lzw_result lzw_decode(struct lzw_ctx *ctx,
const uint8_t ** const stack_pos_out)
{
lzw_result res;
uint32_t code_new;
uint32_t code_out;
uint8_t last_value;
uint8_t *stack_pos = ctx->stack_base;
uint32_t clear_code = ctx->clear_code;
uint32_t current_entry = ctx->current_entry;
struct lzw_dictionary_entry * c... | 1 |
214,282 | R_API RBinJavaAttrInfo *r_bin_java_inner_classes_attr_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz, ut64 buf_offset) {
RBinJavaClassesAttribute *icattr;
RBinJavaAttrInfo *attr = NULL;
RBinJavaCPTypeObj *obj;
ut32 i = 0;
ut64 offset = 0, curpos;
attr = r_bin_java_default_attr_new (bin, buffer, sz, buf_offset);
offs... | 1 |
477,278 | static void *tipc_aead_mem_alloc(struct crypto_aead *tfm,
unsigned int crypto_ctx_size,
u8 **iv, struct aead_request **req,
struct scatterlist **sg, int nsg)
{
unsigned int iv_size, req_size;
unsigned int len;
u8 *mem;
iv_size = crypto_aead_ivsize(tfm);
req_size = sizeof(**req) + crypto_aead_reqsiz... | 0 |
343,292 | static int doinitsupgroups(const char *user, const uid_t uid, const gid_t gid)
{
#ifndef NON_ROOT_FTP
# ifdef HAVE_SETGROUPS
if (setgroups(1U, &gid) != 0) {
return -1;
}
# else
(void) gid;
# endif
# ifdef HAVE_INITGROUPS
if (user == NULL) {
const struct passwd * const lpwd = getpwuid(uid... | 0 |
309,835 | NCURSES_PUBLIC_VAR(_nc_tputs_trace) (void)
{
return CURRENT_SCREEN ? CURRENT_SCREEN->_tputs_trace : _nc_prescreen._tputs_trace;
} | 0 |
275,956 | uECC_VLI_API uECC_word_t uECC_vli_add(uECC_word_t *result,
const uECC_word_t *left,
const uECC_word_t *right,
wordcount_t num_words) {
uECC_word_t carry = 0;
wordcount_t i;
for (i = 0; i < num_w... | 0 |
294,603 | date_s_iso8601(int argc, VALUE *argv, VALUE klass)
{
VALUE str, sg, opt;
rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
str = rb_str_new2("-4712-01-01");
case 1:
sg = INT2FIX(DEFAULT_SG);
}
{
int argc2 = 1;
VALU... | 0 |
219,907 | GF_Err gf_isom_hint_sample_data(GF_ISOFile *the_file, u32 trackNumber, GF_ISOTrackID SourceTrackID, u32 SampleNumber, u16 DataLength, u32 offsetInSample, u8 *extra_data, u8 AtBegin)
{
GF_TrackBox *trak;
GF_HintSampleEntryBox *entry;
u32 count;
u16 refIndex;
GF_HintPacket *pck;
GF_SampleDTE *dte;
GF_Err e;
GF_Tr... | 0 |
416,364 | may_adjust_incsearch_highlighting(
int firstc,
long count,
incsearch_state_T *is_state,
int c)
{
int skiplen, patlen;
pos_T t;
char_u *pat;
int search_flags = SEARCH_NOOF;
int i;
int save;
int search_delim;
// Parsing range may already set the last searc... | 0 |
432,349 | static void i2c_ddc_init(Object *obj)
{
I2CDDCState *s = I2CDDC(obj);
qemu_edid_generate(s->edid_blob, sizeof(s->edid_blob), &s->edid_info);
} | 0 |
218,972 | bool ConstantFolding::IsReductionWithConstantIndices(
const NodeDef& node, bool* indices_is_empty) const {
// Ensure its an appropriate Reduce node.
if (!IsReduction(node) || node.input_size() < 2) {
return false;
}
// Ensure that the axes to reduce by are constant.
NodeDef* reductions_indices = node_... | 0 |
463,057 | static void sungem_update_masks(SunGEMState *s)
{
uint32_t sz;
sz = 1 << (((s->rxdmaregs[RXDMA_CFG >> 2] & RXDMA_CFG_RINGSZ) >> 1) + 5);
s->rx_mask = sz - 1;
sz = 1 << (((s->txdmaregs[TXDMA_CFG >> 2] & TXDMA_CFG_RINGSZ) >> 1) + 5);
s->tx_mask = sz - 1;
} | 0 |
256,398 | int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
unsigned int len, gfp_t gfp_mask)
{
int reading = rq_data_dir(rq) == READ;
unsigned long addr = (unsigned long) kbuf;
struct bio *bio;
int ret;
if (len > (queue_max_hw_sectors(q) << 9))
return -EINVAL;
if (!len || !kbuf)
retur... | 0 |
398,516 | RZ_API void rz_bin_dwarf_line_header_reset_regs(const RzBinDwarfLineHeader *hdr, RzBinDwarfSMRegisters *regs) {
rz_return_if_fail(hdr && regs);
regs->address = 0;
regs->file = 1;
regs->line = 1;
regs->column = 0;
regs->is_stmt = hdr->default_is_stmt;
regs->basic_block = DWARF_FALSE;
regs->end_sequence = DWARF_F... | 0 |
473,930 | fetch_name(OnigCodePoint start_code, UChar** src, UChar* end,
UChar** rname_end, ScanEnv* env, int* rback_num, int ref)
{
int r, is_num, sign;
OnigCodePoint end_code;
OnigCodePoint c = 0;
OnigEncoding enc = env->enc;
UChar *name_end;
UChar *pnum_head;
UChar *p = *src;
PFETCH_READY;
*rback_num = 0... | 0 |
402,603 | handle_get_cmd_version(context *ctx, struct pollfd *pollfd, socklen_t size)
{
struct msghdr msg;
struct iovec iov;
ssize_t n;
int rc = cms_context_alloc(&ctx->cms);
if (rc < 0) {
send_response(ctx, ctx->backup_cms, pollfd, rc);
return;
}
steal_from_cms(ctx->backup_cms, ctx->cms);
char *buffer = malloc(si... | 0 |
424,916 | static void iwl_trans_pcie_write8(struct iwl_trans *trans, u32 ofs, u8 val)
{
writeb(val, IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs);
} | 0 |
310,257 | dirserv_dump_directory_to_string(char **dir_out,
crypto_pk_env_t *private_key)
{
char *cp;
char *identity_pkey; /* Identity key, DER64-encoded. */
char *recommended_versions;
char digest[DIGEST_LEN];
char published[ISO_TIME_LEN+1];
char *buf = NULL;
size_t buf_len;
size_... | 0 |
481,271 | static void mlx5_fpga_conn_arm_cq(struct mlx5_fpga_conn *conn)
{
mlx5_cq_arm(&conn->cq.mcq, MLX5_CQ_DB_REQ_NOT,
conn->fdev->conn_res.uar->map, conn->cq.wq.cc);
} | 0 |
369,220 |
static __cold int io_sq_offload_create(struct io_ring_ctx *ctx,
struct io_uring_params *p)
{
int ret;
/* Retain compatibility with failing for an invalid attach attempt */
if ((ctx->flags & (IORING_SETUP_ATTACH_WQ | IORING_SETUP_SQPOLL)) ==
IORING_SETUP_ATTACH_WQ) {
struct fd f;
f = fdget(p->wq... | 0 |
312,532 | qf_setprop_get_qfidx(
qf_info_T *qi,
dict_T *what,
int action,
int *newlist)
{
dictitem_T *di;
int qf_idx = qi->qf_curlist; // default is the current list
if ((di = dict_find(what, (char_u *)"nr", -1)) != NULL)
{
// Use the specified quickfix/location list
if (di->di_tv.v_type == VAR_NUMBE... | 0 |
386,531 | void DL_Dxf::writeInsert(DL_WriterA& dw,
const DL_InsertData& data,
const DL_Attributes& attrib) {
if (data.name.empty()) {
std::cerr << "DL_Dxf::writeInsert: "
<< "Block name must not be empty\n";
return;
}
dw.entity("INSERT");
... | 0 |
222,496 | string Print(const AttrValue& attr_value,
const bool hash_string_attrs = false) {
if (attr_value.value_case() == AttrValue::kType) {
return DataTypeString(attr_value.type());
} else if ((attr_value.value_case() == AttrValue::kList) &&
(attr_value.list().type_size() > 0)) {
string r... | 0 |
226,303 | void minf_box_del(GF_Box *s)
{
GF_MediaInformationBox *ptr = (GF_MediaInformationBox *)s;
if (ptr == NULL) return;
//if we have a Handler not self-contained, delete it (the self-contained belongs to the movie)
if (ptr->dataHandler) {
gf_isom_datamap_close(ptr);
}
gf_free(ptr);
} | 0 |
234,820 | static struct btrfs_device *add_missing_dev(struct btrfs_fs_devices *fs_devices,
u64 devid, u8 *dev_uuid)
{
struct btrfs_device *device;
unsigned int nofs_flag;
/*
* We call this under the chunk_mutex, so we want to use NOFS for this
* allocation, however we don't want to change btrfs_alloc_device() to... | 0 |
359,317 | DEFUN (bgp_graceful_restart_stalepath_time,
bgp_graceful_restart_stalepath_time_cmd,
"bgp graceful-restart stalepath-time <1-3600>",
"BGP specific commands\n"
"Graceful restart capability parameters\n"
"Set the max time to hold onto restarting peer's stale paths\n"
"Delay value... | 0 |
405,356 | static struct xfrm_policy *xfrm_policy_lookup(struct net *net,
const struct flowi *fl,
u16 family, u8 dir, u32 if_id)
{
#ifdef CONFIG_XFRM_SUB_POLICY
struct xfrm_policy *pol;
pol = xfrm_policy_lookup_bytype(net, XFRM_POLICY_TYPE_SUB, fl, family,
dir, if_id);
if (pol != NULL)
return pol;... | 0 |
175,688 | virtual void EnableWifiNetworkDevice(bool enable) {}
| 0 |
244,074 | GF_Err sbgp_box_write(GF_Box *s, GF_BitStream *bs)
{
u32 i;
GF_Err e;
GF_SampleGroupBox *p = (GF_SampleGroupBox*)s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u32(bs, p->grouping_type);
if (p->version==1)
gf_bs_write_u32(bs, p->grouping_type_parameter);
gf_bs_write_u32(bs, p->entry_coun... | 0 |
369,225 | static bool io_cqring_event_overflow(struct io_ring_ctx *ctx, u64 user_data,
s32 res, u32 cflags)
{
struct io_overflow_cqe *ocqe;
ocqe = kmalloc(sizeof(*ocqe), GFP_ATOMIC | __GFP_ACCOUNT);
if (!ocqe) {
/*
* If we're in ring overflow flush mode, or in task cancel mode,
* or cannot allocate an overfl... | 0 |
473,864 | uniname2ctype_hash (str, len)
register const char *str;
register unsigned int len;
{
#ifndef USE_UNICODE_PROPERTIES
static const unsigned char asso_values[] =
#else /* USE_UNICODE_PROPERTIES */
static const unsigned short asso_values[] =
#endif /* USE_UNICODE_PROPERTIES */
{
#ifndef USE_UNICODE_PROPER... | 0 |
232,288 | void SampleInterleavedLSScan::FindComponentDimensions(void)
{
#if ACCUSOFT_CODE
UBYTE cx;
JPEGLSScan::FindComponentDimensions();
//
// Check that all MCU dimensions are 1.
for(cx = 0;cx < m_ucCount;cx++) {
class Component *comp = ComponentOf(cx);
if (comp->MCUHeightOf() != 1 || comp->MCUWidthOf()... | 0 |
369,157 | */
static int io_poll_check_events(struct io_kiocb *req, bool locked)
{
struct io_ring_ctx *ctx = req->ctx;
int v;
/* req->task == current here, checking PF_EXITING is safe */
if (unlikely(req->task->flags & PF_EXITING))
io_poll_mark_cancelled(req);
do {
v = atomic_read(&req->poll_refs);
/* tw handler sh... | 0 |
272,353 | match_subject(CERTCertificate *cert, void *cbdatap)
{
if (!cert->subjectName)
return 0;
if (!strcmp(cert->subjectName, (char *)cbdatap))
return 1;
return 0;
} | 0 |
231,652 | TEST_F(QuicUnencryptedServerTransportTest, TestUnencryptedStream) {
auto data = IOBuf::copyBuffer("bad data");
PacketNum nextPacket = clientNextInitialPacketNum++;
StreamId streamId = 3;
auto initialCipher = getInitialCipher();
auto headerCipher = getInitialHeaderCipher();
auto packetData = packetToBufClear... | 0 |
455,421 | xfs_reclaim_inodes_count(
struct xfs_mount *mp)
{
struct xfs_perag *pag;
xfs_agnumber_t ag = 0;
int reclaimable = 0;
while ((pag = xfs_perag_get_tag(mp, ag, XFS_ICI_RECLAIM_TAG))) {
ag = pag->pag_agno + 1;
reclaimable += pag->pag_ici_reclaimable;
xfs_perag_put(pag);
}
return reclaimable;
} | 0 |
432,189 | static void phys_page_compact(struct uc_struct *uc, PhysPageEntry *lp, Node *nodes)
{
unsigned valid_ptr = P_L2_SIZE;
int valid = 0;
PhysPageEntry *p;
int i;
if (lp->ptr == PHYS_MAP_NODE_NIL) {
return;
}
p = nodes[lp->ptr];
for (i = 0; i < P_L2_SIZE; i++) {
if (p[i].ptr... | 0 |
487,665 | asmlinkage long sys_getresgid(gid_t __user *rgid, gid_t __user *egid, gid_t __user *sgid)
{
int retval;
if (!(retval = put_user(current->gid, rgid)) &&
!(retval = put_user(current->egid, egid)))
retval = put_user(current->sgid, sgid);
return retval;
} | 0 |
417,055 | mp_sint32 PlayerGeneric::setBufferSize(mp_uint32 bufferSize)
{
mp_sint32 res = 0;
this->bufferSize = bufferSize;
if (mixer)
{
// If we're told to compensate the samples until we
// we reached 2^n buffer sizes
if (compensateBufferFlag)
{
for (mp_uint32 i = 0; i < 16; i++)
{
if ((unsigned)(1 <<... | 0 |
328,970 | R_API char *r_bin_java_get_item_desc_from_bin_cp_list(RBinJavaObj *bin, RBinJavaCPTypeObj *obj) {
/*
Given a constant pool object Class, FieldRef, MethodRef, or InterfaceMethodRef
return the actual descriptor string.
@param cp_list: RList of RBinJavaCPTypeObj *
@param obj object to look up the name for
@rvalue ch... | 0 |
402,588 | print_flag_name(FILE *f, int flag)
{
for (int i = 0; flag_names[i].flag != FLAG_LIST_END; i++) {
if (flag_names[i].flag == flag)
fprintf(f, "%s ", flag_names[i].name);
}
} | 0 |
409,481 | decode_modifiers(int n)
{
int code = n - 1;
int modifiers = 0;
if (code & 1)
modifiers |= MOD_MASK_SHIFT;
if (code & 2)
modifiers |= MOD_MASK_ALT;
if (code & 4)
modifiers |= MOD_MASK_CTRL;
if (code & 8)
modifiers |= MOD_MASK_META;
return modifiers;
} | 0 |
197,615 | Status TensorSliceReader::GetTensor(
const string& name, std::unique_ptr<tensorflow::Tensor>* out_tensor) const {
DataType type;
TensorShape shape;
TensorSlice slice;
{
mutex_lock l(mu_);
const TensorSliceSet* tss = gtl::FindPtrOrNull(tensors_, name);
if (tss == nullptr) {
return errors::N... | 1 |
101,684 | void WebProcessProxy::getPluginPath(const String& mimeType, const String& urlString, String& pluginPath, uint32_t& pluginLoadPolicy)
{
MESSAGE_CHECK_URL(urlString);
String newMimeType = mimeType.lower();
pluginLoadPolicy = PluginModuleLoadNormally;
PluginModuleInfo plugin = m_context->pluginInfoStore(... | 0 |
252,366 | static void hufCanonicalCodeTable(long long hcode[HUF_ENCSIZE]) {
long long n[59];
//
// For each i from 0 through 58, count the
// number of different codes of length i, and
// store the count in n[i].
//
for (int i = 0; i <= 58; ++i) n[i] = 0;
for (int i = 0; i < HUF_ENCSIZE; ++i) n[hcode[i]] += 1;... | 0 |
225,413 | static int vidioc_g_output(struct file *file, void *fh, unsigned int *i)
{
struct v4l2_loopback_device *dev = v4l2loopback_getdevice(file);
if (!dev->announce_all_caps && !dev->ready_for_output)
return -ENOTTY;
if (i)
*i = 0;
return 0;
} | 0 |
224,761 | GF_Err ireftype_box_size(GF_Box *s)
{
GF_ItemReferenceTypeBox *ptr = (GF_ItemReferenceTypeBox *)s;
ptr->size += 4 + (ptr->reference_count * sizeof(u16));
return GF_OK;
} | 0 |
488,381 | static inline int handle_pte_fault(struct mm_struct *mm,
struct vm_area_struct *vma, unsigned long address,
pte_t *pte, pmd_t *pmd, int write_access)
{
pte_t entry;
spinlock_t *ptl;
entry = *pte;
if (!pte_present(entry)) {
if (pte_none(entry)) {
if (vma->vm_ops) {
if (likely(vma->vm_ops->fault))
... | 0 |
415,195 | update_reader_status_file (int set_card_removed_flag)
{
int idx;
unsigned int status, changed;
/* Note, that we only try to get the status, because it does not
make sense to wait here for a operation to complete. If we are
busy working with a card, delays in the status file update should
be accep... | 0 |
487,616 | asmlinkage long sys_getsid(pid_t pid)
{
if (!pid)
return process_session(current);
else {
int retval;
struct task_struct *p;
read_lock(&tasklist_lock);
p = find_task_by_pid(pid);
retval = -ESRCH;
if (p) {
retval = security_task_getsid(p);
if (!retval)
retval = process_session(p);
}
read_... | 0 |
488,328 | static void __init vdso_setup_syscall_map(void)
{
unsigned int i;
extern unsigned long *sys_call_table;
extern unsigned long sys_ni_syscall;
for (i = 0; i < __NR_syscalls; i++) {
#ifdef CONFIG_PPC64
if (sys_call_table[i*2] != sys_ni_syscall)
vdso_data->syscall_map_64[i >> 5] |=
0x80000000UL >> (i & 0x1f)... | 0 |
254,033 | static int v4l2_loopback_close(struct file *file)
{
struct v4l2_loopback_opener *opener;
struct v4l2_loopback_device *dev;
int iswriter=0;
MARK();
opener = file->private_data;
dev = v4l2loopback_getdevice(file);
if(WRITER == opener->type)
iswriter = 1;
atomic_dec(&dev->open_count);
if (dev->open_count... | 0 |
468,340 | g_socket_client_set_enable_proxy (GSocketClient *client,
gboolean enable)
{
enable = !!enable;
if (client->priv->enable_proxy == enable)
return;
client->priv->enable_proxy = enable;
g_object_notify (G_OBJECT (client), "enable-proxy");
} | 0 |
409,494 | add_long_to_buf(long_u val, char_u *dst)
{
int i;
int shift;
for (i = 1; i <= (int)sizeof(long_u); i++)
{
shift = 8 * (sizeof(long_u) - i);
dst[i - 1] = (char_u) ((val >> shift) & 0xff);
}
} | 0 |
338,100 | WasmBinaryBuilder::WasmBinaryBuilder(Module& wasm,
FeatureSet features,
const std::vector<char>& input)
: wasm(wasm), allocator(wasm.allocator), input(input), sourceMap(nullptr),
nextDebugLocation(0, {0, 0, 0}), debugLocation() {
wasm.fea... | 0 |
294,710 | d_lite_fill(VALUE self)
{
get_d1(self);
if (simple_dat_p(dat)) {
get_s_jd(dat);
get_s_civil(dat);
}
else {
get_c_jd(dat);
get_c_civil(dat);
get_c_df(dat);
get_c_time(dat);
}
return self;
} | 0 |
254,072 | inline std::unique_ptr<std::pair<std::string, std::string>> qs_dict_name2kv(const char * dict_name, char * const * qs_kv, int qs_kv_size, int nth = 0)
{
int i;
size_t name_len, skip_to_eq, skip_to_brace_open, skip_to_brace_close;
name_len = strlen(dict_name);
#ifdef _qsSORTING
// TODO: binary search for k... | 0 |
233,848 | static int de_fmtutil_default_iff_chunk_handler(deark *c, struct de_iffctx *ictx)
{
i64 dpos = ictx->chunkctx->dpos;
i64 dlen = ictx->chunkctx->dlen;
u32 chunktype = ictx->chunkctx->chunk4cc.id;
switch(chunktype) {
// Note that chunks appearing here should also be listed below,
// in de_fmtutil_is_standard_iff... | 0 |
473,979 | unpack_entries(register st_table *table)
{
st_index_t i;
struct st_table_entry *packed_bins[MAX_PACKED_NUMHASH*2];
st_table tmp_table = *table;
memcpy(packed_bins, table->bins, sizeof(struct st_table_entry *) * table->num_entries*2);
table->bins = packed_bins;
tmp_table.entries_packed = 0;
... | 0 |
221,485 | extract_unix_path_from_dbus_address (const char *address)
{
const char *path, *path_end;
if (address == NULL)
return NULL;
if (!g_str_has_prefix (address, "unix:"))
return NULL;
path = strstr (address, "path=");
if (path == NULL)
return NULL;
path += strlen ("path=");
path_end = path;
whi... | 0 |
294,658 | c_jd_to_wday(int jd)
{
return MOD(jd + 1, 7);
} | 0 |
404,730 | static struct file *__fget_files(struct files_struct *files, unsigned int fd,
fmode_t mask, unsigned int refs)
{
struct file *file;
rcu_read_lock();
loop:
file = files_lookup_fd_rcu(files, fd);
if (file) {
/* File object ref couldn't be taken.
* dup2() atomicity guarantee is the reason
* we loop to ca... | 0 |
238,384 | njs_function_prototype_thrower(njs_vm_t *vm, njs_value_t *args,
njs_uint_t nargs, njs_index_t unused)
{
njs_type_error(vm, "\"caller\", \"callee\", \"arguments\" "
"properties may not be accessed");
return NJS_ERROR;
} | 0 |
417,129 | void PlayerGeneric::nextPattern()
{
if (player)
player->nextPattern();
} | 0 |
384,535 | void MACH0_(mach_headerfields)(RBinFile *bf) {
PrintfCallback cb_printf = bf->rbin->cb_printf;
if (!cb_printf) {
cb_printf = printf;
}
RBuffer *buf = bf->buf;
ut64 length = r_buf_size (buf);
int n = 0;
struct MACH0_(mach_header) *mh = MACH0_(get_hdr)(buf);
if (!mh) {
return;
}
ut64 pvaddr = pa2va (bf, 0);... | 0 |
252,299 | static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) {
if (static_block)
tdefl_start_static_block(d);
else
tdefl_start_dynamic_block(d);
return tdefl_compress_lz_codes(d);
} | 0 |
336,581 | SPICE_GNUC_VISIBLE void spice_server_set_addr(SpiceServer *reds, const char *addr, int flags)
{
g_strlcpy(reds->config->spice_addr, addr, sizeof(reds->config->spice_addr));
if (flags == SPICE_ADDR_FLAG_IPV4_ONLY) {
reds->config->spice_family = PF_INET;
} else if (flags == SPICE_ADDR_FLAG_IPV6_ONLY)... | 0 |
261,244 | static int SN_Client_HandlePacket(MqttClient* client, SN_MsgType packet_type,
void* packet_obj, int timeout)
{
int rc = MQTT_CODE_SUCCESS;
word16 packet_id = 0;
(void)timeout;
switch ((int)packet_type)
{
case SN_MSG_TYPE_GWINFO:
{
SN_GwInfo info, *p_info = &info;
... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.