unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
1,110 | 0 | GfxState *GfxState::restore() {
GfxState *oldState;
if (saved) {
oldState = saved;
oldState->path = path;
oldState->curX = curX;
oldState->curY = curY;
oldState->lineX = lineX;
oldState->lineY = lineY;
path = NULL;
saved = NULL;
delete this;
} else {
oldState = this;
... | 4,900 |
12,729 | 0 | static int version_cmp(const SSL *s, int a, int b)
{
int dtls = SSL_IS_DTLS(s);
if (a == b)
return 0;
if (!dtls)
return a < b ? -1 : 1;
return DTLS_VERSION_LT(a, b) ? -1 : 1;
}
| 4,901 |
81,058 | 0 | vmx_restore_control_msr(struct vcpu_vmx *vmx, u32 msr_index, u64 data)
{
u64 supported;
u32 *lowp, *highp;
switch (msr_index) {
case MSR_IA32_VMX_TRUE_PINBASED_CTLS:
lowp = &vmx->nested.msrs.pinbased_ctls_low;
highp = &vmx->nested.msrs.pinbased_ctls_high;
break;
case MSR_IA32_VMX_TRUE_PROCBASED_CTLS:
lowp... | 4,902 |
169,971 | 0 | profCallgraphAdd(xsltTemplatePtr templ, xsltTemplatePtr parent)
{
int i;
if (templ->templMax == 0) {
templ->templMax = 4;
templ->templCalledTab =
(xsltTemplatePtr *) xmlMalloc(templ->templMax *
sizeof(templ->templCalledTab[0]));
temp... | 4,903 |
110,978 | 0 | void RootWindowHostWin::OnPaint(HDC dc) {
root_window_->Draw();
ValidateRect(hwnd(), NULL);
}
| 4,904 |
111,351 | 0 | void WebPage::setInitialScale(double initialScale)
{
d->setInitialScale(initialScale);
}
| 4,905 |
129,832 | 0 | void TraceEvent::Reset() {
duration_ = TimeDelta::FromInternalValue(-1);
parameter_copy_storage_ = NULL;
for (int i = 0; i < kTraceMaxNumArgs; ++i)
convertable_values_[i] = NULL;
}
| 4,906 |
58,378 | 0 | static void dump_mem(const char *lvl, const char *str, unsigned long bottom,
unsigned long top)
{
unsigned long first;
mm_segment_t fs;
int i;
/*
* We need to switch to kernel mode so that we can use __get_user
* to safely read from kernel space. Note that we now dump the
* code first, just in case t... | 4,907 |
127,368 | 0 | void StyleResolver::applyPropertiesToStyle(const CSSPropertyValue* properties, size_t count, RenderStyle* style)
{
StyleResolverState state(document(), document().documentElement(), style);
state.setStyle(style);
state.fontBuilder().initForStyleResolve(document(), style, state.useSVGZoomRules());
for ... | 4,908 |
137,064 | 0 | ChromeClient* InputType::GetChromeClient() const {
if (Page* page = GetElement().GetDocument().GetPage())
return &page->GetChromeClient();
return nullptr;
}
| 4,909 |
126,079 | 0 | BrowserOpenedNotificationObserver::~BrowserOpenedNotificationObserver() {
}
| 4,910 |
163,873 | 0 | void DevToolsWindow::HandleKeyboardEvent(
WebContents* source,
const content::NativeWebKeyboardEvent& event) {
if (event.windows_key_code == 0x08) {
return;
}
BrowserWindow* inspected_window = GetInspectedBrowserWindow();
if (inspected_window)
inspected_window->HandleKeyboardEvent(event);
}
| 4,911 |
67,811 | 0 | static int xfrm_dump_policy_done(struct netlink_callback *cb)
{
struct xfrm_policy_walk *walk = (struct xfrm_policy_walk *) &cb->args[1];
struct net *net = sock_net(cb->skb->sk);
xfrm_policy_walk_done(walk, net);
return 0;
}
| 4,912 |
168,407 | 0 | ui::WindowShowState TestBrowserWindow::GetRestoredState() const {
return ui::SHOW_STATE_DEFAULT;
}
| 4,913 |
140,137 | 0 | void HTMLMediaElement::updateControlsVisibility() {
if (!isConnected()) {
if (mediaControls())
mediaControls()->hide();
return;
}
ensureMediaControls();
mediaControls()->reset();
if (shouldShowControls(RecordMetricsBehavior::DoRecord))
mediaControls()->show();
else
mediaControls()->h... | 4,914 |
24,425 | 0 | int proc_dointvec_minmax(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
struct do_proc_dointvec_minmax_conv_param param = {
.min = (int *) table->extra1,
.max = (int *) table->extra2,
};
return do_proc_dointvec(table, write, buffer, lenp, ppos,
do_proc_dointvec_min... | 4,915 |
87,970 | 0 | static int pcd_drive_status(struct cdrom_device_info *cdi, int slot_nr)
{
char rc_cmd[12] = { 0x25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
struct pcd_unit *cd = cdi->handle;
if (pcd_ready_wait(cd, PCD_READY_TMO))
return CDS_DRIVE_NOT_READY;
if (pcd_atapi(cd, rc_cmd, 8, pcd_scratch, DBMSG("check media")))
return CD... | 4,916 |
169,126 | 0 | static bool TokenExitsInSelect(const CompactHTMLToken& token) {
const String& tag_name = token.Data();
return ThreadSafeMatch(tag_name, inputTag) ||
ThreadSafeMatch(tag_name, keygenTag) ||
ThreadSafeMatch(tag_name, textareaTag);
}
| 4,917 |
133,911 | 0 | ValidityState* FormAssociatedElement::validity()
{
if (!m_validityState)
m_validityState = ValidityState::create(this);
return m_validityState.get();
}
| 4,918 |
165,048 | 0 | bool HTMLCanvasElement::WouldTaintOrigin() const {
return !OriginClean();
}
| 4,919 |
58,946 | 0 | static inline int l2cap_get_conf_opt(void **ptr, int *type, int *olen, unsigned long *val)
{
struct l2cap_conf_opt *opt = *ptr;
int len;
len = L2CAP_CONF_OPT_SIZE + opt->len;
*ptr += len;
*type = opt->type;
*olen = opt->len;
switch (opt->len) {
case 1:
*val = *((u8 *) opt->val);
break;
case 2:
*val =... | 4,920 |
121,411 | 0 | GURL DevToolsWindow::GetDevToolsURL(Profile* profile,
const GURL& base_url,
DevToolsDockSide dock_side,
bool shared_worker_frontend,
bool external_frontend) {
if (base_url.Sc... | 4,921 |
66,432 | 0 | static inline bool use_goto_tb(DisasContext *s, target_ulong pc)
{
#ifndef CONFIG_USER_ONLY
return (pc & TARGET_PAGE_MASK) == (s->tb->pc & TARGET_PAGE_MASK) ||
(pc & TARGET_PAGE_MASK) == (s->pc_start & TARGET_PAGE_MASK);
#else
return true;
#endif
}
| 4,922 |
61,997 | 0 | ikev1_print(netdissect_options *ndo,
const u_char *bp, u_int length,
const u_char *bp2, struct isakmp *base)
{
const struct isakmp *p;
const u_char *ep;
u_char np;
int i;
int phase;
p = (const struct isakmp *)bp;
ep = ndo->ndo_snapend;
phase = (EXTRACT_32BITS(base->msgid) == 0) ? 1 : 2;
if (phase ... | 4,923 |
166,712 | 0 | void ThreadHeap::VerifyMarking() {
for (int i = 0; i < BlinkGC::kNumberOfArenas; ++i) {
arenas_[i]->VerifyMarking();
}
}
| 4,924 |
128,171 | 0 | void PluginDataRemover::GetSupportedPlugins(
std::vector<WebPluginInfo>* supported_plugins) {
bool allow_wildcard = false;
std::vector<WebPluginInfo> plugins;
PluginService::GetInstance()->GetPluginInfoArray(
GURL(), kFlashPluginSwfMimeType, allow_wildcard, &plugins, NULL);
Version min_version(kMinFla... | 4,925 |
40,083 | 0 | int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *data)
{
struct compat_cmsghdr __user *cm = (struct compat_cmsghdr __user *) kmsg->msg_control;
struct compat_cmsghdr cmhdr;
struct compat_timeval ctv;
struct compat_timespec cts[3];
int cmlen;
if (cm == NULL || kmsg->msg_controllen < si... | 4,926 |
154,734 | 0 | error::Error GLES2DecoderPassthroughImpl::DoIsEnabled(GLenum cap,
uint32_t* result) {
*result = api()->glIsEnabledFn(cap);
return error::kNoError;
}
| 4,927 |
63,943 | 0 | static void reinit_tables(SCPRContext *s)
{
int comp, i, j;
for (comp = 0; comp < 3; comp++) {
for (j = 0; j < 4096; j++) {
if (s->pixel_model[comp][j].total_freq != 256) {
for (i = 0; i < 256; i++)
s->pixel_model[comp][j].freq[i] = 1;
for... | 4,928 |
93,642 | 0 | nvmet_fc_unregister_targetport(struct nvmet_fc_target_port *target_port)
{
struct nvmet_fc_tgtport *tgtport = targetport_to_tgtport(target_port);
/* terminate any outstanding associations */
__nvmet_fc_free_assocs(tgtport);
nvmet_fc_tgtport_put(tgtport);
return 0;
}
| 4,929 |
122,685 | 0 | bool Extension::LoadLaunchContainer(string16* error) {
Value* tmp_launcher_container = NULL;
if (!manifest_->Get(keys::kLaunchContainer, &tmp_launcher_container))
return true;
std::string launch_container_string;
if (!tmp_launcher_container->GetAsString(&launch_container_string)) {
*error = ASCIIToUTF1... | 4,930 |
21,471 | 0 | static unsigned long vma_dump_size(struct vm_area_struct *vma,
unsigned long mm_flags)
{
#define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type))
/* The vma can be set up to tell us the answer directly. */
if (vma->vm_flags & VM_ALWAYSDUMP)
goto whole;
/* Hugetlb memory check */
if (vma->vm_flags & VM... | 4,931 |
38,549 | 0 | __be64 rdma_get_service_id(struct rdma_cm_id *id, struct sockaddr *addr)
{
if (addr->sa_family == AF_IB)
return ((struct sockaddr_ib *) addr)->sib_sid;
return cpu_to_be64(((u64)id->ps << 16) + be16_to_cpu(cma_port(addr)));
}
| 4,932 |
168,037 | 0 | void AutofillManager::FillOrPreviewCreditCardForm(
AutofillDriver::RendererFormDataAction action,
int query_id,
const FormData& form,
const FormFieldData& field,
const CreditCard& credit_card) {
FormStructure* form_structure = nullptr;
AutofillField* autofill_field = nullptr;
if (!GetCachedFor... | 4,933 |
62,434 | 0 | pktap_header_print(netdissect_options *ndo, const u_char *bp, u_int length)
{
const pktap_header_t *hdr;
uint32_t dlt, hdrlen;
const char *dltname;
hdr = (const pktap_header_t *)bp;
dlt = EXTRACT_LE_32BITS(&hdr->pkt_dlt);
hdrlen = EXTRACT_LE_32BITS(&hdr->pkt_len);
dltname = pcap_datalink_val_to_name(dlt);
if ... | 4,934 |
56,758 | 0 | static void hub_port_logical_disconnect(struct usb_hub *hub, int port1)
{
dev_dbg(&hub->ports[port1 - 1]->dev, "logical disconnect\n");
hub_port_disable(hub, port1, 1);
/* FIXME let caller ask to power down the port:
* - some devices won't enumerate without a VBUS power cycle
* - SRP saves power that way
* ... | 4,935 |
174,002 | 0 | bool Block::IsKey() const {
return ((m_flags & static_cast<unsigned char>(1 << 7)) != 0);
}
| 4,936 |
174,219 | 0 | uint32_t Camera3Device::getDeviceVersion() {
ATRACE_CALL();
Mutex::Autolock il(mInterfaceLock);
return mDeviceVersion;
}
| 4,937 |
184,365 | 1 | ConflictResolver::ProcessSimpleConflict(WriteTransaction* trans,
const Id& id,
const Cryptographer* cryptographer,
StatusController* status) {
MutableEntry entry(trans, syncable::GET_BY_ID, id);
// Must be good as the entry won't have been cleaned up.
CHECK(entry.good());
// This function can only resolve simple confl... | 4,938 |
139,307 | 0 | bool HarfBuzzShaper::fillGlyphBuffer(GlyphBuffer* glyphBuffer)
{
ASSERT(glyphBuffer);
unsigned numRuns = m_harfBuzzRuns.size();
float advanceSoFar = 0;
for (unsigned runIndex = 0; runIndex < numRuns; ++runIndex) {
HarfBuzzRun* currentRun = m_harfBuzzRuns[m_run.ltr() ? runIndex : numRuns - runIn... | 4,939 |
121,284 | 0 | void HTMLInputElement::stepUp(int n, ExceptionCode& ec)
{
m_inputType->stepUp(n, ec);
}
| 4,940 |
121,934 | 0 | v8::Handle<v8::Value> V8DOMWindow::eventAttrGetterCustom(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8DOMWindow::GetTemplate(info.GetIsolate(), worldTypeInMainThread(info.GetIsolate())));
if (holder.IsEmpty())
ret... | 4,941 |
128,621 | 0 | ~FlagsStateSingleton() {}
| 4,942 |
58,749 | 0 | void tty_del_file(struct file *file)
{
struct tty_file_private *priv = file->private_data;
spin_lock(&tty_files_lock);
list_del(&priv->list);
spin_unlock(&tty_files_lock);
file->private_data = NULL;
kfree(priv);
}
| 4,943 |
65,316 | 0 | bool nfsd4_cache_this_op(struct nfsd4_op *op)
{
if (op->opnum == OP_ILLEGAL)
return false;
return OPDESC(op)->op_flags & OP_CACHEME;
}
| 4,944 |
72,789 | 0 | static int file_read(jas_stream_obj_t *obj, char *buf, int cnt)
{
jas_stream_fileobj_t *fileobj;
JAS_DBGLOG(100, ("file_read(%p, %p, %d)\n", obj, buf, cnt));
fileobj = JAS_CAST(jas_stream_fileobj_t *, obj);
return read(fileobj->fd, buf, cnt);
}
| 4,945 |
181,386 | 1 | static int get_registers(rtl8150_t * dev, u16 indx, u16 size, void *data)
{
return usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0),
RTL8150_REQ_GET_REGS, RTL8150_REQT_READ,
indx, 0, data, size, 500);
}
| 4,946 |
46,718 | 0 | static int sha256_init(struct shash_desc *desc)
{
struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
sctx->state[0] = SHA256_H0;
sctx->state[1] = SHA256_H1;
sctx->state[2] = SHA256_H2;
sctx->state[3] = SHA256_H3;
sctx->state[4] = SHA256_H4;
sctx->state[5] = SHA256_H5;
sctx->state[6] = SHA256_H6;
sctx->state[7]... | 4,947 |
80,152 | 0 | GF_Err gnrm_Size(GF_Box *s)
{
GF_GenericSampleEntryBox *ptr = (GF_GenericSampleEntryBox *)s;
s->type = GF_ISOM_BOX_TYPE_GNRM;
ptr->size += 8+ptr->data_size;
return GF_OK;
}
| 4,948 |
56,208 | 0 | static inline int armv8pmu_enable_intens(int idx)
{
u32 counter;
if (!armv8pmu_counter_valid(idx)) {
pr_err("CPU%u enabling wrong PMNC counter IRQ enable %d\n",
smp_processor_id(), idx);
return -EINVAL;
}
counter = ARMV8_IDX_TO_COUNTER(idx);
asm volatile("msr pmintenset_el1, %0" :: "r" (BIT(counter)));
r... | 4,949 |
17,764 | 0 | sort_min_max(INT16 *a, INT16 *b)
{
INT16 A, B;
if (*a < 0 || *b < 0)
return;
A = *a;
B = *b;
*a = min(A, B);
*b = max(A, B);
}
| 4,950 |
21,281 | 0 | static unsigned long zap_pte_range(struct mmu_gather *tlb,
struct vm_area_struct *vma, pmd_t *pmd,
unsigned long addr, unsigned long end,
struct zap_details *details)
{
struct mm_struct *mm = tlb->mm;
int force_flush = 0;
int rss[NR_MM_COUNTERS];
spinlock_t *ptl;
pte_t *start_pte;
pte_t *pte;
again:
... | 4,951 |
55,228 | 0 | static ssize_t ati_remote2_show_channel_mask(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct usb_device *udev = to_usb_device(dev);
struct usb_interface *intf = usb_ifnum_to_if(udev, 0);
struct ati_remote2 *ar2 = usb_get_intfdata(intf);
return sprintf(buf, "0x%04x\n", ar2... | 4,952 |
89,267 | 0 | static void TIFFIgnoreTags(TIFF *tiff)
{
char
*q;
const char
*p,
*tags;
Image
*image;
register ssize_t
i;
size_t
count;
TIFFFieldInfo
*ignore;
if (TIFFGetReadProc(tiff) != TIFFReadBlob)
return;
image=(Image *)TIFFClientdata(tiff);
tags=GetImageArtifact(image,"tiff:... | 4,953 |
53,088 | 0 | static int check_ld_imm(struct verifier_env *env, struct bpf_insn *insn)
{
struct reg_state *regs = env->cur_state.regs;
int err;
if (BPF_SIZE(insn->code) != BPF_DW) {
verbose("invalid BPF_LD_IMM insn\n");
return -EINVAL;
}
if (insn->off != 0) {
verbose("BPF_LD_IMM64 uses reserved fields\n");
return -EINV... | 4,954 |
94,317 | 0 | static void cfq_exit(struct io_context *ioc)
{
rcu_read_lock();
if (!hlist_empty(&ioc->cic_list)) {
struct cfq_io_context *cic;
cic = list_entry(ioc->cic_list.first, struct cfq_io_context,
cic_list);
cic->exit(ioc);
}
rcu_read_unlock();
}
| 4,955 |
164,673 | 0 | virtual ~ConnectionRequest() {}
| 4,956 |
148,766 | 0 | void InterstitialPageImpl::Disable() {
enabled_ = false;
static_cast<InterstitialPageNavigatorImpl*>(frame_tree_->root()->navigator())
->Disable();
}
| 4,957 |
106,179 | 0 | JSValue jsTestObjUnsignedLongSequenceAttr(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
UNUSED_PARAM(exec);
TestObj* impl = static_cast<TestObj*>(castedThis->impl());
JSValue result = jsArray(exec, castedThis->globalObject(), impl... | 4,958 |
126,434 | 0 | void BrowserWindowGtk::ShowDevToolsContainer() {
bool to_right = devtools_dock_side_ == DEVTOOLS_DOCK_SIDE_RIGHT;
gtk_paned_pack2(GTK_PANED(to_right ? contents_hsplit_ : contents_vsplit_),
devtools_container_->widget(),
FALSE,
TRUE);
UpdateDevToolsSplitPositio... | 4,959 |
37,504 | 0 | static void kvm_unlink_unsync_page(struct kvm *kvm, struct kvm_mmu_page *sp)
{
WARN_ON(!sp->unsync);
trace_kvm_mmu_sync_page(sp);
sp->unsync = 0;
--kvm->stat.mmu_unsync;
}
| 4,960 |
38,330 | 0 | static inline void bpf_flush_icache(void *start, void *end)
{
mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
smp_wmb();
flush_icache_range((unsigned long)start, (unsigned long)end);
set_fs(old_fs);
}
| 4,961 |
163,580 | 0 | htmlCreateFileParserCtxt(const char *filename, const char *encoding)
{
htmlParserCtxtPtr ctxt;
htmlParserInputPtr inputStream;
char *canonicFilename;
/* htmlCharEncoding enc; */
xmlChar *content, *content_line = (xmlChar *) "charset=";
if (filename == NULL)
return(NULL);
ctxt = htm... | 4,962 |
54,814 | 0 | static void snd_usbmidi_us122l_output(struct snd_usb_midi_out_endpoint *ep,
struct urb *urb)
{
int count;
if (!ep->ports[0].active)
return;
switch (snd_usb_get_speed(ep->umidi->dev)) {
case USB_SPEED_HIGH:
case USB_SPEED_SUPER:
count = 1;
break;
default:
count = 2;
}
count = snd_rawmidi_trans... | 4,963 |
65,690 | 0 | static void release_lock_stateid(struct nfs4_ol_stateid *stp)
{
struct nfs4_client *clp = stp->st_stid.sc_client;
bool unhashed;
spin_lock(&clp->cl_lock);
unhashed = unhash_lock_stateid(stp);
spin_unlock(&clp->cl_lock);
if (unhashed)
nfs4_put_stid(&stp->st_stid);
}
| 4,964 |
35,319 | 0 | static int ipgre_header(struct sk_buff *skb, struct net_device *dev,
unsigned short type,
const void *daddr, const void *saddr, unsigned int len)
{
struct ip_tunnel *t = netdev_priv(dev);
struct iphdr *iph = (struct iphdr *)skb_push(skb, t->hlen);
__be16 *p = (__be16*)(iph+1);
memcpy(iph, &t->parms.iph, size... | 4,965 |
94,730 | 0 | static int chown_common(struct path *path, uid_t user, gid_t group)
{
struct inode *inode = path->dentry->d_inode;
struct inode *delegated_inode = NULL;
int error;
struct iattr newattrs;
kuid_t uid;
kgid_t gid;
uid = make_kuid(current_user_ns(), user);
gid = make_kgid(current_user_ns(), group);
retry_deleg:
... | 4,966 |
171,070 | 0 | bool ID3::Iterator::done() const {
return mFrameData == NULL;
}
| 4,967 |
98,925 | 0 | void HTMLConstructionSite::insertForeignElement(AtomicHTMLToken& token, const AtomicString& namespaceURI)
{
ASSERT(token.type() == HTMLToken::StartTag);
notImplemented(); // parseError when xmlns or xmlns:xlink are wrong.
RefPtr<Element> element = attachToCurrent(createElement(token, namespaceURI));
if... | 4,968 |
53,145 | 0 | static u16 rtnl_calcit(struct sk_buff *skb, struct nlmsghdr *nlh)
{
struct net *net = sock_net(skb->sk);
struct net_device *dev;
struct nlattr *tb[IFLA_MAX+1];
u32 ext_filter_mask = 0;
u16 min_ifinfo_dump_size = 0;
int hdrlen;
/* Same kernel<->userspace interface hack as in rtnl_dump_ifinfo. */
hdrlen = nlmsg_... | 4,969 |
1,651 | 0 | clamp_pattern_bbox(gs_pattern1_instance_t * pinst, gs_rect * pbbox,
int width, int height, const gs_matrix * pmat)
{
double xstep = pinst->templat.XStep;
double ystep = pinst->templat.YStep;
double xmin = pbbox->q.x;
double xmax = pbbox->p.x;
double ymin = pbbox->q.y;
double ... | 4,970 |
149,440 | 0 | ContentSecurityPolicy::DirectiveType ContentSecurityPolicy::getDirectiveType(
const String& name) {
if (name == "base-uri")
return DirectiveType::BaseURI;
if (name == "block-all-mixed-content")
return DirectiveType::BlockAllMixedContent;
if (name == "child-src")
return DirectiveType::ChildSrc;
i... | 4,971 |
15,339 | 0 | static void xmlwriter_free_resource_ptr(xmlwriter_object *intern TSRMLS_DC)
{
if (intern) {
if (intern->ptr) {
xmlFreeTextWriter(intern->ptr);
intern->ptr = NULL;
}
if (intern->output) {
xmlBufferFree(intern->output);
intern->output = NULL;
}
efree(intern);
}
}
| 4,972 |
71,803 | 0 | static int WMFSeekBlob(void *image,long offset)
{
return((int) SeekBlob((Image *) image,(MagickOffsetType) offset,SEEK_SET));
}
| 4,973 |
155,719 | 0 | bool IsUsed(vr::EVRButtonId button_id) {
auto it = used_axes_.find(button_id);
return it != used_axes_.end();
}
| 4,974 |
175,813 | 0 | void ID3::Iterator::findFrame() {
for (;;) {
mFrameData = NULL;
mFrameSize = 0;
if (mParent.mVersion == ID3_V2_2) {
if (mOffset + 6 > mParent.mSize) {
return;
}
if (!memcmp(&mParent.mData[mOffset], "\0\0\0", 3)) {
return;
}
mFrameSize =
(mParent.mData[mOffset + 3] << 16)
| (mPar... | 4,975 |
144,506 | 0 | WebContentsImpl* WebContentsImpl::FromFrameTreeNode(
FrameTreeNode* frame_tree_node) {
return static_cast<WebContentsImpl*>(
WebContents::FromRenderFrameHost(frame_tree_node->current_frame_host()));
}
| 4,976 |
156,286 | 0 | const char* RendererSchedulerImpl::VirtualTimePolicyToString(
VirtualTimePolicy virtual_time_policy) {
switch (virtual_time_policy) {
case VirtualTimePolicy::kAdvance:
return "ADVANCE";
case VirtualTimePolicy::kPause:
return "PAUSE";
case VirtualTimePolicy::kDeterministicLoading:
ret... | 4,977 |
58,084 | 0 | static int snd_compr_open(struct inode *inode, struct file *f)
{
struct snd_compr *compr;
struct snd_compr_file *data;
struct snd_compr_runtime *runtime;
enum snd_compr_direction dirn;
int maj = imajor(inode);
int ret;
if ((f->f_flags & O_ACCMODE) == O_WRONLY)
dirn = SND_COMPRESS_PLAYBACK;
else if ((f->f_fla... | 4,978 |
20,694 | 0 | static void fx_free(struct kvm_vcpu *vcpu)
{
fpu_free(&vcpu->arch.guest_fpu);
}
| 4,979 |
180,764 | 1 | cmsPipeline* DefaultICCintents(cmsContext ContextID,
cmsUInt32Number nProfiles,
cmsUInt32Number TheIntents[],
cmsHPROFILE hProfiles[],
cmsBool BPC[],
cmsFloat64Number AdaptationStates[],
cmsUInt32Number dwFlags)
{
cmsPipeline* Lut = NULL;
cmsPipeline* Result;
cmsHPROFILE hProfile;
cmsMAT3 m;
cmsV... | 4,980 |
18,065 | 0 | jbig2_end_of_page(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data)
{
uint32_t page_number = ctx->pages[ctx->current_page].number;
if (segment->page_association != page_number) {
jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number,
"end of page marker for page ... | 4,981 |
125,157 | 0 | void Fail() {
if (!expect_fail_)
FAIL();
QuitMessageLoop();
}
| 4,982 |
6,053 | 0 | e1000e_set_dbal(E1000ECore *core, int index, uint32_t val)
{
core->mac[index] = val & E1000_XDBAL_MASK;
}
| 4,983 |
844 | 0 | ArthurOutputDev::ArthurOutputDev(QPainter *painter):
m_painter(painter)
{
m_currentBrush = QBrush(Qt::SolidPattern);
m_fontEngine = 0;
m_font = 0;
m_image = 0;
}
| 4,984 |
122,699 | 0 | bool Extension::LoadSharedFeatures(
const APIPermissionSet& api_permissions,
string16* error) {
if (!LoadDescription(error) ||
!LoadIcons(error) ||
!ManifestHandler::ParseExtension(this, error) ||
!LoadPlugins(error) ||
!LoadNaClModules(error) ||
!LoadSandboxedPages(error) ||
... | 4,985 |
97,254 | 0 | void appendCharactersCallback(const xmlChar* s, int len)
{
PendingCharactersCallback* callback = new PendingCharactersCallback;
callback->s = xmlStrndup(s, len);
callback->len = len;
m_callbacks.append(callback);
}
| 4,986 |
39,325 | 0 | static ssize_t show_model(struct device *cd,
struct device_attribute *attr, char *buf)
{
struct media_device *mdev = to_media_device(to_media_devnode(cd));
return sprintf(buf, "%.*s\n", (int)sizeof(mdev->model), mdev->model);
}
| 4,987 |
5,219 | 0 | static inline char * _php_pgsql_trim_result(PGconn * pgsql, char **buf)
{
return *buf = _php_pgsql_trim_message(PQerrorMessage(pgsql), NULL);
}
| 4,988 |
173,013 | 0 | display_cache_file(struct display *dp, const char *filename)
/* Does the initial cache of the file. */
{
FILE *fp;
int ret;
dp->filename = filename;
if (filename != NULL)
{
fp = fopen(filename, "rb");
if (fp == NULL)
display_log(dp, USER_ERROR, "open failed: %s", strerror(errno));
}
else
... | 4,989 |
112,687 | 0 | void DocumentLoader::removeSubresourceLoader(ResourceLoader* loader)
{
if (!m_subresourceLoaders.contains(loader))
return;
m_subresourceLoaders.remove(loader);
checkLoadComplete();
if (Frame* frame = m_frame)
frame->loader()->checkLoadComplete();
}
| 4,990 |
105,040 | 0 | int TestURLFetcher::response_code() const {
return fake_response_code_;
}
| 4,991 |
113,057 | 0 | std::string DownloadItemImpl::GetSuggestedFilename() const {
return suggested_filename_;
}
| 4,992 |
7,525 | 0 | tt_synth_sfnt_checksum( FT_Stream stream,
FT_ULong length )
{
FT_Error error;
FT_UInt32 checksum = 0;
FT_UInt i;
if ( FT_FRAME_ENTER( length ) )
return 0;
for ( ; length > 3; length -= 4 )
checksum += (FT_UInt32)FT_GET_ULONG();
for ( i = 3; ... | 4,993 |
103,657 | 0 | unsigned long long ChromeContentRendererClient::VisitedLinkHash(
const char* canonical_url, size_t length) {
return visited_link_slave_->ComputeURLFingerprint(canonical_url, length);
}
| 4,994 |
1,863 | 0 | int reds_get_agent_mouse(void)
{
return agent_mouse;
}
| 4,995 |
45,029 | 0 | static int em_mov_rm_sreg(struct x86_emulate_ctxt *ctxt)
{
if (ctxt->modrm_reg > VCPU_SREG_GS)
return emulate_ud(ctxt);
ctxt->dst.val = get_segment_selector(ctxt, ctxt->modrm_reg);
if (ctxt->dst.bytes == 4 && ctxt->dst.type == OP_MEM)
ctxt->dst.bytes = 2;
return X86EMUL_CONTINUE;
}
| 4,996 |
62,188 | 0 | static void CALLBACK FormatPromptHook(HWINEVENTHOOK hWinEventHook, DWORD Event, HWND hWnd, LONG idObject, LONG idChild, DWORD dwEventThread, DWORD dwmsEventTime)
{
char str[128];
BOOL found;
if (Event == EVENT_SYSTEM_FOREGROUND) {
if (GetWindowLong(hWnd, GWL_STYLE) & WS_POPUPWINDOW) {
str[0] = 0;
GetWindowT... | 4,997 |
48,624 | 0 | static int vfio_pci_set_intx_unmask(struct vfio_pci_device *vdev,
unsigned index, unsigned start,
unsigned count, uint32_t flags, void *data)
{
if (!is_intx(vdev) || start != 0 || count != 1)
return -EINVAL;
if (flags & VFIO_IRQ_SET_DATA_NONE) {
vfio_pci_intx_unmask(vdev);
} else if (flags & VFI... | 4,998 |
104,579 | 0 | explicit TimedLimitMockFunction(const std::string& name)
: MockFunction(name) {}
| 4,999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.