unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
35,663 | 0 | printable(char *buf, size_t bufsiz, const char *str)
{
char *ptr, *eptr;
const unsigned char *s = (const unsigned char *)str;
for (ptr = buf, eptr = ptr + bufsiz - 1; ptr < eptr && *s; s++) {
if (isprint(*s)) {
*ptr++ = *s;
continue;
}
if (ptr >= eptr + 4)
break;
*ptr++ = '\\';
*ptr++ = ((*s >> 6... | 18,600 |
103,311 | 0 | bool GpuDataManager::RemoveGpuInfoUpdateCallback(Callback0::Type* callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
std::set<Callback0::Type*>::iterator i =
gpu_info_update_callbacks_.find(callback);
if (i != gpu_info_update_callbacks_.end()) {
gpu_info_update_callbacks_.erase(i);
r... | 18,601 |
114,349 | 0 | void WebGraphicsContext3DCommandBufferImpl::vertexAttribPointer(
WGC3Duint index, WGC3Dint size, WGC3Denum type, WGC3Dboolean normalized,
WGC3Dsizei stride, WGC3Dintptr offset) {
gl_->VertexAttribPointer(
index, size, type, normalized, stride,
reinterpret_cast<void*>(static_cast<intptr_t>(offset))... | 18,602 |
120,356 | 0 | int flags() const { return flags_; }
| 18,603 |
76,290 | 0 | static int dvd_read_physical(struct cdrom_device_info *cdi, dvd_struct *s,
struct packet_command *cgc)
{
unsigned char buf[21], *base;
struct dvd_layer *layer;
const struct cdrom_device_ops *cdo = cdi->ops;
int ret, layer_num = s->physical.layer_num;
if (layer_num >= DVD_LAYERS)
return -EINVAL;
init_cdrom... | 18,604 |
170,222 | 0 | content::RenderFrameHost* GetMainFrame() {
return GetWebContents()->GetMainFrame();
}
| 18,605 |
25,216 | 0 | static void get_timewait6_sock(struct seq_file *seq,
struct inet_timewait_sock *tw, int i)
{
const struct in6_addr *dest, *src;
__u16 destp, srcp;
struct inet6_timewait_sock *tw6 = inet6_twsk((struct sock *)tw);
int ttd = tw->tw_ttd - jiffies;
if (ttd < 0)
ttd = 0;
dest = &tw6->tw_v6_daddr;
src = ... | 18,606 |
168,450 | 0 | PlatformFontSkia::PlatformFontSkia(const std::string& font_name,
int font_size_pixels) {
FontRenderParamsQuery query;
query.families.push_back(font_name);
query.pixel_size = font_size_pixels;
query.weight = Font::Weight::NORMAL;
InitFromDetails(nullptr, font_name, font_size_... | 18,607 |
106,343 | 0 | void SyncBackendHost::Core::OnChangesComplete(
syncable::ModelType model_type) {
if (!host_ || !host_->frontend_) {
DCHECK(false) << "OnChangesComplete called after Shutdown?";
return;
}
ChangeProcessor* processor = GetProcessor(model_type);
if (!processor)
return;
processor->CommitChangesFr... | 18,608 |
80,815 | 0 | GF_Err payt_dump(GF_Box *a, FILE * trace)
{
GF_PAYTBox *p;
p = (GF_PAYTBox *)a;
gf_isom_box_dump_start(a, "PayloadTypeBox", trace);
fprintf(trace, "PayloadID=\"%d\" PayloadString=\"%s\">\n", p->payloadCode, p->payloadString);
gf_isom_box_dump_done("PayloadTypeBox", a, trace);
return GF_OK;
}
| 18,609 |
100,260 | 0 | WifiNetwork* GetWifiNetworkByName(const std::string& name) {
for (size_t i = 0; i < wifi_networks_.size(); ++i) {
if (wifi_networks_[i]->name().compare(name) == 0) {
return wifi_networks_[i];
}
}
return NULL;
}
| 18,610 |
86,342 | 0 | int dissolve_free_huge_page(struct page *page)
{
int rc = 0;
spin_lock(&hugetlb_lock);
if (PageHuge(page) && !page_count(page)) {
struct page *head = compound_head(page);
struct hstate *h = page_hstate(head);
int nid = page_to_nid(head);
if (h->free_huge_pages - h->resv_huge_pages == 0) {
rc = -EBUSY;
... | 18,611 |
37,791 | 0 | static inline bool nested_svm_nmi(struct vcpu_svm *svm)
{
if (!is_guest_mode(&svm->vcpu))
return true;
if (!(svm->nested.intercept & (1ULL << INTERCEPT_NMI)))
return true;
svm->vmcb->control.exit_code = SVM_EXIT_NMI;
svm->nested.exit_required = true;
return false;
}
| 18,612 |
150,754 | 0 | bool MatchesFilter(const std::string* device_name,
const UUIDSet& device_uuids,
const blink::mojom::WebBluetoothLeScanFilterPtr& filter) {
if (filter->name) {
if (device_name == nullptr)
return false;
if (filter->name.value() != *device_name)
return false;
}... | 18,613 |
101,752 | 0 | void Browser::OpenPrivacyDashboardTabAndActivate() {
OpenURL(GURL(kPrivacyDashboardUrl), GURL(),
NEW_FOREGROUND_TAB, PageTransition::LINK);
window_->Activate();
}
| 18,614 |
62,075 | 0 | static bool rt_cache_route(struct fib_nh *nh, struct rtable *rt)
{
struct rtable *orig, *prev, **p;
bool ret = true;
if (rt_is_input_route(rt)) {
p = (struct rtable **)&nh->nh_rth_input;
} else {
p = (struct rtable **)raw_cpu_ptr(nh->nh_pcpu_rth_output);
}
orig = *p;
/* hold dst before doing cmpxchg() to a... | 18,615 |
88,815 | 0 | static int compat_getdrvprm(int drive,
struct compat_floppy_drive_params __user *arg)
{
struct compat_floppy_drive_params v;
memset(&v, 0, sizeof(struct compat_floppy_drive_params));
mutex_lock(&floppy_mutex);
v.cmos = UDP->cmos;
v.max_dtr = UDP->max_dtr;
v.hlt = UDP->hlt;
v.hut = UDP->hut;
v.srt = UDP-... | 18,616 |
4,251 | 0 | PHP_FUNCTION(constant)
{
char *const_name;
int const_name_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &const_name, &const_name_len) == FAILURE) {
return;
}
if (!zend_get_constant_ex(const_name, const_name_len, return_value, NULL, ZEND_FETCH_CLASS_SILENT TSRMLS_CC)) {
php_error_docref(NULL ... | 18,617 |
169,832 | 0 | xsltGetSAS(xsltStylesheetPtr style, const xmlChar *name, const xmlChar *ns) {
xsltAttrElemPtr values;
while (style != NULL) {
values = xmlHashLookup2(style->attributeSets, name, ns);
if (values != NULL)
return(values);
style = xsltNextImport(style);
}
return(NULL);
}
| 18,618 |
11,438 | 0 | fbFetch_a1b5g5r5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
{
const CARD16 *pixel = (const CARD16 *)bits + x;
const CARD16 *end = pixel + width;
while (pixel < end) {
CARD32 p = READ(pixel++);
CARD32 r,g,b, a;
a = (CARD32) ((CARD8) (0 - ((p & 0x80... | 18,619 |
98,882 | 0 | void WebSocket::SendPending() {
DCHECK(MessageLoop::current() == origin_loop_);
DCHECK(socket_stream_);
if (!current_write_buf_) {
if (pending_write_bufs_.empty())
return;
current_write_buf_ = new DrainableIOBuffer(
pending_write_bufs_.front(), pending_write_bufs_.front()->size());
}
DCH... | 18,620 |
36,101 | 0 | static void isofs_i_callback(struct rcu_head *head)
{
struct inode *inode = container_of(head, struct inode, i_rcu);
kmem_cache_free(isofs_inode_cachep, ISOFS_I(inode));
}
| 18,621 |
182,428 | 1 | mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
{
/* mrb_assert(mrb_proc_cfunc_p(proc)) */
mrb_irep *irep = proc->body.irep;
mrb_value *pool = irep->pool;
mrb_sym *syms = irep->syms;
mrb_code i;
int ai = mrb_gc_arena_save(mrb);
struct mrb_jmpbuf *prev_jmp = mrb->jmp;
struct mrb_jmpbuf c_jmp;
#ifdef DIREC... | 18,622 |
161,452 | 0 | Response TargetHandler::ActivateTarget(const std::string& target_id) {
scoped_refptr<DevToolsAgentHost> agent_host(
DevToolsAgentHost::GetForId(target_id));
if (!agent_host)
return Response::InvalidParams("No target with given id found");
agent_host->Activate();
return Response::OK();
}
| 18,623 |
49,883 | 0 | int phar_create_writeable_entry(phar_archive_data *phar, phar_entry_info *entry, char **error) /* {{{ */
{
if (entry->fp_type == PHAR_MOD) {
/* already newly created, truncate */
php_stream_truncate_set_size(entry->fp, 0);
entry->old_flags = entry->flags;
entry->is_modified = 1;
phar->is_modified = 1;
/* ... | 18,624 |
21,950 | 0 | int rdfa_parse(rdfacontext* context)
{
int rval;
rval = rdfa_parse_start(context);
if(rval != RDFA_PARSE_SUCCESS)
{
context->done = 1;
return rval;
}
do
{
size_t wblen;
int done;
wblen = context->buffer_filler_callback(
context->working_buffer, context->wb_allocated,
... | 18,625 |
19,935 | 0 | static void nfs4_locku_done(struct rpc_task *task, void *data)
{
struct nfs4_unlockdata *calldata = data;
if (!nfs4_sequence_done(task, &calldata->res.seq_res))
return;
switch (task->tk_status) {
case 0:
nfs4_stateid_copy(&calldata->lsp->ls_stateid,
&calldata->res.stateid);
renew_lease(calldata->serv... | 18,626 |
112,628 | 0 | void Document::write(const SegmentedString& text, Document* ownerDocument)
{
NestingLevelIncrementer nestingLevelIncrementer(m_writeRecursionDepth);
m_writeRecursionIsTooDeep = (m_writeRecursionDepth > 1) && m_writeRecursionIsTooDeep;
m_writeRecursionIsTooDeep = (m_writeRecursionDepth > cMaxWriteRecursionD... | 18,627 |
38,014 | 0 | static u32 __peek_user_compat(struct task_struct *child, addr_t addr)
{
struct compat_user *dummy32 = NULL;
addr_t offset;
__u32 tmp;
if (addr < (addr_t) &dummy32->regs.acrs) {
struct pt_regs *regs = task_pt_regs(child);
/*
* psw and gprs are stored on the stack
*/
if (addr == (addr_t) &dummy32->regs.p... | 18,628 |
94,639 | 0 | EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey)
{
return ASN1_d2i_bio_of(EC_KEY,EC_KEY_new,d2i_ECPrivateKey,bp,eckey);
}
| 18,629 |
68,211 | 0 | struct sock *llc_sk_alloc(struct net *net, int family, gfp_t priority, struct proto *prot, int kern)
{
struct sock *sk = sk_alloc(net, family, priority, prot, kern);
if (!sk)
goto out;
llc_sk_init(sk);
sock_init_data(NULL, sk);
#ifdef LLC_REFCNT_DEBUG
atomic_inc(&llc_sock_nr);
printk(KERN_DEBUG "LLC socket %p ... | 18,630 |
104,841 | 0 | bool UrlIsInPrerenderManager(const std::string& html_file) {
GURL dest_url = test_server()->GetURL(html_file);
return (prerender_manager()->FindEntry(dest_url) != NULL);
}
| 18,631 |
102,936 | 0 | void DefaultTabHandler::TabReplacedAt(TabStripModel* tab_strip_model,
TabContentsWrapper* old_contents,
TabContentsWrapper* new_contents,
int index) {
delegate_->AsBrowser()->TabReplacedAt(tab_strip_model... | 18,632 |
38,562 | 0 | static inline void release_mc(struct kref *kref)
{
struct cma_multicast *mc = container_of(kref, struct cma_multicast, mcref);
kfree(mc->multicast.ib);
kfree(mc);
}
| 18,633 |
12,161 | 0 | int XMLRPC_ResponseIsFault(XMLRPC_REQUEST response) {
return XMLRPC_ValueIsFault( XMLRPC_RequestGetData(response) );
}
| 18,634 |
173,823 | 0 | OMX_ERRORTYPE omx_video::free_input_buffer(OMX_BUFFERHEADERTYPE *bufferHdr)
{
unsigned int index = 0;
OMX_U8 *temp_buff ;
if (bufferHdr == NULL || m_inp_mem_ptr == NULL) {
DEBUG_PRINT_ERROR("ERROR: free_input: Invalid bufferHdr[%p] or m_inp_mem_ptr[%p]",
bufferHdr, m_inp_mem_ptr);
return... | 18,635 |
137,980 | 0 | AXSVGRoot* AXLayoutObject::remoteSVGRootElement() const {
return 0;
}
| 18,636 |
161,083 | 0 | void DevToolsHttpHandler::SendJson(int connection_id,
net::HttpStatusCode status_code,
base::Value* value,
const std::string& message) {
if (!thread_)
return;
std::string json_value;
if (value) {
base... | 18,637 |
46,858 | 0 | static int xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
struct scatterlist *src, unsigned int nbytes)
{
struct camellia_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
return glue_xts_crypt_128bit(&camellia_dec_xts, desc, dst, src, nbytes,
XTS_TWEAK_CAST(camellia_enc_blk),
... | 18,638 |
148,313 | 0 | void WebContentsImpl::BeforeUnloadFiredFromRenderManager(
bool proceed, const base::TimeTicks& proceed_time,
bool* proceed_to_fire_unload) {
for (auto& observer : observers_)
observer.BeforeUnloadFired(proceed_time);
if (delegate_)
delegate_->BeforeUnloadFired(this, proceed, proceed_to_fire_unload);... | 18,639 |
44,329 | 0 | static void ip_rt_build_flow_key(struct flowi4 *fl4, const struct sock *sk,
const struct sk_buff *skb)
{
if (skb)
build_skb_flow_key(fl4, skb, sk);
else
build_sk_flow_key(fl4, sk);
}
| 18,640 |
24,868 | 0 | static ssize_t reclaim_account_store(struct kmem_cache *s,
const char *buf, size_t length)
{
s->flags &= ~SLAB_RECLAIM_ACCOUNT;
if (buf[0] == '1')
s->flags |= SLAB_RECLAIM_ACCOUNT;
return length;
}
| 18,641 |
38,116 | 0 | static void lg_remove(struct hid_device *hdev)
{
struct lg_drv_data *drv_data = hid_get_drvdata(hdev);
if (drv_data->quirks & LG_FF4)
lg4ff_deinit(hdev);
hid_hw_stop(hdev);
kfree(drv_data);
}
| 18,642 |
89,705 | 0 | void nfc_llcp_recv(void *data, struct sk_buff *skb, int err)
{
struct nfc_llcp_local *local = (struct nfc_llcp_local *) data;
pr_debug("Received an LLCP PDU\n");
if (err < 0) {
pr_err("err %d\n", err);
return;
}
__nfc_llcp_recv(local, skb);
}
| 18,643 |
126,437 | 0 | void BrowserWindowGtk::ShowPageInfo(content::WebContents* web_contents,
const GURL& url,
const SSLStatus& ssl,
bool show_history) {
chrome::ShowPageInfoBubble(window_, web_contents, url, ssl, show_history,
... | 18,644 |
71,534 | 0 | ModuleExport void UnregisterEXRImage(void)
{
(void) UnregisterMagickInfo("EXR");
}
| 18,645 |
187,559 | 1 | status_t MediaPlayer::setDataSource(
const sp<IMediaHTTPService> &httpService,
const char *url, const KeyedVector<String8, String8> *headers)
{
ALOGV("setDataSource(%s)", url);
status_t err = BAD_VALUE;
if (url != NULL) {
const sp<IMediaPlayerService>& service(getMediaPlayerService());
if (service != 0) {
sp<I... | 18,646 |
69,532 | 0 | static int encrypted_update(struct key *key, struct key_preparsed_payload *prep)
{
struct encrypted_key_payload *epayload = key->payload.data;
struct encrypted_key_payload *new_epayload;
char *buf;
char *new_master_desc = NULL;
const char *format = NULL;
size_t datalen = prep->datalen;
int ret = 0;
if (datalen... | 18,647 |
137,305 | 0 | void Textfield::StartBlinkingCursor() {
DCHECK(ShouldBlinkCursor());
cursor_blink_timer_.Start(FROM_HERE, Textfield::GetCaretBlinkInterval(), this,
&Textfield::OnCursorBlinkTimerFired);
}
| 18,648 |
170,705 | 0 | static EAS_BOOL QueryGUID (const DLSID *pGUID, EAS_U32 *pValue)
{
/* assume false */
*pValue = 0;
if (EAS_HWMemCmp(&DLSID_GMInHardware, pGUID, sizeof(DLSID)) == 0)
{
*pValue = 0xffffffff;
return EAS_TRUE;
}
if (EAS_HWMemCmp(&DLSID_GSInHardware, pGUID, sizeof(DLSID)) == 0)
return EAS_TRUE;
if (EAS_HWMemCmp(... | 18,649 |
16,331 | 0 | int getJobAdExitedBySignal(ClassAd *jad, int &exited_by_signal)
{
if( ! jad->LookupInteger(ATTR_ON_EXIT_BY_SIGNAL, exited_by_signal) ) {
return FALSE;
}
return TRUE;
}
| 18,650 |
135,752 | 0 | bool IsTextTooLongAt(const Position& position) {
const Element* element = EnclosingTextControl(position);
if (!element)
return false;
if (isHTMLInputElement(element))
return toHTMLInputElement(element)->TooLong();
if (isHTMLTextAreaElement(element))
return toHTMLTextAreaElement(element)->TooLong();
... | 18,651 |
114,392 | 0 | void GpuCommandBufferStub::OnEcho(const IPC::Message& message) {
TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnEcho");
Send(new IPC::Message(message));
}
| 18,652 |
92,876 | 0 | GF_Err gf_sm_load_suspend(GF_SceneLoader *load, Bool suspend)
{
if (load->suspend) return load->suspend(load, suspend);
return GF_OK;
}
| 18,653 |
58,352 | 0 | static int ptrace_read_user(struct task_struct *tsk, unsigned long off,
unsigned long __user *ret)
{
unsigned long tmp;
if (off & 3)
return -EIO;
tmp = 0;
if (off == PT_TEXT_ADDR)
tmp = tsk->mm->start_code;
else if (off == PT_DATA_ADDR)
tmp = tsk->mm->start_data;
else if (off == PT_TEXT_END_ADDR)
... | 18,654 |
48,075 | 0 | static int nested_vmx_check_vmptr(struct kvm_vcpu *vcpu, int exit_reason,
gpa_t *vmpointer)
{
gva_t gva;
gpa_t vmptr;
struct x86_exception e;
struct page *page;
struct vcpu_vmx *vmx = to_vmx(vcpu);
int maxphyaddr = cpuid_maxphyaddr(vcpu);
if (get_vmx_mem_address(vcpu, vmcs_readl(EXIT_QUALIFICATION),
vm... | 18,655 |
4,884 | 0 | ProcUngrabKeyboard(ClientPtr client)
{
DeviceIntPtr device = PickKeyboard(client);
GrabPtr grab;
TimeStamp time;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
UpdateCurrentTime();
grab = device->deviceGrab.grab;
time = ClientTimeToServerTime(stuff->id);
if ((CompareTim... | 18,656 |
62,904 | 0 | void kvm_register_target_sys_reg_table(unsigned int target,
struct kvm_sys_reg_target_table *table)
{
target_tables[target] = table;
}
| 18,657 |
151,077 | 0 | void DevToolsWindow::Inspect(scoped_refptr<content::DevToolsAgentHost> host) {
DevToolsWindow::OpenDevToolsWindow(host, profile_);
}
| 18,658 |
60,805 | 0 | struct pid *task_pid_type(struct task_struct *task, enum pid_type type)
{
if (type != PIDTYPE_PID)
task = task->group_leader;
return task->pids[type].pid;
}
| 18,659 |
35,990 | 0 | SMB2_tdis(const unsigned int xid, struct cifs_tcon *tcon)
{
struct smb2_tree_disconnect_req *req; /* response is trivial */
int rc = 0;
struct TCP_Server_Info *server;
struct cifs_ses *ses = tcon->ses;
cifs_dbg(FYI, "Tree Disconnect\n");
if (ses && (ses->server))
server = ses->server;
else
return -EIO;
i... | 18,660 |
65,546 | 0 | nfs4_state_start(void)
{
int ret;
ret = set_callback_cred();
if (ret)
return ret;
laundry_wq = alloc_workqueue("%s", WQ_UNBOUND, 0, "nfsd4");
if (laundry_wq == NULL) {
ret = -ENOMEM;
goto out_cleanup_cred;
}
ret = nfsd4_create_callback_queue();
if (ret)
goto out_free_laundry;
set_max_delegations();
... | 18,661 |
176,303 | 0 | static bool HasElementImpl(Isolate* isolate, Handle<JSObject> holder,
uint32_t index,
Handle<FixedArrayBase> backing_store,
PropertyFilter filter = ALL_PROPERTIES) {
return Subclass::GetEntryForIndexImpl(isolate, *holder, *backing_store,
index, filter) != kMaxUInt32;
}
| 18,662 |
33,727 | 0 | static void hidp_close(struct hid_device *hid)
{
}
| 18,663 |
127,539 | 0 | void LayerWebKitThread::setSublayers(const Vector<RefPtr<LayerWebKitThread> >& sublayers)
{
if (sublayers == m_sublayers)
return;
removeAllSublayers();
size_t listSize = sublayers.size();
for (size_t i = 0; i < listSize; ++i)
addSublayer(sublayers[i]);
}
| 18,664 |
160,118 | 0 | void InFlightBackendIO::CloseEntryImpl(EntryImpl* entry) {
scoped_refptr<BackendIO> operation(
new BackendIO(this, backend_, net::CompletionCallback()));
operation->CloseEntryImpl(entry);
PostOperation(FROM_HERE, operation.get());
}
| 18,665 |
129,496 | 0 | ScopedRenderTo::ScopedRenderTo(Framebuffer* framebuffer)
: framebuffer_(framebuffer) {
if (framebuffer)
framebuffer_->OnWillRenderTo();
}
| 18,666 |
85,865 | 0 | void disable_write_same(struct mapped_device *md)
{
struct queue_limits *limits = dm_get_queue_limits(md);
/* device doesn't really support WRITE SAME, disable it */
limits->max_write_same_sectors = 0;
}
| 18,667 |
102,526 | 0 | RelayFlush(base::PlatformFile file,
base::FileUtilProxy::StatusCallback* callback)
: RelayWithStatusCallback(callback),
file_(file) {
}
| 18,668 |
147,467 | 0 | static void LimitedToOnlyAttributeAttributeSetter(
v8::Local<v8::Value> v8_value, const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
ALLOW_UNUSED_LOCAL(isolate);
v8::Local<v8::Object> holder = info.Holder();
ALLOW_UNUSED_LOCAL(holder);
TestObject* impl = V8TestO... | 18,669 |
149,267 | 0 | CrostiniUpgrader::CrostiniUpgrader(Profile* profile)
: profile_(profile), container_id_("", "") {
CrostiniManager::GetForProfile(profile_)->AddUpgradeContainerProgressObserver(
this);
}
| 18,670 |
87,176 | 0 | void GetIntersection (uint64 start1, uint32 length1, uint64 start2, uint64 end2, uint64 *intersectStart, uint32 *intersectLength)
{
uint64 end1 = start1 + length1 - 1;
uint64 intersectEnd = (end1 <= end2) ? end1 : end2;
*intersectStart = (start1 >= start2) ? start1 : start2;
*intersectLength = (uint32) ((*intersec... | 18,671 |
111,031 | 0 | base::PlatformFileError FileSystemOperation::SetUpFileSystemPath(
const GURL& path_url,
FileSystemPath* file_system_path,
FileSystemFileUtil** file_util,
SetUpPathMode mode) {
DCHECK(file_system_path);
GURL origin_url;
FileSystemType type;
FilePath cracked_path;
if (!CrackFileSystemURL(path_ur... | 18,672 |
184 | 0 | static int phar_call_openssl_signverify(int is_sign, php_stream *fp, off_t end, char *key, int key_len, char **signature, int *signature_len TSRMLS_DC) /* {{{ */
{
zend_fcall_info fci;
zend_fcall_info_cache fcc;
zval *zdata, *zsig, *zkey, *retval_ptr, **zp[3], *openssl;
MAKE_STD_ZVAL(zdata);
MAKE_STD_ZVAL(openssl... | 18,673 |
133,687 | 0 | void set_cookie_value(string value) {
decoder_->cookie_value_ = value;
}
| 18,674 |
20,864 | 0 | static bool msr_mtrr_valid(unsigned msr)
{
switch (msr) {
case 0x200 ... 0x200 + 2 * KVM_NR_VAR_MTRR - 1:
case MSR_MTRRfix64K_00000:
case MSR_MTRRfix16K_80000:
case MSR_MTRRfix16K_A0000:
case MSR_MTRRfix4K_C0000:
case MSR_MTRRfix4K_C8000:
case MSR_MTRRfix4K_D0000:
case MSR_MTRRfix4K_D8000:
case MSR_MTRRfix4K_... | 18,675 |
178,640 | 1 | static int zrle_send_framebuffer_update(VncState *vs, int x, int y,
int w, int h)
{
bool be = !!(vs->clientds.flags & QEMU_BIG_ENDIAN_FLAG);
size_t bytes;
int zywrle_level;
if (vs->zrle.type == VNC_ENCODING_ZYWRLE) {
if (!vs->vd->lossy || vs->tight.quality == (uint8_t)-1
|| vs->tight.quality == 9) {
zywrle_level =... | 18,676 |
40,115 | 0 | static unsigned char *ikev2_authloc(struct msg_digest *md,
pb_stream *e_pbs)
{
unsigned char *b12;
struct state *st = md->st;
struct state *pst = st;
if (st->st_clonedfrom != 0) {
pst = state_with_serialno(st->st_clonedfrom);
if ( pst == NULL)
return NULL;
}
b12 = e_pbs->cur;
if (!out_zero(pst->... | 18,677 |
118,694 | 0 | void V8WindowShell::namedItemAdded(HTMLDocument* document, const AtomicString& name)
{
ASSERT(m_world->isMainWorld());
if (m_context.isEmpty())
return;
v8::HandleScope handleScope(m_isolate);
v8::Context::Scope contextScope(m_context.newLocal(m_isolate));
ASSERT(!m_document.isEmpty());
... | 18,678 |
109,347 | 0 | void InspectorResourceAgent::canClearBrowserCache(ErrorString*, bool* result)
{
*result = true;
}
| 18,679 |
47,541 | 0 | static void hash_hw_write_key(struct hash_device_data *device_data,
const u8 *key, unsigned int keylen)
{
u32 word = 0;
int nwords = 1;
HASH_CLEAR_BITS(&device_data->base->str, HASH_STR_NBLW_MASK);
while (keylen >= 4) {
u32 *key_word = (u32 *)key;
HASH_SET_DIN(key_word, nwords);
keylen -= 4;
key... | 18,680 |
177,079 | 0 | void SoftMPEG2::onReset() {
SoftVideoDecoderOMXComponent::onReset();
mWaitForI = true;
resetDecoder();
resetPlugin();
}
| 18,681 |
53,385 | 0 | iperf_get_test_one_off(struct iperf_test *ipt)
{
return ipt->one_off;
}
| 18,682 |
1,424 | 0 | _XcursorWriteImage (XcursorFile *file,
XcursorFileHeader *fileHeader,
int toc,
XcursorImage *image)
{
XcursorChunkHeader chunkHeader;
int n;
XcursorPixel *p;
if (!file || !fileHeader || !image)
return XcursorFalse;
/* sanity check data */
if (image->width > XCURS... | 18,683 |
39,352 | 0 | static void fd_timer_workfn(struct work_struct *work)
{
fd_timer_fn();
}
| 18,684 |
46,934 | 0 | static int crc32c_intel_cra_init(struct crypto_tfm *tfm)
{
u32 *key = crypto_tfm_ctx(tfm);
*key = ~0;
return 0;
}
| 18,685 |
149,859 | 0 | void LayerTreeHost::SetRootLayer(scoped_refptr<Layer> root_layer) {
if (root_layer_.get() == root_layer.get())
return;
if (root_layer_.get())
root_layer_->SetLayerTreeHost(nullptr);
root_layer_ = root_layer;
if (root_layer_.get()) {
DCHECK(!root_layer_->parent());
root_layer_->SetLayerTreeHost(... | 18,686 |
15,575 | 0 | usage(void)
{
fprintf(stderr,
"usage: ssh [-1246AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]\n"
" [-D [bind_address:]port] [-E log_file] [-e escape_char]\n"
" [-F configfile] [-I pkcs11] [-i identity_file] [-L address]\n"
" [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o optio... | 18,687 |
96,995 | 0 | pte_t *huge_pte_alloc(struct mm_struct *mm,
unsigned long addr, unsigned long sz)
{
pgd_t *pgd;
p4d_t *p4d;
pud_t *pud;
pte_t *pte = NULL;
pgd = pgd_offset(mm, addr);
p4d = p4d_alloc(mm, pgd, addr);
if (!p4d)
return NULL;
pud = pud_alloc(mm, p4d, addr);
if (pud) {
if (sz == PUD_SIZE) {
pte = (pte_t ... | 18,688 |
35,478 | 0 | ieee80211_tx_h_dynamic_ps(struct ieee80211_tx_data *tx)
{
struct ieee80211_local *local = tx->local;
struct ieee80211_if_managed *ifmgd;
/* driver doesn't support power save */
if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS))
return TX_CONTINUE;
/* hardware does dynamic power save */
if (local->hw.flags & I... | 18,689 |
136,957 | 0 | void HTMLInputElement::SelectColorInColorChooser(const Color& color) {
if (ColorChooserClient* client = input_type_->GetColorChooserClient())
client->DidChooseColor(color);
}
| 18,690 |
9,236 | 0 | void virtio_queue_set_last_avail_idx(VirtIODevice *vdev, int n, uint16_t idx)
{
vdev->vq[n].last_avail_idx = idx;
vdev->vq[n].shadow_avail_idx = idx;
}
| 18,691 |
135,119 | 0 | AutofocusTask() { }
| 18,692 |
33,424 | 0 | static int __add_preferred_console(char *name, int idx, char *options,
char *brl_options)
{
struct console_cmdline *c;
int i;
/*
* See if this tty is not yet registered, and
* if we have a slot free.
*/
for (i = 0; i < MAX_CMDLINECONSOLES && console_cmdline[i].name[0]; i++)
if (strcmp(console_cmdlin... | 18,693 |
104,817 | 0 | void ExtensionServiceBackend::ReportExtensionLoadError(
const FilePath& extension_path, const std::string &error) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (frontend_.get())
frontend_->ReportExtensionLoadError(
extension_path, error, NotificationType::EXTENSION_INSTALL_ERROR,
... | 18,694 |
31,107 | 0 | static int dcbnl_notify(struct net_device *dev, int event, int cmd,
u32 seq, u32 portid, int dcbx_ver)
{
struct net *net = dev_net(dev);
struct sk_buff *skb;
struct nlmsghdr *nlh;
const struct dcbnl_rtnl_ops *ops = dev->dcbnl_ops;
int err;
if (!ops)
return -EOPNOTSUPP;
skb = dcbnl_newmsg(event, cmd, porti... | 18,695 |
76,543 | 0 | local_wcsnlen (const wchar_t *s, size_t maxlen)
{
const wchar_t *ptr;
for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--)
;
return ptr - s;
}
| 18,696 |
121,507 | 0 | bool WindowsGetCurrentFunction::RunImpl() {
scoped_ptr<GetCurrent::Params> params(GetCurrent::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
bool populate_tabs = false;
if (params->get_info.get() && params->get_info->populate.get())
populate_tabs = *params->get_info->populate;
Windo... | 18,697 |
64,106 | 0 | static void reset_proteus(struct snd_msnd *chip)
{
outb(HPPRORESET_ON, chip->io + HP_PROR);
msleep(TIME_PRO_RESET);
outb(HPPRORESET_OFF, chip->io + HP_PROR);
msleep(TIME_PRO_RESET_DONE);
}
| 18,698 |
87,404 | 0 | BOOL rectangle_is_empty(const RECTANGLE_16* rect)
{
/* A rectangle with width = 0 or height = 0 should be regarded
* as empty.
*/
return ((rect->left == rect->right) || (rect->top == rect->bottom)) ? TRUE : FALSE;
}
| 18,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.