idx int64 | func string | target int64 |
|---|---|---|
513,010 | Item *get_copy(THD *thd)
{ return get_item_copy<Item_uint>(thd, this); } | 0 |
247,155 | u32 gf_fs_get_http_rate(GF_FilterSession *fs)
{
if (!fs->download_manager) {
gf_fs_get_download_manager(fs);
if (!fs->download_manager) return 0;
}
return gf_dm_get_global_rate(fs->download_manager);
} | 0 |
209,106 | static int ax25_release(struct socket *sock)
{
struct sock *sk = sock->sk;
ax25_cb *ax25;
ax25_dev *ax25_dev;
if (sk == NULL)
return 0;
sock_hold(sk);
lock_sock(sk);
sock_orphan(sk);
ax25 = sk_to_ax25(sk);
ax25_dev = ax25->ax25_dev;
if (ax25_dev) {
dev_put_track(ax25_dev->dev, &ax25_dev->dev_tracker);
... | 1 |
224,540 | Status GetWindowedOutputSizeFromDims(
shape_inference::InferenceContext* c,
shape_inference::DimensionHandle input_size,
shape_inference::DimensionOrConstant filter_size, int64_t stride,
Padding padding_type, shape_inference::DimensionHandle* output_size) {
if (padding_type == Padding::EXPLICIT) {
... | 0 |
473,958 | onigenc_minimum_property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
{
static const PosixBracketEntryType PBS[] = {
PosixBracketEntryInit("Alnum", ONIGENC_CTYPE_ALNUM),
PosixBracketEntryInit("Alpha", ONIGENC_CTYPE_ALPHA),
PosixBracketEntryInit("Blank", ONIGENC_CTYPE_BLANK),
PosixBracketEn... | 0 |
512,860 | virtual void update_null_value ()
{
return type_handler()->Item_update_null_value(this);
} | 0 |
231,634 | TEST_F(QuicServerTransportTest, RecvNewConnectionIdValid) {
auto& conn = server->getNonConstConn();
conn.transportSettings.selfActiveConnectionIdLimit = 2;
ShortHeader header(ProtectionType::KeyPhaseZero, *conn.clientConnectionId, 1);
RegularQuicPacketBuilder builder(
conn.udpSendPacketLen, std::move(hea... | 0 |
225,811 | GF_Box *stss_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_SyncSampleBox, GF_ISOM_BOX_TYPE_STSS);
return (GF_Box*)tmp;
} | 0 |
398,552 | static size_t std_opcode_args_count(const RzBinDwarfLineHeader *hdr, ut8 opcode) {
if (!opcode || opcode > hdr->opcode_base - 1 || !hdr->std_opcode_lengths) {
return 0;
}
return hdr->std_opcode_lengths[opcode - 1];
} | 0 |
463,204 | EXPORTED int specialuse_validate(const char *mboxname, const char *userid,
const char *src, struct buf *dest)
{
const char *specialuse_extra_opt = config_getstring(IMAPOPT_SPECIALUSE_EXTRA);
char *strval = NULL;
strarray_t *valid = NULL;
strarray_t *new_attribs = NULL;
... | 0 |
482,526 | getNextAttribute(TranslationTableHeader *table) {
/* Get the next attribute value, or 0 if there is no more space in the table. */
TranslationTableCharacterAttributes next = table->nextCharacterClassAttribute;
if (next) {
if (next == CTC_LitDigit)
table->nextCharacterClassAttribute = CTC_UserDefined9;
else
... | 0 |
344,232 | static int lessthanothers (lua_State *L, const TValue *l, const TValue *r) {
lua_assert(!ttisnumber(l) || !ttisnumber(r));
if (ttisstring(l) && ttisstring(r)) /* both are strings? */
return l_strcmp(tsvalue(l), tsvalue(r)) < 0;
else
return luaT_callorderTM(L, l, r, TM_LT);
} | 0 |
247,568 | TEST_P(SslSocketTest, ClientCertificateHashListVerificationNoCA) {
envoy::config::listener::v3::Listener listener;
envoy::config::listener::v3::FilterChain* filter_chain = listener.add_filter_chains();
envoy::extensions::transport_sockets::tls::v3::DownstreamTlsContext tls_context;
envoy::extensions::transport_... | 0 |
404,749 | static void copy_fd_bitmaps(struct fdtable *nfdt, struct fdtable *ofdt,
unsigned int count)
{
unsigned int cpy, set;
cpy = count / BITS_PER_BYTE;
set = (nfdt->max_fds - count) / BITS_PER_BYTE;
memcpy(nfdt->open_fds, ofdt->open_fds, cpy);
memset((char *)nfdt->open_fds + cpy, 0, set);
memcpy(nfdt->close_on_... | 0 |
90,227 | virtual bool wifi_connecting() const {
return wifi_ ? wifi_->connecting() : false;
}
| 0 |
387,592 | static int snd_ctl_dev_disconnect(struct snd_device *device)
{
struct snd_card *card = device->device_data;
struct snd_ctl_file *ctl;
struct snd_ctl_layer_ops *lops;
unsigned long flags;
read_lock_irqsave(&card->ctl_files_rwlock, flags);
list_for_each_entry(ctl, &card->ctl_files, list) {
wake_up(&ctl->change_s... | 0 |
513,248 | static bool check_simple_equality(THD *thd, const Item::Context &ctx,
Item *left_item, Item *right_item,
COND_EQUAL *cond_equal)
{
Item *orig_left_item= left_item;
Item *orig_right_item= right_item;
if (left_item->type() == Item::REF_ITEM &&
... | 0 |
477,306 | static void tipc_crypto_do_cmd(struct net *net, int cmd)
{
struct tipc_net *tn = tipc_net(net);
struct tipc_crypto *tx = tn->crypto_tx, *rx;
struct list_head *p;
unsigned int stat;
int i, j, cpu;
char buf[200];
/* Currently only one command is supported */
switch (cmd) {
case 0xfff1:
goto print_stats;
defa... | 0 |
506,687 | static int check_message(const struct set_name_fn *fn, const char *op,
const char *nameincert, int match, const char *name)
{
char msg[1024];
if (match < 0)
return 1;
BIO_snprintf(msg, sizeof(msg), "%s: %s: [%s] %s [%s]",
fn->name, op, nameincert,
... | 0 |
343,172 | static int __init esp6_init(void)
{
if (xfrm_register_type(&esp6_type, AF_INET6) < 0) {
pr_info("%s: can't add xfrm type\n", __func__);
return -EAGAIN;
}
if (xfrm6_protocol_register(&esp6_protocol, IPPROTO_ESP) < 0) {
pr_info("%s: can't add protocol\n", __func__);
xfrm_unregister_type(&esp6_type, AF_INET6);
... | 0 |
213,075 | void nfcmrvl_nci_unregister_dev(struct nfcmrvl_private *priv)
{
struct nci_dev *ndev = priv->ndev;
if (priv->ndev->nfc_dev->fw_download_in_progress)
nfcmrvl_fw_dnld_abort(priv);
nfcmrvl_fw_dnld_deinit(priv);
if (gpio_is_valid(priv->config.reset_n_io))
gpio_free(priv->config.reset_n_io);
nci_unregister_devi... | 1 |
220,033 | ~SparseTensorAccessingOp() override {
if (sparse_tensors_map_) sparse_tensors_map_->Unref();
} | 0 |
328,842 | R_API RBinJavaStackMapFrame *r_bin_java_default_stack_frame(void) {
RBinJavaStackMapFrame *sf = R_NEW0 (RBinJavaStackMapFrame);
if (!sf) {
return NULL;
}
sf->metas = R_NEW0 (RBinJavaMetaInfo);
if (!sf->metas) {
free (sf);
return NULL;
}
sf->metas->type_info = (void *) &R_BIN_JAVA_STACK_MAP_FRAME_METAS[R_BI... | 0 |
329,924 | _inplace_src_opacity_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;
uint8_t *mask;
int x0;
if (num_spans == 0)
return CAIRO_STATUS_SUCCESS;
x0 = spans[0].x;
mask = (uint... | 0 |
230,287 | njs_array_compare(const void *a, const void *b, void *c)
{
double num;
njs_int_t ret;
njs_value_t arguments[3], retval;
njs_array_sort_ctx_t *ctx;
njs_array_sort_slot_t *aslot, *bslot;
ctx = c;
if (ctx->exception) {
return 0;
}
as... | 0 |
513,075 | String *val_str(String *to)
{
return m_value.to_datetime(current_thd).to_string(to, decimals);
} | 0 |
222,898 | Status UpdateOutputShapesAndValues(const NodeDef& node, NodeContext* c) {
InferenceContext* ic = c->inference_context.get();
// Input to EvaluateNode()
TensorVector inputs;
// Container for temporarily created tensor object.
std::vector<Tensor> input_tensor_vector(ic->num_inputs());
CreateInp... | 0 |
247,147 | static Bool fsess_on_event(void *cbk, GF_Event *evt)
{
return GF_TRUE;
} | 0 |
294,457 | date_s_valid_nth_kday_p(int argc, VALUE *argv, VALUE klass)
{
VALUE vy, vm, vn, vk, vsg;
VALUE argv2[5];
rb_scan_args(argc, argv, "41", &vy, &vm, &vn, &vk, &vsg);
argv2[0] = vy;
argv2[1] = vm;
argv2[2] = vn;
argv2[3] = vk;
if (argc < 5)
argv2[4] = INT2FIX(DEFAULT_SG);
else
argv2[... | 0 |
267,987 | R_API bool r_bin_file_delete(RBin *bin, ut32 bin_id) {
r_return_val_if_fail (bin, false);
RListIter *iter;
RBinFile *bf, *cur = r_bin_cur (bin);
r_list_foreach (bin->binfiles, iter, bf) {
if (bf && bf->id == bin_id) {
if (cur && cur->id == bin_id) {
// avoiding UaF due to dead reference
bin->cur = NU... | 0 |
328,954 | R_API RBinJavaAttrInfo *r_bin_java_signature_attr_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz, ut64 buf_offset) {
if (sz < 8) {
return NULL;
}
RBinJavaAttrInfo *attr = r_bin_java_default_attr_new (bin, buffer, sz, buf_offset);
if (!attr) {
return NULL;
}
ut64 offset = 6;
attr->type = R_BIN_JAVA_ATTR_TYPE_SIGN... | 0 |
448,552 | static int bgp_notify_receive(struct peer *peer, bgp_size_t size)
{
struct bgp_notify outer = {};
struct bgp_notify inner = {};
bool hard_reset = false;
if (peer->notify.data) {
XFREE(MTYPE_BGP_NOTIFICATION, peer->notify.data);
peer->notify.length = 0;
peer->notify.hard_reset = false;
}
outer.code = strea... | 0 |
310,085 | write_tabs(int *tab_list)
{
int stop;
while ((stop = *tab_list++) > 0 && stop <= max_cols) {
fputs((stop == 1) ? "*" : "\t*", stdout);
};
/* also show a tab _past_ the stops */
if (stop < max_cols)
fputs("\t+", stdout);
putchar('\n');
} | 0 |
366,203 | static void shrink_submounts(struct mount *mnt)
{
LIST_HEAD(graveyard);
struct mount *m;
/* extract submounts of 'mountpoint' from the expiration list */
while (select_submounts(mnt, &graveyard)) {
while (!list_empty(&graveyard)) {
m = list_first_entry(&graveyard, struct mount,
mnt_expire);
touch_mnt... | 0 |
318,984 | assert_inrange(typval_T *argvars)
{
garray_T ga;
int error = FALSE;
char_u *tofree;
char msg[200];
char_u numbuf[NUMBUFLEN];
#ifdef FEAT_FLOAT
if (argvars[0].v_type == VAR_FLOAT
|| argvars[1].v_type == VAR_FLOAT
|| argvars[2].v_type == VAR_FLOAT)
{
float_T flower = tv_get_float(... | 0 |
238,473 | static void scalar_min_max_rsh(struct bpf_reg_state *dst_reg,
struct bpf_reg_state *src_reg)
{
u64 umax_val = src_reg->umax_value;
u64 umin_val = src_reg->umin_value;
/* BPF_RSH is an unsigned shift. If the value in dst_reg might
* be negative, then either:
* 1) src_reg might be zero, so the sign bit... | 0 |
176,404 | void AddQuickEnableWorkItems(const InstallerState& installer_state,
const InstallationState& machine_state,
const FilePath* setup_path,
const Version* new_version,
WorkItemList* work_item_list) {
DCHECK... | 0 |
232,946 | static CURLcode brotli_unencode_write(struct Curl_easy *data,
struct contenc_writer *writer,
const char *buf, size_t nbytes)
{
struct brotli_params *bp = (struct brotli_params *) &writer->params;
const uint8_t *src = (const uint8_t *) buf;
... | 0 |
291,823 | static void rtrs_clt_init_hb(struct rtrs_clt_path *clt_path)
{
rtrs_init_hb(&clt_path->s, &io_comp_cqe,
RTRS_HB_INTERVAL_MS,
RTRS_HB_MISSED_MAX,
rtrs_clt_hb_err_handler,
rtrs_wq);
} | 0 |
265,447 | static char *sqfs_basename(char *path)
{
char *fname;
fname = path + strlen(path) - 1;
while (fname >= path) {
if (*fname == '/') {
fname++;
break;
}
fname--;
}
return fname;
} | 0 |
204,243 | eval7(
char_u **arg,
typval_T *rettv,
evalarg_T *evalarg,
int want_string) // after "." operator
{
int evaluate = evalarg != NULL
&& (evalarg->eval_flags & EVAL_EVALUATE);
int len;
char_u *s;
char_u *name_start = NULL;
char_u *start_leader, *end_leader;
int ret = OK... | 1 |
379,656 | R_API char *r_anal_var_get_constraints_readable(RAnalVar *var) {
size_t n = var->constraints.len;
if (!n) {
return NULL;
}
bool low = false, high = false;
RStrBuf sb;
r_strbuf_init (&sb);
size_t i;
for (i = 0; i < n; i += 1) {
RAnalVarConstraint *constr = r_vector_index_ptr (&var->constraints, i);
switch ... | 0 |
259,200 | static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
int64_t stream_size = avio_size(pb);
int64_t offset = av_sat_add64(avio_tell(pb), atom.size), pts, timestamp;
uint8_t version, is_complete;
int64_t offadd;
unsigned i, j, track_id, item_count;
AVStream *st = NULL;
AVStr... | 0 |
313,761 | clearopbeep(oparg_T *oap)
{
clearop(oap);
beep_flush();
} | 0 |
273,405 | void LSTMBlockCellBpropWithEigen(
const LSTMBlockCell& cell, OpKernelContext* ctx, const Device& d,
bool use_peephole, typename TTypes<T>::ConstMatrix x,
typename TTypes<T>::ConstMatrix cs_prev,
typename TTypes<T>::ConstMatrix h_prev, typename TTypes<T>::ConstMatrix w,
typename TTypes<T>::ConstVec w... | 0 |
448,581 | gdk_pixbuf__xbm_image_load (FILE *f,
GError **error)
{
return gdk_pixbuf__xbm_image_load_real (f, NULL, error);
} | 0 |
361,752 | static inline void em28xx_set_model(struct em28xx *dev)
{
dev->board = em28xx_boards[dev->model];
dev->has_msp34xx = dev->board.has_msp34xx;
dev->is_webcam = dev->board.is_webcam;
em28xx_set_xclk_i2c_speed(dev);
/* Should be initialized early, for I2C to work */
dev->def_i2c_bus = dev->board.def_i2c_bus;
} | 0 |
246,726 | void PrintEncodeUsage()
{
u32 i=0;
gf_sys_format_help(helpout, help_flags, "# MPEG-4 Scene Encoding Options\n"
"## General considerations\n"
"MP4Box supports encoding and decoding of of BT, XMT, VRML and (partially) X3D formats int MPEG-4 BIFS, and encoding and decoding of XSR and SVG into MPEG-4 LASeR\n"
"Any ... | 0 |
90,807 | void QuotaManager::SetPersistentHostQuota(const std::string& host,
int64 new_quota,
HostQuotaCallback* callback_ptr) {
scoped_ptr<HostQuotaCallback> callback(callback_ptr);
LazyInitialize();
if (host.empty()) {
callback->Run(k... | 0 |
318,109 | static void rsi_deinit_usb_interface(struct rsi_hw *adapter)
{
struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev;
rsi_kill_thread(&dev->rx_thread);
usb_free_urb(dev->rx_cb[0].rx_urb);
if (adapter->priv->coex_mode > 1)
usb_free_urb(dev->rx_cb[1].rx_urb);
kfree(dev->tx_buffer);
} | 0 |
390,601 | ProcXkbGetNames(ClientPtr client)
{
DeviceIntPtr dev;
XkbDescPtr xkb;
xkbGetNamesReply rep;
REQUEST(xkbGetNamesReq);
REQUEST_SIZE_MATCH(xkbGetNamesReq);
if (!(client->xkbClientFlags&_XkbClientInitialized))
return BadAccess;
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAcces... | 0 |
220,214 | void Graph::ToGraphDef(GraphDef* graph_def) const {
ToGraphDefSubRange(graph_def, 0);
} | 0 |
369,308 | static bool req_need_defer(struct io_kiocb *req, u32 seq)
{
if (unlikely(req->flags & REQ_F_IO_DRAIN)) {
struct io_ring_ctx *ctx = req->ctx;
return seq + READ_ONCE(ctx->cq_extra) != ctx->cached_cq_tail;
}
return false;
} | 0 |
229,274 | void cql_server::response::write(const cql3::prepared_metadata& m, uint8_t version)
{
bool global_tables_spec = m.flags().contains<cql3::prepared_metadata::flag::GLOBAL_TABLES_SPEC>();
write_int(m.flags().mask());
write_int(m.names().size());
if (version >= 4) {
if (!global_tables_spec) {
... | 0 |
508,837 | void LEX::cleanup_after_one_table_open()
{
/*
thd->lex->derived_tables & additional units may be set if we open
a view. It is necessary to clear thd->lex->derived_tables flag
to prevent processing of derived tables during next open_and_lock_tables
if next table is a real table and cleanup & remove und... | 0 |
225,788 | GF_Box *stco_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_ChunkOffsetBox, GF_ISOM_BOX_TYPE_STCO);
return (GF_Box *)tmp;
} | 0 |
274,886 | TEST(ComparisonsTest, QuantizedUInt8NotEqualWithBroadcast) {
const float kMin = -1.f;
const float kMax = 128.f;
std::vector<std::vector<int>> test_shapes = {
{6}, {2, 3}, {2, 1, 3}, {1, 3, 1, 2}};
for (int i = 0; i < test_shapes.size(); ++i) {
ComparisonOpModel model({TensorType_UINT8, test_shapes[i],... | 0 |
379,706 | R_API const char *r_anal_function_get_var_reg_at(RAnalFunction *fcn, st64 delta, ut64 addr) {
st64 offset = addr - fcn->addr;
RPVector *inst_accesses = ht_up_find (fcn->inst_vars, offset, NULL);
if (!inst_accesses) {
return NULL;
}
RAnalVar *var = NULL;
void **it;
r_pvector_foreach (inst_accesses, it) {
RAna... | 0 |
259,164 | int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
{
AVStream *st;
MOVStreamContext *sc;
int pseudo_stream_id;
av_assert0 (c->fc->nb_streams >= 1);
st = c->fc->streams[c->fc->nb_streams-1];
sc = st->priv_data;
for (pseudo_stream_id = 0;
pseudo_stream_id < en... | 0 |
198,449 | PJ_DEF(pj_status_t) pjstun_parse_msg( void *buf, pj_size_t buf_len,
pjstun_msg *msg)
{
pj_uint16_t msg_type, msg_len;
char *p_attr;
PJ_CHECK_STACK();
msg->hdr = (pjstun_msg_hdr*)buf;
msg_type = pj_ntohs(msg->hdr->type);
switch (msg_type) {
case PJSTUN_BINDING_REQUEST:
case ... | 1 |
294,535 | c_julian_leap_p(int y)
{
return MOD(y, 4) == 0;
} | 0 |
512,255 | double val_real()
{
return m_value.to_datetime(current_thd).to_double();
} | 0 |
432,247 | void qemu_ram_free(struct uc_struct *uc, RAMBlock *block)
{
if (!block) {
return;
}
//if (block->host) {
// ram_block_notify_remove(block->host, block->max_length);
//}
QLIST_REMOVE_RCU(block, next);
uc->ram_list.mru_block = NULL;
/* Write list before version */
//smp_wm... | 0 |
220,433 | mrb_ary_join_m(mrb_state *mrb, mrb_value ary)
{
mrb_value sep = mrb_nil_value();
mrb_get_args(mrb, "|S!", &sep);
return mrb_ary_join(mrb, ary, sep);
} | 0 |
220,440 | mrb_ary_new_from_values(mrb_state *mrb, mrb_int size, const mrb_value *vals)
{
struct RArray *a = ary_new_from_values(mrb, size, vals);
return mrb_obj_value(a);
} | 0 |
424,893 | static void iwl_trans_pcie_set_pmi(struct iwl_trans *trans, bool state)
{
if (state)
set_bit(STATUS_TPOWER_PMI, &trans->status);
else
clear_bit(STATUS_TPOWER_PMI, &trans->status);
} | 0 |
224,469 | static char *ttxt_parse_string(char *str, Bool strip_lines)
{
u32 i=0;
u32 k=0;
u32 len = (u32) strlen(str);
u32 state = 0;
if (!strip_lines) {
for (i=0; i<len; i++) {
if ((str[i] == '\r') && (str[i+1] == '\n')) {
i++;
}
str[k] = str[i];
k++;
}
str[k]=0;
return str;
}
if (str[0]!='\'') ... | 0 |
219,024 | Status ConstantFolding::MaterializeConstantValuedNode(
NodeDef* node, const GraphProperties& properties) {
if (disable_compressed_tensor_optimization_) {
return Status::OK();
}
// Nodes that generate constant-valued outputs can be represented compactly in
// compressed format, regardless of their shape.... | 0 |
205,747 | static void sixpack_close(struct tty_struct *tty)
{
struct sixpack *sp;
write_lock_irq(&disc_data_lock);
sp = tty->disc_data;
tty->disc_data = NULL;
write_unlock_irq(&disc_data_lock);
if (!sp)
return;
/*
* We have now ensured that nobody can start using ap from now on, but
* we have to wait for all exist... | 1 |
211,695 | reg_match_visual(void)
{
pos_T top, bot;
linenr_T lnum;
colnr_T col;
win_T *wp = rex.reg_win == NULL ? curwin : rex.reg_win;
int mode;
colnr_T start, end;
colnr_T start2, end2;
colnr_T cols;
colnr_T curswant;
// Check if the buffer is the current buffer.
if (rex.reg_buf ... | 1 |
331,779 | QRectF QVectorPath::controlPointRect() const
{
if (m_hints & ControlPointRect)
return QRectF(QPointF(m_cp_rect.x1, m_cp_rect.y1), QPointF(m_cp_rect.x2, m_cp_rect.y2));
if (m_count == 0) {
m_cp_rect.x1 = m_cp_rect.x2 = m_cp_rect.y1 = m_cp_rect.y2 = 0;
m_hints |= ControlPointRect;
... | 0 |
365,615 | _asn1_find_up (asn1_node node)
{
asn1_node p;
if (node == NULL)
return NULL;
p = node;
while ((p->left != NULL) && (p->left->right == p))
p = p->left;
return p->left;
} | 0 |
312,413 | qf_init_ext(
qf_info_T *qi,
int qf_idx,
char_u *efile,
buf_T *buf,
typval_T *tv,
char_u *errorformat,
int newlist, // TRUE: start a new error list
linenr_T lnumfirst, // first line number to use
linenr_T lnumlast, // last line number to use
... | 0 |
409,423 | settmode(tmode_T tmode)
{
#ifdef FEAT_GUI
// don't set the term where gvim was started to any mode
if (gui.in_use)
return;
#endif
if (full_screen)
{
/*
* When returning after calling a shell cur_tmode is TMODE_UNKNOWN,
* set the terminal to raw mode, even though we think it already is,
* becaus... | 0 |
246,492 | RList *r_bin_wasm_get_sections(RBinWasmObj *bin) {
RList *ret = NULL;
RBinWasmSection *ptr = NULL;
if (!bin) {
return NULL;
}
if (bin->g_sections) {
return bin->g_sections;
}
if (!(ret = r_list_newf ((RListFree)wasm_sec_free))) {
return NULL;
}
RBuffer *b = bin->buf;
ut64 bound = r_buf_size (b) - 1;
r... | 0 |
229,143 | static bool use_multiport(VirtIOSerial *vser)
{
VirtIODevice *vdev = VIRTIO_DEVICE(vser);
return virtio_has_feature(vdev, VIRTIO_CONSOLE_F_MULTIPORT);
} | 0 |
487,651 | asmlinkage long sys_getpgrp(void)
{
/* SMP - assuming writes are word atomic this is fine */
return process_group(current);
} | 0 |
404,743 | static struct file *pick_file(struct files_struct *files, unsigned fd)
{
struct file *file;
struct fdtable *fdt;
spin_lock(&files->file_lock);
fdt = files_fdtable(files);
if (fd >= fdt->max_fds) {
file = ERR_PTR(-EINVAL);
goto out_unlock;
}
file = fdt->fd[fd];
if (!file) {
file = ERR_PTR(-EBADF);
goto ... | 0 |
310,319 | should_generate_v2_networkstatus(void)
{
return authdir_mode_v2(get_options()) &&
the_v2_networkstatus_is_dirty &&
the_v2_networkstatus_is_dirty + DIR_REGEN_SLACK_TIME < time(NULL);
} | 0 |
276,912 | static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
int ret = 0;
int bus_no;
if (argc == 1) {
/* querying current setting */
#if CONFIG_IS_ENABLED(DM_I2C)
struct udevice *bus;
if (!i2c_get_cur_bus(&bus))
bus_no = dev_seq(bus);
else
bus_no = -1;
#else
bus... | 0 |
246,485 | static inline RBinWasmTypeVec *parse_type_vector(RBuffer *b, ut64 bound) {
RBinWasmTypeVec *vec = R_NEW0 (RBinWasmTypeVec);
// types are all ut8, so leb128 shouldn't be needed, we can reuse consume_str_new
if (vec && !consume_str_new (b, bound, &vec->count, (char **)&vec->types)) {
free_type_vec (vec);
return NU... | 0 |
359,375 | DEFUN (bgp_bestpath_aspath_ignore,
bgp_bestpath_aspath_ignore_cmd,
"bgp bestpath as-path ignore",
"BGP specific commands\n"
"Change the default bestpath selection\n"
"AS-path attribute\n"
"Ignore as-path length in selecting a route\n")
{
struct bgp *bgp;
bgp = vty->index;
... | 0 |
254,748 | njs_typed_array_compare_u8(const void *a, const void *b, void *c)
{
return *((const uint8_t *) a) - *((const uint8_t *) b);
} | 0 |
230,275 | njs_array_handler_filter(njs_vm_t *vm, njs_iterator_args_t *args,
njs_value_t *entry, int64_t n)
{
njs_int_t ret;
njs_value_t copy;
if (njs_is_valid(entry)) {
copy = *entry;
ret = njs_array_iterator_call(vm, args, ©, n);
if (njs_slow_path(ret != NJS_OK)) {
r... | 0 |
206,771 | bool DL_Dxf::handleLWPolylineData(DL_CreationInterface* /*creationInterface*/) {
// Allocate LWPolyline vertices (group code 90):
if (groupCode==90) {
maxVertices = toInt(groupValue);
if (maxVertices>0) {
if (vertices!=NULL) {
delete[] vertices;
}
... | 1 |
512,348 | void Regexp_processor_pcre::set_recursion_limit(THD *thd)
{
long stack_used;
DBUG_ASSERT(thd == current_thd);
stack_used= available_stack_size(thd->thread_stack, &stack_used);
m_pcre_extra.match_limit_recursion=
(ulong)((my_thread_stack_size - STACK_MIN_SIZE - stack_used)/my_pcre_frame_size);
} | 0 |
309,852 | _nc_retrace_char(int code)
{
T((T_RETURN("%c"), code));
return (char) code;
} | 0 |
317,255 | static int selinux_sb_eat_lsm_opts(char *options, void **mnt_opts)
{
char *from = options;
char *to = options;
bool first = true;
int rc;
while (1) {
int len = opt_len(from);
int token;
char *arg = NULL;
token = match_opt_prefix(from, len, &arg);
if (token != Opt_error) {
char *p, *q;
/* strip ... | 0 |
484,736 | uint16_t mobi_buffer_get16(MOBIBuffer *buf) {
if (buf->offset + 2 > buf->maxlen) {
debug_print("%s", "End of buffer\n");
buf->error = MOBI_BUFFER_END;
return 0;
}
uint16_t val;
val = (uint16_t)((uint16_t) buf->data[buf->offset] << 8 | (uint16_t) buf->data[buf->offset + 1]);
b... | 0 |
513,322 | bool Virtual_tmp_table::add(List<Column_definition> &field_list)
{
/* Create all fields and calculate the total length of record */
Column_definition *cdef; /* column definition */
List_iterator_fast<Column_definition> it(field_list);
for ( ; (cdef= it++); )
{
Field *tmp;
if (!(tmp= cdef->m... | 0 |
220,420 | mrb_assoc_new(mrb_state *mrb, mrb_value car, mrb_value cdr)
{
struct RArray *a;
a = ary_new_capa(mrb, 2);
ARY_PTR(a)[0] = car;
ARY_PTR(a)[1] = cdr;
ARY_SET_LEN(a, 2);
return mrb_obj_value(a);
} | 0 |
405,703 | static int xemaclite_set_mac_address(struct net_device *dev, void *address)
{
struct net_local *lp = netdev_priv(dev);
struct sockaddr *addr = address;
if (netif_running(dev))
return -EBUSY;
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
xemaclite_update_address(lp, dev->dev_addr);
return 0;
} | 0 |
90,194 | WifiNetwork::WifiNetwork(const WifiNetwork& network)
: WirelessNetwork(network) {
encryption_ = network.encryption();
passphrase_ = network.passphrase();
identity_ = network.identity();
cert_path_ = network.cert_path();
}
| 0 |
482,650 | static inline const char *xt_outname(const struct xt_action_param *par)
{
return par->state->out->name;
} | 0 |
269,312 | static inline void put_symbol(RangeCoder *c, uint8_t *state, int v, int is_signed){
int i;
if(v){
const int a= FFABS(v);
const int e= av_log2(a);
const int el= FFMIN(e, 10);
put_rac(c, state+0, 0);
for(i=0; i<el; i++){
put_rac(c, state+1+i, 1); //1..10
... | 0 |
491,957 | static void fuse_write_update_size(struct inode *inode, loff_t pos)
{
struct fuse_conn *fc = get_fuse_conn(inode);
struct fuse_inode *fi = get_fuse_inode(inode);
spin_lock(&fc->lock);
fi->attr_version = ++fc->attr_version;
if (pos > inode->i_size)
i_size_write(inode, pos);
spin_unlock(&fc->lock);
} | 0 |
432,229 | void cpu_exec_initfn(CPUState *cpu)
{
cpu->num_ases = 1;
cpu->as = &(cpu->uc->address_space_memory);
cpu->memory = cpu->uc->system_memory;
} | 0 |
253,583 | static long smb3_zero_range(struct file *file, struct cifs_tcon *tcon,
loff_t offset, loff_t len, bool keep_size)
{
struct cifs_ses *ses = tcon->ses;
struct inode *inode;
struct cifsInodeInfo *cifsi;
struct cifsFileInfo *cfile = file->private_data;
struct file_zero_data_information fsctl_buf;
long rc;
uns... | 0 |
226,034 |
GF_Err fiin_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
FDItemInformationBox *ptr = (FDItemInformationBox *) s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u16(bs, gf_list_count(ptr->partition_entries) );
return GF_OK; | 0 |
300,799 | void tipc_sk_reinit(struct net *net)
{
struct tipc_net *tn = net_generic(net, tipc_net_id);
struct rhashtable_iter iter;
struct tipc_sock *tsk;
struct tipc_msg *msg;
rhashtable_walk_enter(&tn->sk_rht, &iter);
do {
rhashtable_walk_start(&iter);
while ((tsk = rhashtable_walk_next(&iter)) && !IS_ERR(tsk)) {
... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.