idx int64 | func string | target int64 |
|---|---|---|
97,950 | static int check_reg_arg(struct reg_state *regs, u32 regno,
enum reg_arg_type t)
{
if (regno >= MAX_BPF_REG) {
verbose("R%d is invalid\n", regno);
return -EINVAL;
}
if (t == SRC_OP) {
/* check whether register used as source operand can be read */
if (regs[regno].type == NOT_INIT) {
verbose("R%d !rea... | 0 |
451,568 | static BROTLI_INLINE size_t NextBlockTypeCode(
BlockTypeCodeCalculator* calculator, uint8_t type) {
size_t type_code = (type == calculator->last_type + 1) ? 1u :
(type == calculator->second_last_type) ? 0u : type + 2u;
calculator->second_last_type = calculator->last_type;
calculator->last_type = type;
... | 0 |
237,016 | TestInterstitialPageDelegate(TestInterstitialPage* interstitial_page)
: interstitial_page_(interstitial_page) {}
| 0 |
153,800 | BOOL update_write_opaque_rect_order(wStream* s, ORDER_INFO* orderInfo,
const OPAQUE_RECT_ORDER* opaque_rect)
{
BYTE byte;
int inf = update_approximate_opaque_rect_order(orderInfo, opaque_rect);
if (!Stream_EnsureRemainingCapacity(s, inf))
return FALSE;
// TODO: Color format c... | 0 |
139,190 | flatpak_run_add_pcsc_args (FlatpakBwrap *bwrap)
{
const char * pcsc_socket;
const char * sandbox_pcsc_socket = "/run/pcscd/pcscd.comm";
pcsc_socket = g_getenv ("PCSCLITE_CSOCK_NAME");
if (pcsc_socket)
{
if (!g_file_test (pcsc_socket, G_FILE_TEST_EXISTS))
{
flatpak_bwrap_unset_env (b... | 0 |
429,086 | static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
#define ThrowPCXException(severity,tag) \
{ \
if (scanline != (unsigned char *) NULL) \
scanline=(unsigned char *) RelinquishMagickMemory(scanline); \
if (pixel_info != (MemoryInfo *) NULL) \
pixel_info=RelinquishVirtualMemor... | 0 |
103,618 | static int nf_tables_loop_check_setelem(const struct nft_ctx *ctx,
const struct nft_set *set,
const struct nft_set_iter *iter,
const struct nft_set_elem *elem)
{
if (elem->flags & NFT_SET_ELEM_INTERVAL_END)
return 0;
switch (elem->data.verdict) {
case NFT_JUMP:
case NFT_GOTO:
return nf_tables_ch... | 0 |
71,600 | bool AdminRequestHandler::handleRandomStaticStringsRequest(
const std::string& /*cmd*/, Transport* transport) {
size_t count = 1;
auto countParam = transport->getParam("count");
if (countParam != "") {
try {
count = folly::to<size_t>(countParam);
} catch (...) {
// do the default on invalid ... | 0 |
300,376 | TEST_F(SecretManagerImplTest, ConfigDumpHandler) {
Server::MockInstance server;
auto secret_manager = std::make_unique<SecretManagerImpl>(config_tracker_);
time_system_.setSystemTime(std::chrono::milliseconds(1234567891234));
NiceMock<Server::Configuration::MockTransportSocketFactoryContext> secret_context;
... | 0 |
342,147 | static int int_pow(int i, int *exp_ptr)
{
int e, er, eq, j;
int a, a1;
/* renormalize */
a = i;
e = POW_FRAC_BITS;
while (a < (1 << (POW_FRAC_BITS - 1))) {
a = a << 1;
e--;
}
a -= (1 << POW_FRAC_BITS);
a1 = 0;
for(j = DEV_ORDER - 1; j >= 0; j--)... | 1 |
42,355 | static int nfs_readdir_page_filler(struct nfs_readdir_descriptor *desc,
struct nfs_entry *entry,
struct page **xdr_pages,
unsigned int buflen,
struct page **arrays,
size_t narrays)
{
struct address_space *mapping = desc->file->f_mapping;
struct xdr_stream stream;
struct xdr_buf buf... | 0 |
389,490 | _encode(ImagingEncoderObject* encoder, PyObject* args)
{
PyObject* buf;
PyObject* result;
int status;
/* Encode to a Python string (allocated by this method) */
int bufsize = 16384;
if (!PyArg_ParseTuple(args, "|i", &bufsize))
return NULL;
buf = PyBytes_FromStringAndSize(NULL, bufsize);... | 0 |
160,385 | static inline bool rom_order_compare(Rom *rom, Rom *item)
{
return ((uintptr_t)(void *)rom->as > (uintptr_t)(void *)item->as) ||
(rom->as == item->as && rom->addr >= item->addr);
} | 0 |
87,117 | #ifndef GPAC_DISABLE_ISOM_WRITE
GF_Err tsro_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_TimeOffHintEntryBox *ptr = (GF_TimeOffHintEntryBox *)s;
if (ptr == NULL) return GF_BAD_PARAM;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
gf_bs_write_u32(bs, ptr->TimeOffset);
return GF_OK; | 0 |
210,871 | void BrowserWindowGtk::Close() {
if (!window_)
return;
if (!CanClose())
return;
tabstrip_->StopAnimation();
SaveWindowPosition();
if (accel_group_) {
AcceleratorsGtk* accelerators = AcceleratorsGtk::GetInstance();
for (AcceleratorsGtk::const_iterator iter = accelerators->begin();
... | 0 |
115,951 | QUInt8(const uint8_t v) : value(v) {} | 0 |
273,937 | bson_iter_key (const bson_iter_t *iter) /* IN */
{
BSON_ASSERT (iter);
return bson_iter_key_unsafe (iter);
} | 0 |
172,501 | Browser::~Browser() {
registrar_.RemoveAll();
extension_registry_observer_.RemoveAll();
DCHECK(tab_strip_model_->empty());
tab_strip_model_->RemoveObserver(this);
bubble_manager_.reset();
command_controller_.reset();
BrowserList::RemoveBrowser(this);
int num_downloads;
if (!browser_defaults::kBrows... | 0 |
408,433 | string_isupper(PyStringObject *self)
{
register const unsigned char *p
= (unsigned char *) PyString_AS_STRING(self);
register const unsigned char *e;
int cased;
/* Shortcut for single character strings */
if (PyString_GET_SIZE(self) == 1)
return PyBool_FromLong(isupper(*p) != 0);
... | 0 |
96,076 | mrb_obj_new(mrb_state *mrb, struct RClass *c, mrb_int argc, const mrb_value *argv)
{
mrb_value obj;
mrb_sym mid;
obj = mrb_instance_alloc(mrb, mrb_obj_value(c));
mid = MRB_SYM(initialize);
if (!mrb_func_basic_p(mrb, obj, mid, mrb_do_nothing)) {
mrb_funcall_argv(mrb, obj, mid, argc, argv);
}
return ob... | 0 |
483,419 | static void *cgroup_idr_replace(struct idr *idr, void *ptr, int id)
{
void *ret;
spin_lock_bh(&cgroup_idr_lock);
ret = idr_replace(idr, ptr, id);
spin_unlock_bh(&cgroup_idr_lock);
return ret;
} | 0 |
202,297 | RenderFrameHostImpl::GetFindInPage() {
if (!find_in_page_ || !find_in_page_.is_bound() ||
find_in_page_.encountered_error())
GetRemoteAssociatedInterfaces()->GetInterface(&find_in_page_);
return find_in_page_;
}
| 0 |
492,096 | backup_cleanup()
{
free(mysql_binlog_position);
free(buffer_pool_filename);
free(backup_uuid);
backup_uuid = NULL;
if (mysql_connection) {
mysql_close(mysql_connection);
}
} | 0 |
167,370 | void BlobStorageContext::NotifyTransportComplete(const std::string& uuid) {
BlobEntry* entry = registry_.GetEntry(uuid);
CHECK(entry) << "There is no blob entry with uuid " << uuid;
DCHECK(BlobStatusIsPending(entry->status()));
NotifyTransportCompleteInternal(entry);
}
| 0 |
99,240 | PHP_FUNCTION(imagecolorresolvealpha)
{
zval *IM;
long red, green, blue, alpha;
gdImagePtr im;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllll", &IM, &red, &green, &blue, &alpha) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, "Image", le_gd);
RETURN_LONG(gdImageColorResolveA... | 0 |
10,458 | qtdemux_parse_samples (GstQTDemux * qtdemux, QtDemuxStream * stream,
GNode * stbl)
{
int offset;
GNode *stsc;
GNode *stsz;
GNode *stco;
GNode *co64;
GNode *stts;
GNode *stss;
GNode *ctts;
const guint8 *stsc_data, *stsz_data, *stco_data;
int sample_size;
int sample_index;
int n_samples;
int... | 1 |
272,208 | //! Return pixel value, using cubic interpolation and mirror boundary conditions for the X and Y-coordinates.
Tfloat cubic_atXY_p(const float fx, const float fy, const int z=0, const int c=0) const {
if (is_empty())
throw CImgInstanceException(_cimg_instance
"cu... | 0 |
447,229 | int efi_mem_type(unsigned long phys_addr)
{
const efi_memory_desc_t *md;
if (!efi_enabled(EFI_MEMMAP))
return -ENOTSUPP;
for_each_efi_memory_desc(md) {
if ((md->phys_addr <= phys_addr) &&
(phys_addr < (md->phys_addr +
(md->num_pages << EFI_PAGE_SHIFT))))
return md->type;
}
return -EINVAL;
} | 0 |
409,797 | static int
__skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len,
unsigned int recursion_level)
{
int start = skb_headlen(skb);
int i, copy = start - offset;
struct sk_buff *frag_iter;
int elt = 0;
if (unlikely(recursion_level >= 24))
return -EMSGSIZE;
if (copy > 0) {
if (c... | 0 |
284,058 | launch_login(struct passwd *pw, const char *hostname)
{
/* Launch login(1). */
execl(LOGIN_PROGRAM, "login", "-h", hostname,
#ifdef xxxLOGIN_NEEDS_TERM
(s->term ? s->term : "unknown"),
#endif /* LOGIN_NEEDS_TERM */
#ifdef LOGIN_NO_ENDOPT
"-p", "-f", pw->pw_name, (char *)NULL);
#else
"-p", "-f", "--",... | 0 |
432,089 | static long tftp_state_timeout(struct connectdata *conn, tftp_event_t *event)
{
time_t current;
tftp_state_data_t *state = (tftp_state_data_t *)conn->proto.tftpc;
if(event)
*event = TFTP_EVENT_NONE;
time(¤t);
if(current > state->max_time) {
DEBUGF(infof(conn->data, "timeout:... | 0 |
315,531 | void DTLS_RECORD_LAYER_set_saved_w_epoch(RECORD_LAYER *rl, unsigned short e)
{
if (e == rl->d->w_epoch - 1) {
memcpy(rl->d->curr_write_sequence,
rl->write_sequence, sizeof(rl->write_sequence));
memcpy(rl->write_sequence,
rl->d->last_write_sequence, sizeof(rl->write_sequ... | 0 |
348,152 | ks_http_fetch (ctrl_t ctrl, const char *url, unsigned int flags,
estream_t *r_fp)
{
gpg_error_t err;
http_session_t session = NULL;
unsigned int session_flags;
http_t http = NULL;
int redirects_left = MAX_REDIRECTS;
estream_t fp = NULL;
char *request_buffer = NULL;
parsed_uri_t uri = NULL... | 1 |
63,838 | static int jit_subprogs(struct bpf_verifier_env *env)
{
struct bpf_prog *prog = env->prog, **func, *tmp;
int i, j, subprog_start, subprog_end = 0, len, subprog;
struct bpf_insn *insn;
void *old_bpf_func;
int err = -ENOMEM;
if (env->subprog_cnt <= 1)
return 0;
for (i = 0, insn = prog->insnsi; i < prog->len; i... | 0 |
1,888 | static int crypto_report_kpp(struct sk_buff *skb, struct crypto_alg *alg)
{
struct crypto_report_kpp rkpp;
strlcpy(rkpp.type, "kpp", sizeof(rkpp.type));
if (nla_put(skb, CRYPTOCFGA_REPORT_KPP,
sizeof(struct crypto_report_kpp), &rkpp))
goto nla_put_failure;
return 0;
nla_put_failure:
return -EMSGSIZE;
} | 1 |
111,599 | static int descriptors_changed(struct usb_device *udev,
struct usb_device_descriptor *old_device_descriptor,
struct usb_host_bos *old_bos)
{
int changed = 0;
unsigned index;
unsigned serial_len = 0;
unsigned len;
unsigned old_length;
int length;
char *buf;
if (memcmp(&udev->descriptor, old_device_descri... | 0 |
442,540 | static bool rbuf_alloc(conn *c) {
if (c->rbuf == NULL) {
c->rbuf = do_cache_alloc(c->thread->rbuf_cache);
if (!c->rbuf) {
THR_STATS_LOCK(c);
c->thread->stats.read_buf_oom++;
THR_STATS_UNLOCK(c);
return false;
}
c->rsize = READ_BUFFER_SI... | 0 |
269,259 | void HeaderMapImpl::addReferenceKey(const LowerCaseString& key, uint64_t value) {
HeaderString ref_key(key);
HeaderString new_value;
new_value.setInteger(value);
insertByKey(std::move(ref_key), std::move(new_value));
ASSERT(new_value.empty()); // NOLINT(bugprone-use-after-move)
} | 0 |
210,622 | RTCPeerConnectionHandler::GetConfiguration() const {
return configuration_;
}
| 0 |
440,225 | add_ctype_to_cc(CClassNode* cc, int ctype, int not, ScanEnv* env)
{
#define ASCII_LIMIT 127
int c, r;
int ascii_mode;
int is_single;
const OnigCodePoint *ranges;
OnigCodePoint limit;
OnigCodePoint sb_out;
OnigEncoding enc = env->enc;
ascii_mode = IS_ASCII_MODE_CTYPE_OPTION(ctype, env->options);
... | 0 |
388,034 | start_conversation (GdmSession *self,
const char *service_name)
{
GdmSessionConversation *conversation;
char *job_name;
conversation = g_new0 (GdmSessionConversation, 1);
conversation->session = g_object_ref (self);
conversation->service_nam... | 0 |
104,909 | static int vmx_cpu_uses_apicv(struct kvm_vcpu *vcpu)
{
return enable_apicv && lapic_in_kernel(vcpu);
} | 0 |
413,579 | static void _rpc_prolog(slurm_msg_t *msg)
{
int rc = SLURM_SUCCESS;
prolog_launch_msg_t *req = (prolog_launch_msg_t *)msg->data;
job_env_t job_env;
bool first_job_run;
uid_t req_uid;
if (req == NULL)
return;
req_uid = g_slurm_auth_get_uid(msg->auth_cred, conf->auth_info);
if (!_slurm_authorized_user(... | 0 |
296,721 | static void run_tests()
{
test_simple();
test_secure_funcs();
} | 0 |
35,392 | void usb_sg_cancel(struct usb_sg_request *io)
{
unsigned long flags;
int i, retval;
spin_lock_irqsave(&io->lock, flags);
if (io->status || io->count == 0) {
spin_unlock_irqrestore(&io->lock, flags);
return;
}
/* shut everything down */
io->status = -ECONNRESET;
io->count++; /* Keep the request alive until... | 0 |
85,358 | static void tb_phys_invalidate__locked(TCGContext *tcg_ctx, TranslationBlock *tb)
{
do_tb_phys_invalidate(tcg_ctx, tb, true);
} | 0 |
223,972 | void RootWindow::OnLayerAnimationAborted(
ui::LayerAnimationSequence* animation) {
}
| 0 |
356,663 | static jas_cmpxformseq_t *jas_cmpxformseq_copy(jas_cmpxformseq_t *pxformseq)
{
jas_cmpxformseq_t *newpxformseq;
if (!(newpxformseq = jas_cmpxformseq_create()))
goto error;
if (jas_cmpxformseq_append(newpxformseq, pxformseq))
goto error;
return newpxformseq;
error:
return 0;
} | 0 |
433,111 | static int read_rindex_entry(struct gfs2_inode *ip)
{
struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
const unsigned bsize = sdp->sd_sb.sb_bsize;
loff_t pos = sdp->sd_rgrps * sizeof(struct gfs2_rindex);
struct gfs2_rindex buf;
int error;
struct gfs2_rgrpd *rgd;
if (pos >= i_size_read(&ip->i_inode))
return 1;
... | 0 |
10,246 | tt_cmap14_validate( FT_Byte* table,
FT_Validator valid )
{
FT_Byte* p;
FT_ULong length;
FT_ULong num_selectors;
if ( table + 2 + 4 + 4 > valid->limit )
FT_INVALID_TOO_SHORT;
p = table + 2;
length = TT_NEXT_ULONG( p );
num_selecto... | 1 |
115,915 | static u64 dev_extent_search_start(struct btrfs_device *device, u64 start)
{
switch (device->fs_devices->chunk_alloc_policy) {
case BTRFS_CHUNK_ALLOC_REGULAR:
/*
* We don't want to overwrite the superblock on the drive nor
* any area used by the boot loader (grub for example), so we
* make sure to start at... | 0 |
425,054 | void acquire_daemonlock(int closeflag) {
static int fd = -1;
char buf[3 * MAX_FNAME];
const char *pidfile;
char *ep;
long otherpid = -1;
ssize_t num, len;
pid_t pid = getpid();
if (closeflag) {
/* close stashed fd for child so we don't leak it. */
if (fd != -1) {
close(fd);
fd = -1;
}
/* and rest... | 0 |
452,025 | static void rbd_osd_setup_write_ops(struct ceph_osd_request *osd_req,
int which)
{
struct rbd_obj_request *obj_req = osd_req->r_priv;
switch (obj_req->img_request->op_type) {
case OBJ_OP_WRITE:
__rbd_osd_setup_write_ops(osd_req, which);
break;
case OBJ_OP_DISCARD:
__rbd_osd_setup_discard_ops(osd_req,... | 0 |
243,330 | void LocalFrameClientImpl::DidChangePerformanceTiming() {
if (web_frame_->Client())
web_frame_->Client()->DidChangePerformanceTiming();
}
| 0 |
363,533 | hook_infolist_get (struct t_weechat_plugin *plugin, const char *infolist_name,
void *pointer, const char *arguments)
{
struct t_hook *ptr_hook, *next_hook;
struct t_infolist *value;
/* make C compiler happy */
(void) plugin;
if (!infolist_name || !infolist_name[0])
... | 0 |
486,104 | static int fprintf_utab_fs(FILE *f, struct libmnt_fs *fs)
{
char *p;
int rc = 0;
assert(fs);
assert(f);
if (!fs || !f)
return -EINVAL;
p = mangle(mnt_fs_get_source(fs));
if (p) {
rc = fprintf(f, "SRC=%s ", p);
free(p);
}
if (rc >= 0) {
p = mangle(mnt_fs_get_target(fs));
if (p) {
rc = fprintf(f,... | 0 |
401,551 | gboolean menu_cache_app_get_is_visible( MenuCacheApp* app, guint32 de_flags )
{
if(app->flags & FLAG_IS_NODISPLAY)
return FALSE;
return (!app->show_in_flags || (app->show_in_flags & de_flags)) &&
_can_be_exec(app);
} | 0 |
365,332 | str_gsub(argc, argv, str, bang)
int argc;
VALUE *argv;
VALUE str;
int bang;
{
VALUE pat, val, repl, match, dest;
struct re_registers *regs;
long beg, n;
long offset, blen, slen, len;
int iter = 0;
char *buf, *bp, *sp, *cp;
int tainted = 0;
if (argc == 1) {
RETURN... | 0 |
84,765 | frame_add_height(frame_T *frp, int n)
{
frame_new_height(frp, frp->fr_height + n, FALSE, FALSE);
for (;;)
{
frp = frp->fr_parent;
if (frp == NULL)
break;
frp->fr_height += n;
}
} | 0 |
366,583 | MP4::Properties::bitsPerSample() const
{
return d->bitsPerSample;
} | 0 |
501,539 | void setupServiceRegexPatternValidationHC() {
std::string yaml = R"EOF(
timeout: 1s
interval: 1s
interval_jitter: 1s
unhealthy_threshold: 2
healthy_threshold: 2
http_health_check:
service_name_matcher:
safe_regex:
google_re2: {}
regex: 'locations-.*-.*$'
... | 0 |
230,083 | qtdemux_tag_add_blob (GNode * node, GstQTDemux * demux)
{
gint len;
guint8 *data;
GstBuffer *buf;
gchar *media_type, *style;
GstCaps *caps;
data = node->data;
len = QT_UINT32 (data);
buf = gst_buffer_new_and_alloc (len);
memcpy (GST_BUFFER_DATA (buf), data, len);
/* heuristic to determine style of... | 0 |
299,873 | static bool mtrr_lookup_fixed_start(struct mtrr_iter *iter)
{
int seg, index;
if (!fixed_mtrr_is_enabled(iter->mtrr_state))
return false;
seg = fixed_mtrr_addr_to_seg(iter->start);
if (seg < 0)
return false;
iter->fixed = true;
index = fixed_mtrr_addr_seg_to_range_index(iter->start, seg);
iter->index = in... | 0 |
231,444 | QString IRCView::closeToTagString(TextHtmlData* data, const QString& _tag)
{
QString ret;
QString tag;
int i = data->openHtmlTags.count() - 1;
for ( ; i >= 0 ; --i)
{
tag = data->openHtmlTags.at(i);
ret += QLatin1String("</") + tag + QLatin1Char('>');
if (tag == _tag)
... | 0 |
194,234 | void virtio_queue_set_addr(VirtIODevice *vdev, int n, hwaddr addr)
{
vdev->vq[n].vring.desc = addr;
virtio_queue_update_rings(vdev, n);
}
| 0 |
314,190 | static int wait_on_pipe(struct trace_iterator *iter, int full)
{
/* Iterators are static, they should be filled or empty */
if (trace_buffer_iter(iter, iter->cpu_file))
return 0;
return ring_buffer_wait(iter->trace_buffer->buffer, iter->cpu_file,
full);
}
| 0 |
504,404 | TPMI_DH_SAVED_Marshal(TPMI_DH_CONTEXT *source, BYTE **buffer, INT32 *size)
{
UINT16 written = 0;
written += TPM_HANDLE_Marshal(source, buffer, size);
return written;
} | 0 |
391,679 | xmlDOMWrapNewCtxt(void)
{
xmlDOMWrapCtxtPtr ret;
ret = xmlMalloc(sizeof(xmlDOMWrapCtxt));
if (ret == NULL) {
xmlTreeErrMemory("allocating DOM-wrapper context");
return (NULL);
}
memset(ret, 0, sizeof(xmlDOMWrapCtxt));
return (ret);
} | 0 |
251,304 | void WebGL2RenderingContextBase::uniformMatrix2fv(
const WebGLUniformLocation* location,
GLboolean transpose,
Vector<GLfloat>& v) {
WebGLRenderingContextBase::uniformMatrix2fv(location, transpose, v);
}
| 0 |
119,783 | StartSelect(XtermWidget xw, const CELL *cell)
{
TScreen *screen = TScreenOf(xw);
TRACE(("StartSelect row=%d, col=%d\n", cell->row, cell->col));
if (screen->cursor_state)
HideCursor(xw);
if (screen->numberOfClicks == 1) {
/* set start of selection */
screen->rawPos = *cell;
}
/* else use old ... | 0 |
23,812 | char * evhttp_encode_uri ( const char * uri ) {
struct evbuffer * buf = evbuffer_new ( ) ;
char * p ;
for ( p = ( char * ) uri ;
* p != '\0' ;
p ++ ) {
if ( uri_chars [ ( u_char ) ( * p ) ] ) {
evbuffer_add ( buf , p , 1 ) ;
}
else {
evbuffer_add_printf ( buf , "%%%02X" , ( u_char ) ( * p ) ) ;
}
}
evbuffe... | 0 |
278,166 | void js_defaccessor(js_State *J, int idx, const char *name, int atts)
{
jsR_defproperty(J, js_toobject(J, idx), name, atts, NULL, jsR_tofunction(J, -2), jsR_tofunction(J, -1));
js_pop(J, 2);
}
| 0 |
31,486 | static struct in_ifaddr *inet_alloc_ifa(void)
{
return kzalloc(sizeof(struct in_ifaddr), GFP_KERNEL);
} | 0 |
157,768 | DEFINE_TEST(test_read_format_rar5_invalid_dict_reference)
{
uint8_t buf[16];
PROLOGUE("test_read_format_rar5_invalid_dict_reference.rar");
/* This test should fail on parsing the header. */
assertA(archive_read_next_header(a, &ae) != ARCHIVE_OK);
/* This archive is invalid. However, processing it shouldn't caus... | 0 |
195,735 | bool DrawingBuffer::Initialize(const IntSize& size, bool use_multisampling) {
ScopedStateRestorer scoped_state_restorer(this);
if (gl_->GetGraphicsResetStatusKHR() != GL_NO_ERROR) {
return false;
}
gl_->GetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size_);
int max_sample_count = 0;
anti_aliasing_mode... | 0 |
402,305 | static void xhci_event(XHCIState *xhci, XHCIEvent *event, int v)
{
XHCIInterrupter *intr;
dma_addr_t erdp;
unsigned int dp_idx;
if (v >= xhci->numintrs) {
DPRINTF("intr nr out of range (%d >= %d)\n", v, xhci->numintrs);
return;
}
intr = &xhci->intr[v];
if (intr->er_full) {
... | 0 |
87,898 | int __kvm_set_memory_region(struct kvm *kvm,
const struct kvm_userspace_memory_region *mem)
{
int r;
gfn_t base_gfn;
unsigned long npages;
struct kvm_memory_slot *slot;
struct kvm_memory_slot old, new;
struct kvm_memslots *slots = NULL, *old_memslots;
int as_id, id;
enum kvm_mr_change change;
r = check... | 0 |
46,672 | bool isInvalid() const override {
return data == nullptr;
} | 0 |
361,488 | struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid,
const struct cred *cred, unsigned long flags,
struct key *dest)
{
struct key *keyring;
int ret;
keyring = key_alloc(&key_type_keyring, description,
uid, gid, cred,
(KEY_POS_ALL & ~KEY_POS_SETATTR) | KEY_USR_ALL,
... | 0 |
288,901 | static const char * ultag_getRegion ( const ULanguageTag * langtag ) {
return langtag -> region ;
} | 0 |
281,773 | static void voidMethodSequenceDictionaryArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjectPythonV8Internal::voidMethodSequenceDictionaryArgMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
| 0 |
143,687 | static int ocfs2_dir_open(struct inode *inode, struct file *file)
{
return ocfs2_init_file_private(inode, file);
} | 0 |
182,282 | int64 GetAmountOfFreeDiskSpace() {
if (global_free_disk_getter_for_testing)
return global_free_disk_getter_for_testing->AmountOfFreeDiskSpace();
return base::SysInfo::AmountOfFreeDiskSpace(
FilePath::FromUTF8Unsafe(GetHomeDirectory()));
}
| 0 |
21,060 | static int qdev_add_one_global(QemuOpts *opts, void *opaque)
{
GlobalProperty *g;
ObjectClass *oc;
g = g_malloc0(sizeof(*g));
g->driver = qemu_opt_get(opts, "driver");
g->property = qemu_opt_get(opts, "property");
g->value = qemu_opt_get(opts, "value");
oc = object_class_by_na... | 1 |
70,591 | static void snd_timer_clear_callbacks(struct snd_timer *timer,
struct list_head *head)
{
unsigned long flags;
spin_lock_irqsave(&timer->lock, flags);
while (!list_empty(head))
list_del_init(head->next);
spin_unlock_irqrestore(&timer->lock, flags);
} | 0 |
147,724 | nvmet_fc_find_target_assoc(struct nvmet_fc_tgtport *tgtport,
u64 association_id)
{
struct nvmet_fc_tgt_assoc *assoc;
struct nvmet_fc_tgt_assoc *ret = NULL;
unsigned long flags;
spin_lock_irqsave(&tgtport->lock, flags);
list_for_each_entry(assoc, &tgtport->assoc_list, a_list) {
if (association_id == assoc->a... | 0 |
123,126 | static int create_std_midi_quirk(struct snd_usb_audio *chip,
struct usb_interface *iface,
struct usb_driver *driver,
struct usb_host_interface *alts)
{
struct usb_ms_header_descriptor *mshd;
struct usb_ms_endpoint_descriptor *msepd;
/* must have the MIDIStreaming interface header descriptor*/
mshd =... | 0 |
277,176 | static bool cmd_identify(IDEState *s, uint8_t cmd)
{
if (s->blk && s->drive_kind != IDE_CD) {
if (s->drive_kind != IDE_CFATA) {
ide_identify(s);
} else {
ide_cfata_identify(s);
}
s->status = READY_STAT | SEEK_STAT;
ide_transfer_start(s, s->io_buffer, 5... | 0 |
125,216 | void* leak_realloc(void* oldMem, size_t bytes)
{
if (oldMem == NULL) {
return leak_malloc(bytes);
}
void* newMem = NULL;
AllocationEntry* header = (AllocationEntry*)oldMem - 1;
if (header && header->guard == GUARD) {
size_t oldSize = header->entry->size & ~SIZE_FLAG_MASK;
new... | 0 |
377,316 | static gnutls_datum_t mmap_file(const char *file)
{
int fd;
gnutls_datum_t mmaped_file = { NULL, 0 };
struct stat stat_st;
void *ptr;
fd = open(file, 0);
if (fd == -1)
return mmaped_file;
fstat(fd, &stat_st);
if ((ptr =
mmap(NULL, stat_st.st_size, PROT_READ, MAP_SHARED, fd,
... | 0 |
243,560 | ShellWindowViews::~ShellWindowViews() {
web_view_->SetWebContents(NULL);
}
| 0 |
199,398 | ACodec::BaseState::BaseState(ACodec *codec, const sp<AState> &parentState)
: AState(parentState),
mCodec(codec) {
}
| 0 |
125,484 | static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd)
{
struct inode *inode = dentry->d_inode;
struct task_struct *task = get_proc_task(inode);
int fd = proc_fd(inode);
struct files_struct *files;
const struct cred *cred;
if (task) {
files = get_files_struct(task);
if (files) {
rcu_rea... | 0 |
37,974 | static BOOL freerdp_peer_get_fds(freerdp_peer* client, void** rfds, int* rcount)
{
rfds[*rcount] = (void*)(long)(client->context->rdp->transport->TcpIn->sockfd);
(*rcount)++;
return TRUE;
} | 0 |
28,597 | int min_heap_elem_greater ( struct event * a , struct event * b ) {
return evutil_timercmp ( & a -> ev_timeout , & b -> ev_timeout , > ) ;
} | 0 |
445,873 | exif_data_load_data_content (ExifData *data, ExifIfd ifd,
const unsigned char *d,
unsigned int ds, unsigned int offset, unsigned int recursion_cost)
{
ExifLong o, thumbnail_offset = 0, thumbnail_length = 0;
ExifShort n;
ExifEntry *entry;
unsigned int i;
ExifTag tag;
if (!data || !data->priv)
r... | 0 |
477,623 | static inline void ax25_hold_route(ax25_route *ax25_rt)
{
refcount_inc(&ax25_rt->refcount);
} | 0 |
517,943 | bool Type_std_attributes::agg_item_set_converter(const DTCollation &coll,
const char *fname,
Item **args, uint nargs,
uint flags, int item_sep)
{
THD *thd= current_thd;
... | 0 |
189,049 | static void TestInterfaceOrLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
TestObject* impl = V8TestObject::ToImpl(info.Holder());
TestInterfaceOrLong result;
impl->testInterfaceOrLongMethod(result);
V8SetReturnValue(info, result);
}
| 0 |
41,104 | void ssl_handshake_free( ssl_handshake_params *handshake )
{
#if defined(POLARSSL_DHM_C)
dhm_free( &handshake->dhm_ctx );
#endif
memset( handshake, 0, sizeof( ssl_handshake_params ) );
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.