unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
168,916 | 0 | DevToolsAgentHost::List GetBrowserAgentHosts() {
DevToolsAgentHost::List result;
for (const auto& id_host : g_devtools_instances.Get()) {
if (id_host.second->GetType() == DevToolsAgentHost::kTypeBrowser)
result.push_back(id_host.second);
}
return result;
}
| 8,400 |
155,424 | 0 | ParseCertificatePrincipalPattern(const base::Value* pattern) {
return certificate_matching::CertificatePrincipalPattern::
ParseFromOptionalDict(pattern, "CN", "L", "O", "OU");
}
| 8,401 |
49,134 | 0 | brcmf_vndr_ie(u8 *iebuf, s32 pktflag, u8 *ie_ptr, u32 ie_len, s8 *add_del_cmd)
{
strncpy(iebuf, add_del_cmd, VNDR_IE_CMD_LEN - 1);
iebuf[VNDR_IE_CMD_LEN - 1] = '\0';
put_unaligned_le32(1, &iebuf[VNDR_IE_COUNT_OFFSET]);
put_unaligned_le32(pktflag, &iebuf[VNDR_IE_PKTFLAG_OFFSET]);
memcpy(&iebuf[VNDR_IE_VSIE_OFFS... | 8,402 |
140,406 | 0 | void TypingCommand::insertTextRunWithoutNewlines(const String& text,
bool selectInsertedText,
EditingState* editingState) {
CompositeEditCommand* command;
if (isIncrementalInsertion()) {
command = InsertIncremental... | 8,403 |
67,550 | 0 | static int mpage_submit_page(struct mpage_da_data *mpd, struct page *page)
{
int len;
loff_t size = i_size_read(mpd->inode);
int err;
BUG_ON(page->index != mpd->first_page);
if (page->index == size >> PAGE_SHIFT)
len = size & ~PAGE_MASK;
else
len = PAGE_SIZE;
clear_page_dirty_for_io(page);
err = ext4_bio_w... | 8,404 |
5,696 | 0 | static TRBCCode xhci_disable_slot(XHCIState *xhci, unsigned int slotid)
{
int i;
trace_usb_xhci_slot_disable(slotid);
assert(slotid >= 1 && slotid <= xhci->numslots);
for (i = 1; i <= 31; i++) {
if (xhci->slots[slotid-1].eps[i-1]) {
xhci_disable_ep(xhci, slotid, i);
}
}... | 8,405 |
120,252 | 0 | RendererCapabilities::RendererCapabilities(ResourceFormat best_texture_format,
bool allow_partial_texture_updates,
bool using_offscreen_context3d,
int max_texture_size,
... | 8,406 |
25,068 | 0 | struct sock * __inet_lookup_established(struct net *net,
struct inet_hashinfo *hashinfo,
const __be32 saddr, const __be16 sport,
const __be32 daddr, const u16 hnum,
const int dif)
{
INET_ADDR_COOKIE(acookie, saddr, daddr)
const __portpair ports = INET_COMBINED_PORTS(sport, hnum);
struct sock ... | 8,407 |
159,298 | 0 | void WebGLRenderingContextBase::DrawElementsInstancedANGLE(GLenum mode,
GLsizei count,
GLenum type,
long long offset,
... | 8,408 |
1,265 | 0 | SplashScreen *Splash::getScreen() {
return state->screen;
}
| 8,409 |
167,340 | 0 | explicit FlashContentSettingsChangeWaiter(Profile* profile)
: profile_(profile) {
HostContentSettingsMapFactory::GetForProfile(profile)->AddObserver(this);
}
| 8,410 |
157,199 | 0 | void WebMediaPlayerImpl::EnableOverlay() {
overlay_enabled_ = true;
if (request_routing_token_cb_ &&
overlay_mode_ == OverlayMode::kUseAndroidOverlay) {
overlay_routing_token_is_pending_ = true;
token_available_cb_.Reset(
base::Bind(&WebMediaPlayerImpl::OnOverlayRoutingToken, AsWeakPtr()));
... | 8,411 |
177,601 | 0 | vpx_codec_err_t DecodeRemainingFrames() {
for (; video_->cxdata() != NULL; video_->Next()) {
const vpx_codec_err_t res =
decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
if (res != VPX_CODEC_OK)
return res;
CheckDecodedFrames();
}
return VPX_CODEC_OK;
}
| 8,412 |
112,662 | 0 | void DocumentLoader::handleSubstituteDataLoadSoon()
{
if (m_deferMainResourceDataLoad)
startDataLoadTimer();
else
handleSubstituteDataLoadNow(0);
}
| 8,413 |
71,186 | 0 | static void hardware_disable_nolock(void *junk)
{
int cpu = raw_smp_processor_id();
if (!cpumask_test_cpu(cpu, cpus_hardware_enabled))
return;
cpumask_clear_cpu(cpu, cpus_hardware_enabled);
kvm_arch_hardware_disable();
}
| 8,414 |
29,087 | 0 | bool kvm_largepages_enabled(void)
{
return largepages_enabled;
}
| 8,415 |
48,526 | 0 | static inline void ion_buffer_page_clean(struct page **page)
{
*page = (struct page *)((unsigned long)(*page) & ~(1UL));
}
| 8,416 |
122,988 | 0 | bool RenderWidgetHostImpl::IsMouseLocked() const {
return view_ ? view_->IsMouseLocked() : false;
}
| 8,417 |
69,424 | 0 | static void copy_sec_desc(const struct cifs_ntsd *pntsd,
struct cifs_ntsd *pnntsd, __u32 sidsoffset)
{
struct cifs_sid *owner_sid_ptr, *group_sid_ptr;
struct cifs_sid *nowner_sid_ptr, *ngroup_sid_ptr;
/* copy security descriptor control portion */
pnntsd->revision = pntsd->revision;
pnntsd->type = pntsd->type... | 8,418 |
181,333 | 1 | void svc_rdma_xdr_encode_reply_array(struct rpcrdma_write_array *ary,
int chunks)
{
ary->wc_discrim = xdr_one;
ary->wc_nchunks = cpu_to_be32(chunks);
}
| 8,419 |
68,804 | 0 | static ssize_t k90_store_macro_mode(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
int ret;
struct usb_interface *usbif = to_usb_interface(dev->parent);
struct usb_device *usbdev = interface_to_usbdev(usbif);
__u16 value;
if (strncmp(buf, "SW", 2) == 0)
valu... | 8,420 |
89,765 | 0 | static void save_nonewprivs(void) {
if (arg_nonewprivs == 0)
return;
FILE *fp = fopen(RUN_NONEWPRIVS_CFG, "wxe");
if (fp) {
fprintf(fp, "\n");
SET_PERMS_STREAM(fp, 0, 0, 0644); // assume mode 0644
fclose(fp);
}
else {
fprintf(stderr, "Error: cannot save nonewprivs state\n");
exit(1);
}
}
| 8,421 |
53,884 | 0 | void __init acpi_osi_setup(char *str)
{
struct osi_setup_entry *osi;
bool enable = true;
int i;
if (!acpi_gbl_create_osi_method)
return;
if (str == NULL || *str == '\0') {
printk(KERN_INFO PREFIX "_OSI method disabled\n");
acpi_gbl_create_osi_method = FALSE;
return;
}
if (*str == '!') {
str++;
if ... | 8,422 |
48,518 | 0 | bool ion_buffer_cached(struct ion_buffer *buffer)
{
return !!(buffer->flags & ION_FLAG_CACHED);
}
| 8,423 |
154,328 | 0 | static void RebindCurrentFramebuffer(gl::GLApi* api,
GLenum target,
Framebuffer* framebuffer,
GLuint back_buffer_service_id) {
GLuint framebuffer_id = framebuffer ? framebuffer->service_id() : 0;
if (fram... | 8,424 |
62,840 | 0 | static void bio_release_pages(struct bio *bio)
{
struct bio_vec *bvec;
int i;
bio_for_each_segment_all(bvec, bio, i) {
struct page *page = bvec->bv_page;
if (page)
put_page(page);
}
}
| 8,425 |
141,195 | 0 | void Document::RemoveAXContext(AXContext* context) {
auto** iter =
std::find_if(ax_contexts_.begin(), ax_contexts_.end(),
[&context](const auto& item) { return item == context; });
if (iter != ax_contexts_.end())
ax_contexts_.erase(iter);
if (ax_contexts_.size() == 0)
ClearAXObjec... | 8,426 |
52,942 | 0 | static int qib_open(struct inode *in, struct file *fp)
{
/* The real work is performed later in qib_assign_ctxt() */
fp->private_data = kzalloc(sizeof(struct qib_filedata), GFP_KERNEL);
if (fp->private_data) /* no cpu affinity by default */
((struct qib_filedata *)fp->private_data)->rec_cpu_num = -1;
return fp->p... | 8,427 |
153,787 | 0 | void GLES2Implementation::PathCommandsCHROMIUM(GLuint path,
GLsizei num_commands,
const GLubyte* commands,
GLsizei num_coords,
GLenu... | 8,428 |
15,548 | 0 | mux_tty_alloc_failed(Channel *c)
{
Buffer m;
Channel *mux_chan;
debug3("%s: channel %d: TTY alloc failed", __func__, c->self);
if ((mux_chan = channel_by_id(c->ctl_chan)) == NULL)
fatal("%s: channel %d missing mux channel %d",
__func__, c->self, c->ctl_chan);
/* Append exit message packet to control soc... | 8,429 |
93,843 | 0 | virDomainLookupByUUIDString(virConnectPtr conn, const char *uuidstr)
{
unsigned char uuid[VIR_UUID_BUFLEN];
VIR_DEBUG("conn=%p, uuidstr=%s", conn, NULLSTR(uuidstr));
virResetLastError();
virCheckConnectReturn(conn, NULL);
virCheckNonNullArgGoto(uuidstr, error);
if (virUUIDParse(uuidstr, uuid)... | 8,430 |
12,457 | 0 | int SRP_Verify_A_mod_N(BIGNUM *A, BIGNUM *N)
{
/* Checks if A % N == 0 */
return SRP_Verify_B_mod_N(A,N) ;
}
| 8,431 |
32,982 | 0 | int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp)
{
struct sctp_association *asoc = sctp_id2assoc(sk, id);
struct socket *sock;
struct sctp_af *af;
int err = 0;
if (!asoc)
return -EINVAL;
/* An association cannot be branched off from an already peeled-off
* socket, nor is this sup... | 8,432 |
128,829 | 0 | gfx::SwapResult GLSurfaceOzoneSurfacelessSurfaceImpl::SwapBuffers() {
if (!images_[current_surface_]->ScheduleOverlayPlane(
widget_, 0, OverlayTransform::OVERLAY_TRANSFORM_NONE,
gfx::Rect(GetSize()), gfx::RectF(1, 1)))
return gfx::SwapResult::SWAP_FAILED;
gfx::SwapResult result = GLSurfaceOz... | 8,433 |
58,586 | 0 | SecurityFunctionTableA* SEC_ENTRY InitSecurityInterfaceA(void)
{
return &SSPI_SecurityFunctionTableA;
}
| 8,434 |
145,492 | 0 | void ResourceDispatcherHostImpl::EnableStaleWhileRevalidateForTesting() {
if (!async_revalidation_manager_)
async_revalidation_manager_.reset(new AsyncRevalidationManager);
}
| 8,435 |
158,578 | 0 | void WebLocalFrameImpl::SetIsolatedWorldSecurityOrigin(
int world_id,
const WebSecurityOrigin& security_origin) {
DCHECK(GetFrame());
DOMWrapperWorld::SetIsolatedWorldSecurityOrigin(
world_id,
security_origin.Get() ? security_origin.Get()->IsolatedCopy() : nullptr);
}
| 8,436 |
22,995 | 0 | static int decode_attr_mode(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *mode)
{
__be32 *p;
*mode = 0;
if (unlikely(bitmap[1] & (FATTR4_WORD1_MODE - 1U)))
return -EIO;
if (likely(bitmap[1] & FATTR4_WORD1_MODE)) {
READ_BUF(4);
READ32(*mode);
*mode &= ~S_IFMT;
bitmap[1] &= ~FATTR4_WORD1_MODE;
}
dp... | 8,437 |
5,569 | 0 | static inline int unhex(int c)
{
if (c >= '0' && c <= '9')
return c - '0';
if (c >= 'A' && c <= 'Z')
return c - 'A' + 10;
return c - 'a' + 10;
}
| 8,438 |
120,972 | 0 | bool SocketStream::is_secure() const {
return url_.SchemeIs("wss");
}
| 8,439 |
146,105 | 0 | ScriptValue WebGL2RenderingContextBase::getSamplerParameter(
ScriptState* script_state,
WebGLSampler* sampler,
GLenum pname) {
if (isContextLost() || !ValidateWebGLObject("getSamplerParameter", sampler))
return ScriptValue::CreateNull(script_state);
switch (pname) {
case GL_TEXTURE_COMPARE_FUNC... | 8,440 |
56,469 | 0 | unsigned long copy_vsx_from_user(struct task_struct *task,
void __user *from)
{
u64 buf[ELF_NVSRHALFREG];
int i;
if (__copy_from_user(buf, from, ELF_NVSRHALFREG * sizeof(double)))
return 1;
for (i = 0; i < ELF_NVSRHALFREG ; i++)
task->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i];
return 0;
}
| 8,441 |
124,359 | 0 | void BrowserEventRouter::DispatchEvent(
Profile* profile,
const char* event_name,
scoped_ptr<ListValue> args,
EventRouter::UserGestureState user_gesture) {
if (!profile_->IsSameProfile(profile) ||
!extensions::ExtensionSystem::Get(profile)->event_router())
return;
scoped_ptr<Event> event... | 8,442 |
3,375 | 0 | static void php_apache_ini_dtor(request_rec *r, request_rec *p TSRMLS_DC)
{
if (strcmp(r->protocol, "INCLUDED")) {
zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try();
} else {
typedef struct {
HashTable config;
} php_conf_rec;
char *str;
uint str_len;
php_conf_rec *c = ap_get_module_config(r->per_dir... | 8,443 |
118,967 | 0 | void WebContentsImpl::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
switch (type) {
case NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED: {
RenderWidgetHost* host = Source<RenderWidgetHost>(source).ptr();
... | 8,444 |
116,564 | 0 | virtual void TestInterstitialPageDeleted(TestInterstitialPage* interstitial) {
DCHECK(interstitial_page_ == interstitial);
interstitial_page_ = NULL;
}
| 8,445 |
167,167 | 0 | void HTMLMediaElement::AudioSourceProviderImpl::ProvideInput(
AudioBus* bus,
size_t frames_to_process) {
DCHECK(bus);
MutexTryLocker try_locker(provide_input_lock);
if (!try_locker.Locked() || !web_audio_source_provider_ || !client_.Get()) {
bus->Zero();
return;
}
size_t n = bus->NumberOfCha... | 8,446 |
79,823 | 0 | static void dispose_list(struct list_head *head)
{
while (!list_empty(head)) {
struct inode *inode;
inode = list_first_entry(head, struct inode, i_lru);
list_del_init(&inode->i_lru);
evict(inode);
cond_resched();
}
}
| 8,447 |
89,785 | 0 | resolve_symlinks_in_ops (void)
{
SetupOp *op;
for (op = ops; op != NULL; op = op->next)
{
const char *old_source;
switch (op->type)
{
case SETUP_RO_BIND_MOUNT:
case SETUP_DEV_BIND_MOUNT:
case SETUP_BIND_MOUNT:
old_source = op->source;
op->source ... | 8,448 |
40,187 | 0 | static void __net_exit raw6_exit_net(struct net *net)
{
remove_proc_entry("raw6", net->proc_net);
}
| 8,449 |
47,441 | 0 | static inline void padlock_store_cword(struct cword *cword)
{
per_cpu(paes_last_cword, raw_smp_processor_id()) = cword;
}
| 8,450 |
183,202 | 1 | ieee802_15_4_if_print(netdissect_options *ndo,
const struct pcap_pkthdr *h, const u_char *p)
{
u_int caplen = h->caplen;
int hdrlen;
uint16_t fc;
uint8_t seq;
if (caplen < 3) {
ND_PRINT((ndo, "[|802.15.4] %x", caplen));
return caplen;
}
fc = EXTRACT_LE_16BITS(p);
hdrlen = extract_header_length(fc);
seq = EXTRACT_... | 8,451 |
104,011 | 0 | void GLES2DecoderImpl::DoDeleteSharedIdsCHROMIUM(
GLuint namespace_id, GLsizei n, const GLuint* ids) {
IdAllocatorInterface* id_allocator = group_->GetIdAllocator(namespace_id);
for (GLsizei ii = 0; ii < n; ++ii) {
id_allocator->FreeID(ids[ii]);
}
}
| 8,452 |
172,310 | 0 | static void on_alert_data(wifi_request_id id, char *buffer, int buffer_size, int err_code){
JNIHelper helper(mVM);
ALOGD("on_alert_data called, vm = %p, obj = %p, buffer_size = %d, error code = %d"
, mVM, mCls, buffer_size, err_code);
if (buffer_size > 0) {
JNIObject<jbyteArray> records = helper.newByteArray(... | 8,453 |
172,542 | 0 | status_t StreamingProcessor::recordingStreamNeedsUpdate(
const Parameters ¶ms, bool *needsUpdate) {
status_t res;
if (needsUpdate == 0) {
ALOGE("%s: Camera %d: invalid argument", __FUNCTION__, mId);
return INVALID_OPERATION;
}
if (mRecordingStreamId == NO_STREAM) {
*needsUpdate = true;
return OK;
... | 8,454 |
73,392 | 0 | MagickExport char *GetNextImageProfile(const Image *image)
{
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
if (image->profiles == (SplayTreeInfo *) NULL)
return(... | 8,455 |
37,307 | 0 | static void vmx_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry)
{
if (func == 1 && nested)
entry->ecx |= bit(X86_FEATURE_VMX);
}
| 8,456 |
38,639 | 0 | release_thread(struct task_struct *t)
{
}
| 8,457 |
23,597 | 0 | static int multipath_message(struct dm_target *ti, unsigned argc, char **argv)
{
int r = -EINVAL;
struct dm_dev *dev;
struct multipath *m = (struct multipath *) ti->private;
action_fn action;
mutex_lock(&m->work_mutex);
if (dm_suspended(ti)) {
r = -EBUSY;
goto out;
}
if (argc == 1) {
if (!strcasecmp(ar... | 8,458 |
70,981 | 0 | void Type_Curve_Free(struct _cms_typehandler_struct* self, void* Ptr)
{
cmsToneCurve* gamma = (cmsToneCurve*) Ptr;
cmsFreeToneCurve(gamma);
return;
cmsUNUSED_PARAMETER(self);
}
| 8,459 |
68,561 | 0 | gst_asf_demux_mark_discont (GstASFDemux * demux)
{
guint n;
GST_DEBUG_OBJECT (demux, "Mark stream discont");
for (n = 0; n < demux->num_streams; n++)
demux->stream[n].discont = TRUE;
}
| 8,460 |
90,507 | 0 | static int smaps_hugetlb_range(pte_t *pte, unsigned long hmask,
unsigned long addr, unsigned long end,
struct mm_walk *walk)
{
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
struct page *page = NULL;
if (pte_present(*pte)) {
page = vm_normal_page(vma, addr, *pte);
... | 8,461 |
127,546 | 0 | BackingStoreEvents(Display* d, Picture pic, Pixmap pix,
const base::Closure& c)
: display(d),
picture(pic),
pixmap(pix),
closure(c) {
}
| 8,462 |
53,063 | 0 | void bpf_prog_put(struct bpf_prog *prog)
{
if (atomic_dec_and_test(&prog->aux->refcnt))
__prog_put_common(&prog->aux->rcu);
}
| 8,463 |
25,595 | 0 | static int fld0(struct sh_fpu_soft_struct *fregs, int n)
{
FRn = 0;
return 0;
}
| 8,464 |
39,593 | 0 | static void aio_nr_sub(unsigned nr)
{
spin_lock(&aio_nr_lock);
if (WARN_ON(aio_nr - nr > aio_nr))
aio_nr = 0;
else
aio_nr -= nr;
spin_unlock(&aio_nr_lock);
}
| 8,465 |
149,464 | 0 | void ContentSecurityPolicy::reportInvalidDirectiveValueCharacter(
const String& directiveName,
const String& value) {
String message = "The value for Content Security Policy directive '" +
directiveName + "' contains an invalid character: '" +
value +
"... | 8,466 |
33,624 | 0 | crypto_cert_iteration_next(krb5_context context,
pkinit_cert_iter_handle ih,
pkinit_cert_handle *ch_ret)
{
struct _pkinit_cert_iter_data *id = (struct _pkinit_cert_iter_data *)ih;
struct _pkinit_cert_data *cd;
pkinit_identity_crypto_context id_cryptoctx;... | 8,467 |
85,861 | 0 | static int clone_bio(struct dm_target_io *tio, struct bio *bio,
sector_t sector, unsigned len)
{
struct bio *clone = &tio->clone;
__bio_clone_fast(clone, bio);
if (unlikely(bio_integrity(bio) != NULL)) {
int r;
if (unlikely(!dm_target_has_integrity(tio->ti->type) &&
!dm_target_passes_integrity(... | 8,468 |
142,671 | 0 | SubstituteData FrameLoader::defaultSubstituteDataForURL(const KURL& url)
{
if (!shouldTreatURLAsSrcdocDocument(url))
return SubstituteData();
String srcdoc = m_frame->deprecatedLocalOwner()->fastGetAttribute(srcdocAttr);
ASSERT(!srcdoc.isNull());
CString encodedSrcdoc = srcdoc.utf8();
return... | 8,469 |
120,591 | 0 | bool Element::rareDataChildrenAffectedByDirectAdjacentRules() const
{
ASSERT(hasRareData());
return elementRareData()->childrenAffectedByDirectAdjacentRules();
}
| 8,470 |
73,001 | 0 | static int jpc_dec_process_siz(jpc_dec_t *dec, jpc_ms_t *ms)
{
jpc_siz_t *siz = &ms->parms.siz;
int compno;
int tileno;
jpc_dec_tile_t *tile;
jpc_dec_tcomp_t *tcomp;
int htileno;
int vtileno;
jpc_dec_cmpt_t *cmpt;
size_t size;
dec->xstart = siz->xoff;
dec->ystart = siz->yoff;
dec->xend = siz->width;
dec->... | 8,471 |
176,233 | 0 | static Handle<FixedArray> CreateListFromArrayImpl(Isolate* isolate,
Handle<JSArray> array) {
UNREACHABLE();
return Handle<FixedArray>();
}
| 8,472 |
100,635 | 0 | bool CSSStyleSheet::parseString(const String &string, bool strict)
{
setStrictParsing(strict);
CSSParser p(strict);
p.parseSheet(this, string);
return true;
}
| 8,473 |
41,156 | 0 | static void tcp_grow_window(struct sock *sk, const struct sk_buff *skb)
{
struct tcp_sock *tp = tcp_sk(sk);
/* Check #1 */
if (tp->rcv_ssthresh < tp->window_clamp &&
(int)tp->rcv_ssthresh < tcp_space(sk) &&
!tcp_memory_pressure) {
int incr;
/* Check #2. Increase window, if skb with such overhead
*... | 8,474 |
182,586 | 1 | void f2fs_wait_discard_bios(struct f2fs_sb_info *sbi)
{
__issue_discard_cmd(sbi, false);
__drop_discard_cmd(sbi);
__wait_discard_cmd(sbi, false);
}
| 8,475 |
32,756 | 0 | static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct tg3 *tp = netdev_priv(dev);
u32 speed = ethtool_cmd_speed(cmd);
if (tg3_flag(tp, USE_PHYLIB)) {
struct phy_device *phydev;
if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED))
return -EAGAIN;
phydev = tp->mdio_bus->phy_map[TG3... | 8,476 |
68,875 | 0 | static int enable_cpucache(struct kmem_cache *cachep, gfp_t gfp)
{
int err;
int limit = 0;
int shared = 0;
int batchcount = 0;
err = cache_random_seq_create(cachep, cachep->num, gfp);
if (err)
goto end;
if (!is_root_cache(cachep)) {
struct kmem_cache *root = memcg_root_cache(cachep);
limit = root->limit;... | 8,477 |
128,547 | 0 | void Instance::DidChangeView(const pp::View& view) {
pp::Rect view_rect(view.GetRect());
float device_scale = 1.0f;
float old_device_scale = device_scale_;
if (hidpi_enabled_)
device_scale = view.GetDeviceScale();
pp::Size view_device_size(view_rect.width() * device_scale,
view... | 8,478 |
30,839 | 0 | static void hash_release(void *private)
{
crypto_free_ahash(private);
}
| 8,479 |
93,981 | 0 | PHP_METHOD(HttpParams, offsetExists)
{
char *name_str;
int name_len;
zval **zparam, *zparams;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name_str, &name_len)) {
return;
}
zparams = php_http_ztyp(IS_ARRAY, zend_read_property(php_http_params_class_entry, getThis(), ZEND_STRL("params")... | 8,480 |
9,214 | 0 | hwaddr virtio_queue_get_avail_size(VirtIODevice *vdev, int n)
{
return offsetof(VRingAvail, ring) +
sizeof(uint16_t) * vdev->vq[n].vring.num;
}
| 8,481 |
113,585 | 0 | bool AccessibilityUIElement::isChecked() const
{
return checkElementState(m_element, ATK_STATE_CHECKED);
}
| 8,482 |
158,118 | 0 | void LocalFrameClientImpl::ScrollRectToVisibleInParentFrame(
const WebRect& rect_to_scroll,
const WebScrollIntoViewParams& params) {
web_frame_->Client()->ScrollRectToVisibleInParentFrame(rect_to_scroll,
params);
}
| 8,483 |
10,152 | 0 | Ins_ROLL( INS_ARG )
{
FT_Long A, B, C;
FT_UNUSED_EXEC;
A = args[2];
B = args[1];
C = args[0];
args[2] = C;
args[1] = A;
args[0] = B;
}
| 8,484 |
56,754 | 0 | static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
u16 portchange)
{
int status, i;
unsigned unit_load;
struct usb_device *hdev = hub->hdev;
struct usb_hcd *hcd = bus_to_hcd(hdev->bus);
struct usb_port *port_dev = hub->ports[port1 - 1];
struct usb_device *udev = port_dev->child;
stati... | 8,485 |
134,122 | 0 | void InputMethodIBus::UpdateContextFocusState() {
const bool old_context_focused = context_focused_;
switch (GetTextInputType()) {
case TEXT_INPUT_TYPE_NONE:
case TEXT_INPUT_TYPE_PASSWORD:
context_focused_ = false;
break;
default:
context_focused_ = true;
break;
}
if (!GetEng... | 8,486 |
14,672 | 0 | int phar_detect_phar_fname_ext(const char *filename, int filename_len, const char **ext_str, int *ext_len, int executable, int for_create, int is_complete TSRMLS_DC) /* {{{ */
{
const char *pos, *slash;
*ext_str = NULL;
*ext_len = 0;
if (!filename_len || filename_len == 1) {
return FAILURE;
}
phar_request_in... | 8,487 |
48,067 | 0 | static bool nested_cr4_valid(struct kvm_vcpu *vcpu, unsigned long val)
{
u64 fixed0 = to_vmx(vcpu)->nested.nested_vmx_cr4_fixed0;
u64 fixed1 = to_vmx(vcpu)->nested.nested_vmx_cr4_fixed1;
return fixed_bits_valid(val, fixed0, fixed1);
}
| 8,488 |
22,945 | 0 | nfs4_insert_state_owner(struct nfs_client *clp, struct nfs4_state_owner *new)
{
struct rb_node **p = &clp->cl_state_owners.rb_node,
*parent = NULL;
struct nfs4_state_owner *sp;
while (*p != NULL) {
parent = *p;
sp = rb_entry(parent, struct nfs4_state_owner, so_client_node);
if (new->so_server < sp->... | 8,489 |
85,289 | 0 | int recover_inode_page(struct f2fs_sb_info *sbi, struct page *page)
{
struct f2fs_inode *src, *dst;
nid_t ino = ino_of_node(page);
struct node_info old_ni, new_ni;
struct page *ipage;
get_node_info(sbi, ino, &old_ni);
if (unlikely(old_ni.blk_addr != NULL_ADDR))
return -EINVAL;
retry:
ipage = f2fs_grab_cache_... | 8,490 |
51,467 | 0 | static gdImagePtr _gd2CreateFromFile (gdIOCtxPtr in, int *sx, int *sy, int *cs, int *vers, int *fmt, int *ncx, int *ncy, t_chunk_info ** cidx)
{
gdImagePtr im;
if (_gd2GetHeader (in, sx, sy, cs, vers, fmt, ncx, ncy, cidx) != 1) {
GD2_DBG(php_gd_error("Bad GD2 header"));
goto fail1;
}
if (gd2_truecolor(*fmt)) ... | 8,491 |
117,336 | 0 | xmlXPtrRangeCheckOrder(xmlXPathObjectPtr range) {
int tmp;
xmlNodePtr tmp2;
if (range == NULL)
return;
if (range->type != XPATH_RANGE)
return;
if (range->user2 == NULL)
return;
tmp = xmlXPtrCmpPoints(range->user, range->index,
range->user2, range->index2);
if (tmp ==... | 8,492 |
51,731 | 0 | proto_register_pktap(void)
{
static hf_register_info hf[] = {
{ &hf_pktap_hdrlen,
{ "Header length", "pktap.hdrlen",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_pktap_rectype,
{ "Record type", "pktap.rectype",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_pktap_dlt,... | 8,493 |
15,809 | 0 | int ctdb_tcp_listen(struct ctdb_context *ctdb)
{
struct ctdb_tcp *ctcp = talloc_get_type(ctdb->private_data,
struct ctdb_tcp);
ctdb_sock_addr sock;
int sock_size;
int one = 1;
struct tevent_fd *fde;
/* we can either auto-bind to the first available address, or we can
use a specified address */
... | 8,494 |
2,839 | 0 | nm_setting_vpn_foreach_secret (NMSettingVPN *setting,
NMVPNIterFunc func,
gpointer user_data)
{
g_return_if_fail (setting != NULL);
g_return_if_fail (NM_IS_SETTING_VPN (setting));
foreach_item_helper (NM_SETTING_VPN_GET_PRIVATE (setting)->secrets, func, ... | 8,495 |
103,030 | 0 | virtual int GetDragActions() const { return 0; }
| 8,496 |
160,628 | 0 | void RenderFrameImpl::InitializeUserMediaClient() {
RenderThreadImpl* render_thread = RenderThreadImpl::current();
if (!render_thread) // Will be NULL during unit tests.
return;
#if BUILDFLAG(ENABLE_WEBRTC)
DCHECK(!web_user_media_client_);
web_user_media_client_ = new UserMediaClientImpl(
this, Rend... | 8,497 |
142,209 | 0 | bool PrepareTestEntries(Profile* profile) {
if (!CreateRootDirectory(profile))
return false;
CreateEntry(AddEntriesMessage::TestEntryInfo(AddEntriesMessage::FILE,
"text.txt", "hello.txt")
.SetMimeType("text/plain"));
CreateEntry(A... | 8,498 |
3,959 | 0 | GooString *Stream::getPSFilter(int psLevel, const char *indent) {
return new GooString();
}
| 8,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.