idx int64 | func string | target int64 |
|---|---|---|
424,965 | static ssize_t iwl_dbgfs_interrupt_read(struct file *file,
char __user *user_buf,
size_t count, loff_t *ppos)
{
struct iwl_trans *trans = file->private_data;
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
struct isr_statistics *isr_stats = &trans_pcie->isr_stats;
int pos = 0;
char ... | 0 |
473,970 | big5_mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
{
return onigenc_mbn_mbc_to_code(enc, p, end);
} | 0 |
486,824 | static void gem_phy_write(CadenceGEMState *s, unsigned reg_num, uint16_t val)
{
DB_PRINT("reg: %d value: 0x%04x\n", reg_num, val);
switch (reg_num) {
case PHY_REG_CONTROL:
if (val & PHY_REG_CONTROL_RST) {
/* Phy reset */
gem_phy_reset(s);
val &= ~(PHY_REG_CONTROL... | 0 |
398,547 | static int expand_cu(RzBinDwarfCompUnit *cu) {
RzBinDwarfDie *tmp;
if (!cu || cu->capacity == 0 || cu->capacity != cu->count) {
return -EINVAL;
}
tmp = (RzBinDwarfDie *)realloc(cu->dies,
cu->capacity * 2 * sizeof(RzBinDwarfDie));
if (!tmp) {
return -ENOMEM;
}
memset((ut8 *)tmp + cu->capacity * sizeof(Rz... | 0 |
503,849 | SCM_DEFINE (scm_symlink, "symlink", 2, 0, 0,
(SCM oldpath, SCM newpath),
"Create a symbolic link named @var{newpath} with the value\n"
"(i.e., pointing to) @var{oldpath}. The return value is\n"
"unspecified.")
#define FUNC_NAME s_scm_symlink
{
int val;
STRING2_SYSCALL (oldpath, c_oldpat... | 0 |
413,706 | static int fcnlist_gather_metadata(RAnal *anal, RList *fcns) {
RListIter *iter;
RAnalFunction *fcn;
RList *xrefs;
r_list_foreach (fcns, iter, fcn) {
// Count the number of references and number of calls
RListIter *callrefiter;
RAnalRef *ref;
RList *refs = r_anal_function_get_refs (fcn);
int numcallrefs =... | 0 |
326,640 | clear_nochange_fflags(struct archive_write_disk *a)
{
mode_t mode = archive_entry_mode(a->entry);
const int nochange_flags = 0
#ifdef SF_IMMUTABLE
| SF_IMMUTABLE
#endif
#ifdef UF_IMMUTABLE
| UF_IMMUTABLE
#endif
#ifdef SF_APPEND
| SF_APPEND
#endif
#ifdef UF_APPEND
| UF_APPEND
#endif
#ifdef EXT2_AP... | 0 |
220,243 | Node::NodeClass Node::GetNodeClassForOp(const std::string& ts) {
static const absl::flat_hash_map<std::string, Node::NodeClass>*
kNodeClassTable =
#define REF_CLASS(key, value) \
{key, value}, { "Ref" key, value }
new absl::flat_hash_map<std::string, Node::NodeClass>({
// Keep in same ... | 0 |
220,814 | Integer CeilQuotient(Integer a, Integer b) {
return (a + b - 1) / b;
} | 0 |
274,864 | void ConfigureBuiltinOp(BuiltinOperator op) {
switch (op) {
case BuiltinOperator_EQUAL: {
SetBuiltinOp(op, BuiltinOptions_EqualOptions,
CreateEqualOptions(builder_).Union());
break;
}
case BuiltinOperator_NOT_EQUAL: {
SetBuiltinOp(op, BuiltinOptions_N... | 0 |
220,936 | GF_Err mpgviddmx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
{
Bool was_mpeg12;
const GF_PropertyValue *p;
GF_MPGVidDmxCtx *ctx = gf_filter_get_udta(filter);
if (is_remove) {
ctx->ipid = NULL;
if (ctx->opid) {
gf_filter_pid_remove(ctx->opid);
ctx->opid = NULL;
}
return GF_OK;
... | 0 |
382,784 | gdIOCtx * gdNewDynamicCtxEx (int initialSize, void *data, int freeOKFlag)
{
dpIOCtx *ctx;
dynamicPtr *dp;
ctx = (dpIOCtx *) gdMalloc (sizeof (dpIOCtx));
dp = newDynamic(initialSize, data, freeOKFlag);
ctx->dp = dp;
ctx->ctx.getC = dynamicGetchar;
ctx->ctx.putC = dynamicPutchar;
ctx->ctx.getBuf = dynamicGet... | 0 |
353,170 | void SplashOutputDev::doUpdateFont(GfxState *state) {
GfxFont *gfxFont;
GfxFontLoc *fontLoc;
GfxFontType fontType;
SplashOutFontFileID *id = nullptr;
SplashFontFile *fontFile;
SplashFontSrc *fontsrc = nullptr;
FoFiTrueType *ff;
GooString *fileName;
char *tmpBuf;
int tmpBufLen;
int *codeToGID;
co... | 0 |
234,209 | add_abbrev (unsigned long number,
unsigned long tag,
int children,
abbrev_list * list)
{
abbrev_entry * entry;
entry = (abbrev_entry *) xmalloc (sizeof (*entry));
entry->number = number;
entry->tag = tag;
entry->children = children;
entry->first_attr = NULL;
en... | 0 |
413,615 | R_API RCoreAnalStats* r_core_anal_get_stats(RCore *core, ut64 from, ut64 to, ut64 step) {
RAnalFunction *F;
RAnalBlock *B;
RBinSymbol *S;
RListIter *iter, *iter2;
RCoreAnalStats *as = NULL;
int piece, as_size, blocks;
ut64 at;
if (from == to || from == UT64_MAX || to == UT64_MAX) {
eprintf ("Cannot alloc fo... | 0 |
273,070 | ringbuffer_write(struct ringbuffer *buf, const void* src, size_t srclen)
{
int remaining;
if (buf->write_avail == 0 || srclen == 0)
return 0;
if (srclen > buf->write_avail)
srclen = buf->write_avail;
remaining = buf->size - buf->write_pos;
if (srclen > remaining)
{
memcpy(buf->buffer + buf... | 0 |
313,791 | nv_put(cmdarg_T *cap)
{
nv_put_opt(cap, FALSE);
} | 0 |
401,525 | void update_process_times(int user_tick)
{
struct task_struct *p = current;
/* Note: this timer irq context must be accounted for as well. */
account_process_tick(p, user_tick);
run_local_timers();
rcu_sched_clock_irq(user_tick);
#ifdef CONFIG_IRQ_WORK
if (in_irq())
irq_work_tick();
#endif
scheduler_tick();
... | 0 |
253,601 | smb2_get_credits(struct mid_q_entry *mid)
{
return mid->credits_received;
} | 0 |
328,918 | R_API RBinJavaAttrInfo *r_bin_java_annotation_default_attr_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz, ut64 buf_offset) {
ut64 offset = 0;
if (sz < 8) {
return NULL;
}
RBinJavaAttrInfo *attr = r_bin_java_default_attr_new (bin, buffer, sz, buf_offset);
offset += 6;
if (attr && sz >= offset) {
attr->type = R_BI... | 0 |
269,303 | static inline void init_ref(MotionEstContext *c, uint8_t *src[3], uint8_t *ref[3], uint8_t *ref2[3], int x, int y, int ref_index){
SnowContext *s = c->avctx->priv_data;
const int offset[3]= {
y*c-> stride + x,
((y*c->uvstride + x)>>s->chroma_h_shift),
((y*c->uvstride + x)>>s->chroma_h... | 0 |
468,377 | g_socket_client_connect_to_host_async (GSocketClient *client,
const gchar *host_and_port,
guint16 default_port,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
GSocketConnectable ... | 0 |
229,235 | void cql_server::response::serialize(const event::schema_change& event, uint8_t version)
{
if (version >= 3) {
write_string(to_string(event.change));
write_string(to_string(event.target));
write_string(event.keyspace);
switch (event.target) {
case event::schema_change::target... | 0 |
310,161 | EmitRange(NCURSES_SP_DCLx const NCURSES_CH_T *ntext, int num)
{
int i;
TR(TRACE_CHARPUT, ("EmitRange %d:%s", num, _nc_viscbuf(ntext, num)));
if (erase_chars || repeat_char) {
while (num > 0) {
int runcount;
NCURSES_CH_T ntext0;
while (num > 1 && !CharEq(ntext[0], ntext[1])) {
PutChar(NC... | 0 |
139,226 | gfx::Rect OverlayWindowViews::GetVideoBounds() {
return video_bounds_;
}
| 0 |
338,128 | bool WasmBinaryBuilder::maybeVisitSIMDBinary(Expression*& out, uint32_t code) {
Binary* curr;
switch (code) {
case BinaryConsts::I8x16Eq:
curr = allocator.alloc<Binary>();
curr->op = EqVecI8x16;
break;
case BinaryConsts::I8x16Ne:
curr = allocator.alloc<Binary>();
curr->op = NeV... | 0 |
300,812 | static void tsk_advance_rx_queue(struct sock *sk)
{
trace_tipc_sk_advance_rx(sk, NULL, TIPC_DUMP_SK_RCVQ, " ");
kfree_skb(__skb_dequeue(&sk->sk_receive_queue));
} | 0 |
387,879 | bool InstanceKlass::is_override(const methodHandle& super_method, Handle targetclassloader, Symbol* targetclassname, TRAPS) {
// Private methods can not be overridden
if (super_method->is_private()) {
return false;
}
// If super method is accessible, then override
if ((super_method->is_protected()) ... | 0 |
401,489 | void timers_update_nohz(void)
{
schedule_work(&timer_update_work);
} | 0 |
424,896 | static int _iwl_trans_pcie_start_hw(struct iwl_trans *trans)
{
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
int err;
lockdep_assert_held(&trans_pcie->mutex);
err = iwl_pcie_prepare_card_hw(trans);
if (err) {
IWL_ERR(trans, "Error while preparing HW: %d\n", err);
return err;
}
err =... | 0 |
353,126 | void SplashGouraudPattern::getParameterizedColor(double colorinterp, SplashColorMode mode, SplashColorPtr dest) {
GfxColor src;
GfxColorSpace* srcColorSpace = shading->getColorSpace();
int colorComps = 3;
#ifdef SPLASH_CMYK
if (mode == splashModeCMYK8)
colorComps=4;
else if (mode == splashModeDeviceN8)
... | 0 |
377,475 | static RCoreSymCacheElementHdr *r_coresym_cache_element_header_new(RBuffer *buf, size_t off, int bits) {
RCoreSymCacheElementHdr *hdr = R_NEW0 (RCoreSymCacheElementHdr);
if (hdr && r_buf_fread_at (buf, off, (ut8 *)hdr, "13i16c5i", 1) == sizeof (RCoreSymCacheElementHdr)) {
return hdr;
}
free (hdr);
return NULL;
} | 0 |
434,079 | check_arg_idx(win_T *win)
{
if (WARGCOUNT(win) > 1 && !editing_arg_idx(win))
{
// We are not editing the current entry in the argument list.
// Set "arg_had_last" if we are editing the last one.
win->w_arg_idx_invalid = TRUE;
if (win->w_arg_idx != WARGCOUNT(win) - 1
&& arg_had_last == FALSE
&& ALIST(win... | 0 |
482,649 | static inline u_int8_t xt_family(const struct xt_action_param *par)
{
return par->state->pf;
} | 0 |
252,308 | static void hufPackEncTable(
const long long *hcode, // i : encoding table [HUF_ENCSIZE]
int im, // i : min hcode index
int iM, // i : max hcode index
char **pcode) // o: ptr to packed table (updated)
{
char *p = *pcode;
long long c = 0;
int lc = 0;
... | 0 |
226,380 |
GF_Err chnl_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_ChannelLayoutBox *ptr = (GF_ChannelLayoutBox *) s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u8(bs, ptr->layout.stream_structure);
if (ptr->layout.stream_structure & 1) {
gf_bs_write_u8(bs, ptr->layout.definedLayout);
i... | 0 |
474,089 | st_cleanup_safe(st_table *table, st_data_t never)
{
st_table_entry *ptr, **last, *tmp;
st_index_t i;
if (table->entries_packed) {
st_index_t i = 0, j = 0;
while ((st_data_t)table->bins[i*2] != never) {
if (i++ == table->num_entries) return;
}
for (j = i; ++i < table->num_entries;) {
if ((st_d... | 0 |
249,988 | GF_Err WriteToFile(GF_ISOFile *movie, Bool for_fragments)
{
MovieWriter mw;
GF_Err e = GF_OK;
if (!movie) return GF_BAD_PARAM;
if (movie->openMode == GF_ISOM_OPEN_READ) return GF_BAD_PARAM;
e = gf_isom_insert_copyright(movie);
if (e) return e;
memset(&mw, 0, sizeof(mw));
mw.movie = movie;
if (movie->moov)... | 0 |
224,161 | void Compute(OpKernelContext* ctx) override {
StagingMap<Ordered>* map = nullptr;
OP_REQUIRES_OK(ctx, GetStagingMap(ctx, def(), &map));
core::ScopedUnref scope(map);
OP_REQUIRES_OK(ctx, map->clear());
} | 0 |
459,141 | static int tc_chain_fill_node(const struct tcf_proto_ops *tmplt_ops,
void *tmplt_priv, u32 chain_index,
struct net *net, struct sk_buff *skb,
struct tcf_block *block,
u32 portid, u32 seq, u16 flags, int event)
{
unsigned char *b = skb_tail_pointer(skb);
const struct tcf_proto_ops *... | 0 |
353,178 | static int getLum(int r, int g, int b) {
return (int)(0.3 * r + 0.59 * g + 0.11 * b);
} | 0 |
514,289 | bool Multiupdate_prelocking_strategy::handle_end(THD *thd)
{
DBUG_ENTER("Multiupdate_prelocking_strategy::handle_end");
if (done)
DBUG_RETURN(0);
LEX *lex= thd->lex;
SELECT_LEX *select_lex= &lex->select_lex;
TABLE_LIST *table_list= lex->query_tables, *tl;
done= true;
if (mysql_handle_derived(lex, D... | 0 |
413,596 | static void fcn_list_bbs(RAnalFunction *fcn) {
RAnalBlock *bbi;
RListIter *iter;
r_list_foreach (fcn->bbs, iter, bbi) {
r_cons_printf ("afb+ 0x%08" PFMT64x " 0x%08" PFMT64x " %" PFMT64u " ",
fcn->addr, bbi->addr, bbi->size);
r_cons_printf ("0x%08"PFMT64x" ", bbi->jump);
r_cons_printf ("0x%08"PFMT64x, b... | 0 |
318,949 | f_test_null_function(typval_T *argvars UNUSED, typval_T *rettv)
{
rettv->v_type = VAR_FUNC;
rettv->vval.v_string = NULL;
} | 0 |
492,683 | vte_sequence_handler_al (VteTerminal *terminal, GValueArray *params)
{
VteScreen *screen;
long start, end, param, i;
GValue *value;
/* Find out which part of the screen we're messing with. */
screen = terminal->pvt->screen;
start = screen->cursor_current.row;
if (screen->scrolling_restricted) {
end = screen->... | 0 |
248,245 | DLLIMPORT int cfg_setnbool(cfg_t *cfg, const char *name, cfg_bool_t value, unsigned int index)
{
return cfg_opt_setnbool(cfg_getopt(cfg, name), value, index);
} | 0 |
413,336 | PHP_METHOD(snmp, setSecurity)
{
php_snmp_object *snmp_object;
zval *object = getThis();
char *a1 = "", *a2 = "", *a3 = "", *a4 = "", *a5 = "", *a6 = "", *a7 = "";
int a1_len = 0, a2_len = 0, a3_len = 0, a4_len = 0, a5_len = 0, a6_len = 0, a7_len = 0;
int argc = ZEND_NUM_ARGS();
snmp_object = (php_snmp_object *)z... | 0 |
293,536 | PJ_DEF(int) pj_scan_stricmp( pj_scanner *scanner, const char *s, int len)
{
if (scanner->curptr + len > scanner->end) {
pj_scan_syntax_err(scanner);
return -1;
}
return pj_ansi_strnicmp(scanner->curptr, s, len);
} | 0 |
345,212 | static void set_inverse_transl(struct vc_data *conp, struct uni_pagedir *p, int i)
{
int j, glyph;
unsigned short *t = translations[i];
unsigned char *q;
if (!p) return;
q = p->inverse_translations[i];
if (!q) {
q = p->inverse_translations[i] = kmalloc(MAX_GLYPH, GFP_KERNEL);
if (!q) return;
}
memset(q, ... | 0 |
369,111 | static void kiocb_done(struct io_kiocb *req, ssize_t ret,
unsigned int issue_flags)
{
struct io_async_rw *io = req->async_data;
/* add previously done IO, if any */
if (req_has_async_data(req) && io->bytes_done > 0) {
if (ret < 0)
ret = io->bytes_done;
else
ret += io->bytes_done;
}
if (req->fl... | 0 |
225,833 | void ftyp_box_del(GF_Box *s)
{
GF_FileTypeBox *ptr = (GF_FileTypeBox *) s;
if (ptr->altBrand) gf_free(ptr->altBrand);
gf_free(ptr);
} | 0 |
264,413 | struct Cookie *Curl_cookie_getlist(struct Curl_easy *data,
struct CookieInfo *c,
const char *host, const char *path,
bool secure)
{
struct Cookie *newco;
struct Cookie *co;
struct Cookie *mainco = NULL;
size... | 0 |
452,262 | static char *php_xsl_xslt_string_to_xpathexpr(const char *str TSRMLS_DC)
{
const xmlChar *string = (const xmlChar *)str;
xmlChar *value;
int str_len;
str_len = xmlStrlen(string) + 3;
if (xmlStrchr(string, '"')) {
if (xmlStrchr(string, '\'')) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create XPat... | 0 |
234,835 | static struct btrfs_fs_devices *clone_fs_devices(struct btrfs_fs_devices *orig)
{
struct btrfs_fs_devices *fs_devices;
struct btrfs_device *device;
struct btrfs_device *orig_dev;
int ret = 0;
fs_devices = alloc_fs_devices(orig->fsid, NULL);
if (IS_ERR(fs_devices))
return fs_devices;
mutex_lock(&orig->device_... | 0 |
314,496 | PJ_DEF(pj_status_t) pjmedia_sdp_validate2(const pjmedia_sdp_session *sdp,
pj_bool_t strict)
{
unsigned i;
const pj_str_t STR_RTPMAP = { "rtpmap", 6 };
CHECK( sdp != NULL, PJ_EINVAL);
/* Validate origin line. */
CHECK( sdp->origin.user.slen != 0, PJMEDIA_SDP_EINORIGIN);
CHECK( pj_strcmp2... | 0 |
329,918 | composite_tristrip (void *_dst,
cairo_operator_t op,
cairo_surface_t *abstract_src,
int src_x,
int src_y,
int dst_x,
int dst_y,
const cairo_rectangle_int_t *extents,
cairo_antialias_t antialias,
cairo_tristrip_t *strip)
{
cairo_image_surface_t *dst = (... | 0 |
201,006 | static int FNAME(cmpxchg_gpte)(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu,
pt_element_t __user *ptep_user, unsigned index,
pt_element_t orig_pte, pt_element_t new_pte)
{
int npages;
pt_element_t ret;
pt_element_t *table;
struct page *page;
npages = get_user_pages_fast((unsigned long)ptep_user,... | 1 |
412,099 | resp_addr_get_action(const struct resp_addr* addr)
{
return addr ? addr->action : respip_none;
} | 0 |
196,801 | GF_Err gf_hinter_finalize(GF_ISOFile *file, GF_SDP_IODProfile IOD_Profile, u32 bandwidth)
{
u32 i, sceneT, odT, descIndex, size, size64;
GF_InitialObjectDescriptor *iod;
GF_SLConfig slc;
GF_ISOSample *samp;
Bool remove_ocr;
u8 *buffer;
char buf64[5000], sdpLine[5100];
gf_isom_sdp_clean(file);
if (bandwidth)... | 1 |
463,155 | static void annotate_state_free(annotate_state_t **statep)
{
annotate_state_t *state = *statep;
if (!state)
return;
annotate_state_finish(state);
annotate_state_unset_scope(state);
free(state);
*statep = NULL;
} | 0 |
436,094 |
static enum hrtimer_restart io_link_timeout_fn(struct hrtimer *timer)
{
struct io_timeout_data *data = container_of(timer,
struct io_timeout_data, timer);
struct io_kiocb *prev, *req = data->req;
struct io_ring_ctx *ctx = req->ctx;
unsigned long flags;
spin_lock_irqsave(&ctx->completion_lock, flags);
prev... | 0 |
512,564 | bool get_time(THD *thd, MYSQL_TIME *ltime)
{ return get_date(thd, ltime, Time::Options(thd)); } | 0 |
512,547 | Item_string(THD *thd, CHARSET_INFO *cs, Derivation dv= DERIVATION_COERCIBLE):
Item_literal(thd)
{
collation.set(cs, dv);
max_length= 0;
set_name(thd, NULL, 0, system_charset_info);
decimals= NOT_FIXED_DEC;
} | 0 |
400,718 | ssize_t __import_iovec(int type, const struct iovec __user *uvec,
unsigned nr_segs, unsigned fast_segs, struct iovec **iovp,
struct iov_iter *i, bool compat)
{
ssize_t total_len = 0;
unsigned long seg;
struct iovec *iov;
iov = iovec_from_user(uvec, nr_segs, fast_segs, *iovp, compat);
if (IS_ERR(iov)) {
*i... | 0 |
346,472 | do_in_runtimepath(
char_u *name,
int flags,
void (*callback)(char_u *fname, void *ck),
void *cookie)
{
return do_in_path_and_pp(p_rtp, name, flags, callback, cookie);
} | 0 |
443,157 | static sector_t jfs_bmap(struct address_space *mapping, sector_t block)
{
return generic_block_bmap(mapping, block, jfs_get_block);
} | 0 |
259,298 | static int mov_read_ddts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
#define DDTS_SIZE 20
uint8_t buf[DDTS_SIZE + AV_INPUT_BUFFER_PADDING_SIZE];
AVStream *st = NULL;
uint32_t frame_duration_code = 0;
uint32_t channel_layout_code = 0;
GetBitContext gb;
int ret;
if ((ret = ffio_read_size(... | 0 |
253,703 | static unsigned int ccp_empty_queue_buf(struct ccp_data *data)
{
return ccp_queue_buf(data, 1);
} | 0 |
487,610 | int __kprobes atomic_notifier_call_chain(struct atomic_notifier_head *nh,
unsigned long val, void *v)
{
int ret;
rcu_read_lock();
ret = notifier_call_chain(&nh->head, val, v);
rcu_read_unlock();
return ret;
} | 0 |
254,022 | static int vidioc_querycap(struct file *file, void *priv, struct v4l2_capability *cap)
{
struct v4l2_loopback_device *dev = v4l2loopback_getdevice(file);
int devnr = ((struct v4l2loopback_private *)video_get_drvdata(dev->vdev))->devicenr;
__u32 capabilities = V4L2_CAP_STREAMING | V4L2_CAP_READWRITE;
strlcpy... | 0 |
458,992 | HTTP_create(void *p, uint16_t nhttp, unsigned len)
{
struct http *hp;
hp = p;
hp->magic = HTTP_MAGIC;
hp->hd = (void*)(hp + 1);
hp->shd = nhttp;
hp->hdf = (void*)(hp->hd + nhttp);
assert((unsigned char*)p + len == hp->hdf + PRNDUP(nhttp));
return (hp);
} | 0 |
307,869 | void ciEnv::dump_replay_data(outputStream* out) {
GUARDED_VM_ENTRY(
MutexLocker ml(Compile_lock);
dump_replay_data_unsafe(out);
)
} | 0 |
487,625 | asmlinkage long sys_getrlimit(unsigned int resource, struct rlimit __user *rlim)
{
if (resource >= RLIM_NLIMITS)
return -EINVAL;
else {
struct rlimit value;
task_lock(current->group_leader);
value = current->signal->rlim[resource];
task_unlock(current->group_leader);
return copy_to_user(rlim, &value, size... | 0 |
200,113 | static Image *ReadMATImageV4(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
typedef struct {
unsigned char Type[4];
unsigned int nRows;
unsigned int nCols;
unsigned int imagf;
unsigned int nameLen;
} MAT4_HDR;
long
ldblk;
EndianType
endian;
Image
*ro... | 1 |
498,105 | void cgit_snapshot_link(const char *name, const char *title, const char *class,
const char *head, const char *rev,
const char *archivename)
{
reporevlink("snapshot", name, title, class, head, rev, archivename);
} | 0 |
225,982 |
GF_Err chnl_box_read(GF_Box *s,GF_BitStream *bs)
{
GF_ChannelLayoutBox *ptr = (GF_ChannelLayoutBox *) s;
ISOM_DECREASE_SIZE(s, 1)
ptr->layout.stream_structure = gf_bs_read_u8(bs);
if (ptr->layout.stream_structure & 1) {
ISOM_DECREASE_SIZE(s, 1)
ptr->layout.definedLayout = gf_bs_read_u8(bs);
if (ptr->layout.... | 0 |
384,125 | raptor_xml_writer_set_option(raptor_xml_writer *xml_writer,
raptor_option option, char* string, int integer)
{
return raptor_object_options_set_option(&xml_writer->options, option,
string, integer);
} | 0 |
387,609 | static inline void remove_hash_entries(struct snd_card *card,
struct snd_kcontrol *kcontrol)
{
} | 0 |
326,085 | coll_get_char(void)
{
long nr = -1;
switch (*regparse++)
{
case 'd': nr = getdecchrs(); break;
case 'o': nr = getoctchrs(); break;
case 'x': nr = gethexchrs(2); break;
case 'u': nr = gethexchrs(4); break;
case 'U': nr = gethexchrs(8); break;
}
if (nr < 0 || nr > INT_MAX)
{
// If getting t... | 0 |
275,976 | uECC_VLI_API void uECC_vli_modAdd(uECC_word_t *result,
const uECC_word_t *left,
const uECC_word_t *right,
const uECC_word_t *mod,
wordcount_t num_words) {
uECC_word_t carry = uECC_... | 0 |
432,092 | store_word(
spellinfo_T *spin,
char_u *word,
int flags, // extra flags, WF_BANNED
int region, // supported region(s)
char_u *pfxlist, // list of prefix IDs or NULL
int need_affix) // only store word with affix ID
{
int len = (int)STRLEN(word);
int ct = captype(word, word + len);
... | 0 |
369,206 | static inline void __io_req_complete(struct io_kiocb *req, unsigned issue_flags,
s32 res, u32 cflags)
{
if (issue_flags & IO_URING_F_COMPLETE_DEFER)
io_req_complete_state(req, res, cflags);
else
io_req_complete_post(req, res, cflags);
} | 0 |
241,048 | static int host_convert(char *hostname, char *ip_str, size_t ip_size)
{
struct addrinfo *result = NULL, hints = {0};
int re = -1;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_DGRAM;
re = getaddrinfo(hostname, NULL, &hints, &result);
if (re == 0) {
struct in_addr addr... | 0 |
246,475 | static ut32 r_bin_wasm_get_start(RBinWasmObj *bin) {
if (bin->g_start == UT32_MAX) {
RBinWasmSection *sec = section_by_id_unique (bin->g_sections, R_BIN_WASM_SECTION_START);
if (sec) {
RBuffer *b = bin->buf;
r_buf_seek (b, sec->payload_data, R_BUF_SET);
ut64 bound = r_buf_tell (b) + sec->payload_len - 1;
... | 0 |
437,690 | static inline u16 carrier_freq_to_clock_divider(unsigned int freq)
{
return count_to_clock_divider(
DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ, freq * 16));
} | 0 |
225,738 | GF_Box *smhd_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_SoundMediaHeaderBox, GF_ISOM_BOX_TYPE_SMHD);
return (GF_Box *)tmp;
} | 0 |
309,929 | main(int argc, char *argv[])
{
int ch;
int fg, bg;
double r;
double c;
#if HAVE_USE_DEFAULT_COLORS
bool d_option = FALSE;
#endif
int m_option = 2;
int r_option = 0;
int s_option = 1;
size_t need;
char *my_env;
while ((ch = getopt(argc, argv, "T:dem:r:s:")) != -1) {
switch (... | 0 |
226,236 | GF_Box *elng_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_MediaBox, GF_ISOM_BOX_TYPE_ELNG);
return (GF_Box *)tmp;
} | 0 |
206,921 | regmatch(
char_u *scan, // Current node.
proftime_T *tm UNUSED, // timeout limit or NULL
int *timed_out UNUSED) // flag set on timeout or NULL
{
char_u *next; // Next node.
int op;
int c;
regitem_T *rp;
int no;
int status; // one of the RA_ values:
#ifdef FEAT_RELTIME
int tm_... | 1 |
513,291 | int join_init_read_record(JOIN_TAB *tab)
{
/*
Note: the query plan tree for the below operations is constructed in
save_agg_explain_data.
*/
if (tab->distinct && tab->remove_duplicates()) // Remove duplicates.
return 1;
if (tab->filesort && tab->sort_table()) // Sort table.
return 1;
DB... | 0 |
276,917 | static int i2c_get_cur_bus(struct udevice **busp)
{
#ifdef CONFIG_I2C_SET_DEFAULT_BUS_NUM
if (!i2c_cur_bus) {
if (cmd_i2c_set_bus_num(CONFIG_I2C_DEFAULT_BUS_NUMBER)) {
printf("Default I2C bus %d not found\n",
CONFIG_I2C_DEFAULT_BUS_NUMBER);
return -ENODEV;
}
}
#endif
if (!i2c_cur_bus) {
puts("... | 0 |
349,900 | static u32 hw_atl_utils_mif_addr_get(struct aq_hw_s *self)
{
return aq_hw_read_reg(self, HW_ATL_MIF_ADDR);
} | 0 |
369,403 | static void tctx_task_work(struct callback_head *cb)
{
bool uring_locked = false;
struct io_ring_ctx *ctx = NULL;
struct io_uring_task *tctx = container_of(cb, struct io_uring_task,
task_work);
while (1) {
struct io_wq_work_node *node1, *node2;
if (!tctx->task_list.first &&
!tctx->prior_task_lis... | 0 |
273,058 | linear_regression(double *m, double *b, double *r2, const double *x, const double *y, int n)
{
double x_val;
double sum_x = 0;
double sum_x2 = 0;
double sum_y = 0;
double sum_y2 = 0;
double sum_xy = 0;
double denom;
int i;
for (i = 0; i < n; i++)
{
x_val = x ? x[i] : (double)i;
su... | 0 |
462,310 | status_do_fonts(stream * s, pcl_state_t * pcs,
pcl_data_storage_t storage, bool extended)
{
gs_const_string key;
void *value;
pl_dict_enum_t denum;
int res;
pl_dict_enum_begin(&pcs->soft_fonts, &denum);
while (pl_dict_enum_next(&denum, &key, &value)) {
uint id = (key.dat... | 0 |
326,599 | set_xattrs(struct archive_write_disk *a)
{
static int warning_done = 0;
/* If there aren't any extended attributes, then it's okay not
* to extract them, otherwise, issue a single warning. */
if (archive_entry_xattr_count(a->entry) != 0 && !warning_done) {
warning_done = 1;
archive_set_error(&a->archive, ARCH... | 0 |
225,548 | void TfLiteTensorRealloc(size_t num_bytes, TfLiteTensor* tensor) {
if (tensor->allocation_type != kTfLiteDynamic &&
tensor->allocation_type != kTfLitePersistentRo) {
return;
}
// TODO(b/145340303): Tensor data should be aligned.
if (!tensor->data.raw) {
tensor->data.raw = (char*)malloc(num_bytes);... | 0 |
384,536 | static ut64 read_uleb128(ut8 **p, ut8 *end) {
const char *error = NULL;
ut64 v;
*p = (ut8 *)r_uleb128 (*p, end - *p, &v, &error);
if (error) {
eprintf ("%s", error);
R_FREE (error);
return UT64_MAX;
}
return v;
} | 0 |
405,338 | struct dst_entry *xfrm_lookup_route(struct net *net, struct dst_entry *dst_orig,
const struct flowi *fl,
const struct sock *sk, int flags)
{
struct dst_entry *dst = xfrm_lookup(net, dst_orig, fl, sk,
flags | XFRM_LOOKUP_QUEUE |
XFRM_LOOKUP_KEEP_DST_REF);
if (PTR_ERR(dst) == -EREMOTE... | 0 |
369,381 |
static int io_rsrc_update_prep(struct io_kiocb *req,
const struct io_uring_sqe *sqe)
{
if (unlikely(req->flags & (REQ_F_FIXED_FILE | REQ_F_BUFFER_SELECT)))
return -EINVAL;
if (sqe->ioprio || sqe->rw_flags || sqe->splice_fd_in)
return -EINVAL;
req->rsrc_update.offset = READ_ONCE(sqe->off);
req->rsrc_update... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.