unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
119,169 | 0 | void XMLHttpRequest::didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent)
{
if (!m_upload)
return;
if (m_uploadEventsAllowed)
m_upload->dispatchEvent(XMLHttpRequestProgressEvent::create(eventNames().progressEvent, true, bytesSent, totalBytesToBeSent));
if (bytes... | 12,200 |
157,221 | 0 | bool WebMediaPlayerImpl::HasAudio() const {
DCHECK(main_task_runner_->BelongsToCurrentThread());
return pipeline_metadata_.has_audio;
}
| 12,201 |
130,958 | 0 | static void perWorldAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObject* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueForMainWorld(info, WTF::getPtr(imp->perWorldAttribute()));
}
| 12,202 |
48,217 | 0 | pickCopyFunc(TIFF* in, TIFF* out, uint16 bitspersample, uint16 samplesperpixel)
{
uint16 shortv;
uint32 w, l, tw, tl;
int bychunk;
(void) TIFFGetField(in, TIFFTAG_PLANARCONFIG, &shortv);
if (shortv != config && bitspersample != 8 && samplesperpixel > 1) {
fprintf(stderr,
"%s: Cannot handle different plana... | 12,203 |
127,545 | 0 | LayerWebKitThread::~LayerWebKitThread()
{
if (m_tiler)
m_tiler->layerWebKitThreadDestroyed();
ASSERT(!superlayer());
removeAll(m_sublayers);
removeAll(m_overlays);
}
| 12,204 |
183,734 | 1 | void EnterpriseEnrollmentScreen::OnPolicyStateChanged(
policy::CloudPolicySubsystem::PolicySubsystemState state,
policy::CloudPolicySubsystem::ErrorDetails error_details) {
if (is_showing_) {
switch (state) {
case policy::CloudPolicySubsystem::UNENROLLED:
// Still working...
return;
case policy::CloudPolicySubsystem::... | 12,205 |
73,962 | 0 | rtadv_terminate (struct zebra_vrf *zvrf)
{
/* Empty.*/;
}
| 12,206 |
162,373 | 0 | void MojoVideoEncodeAcceleratorService::RequestEncodingParametersChange(
uint32_t bitrate,
uint32_t framerate) {
DVLOG(2) << __func__ << " bitrate=" << bitrate << " framerate=" << framerate;
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (!encoder_)
return;
encoder_->RequestEncodingParamete... | 12,207 |
181,241 | 1 | static int cdxl_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *pkt)
{
CDXLVideoContext *c = avctx->priv_data;
AVFrame * const p = data;
int ret, w, h, encoding, aligned_width, buf_size = pkt->size;
const uint8_t *buf = pkt->data;
if (buf_size < 32)
return AVERROR_INVALIDDATA;
encoding ... | 12,208 |
120,435 | 0 | ElementData::ElementData(const ElementData& other, bool isUnique)
: m_isUnique(isUnique)
, m_arraySize(isUnique ? 0 : other.length())
, m_presentationAttributeStyleIsDirty(other.m_presentationAttributeStyleIsDirty)
, m_styleAttributeIsDirty(other.m_styleAttributeIsDirty)
, m_animatedSVGAttributesAre... | 12,209 |
19,081 | 0 | void udp_flush_pending_frames(struct sock *sk)
{
struct udp_sock *up = udp_sk(sk);
if (up->pending) {
up->len = 0;
up->pending = 0;
ip_flush_pending_frames(sk);
}
}
| 12,210 |
170,089 | 0 | xsltParseContentError(xsltStylesheetPtr style,
xmlNodePtr node)
{
if ((style == NULL) || (node == NULL))
return;
if (IS_XSLT_ELEM(node))
xsltTransformError(NULL, style, node,
"The XSLT-element '%s' is not allowed at this position.\n",
node->name);
else
xsltTransformError(NULL, style, ... | 12,211 |
160,190 | 0 | void MemBackendImpl::OnEntryInserted(MemEntryImpl* entry) {
lru_list_.Append(entry);
}
| 12,212 |
69,627 | 0 | rend_service_parse_intro_for_v0_or_v1(
rend_intro_cell_t *intro,
const uint8_t *buf,
size_t plaintext_len,
char **err_msg_out)
{
const char *rp_nickname, *endptr;
size_t nickname_field_len, ver_specific_len;
if (intro->version == 1) {
ver_specific_len = MAX_HEX_NICKNAME_LEN + 2;
rp_nickna... | 12,213 |
52,069 | 0 | static struct sk_buff *tipc_get_err_tlv(char *str)
{
int str_len = strlen(str) + 1;
struct sk_buff *buf;
buf = tipc_tlv_alloc(TLV_SPACE(str_len));
if (buf)
tipc_add_tlv(buf, TIPC_TLV_ERROR_STRING, str, str_len);
return buf;
}
| 12,214 |
41,757 | 0 | static void addrconf_dad_kick(struct inet6_ifaddr *ifp)
{
unsigned long rand_num;
struct inet6_dev *idev = ifp->idev;
if (ifp->flags & IFA_F_OPTIMISTIC)
rand_num = 0;
else
rand_num = prandom_u32() % (idev->cnf.rtr_solicit_delay ? : 1);
ifp->dad_probes = idev->cnf.dad_transmits;
addrconf_mod_dad_work(ifp, ra... | 12,215 |
5,382 | 0 | static void Ins_FLIPOFF( INS_ARG )
{ (void)args;
CUR.GS.auto_flip = FALSE;
}
| 12,216 |
151,172 | 0 | void InspectorNetworkAgent::DidReceiveWebSocketFrameError(
unsigned long identifier,
const String& error_message) {
GetFrontend()->webSocketFrameError(IdentifiersFactory::RequestId(identifier),
MonotonicallyIncreasingTime(),
error_messa... | 12,217 |
185,732 | 1 | Document* LocalDOMWindow::InstallNewDocument(const String& mime_type,
const DocumentInit& init,
bool force_xhtml) {
DCHECK_EQ(init.GetFrame(), GetFrame());
ClearDocument();
document_ = CreateDocument(mime_type, init, force_xhtml);
event_queue_ = DOMWindowEventQueue::Create(document_.Get());
document_->Initialize();
... | 12,218 |
150,421 | 0 | int GetShadowElevation(aura::Window* window) {
return window->GetProperty(wm::kShadowElevationKey);
}
| 12,219 |
161,055 | 0 | bool IDNSpoofChecker::SimilarToTopDomains(base::StringPiece16 hostname) {
size_t hostname_length = hostname.length() - (hostname.back() == '.' ? 1 : 0);
icu::UnicodeString ustr_host(FALSE, hostname.data(), hostname_length);
if (lgc_letters_n_ascii_.span(ustr_host, 0, USET_SPAN_CONTAINED) ==
ustr_host.length... | 12,220 |
130,421 | 0 | bool WatchDogThread::PostTask(const tracked_objects::Location& from_here,
const base::Closure& task) {
return PostTaskHelper(from_here, task, base::TimeDelta());
}
| 12,221 |
131,701 | 0 | static void sequenceTestInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjectPythonV8Internal::sequenceTestInterfaceEmptyMethodMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
| 12,222 |
78,798 | 0 | sc_pkcs15emu_add_object(sc_pkcs15_card_t *p15card, int type,
const char *label, void *data,
const sc_pkcs15_id_t *auth_id, int obj_flags)
{
sc_pkcs15_object_t *obj;
int df_type;
obj = calloc(1, sizeof(*obj));
obj->type = type;
obj->data = data;
if (label)
strncpy(obj->label, label, sizeof(obj->label)-... | 12,223 |
146,903 | 0 | void Document::open(Document* entered_document,
ExceptionState& exception_state) {
if (ImportLoader()) {
exception_state.ThrowDOMException(
kInvalidStateError, "Imported document doesn't support open().");
return;
}
if (!IsHTMLDocument()) {
exception_state.ThrowDOMExceptio... | 12,224 |
44,769 | 0 | int lxclock(struct lxc_lock *l, int timeout)
{
int ret = -1, saved_errno = errno;
struct flock lk;
switch(l->type) {
case LXC_LOCK_ANON_SEM:
if (!timeout) {
ret = sem_wait(l->u.sem);
if (ret == -1)
saved_errno = errno;
} else {
struct timespec ts;
if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {... | 12,225 |
38,825 | 0 | box_overright(PG_FUNCTION_ARGS)
{
BOX *box1 = PG_GETARG_BOX_P(0);
BOX *box2 = PG_GETARG_BOX_P(1);
PG_RETURN_BOOL(FPge(box1->low.x, box2->low.x));
}
| 12,226 |
134,913 | 0 | void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() {
TPMTokenLoader::Get()->SetCryptoTaskRunner(
content::BrowserThread::GetTaskRunnerForThread(
content::BrowserThread::IO));
system_token_certdb_initializer_ =
std::make_unique<internal::SystemTokenCertDBInitializer>();
system_toke... | 12,227 |
61,533 | 0 | static inline ssize_t WritePSDOffset(const PSDInfo *psd_info,Image *image,
const MagickSizeType size,const MagickSizeType offset)
{
MagickSizeType
current_offset;
ssize_t
result;
current_offset=TellBlob(image);
SeekBlob(image,offset,SEEK_SET);
if (psd_info->version == 1)
result=WriteBlobMSBSho... | 12,228 |
72,356 | 0 | process_request_identities(SocketEntry *e, int version)
{
Idtab *tab = idtab_lookup(version);
Identity *id;
struct sshbuf *msg;
int r;
if ((msg = sshbuf_new()) == NULL)
fatal("%s: sshbuf_new failed", __func__);
if ((r = sshbuf_put_u8(msg, (version == 1) ?
SSH_AGENT_RSA_IDENTITIES_ANSWER :
SSH2_AGENT_... | 12,229 |
74,345 | 0 | static char* get_rootdir(pid_t pid)
{
char buf[sizeof("/proc/%lu/root") + sizeof(long)*3];
sprintf(buf, "/proc/%lu/root", (long)pid);
return malloc_readlink(buf);
}
| 12,230 |
83,135 | 0 | mrb_fd_cloexec(mrb_state *mrb, int fd)
{
#if defined(F_GETFD) && defined(F_SETFD) && defined(FD_CLOEXEC)
int flags, flags2;
flags = fcntl(fd, F_GETFD);
if (flags == -1) {
mrb_bug(mrb, "mrb_fd_cloexec: fcntl(%S, F_GETFD) failed: %S",
mrb_fixnum_value(fd), mrb_fixnum_value(errno));
}
if (fd <= 2) {
... | 12,231 |
114,010 | 0 | int handle_brightness_down_count() const {
return handle_brightness_down_count_;
}
| 12,232 |
111,598 | 0 | void TestGetCacheState(const std::string& resource_id, const std::string& md5,
base::PlatformFileError expected_error,
int expected_cache_state, GDataFile* expected_file) {
expected_error_ = expected_error;
expected_cache_state_ = expected_cache_state;
fi... | 12,233 |
12,486 | 0 | static int obj_cmp(const ASN1_OBJECT * const *ap, const unsigned int *bp)
{
int j;
const ASN1_OBJECT *a= *ap;
const ASN1_OBJECT *b= &nid_objs[*bp];
j=(a->length - b->length);
if (j) return(j);
return(memcmp(a->data,b->data,a->length));
}
| 12,234 |
92,861 | 0 | static void FFD_SetupObjects(FFDemux *ffd)
{
GF_ESD *esd;
GF_ObjectDescriptor *od;
u32 audio_esid = 0;
if ((ffd->audio_st>=0) && (ffd->service_type != 1)) {
od = (GF_ObjectDescriptor *) gf_odf_desc_new(GF_ODF_OD_TAG);
esd = FFD_GetESDescriptor(ffd, GF_TRUE);
od->objectDescriptorID = esd->ESID;
audio_esid =... | 12,235 |
126,586 | 0 | TabAnimation(TabStripGtk* tabstrip, Type type)
: tabstrip_(tabstrip),
animation_(this),
start_selected_width_(0),
start_unselected_width_(0),
end_selected_width_(0),
end_unselected_width_(0),
layout_on_completion_(false),
type_(type) {
}
| 12,236 |
3,183 | 0 | zsetcmykcolor(i_ctx_t * i_ctx_p)
{
os_ptr op = osp; /* required by "push" macro */
int code, i;
float values[4];
/* Gather numeric operand value(s) (also checks type) */
code = float_params(op, 4, (float *)&values);
if (code < 0)
return code;
/* Clamp numeric operand range(s) */
... | 12,237 |
95,764 | 0 | qboolean FS_CompareZipChecksum(const char *zipfile)
{
pack_t *thepak;
int index, checksum;
thepak = FS_LoadZipFile(zipfile, "");
if(!thepak)
return qfalse;
checksum = thepak->checksum;
FS_FreePak(thepak);
for(index = 0; index < fs_numServerReferencedPaks; index++)
{
if(checksum == fs_serverReference... | 12,238 |
43,123 | 0 | static int vhost_scsi_queue_status(struct se_cmd *se_cmd)
{
struct vhost_scsi_cmd *cmd = container_of(se_cmd,
struct vhost_scsi_cmd, tvc_se_cmd);
vhost_scsi_complete_cmd(cmd);
return 0;
}
| 12,239 |
179,588 | 1 | txid_snapshot_recv(PG_FUNCTION_ARGS)
{
StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
TxidSnapshot *snap;
txid last = 0;
int nxip;
int i;
int avail;
int expect;
txid xmin,
xmax;
/*
* load nxip and check for nonsense.
*
* (nxip > avail) check is against int overflows in 'expect'.
*
nxip = pq_g... | 12,240 |
80,412 | 0 | void sidx_del(GF_Box *s)
{
GF_SegmentIndexBox *ptr = (GF_SegmentIndexBox *) s;
if (ptr == NULL) return;
if (ptr->refs) gf_free(ptr->refs);
gf_free(ptr);
}
| 12,241 |
66,563 | 0 | static void rx_fixup(unsigned long data)
{
pegasus_t *pegasus;
int status;
pegasus = (pegasus_t *) data;
if (pegasus->flags & PEGASUS_UNPLUG)
return;
if (pegasus->flags & PEGASUS_RX_URB_FAIL)
if (pegasus->rx_skb)
goto try_again;
if (pegasus->rx_skb == NULL)
pegasus->rx_skb = __netdev_alloc_skb_ip_align... | 12,242 |
83,283 | 0 | uint32 CSoundFile::CalculateXParam(PATTERNINDEX pat, ROWINDEX row, CHANNELINDEX chn, bool *isExtended) const
{
if(isExtended != nullptr) *isExtended = false;
ROWINDEX maxCommands = 4;
const ModCommand *m = Patterns[pat].GetpModCommand(row, chn);
uint32 val = m->param;
switch(m->command)
{
case CMD_OFFSET:
max... | 12,243 |
19,811 | 0 | static int _nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred,
struct nfs_fattr *fattr, struct iattr *sattr,
struct nfs4_state *state)
{
struct nfs_server *server = NFS_SERVER(inode);
struct nfs_setattrargs arg = {
.fh = NFS_FH(inode),
.iap ... | 12,244 |
120,320 | 0 | void OnSignalConnected(const std::string& interface,
const std::string& signal,
bool succeeded) {
LOG_IF(ERROR, !succeeded) << "Connect to " << interface << " " <<
signal << " failed.";
}
| 12,245 |
101,656 | 0 | int Browser::GetContentRestrictionsForSelectedTab() {
int content_restrictions = 0;
TabContents* current_tab = GetSelectedTabContents();
if (current_tab) {
content_restrictions = current_tab->content_restrictions();
NavigationEntry* active_entry = current_tab->controller().GetActiveEntry();
if (!SaveP... | 12,246 |
70,096 | 0 | static opj_pi_iterator_t * opj_pi_create(const opj_image_t *image,
const opj_cp_t *cp,
OPJ_UINT32 tileno)
{
/* loop*/
OPJ_UINT32 pino, compno;
/* number of poc in the p_pi*/
OPJ_UINT32 l_poc_bound;
/* pointers to tile coding parameters and components.*/
opj_pi_iterator_t *l_pi =... | 12,247 |
8,302 | 0 | XFixesCopyRegion (Display *dpy, XserverRegion dst, XserverRegion src)
{
XFixesExtDisplayInfo *info = XFixesFindDisplay (dpy);
xXFixesCopyRegionReq *req;
XFixesSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (XFixesCopyRegion, req);
req->reqType = info->codes->major_opcode;
req->... | 12,248 |
104,857 | 0 | Extension::PermissionMessages Extension::GetPermissionMessages() const {
PermissionMessages messages;
if (!plugins().empty()) {
messages.push_back(PermissionMessage::CreateFromMessageId(
PermissionMessage::ID_FULL_ACCESS));
return messages;
}
if (HasEffectiveAccessToAllHosts()) {
messages.p... | 12,249 |
47,678 | 0 | static void icmpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
u8 type, u8 code, int offset, __be32 info)
{
/* icmpv6_notify checks 8 bytes can be pulled, icmp6hdr is 8 bytes */
struct icmp6hdr *icmp6 = (struct icmp6hdr *) (skb->data + offset);
struct net *net = dev_net(skb->dev);
if (type == ICM... | 12,250 |
71,824 | 0 | static void ipa_draw_line(wmfAPI * API, wmfDrawLine_t * draw_line)
{
/* Save graphic wand */
(void) PushDrawingWand(WmfDrawingWand);
if (TO_DRAW(draw_line))
{
util_set_pen(API, draw_line->dc);
DrawLine(WmfDrawingWand,
XC(draw_line->from.x), YC(draw_line->from.y),
XC(... | 12,251 |
48,083 | 0 | static void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason,
u32 exit_intr_info,
unsigned long exit_qualification)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
u32 vm_inst_error = 0;
/* trying to cancel vmlaunch/vmresume is a bug */
WARN_ON_ONCE(vmx->... | 12,252 |
104,005 | 0 | error::Error GLES2DecoderImpl::DoCommand(
unsigned int command,
unsigned int arg_count,
const void* cmd_data) {
error::Error result = error::kNoError;
if (debug()) {
DLOG(INFO) << "[" << this << "]" << "cmd: " << GetCommandName(command);
}
unsigned int command_index = command - kStartPoint - 1;
... | 12,253 |
32,794 | 0 | static void tg3_tx_skb_unmap(struct tg3_napi *tnapi, u32 entry, int last)
{
int i;
struct sk_buff *skb;
struct tg3_tx_ring_info *txb = &tnapi->tx_buffers[entry];
skb = txb->skb;
txb->skb = NULL;
pci_unmap_single(tnapi->tp->pdev,
dma_unmap_addr(txb, mapping),
skb_headlen(skb),
PCI_DMA_TODEVICE);
wh... | 12,254 |
133,071 | 0 | LRESULT HWNDMessageHandler::DefWindowProcWithRedrawLock(UINT message,
WPARAM w_param,
LPARAM l_param) {
ScopedRedrawLock lock(this);
base::WeakPtr<HWNDMessageHandler> ref(weak_factory_.GetWeakPtr());
LR... | 12,255 |
31,812 | 0 | void task_clear_jobctl_trapping(struct task_struct *task)
{
if (unlikely(task->jobctl & JOBCTL_TRAPPING)) {
task->jobctl &= ~JOBCTL_TRAPPING;
wake_up_bit(&task->jobctl, JOBCTL_TRAPPING_BIT);
}
}
| 12,256 |
160,884 | 0 | void SetSize(const WebSize& new_size) { size_ = new_size; }
| 12,257 |
87,111 | 0 | CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw)
{
cJSON *item = cJSON_New_Item(&global_hooks);
if(item)
{
item->type = cJSON_Raw;
item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks);
if(!item->valuestring)
{
cJSON_Delete(item);... | 12,258 |
42,612 | 0 | struct sock *__udp6_lib_lookup(struct net *net,
const struct in6_addr *saddr, __be16 sport,
const struct in6_addr *daddr, __be16 dport,
int dif, struct udp_table *udptable)
{
struct sock *sk, *result;
struct hlist_nulls_node *node;
unsigned short hnum = ntohs(dport);
unsigned int hash2... | 12,259 |
96,617 | 0 | static int bin_trycatch(RCore *core, int mode) {
RBinFile *bf = r_bin_cur (core->bin);
RListIter *iter;
RBinTrycatch *tc;
RList *trycatch = r_bin_file_get_trycatch (bf);
int idx = 0;
r_list_foreach (trycatch, iter, tc) {
r_cons_printf ("f try.%d.%"PFMT64x".from=0x%08"PFMT64x"\n", idx, tc->source, tc->from);
r... | 12,260 |
21,406 | 0 | void swap_free(swp_entry_t entry)
{
struct swap_info_struct *p;
p = swap_info_get(entry);
if (p) {
swap_entry_free(p, entry, 1);
spin_unlock(&swap_lock);
}
}
| 12,261 |
142,048 | 0 | HRESULT CGaiaCredentialBase::CreateGaiaLogonToken(
base::win::ScopedHandle* token,
PSID* sid) {
DCHECK(token);
DCHECK(sid);
auto policy = ScopedLsaPolicy::Create(POLICY_ALL_ACCESS);
if (!policy) {
LOGFN(ERROR) << "LsaOpenPolicy failed";
return E_UNEXPECTED;
}
wchar_t gaia_username[kWindows... | 12,262 |
36,564 | 0 | void cgsem_reset(cgsem_t *cgsem)
{
int ret;
do {
ret = sem_trywait(cgsem);
if (unlikely(ret < 0 && interrupted()))
ret = 0;
} while (!ret);
}
| 12,263 |
112,305 | 0 | content::RenderView* view() { return view_; }
| 12,264 |
172,601 | 0 | status_t AudioFlinger::EffectModule::configure()
{
status_t status;
sp<ThreadBase> thread;
uint32_t size;
audio_channel_mask_t channelMask;
if (mEffectInterface == NULL) {
status = NO_INIT;
goto exit;
}
thread = mThread.promote();
if (thread == 0) {
status = DEAD_OBJECT;
goto exit;
}
... | 12,265 |
71,189 | 0 | static bool hva_to_pfn_fast(unsigned long addr, bool atomic, bool *async,
bool write_fault, bool *writable, kvm_pfn_t *pfn)
{
struct page *page[1];
int npages;
if (!(async || atomic))
return false;
/*
* Fast pin a writable pfn only if it is a write fault request
* or the caller allows to map a writab... | 12,266 |
12,755 | 0 | static int tls_process_cke_rsa(SSL *s, PACKET *pkt, int *al)
{
#ifndef OPENSSL_NO_RSA
unsigned char rand_premaster_secret[SSL_MAX_MASTER_KEY_LENGTH];
int decrypt_len;
unsigned char decrypt_good, version_good;
size_t j, padding_len;
PACKET enc_premaster;
RSA *rsa = NULL;
unsigned char *rsa_de... | 12,267 |
90,445 | 0 | static void __exit ib_uverbs_cleanup(void)
{
ib_unregister_client(&uverbs_client);
class_destroy(uverbs_class);
unregister_chrdev_region(IB_UVERBS_BASE_DEV,
IB_UVERBS_NUM_FIXED_MINOR);
unregister_chrdev_region(dynamic_uverbs_dev,
IB_UVERBS_NUM_DYNAMIC_MINOR);
}
| 12,268 |
77,299 | 0 | ofproto_class_find__(const char *type)
{
size_t i;
for (i = 0; i < n_ofproto_classes; i++) {
const struct ofproto_class *class = ofproto_classes[i];
struct sset types;
bool found;
sset_init(&types);
class->enumerate_types(&types);
found = sset_contains(&types, t... | 12,269 |
35,575 | 0 | static int flush_pending_x87_faults(struct x86_emulate_ctxt *ctxt)
{
bool fault = false;
ctxt->ops->get_fpu(ctxt);
asm volatile("1: fwait \n\t"
"2: \n\t"
".pushsection .fixup,\"ax\" \n\t"
"3: \n\t"
"movb $1, %[fault] \n\t"
"jmp 2b \n\t"
".popsection \n\t"
_ASM_EXTABL... | 12,270 |
104,786 | 0 | static void WindowOpenHelper(Browser* browser, const GURL& start_url,
const std::string& newtab_url,
TabContents** newtab_result) {
ui_test_utils::NavigateToURL(browser, start_url);
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
browser->GetSelectedTab... | 12,271 |
7,124 | 0 | T42_GlyphSlot_Load( FT_GlyphSlot glyph,
FT_Size size,
FT_UInt glyph_index,
FT_Int32 load_flags )
{
FT_Error error;
T42_GlyphSlot t42slot = (T42_GlyphSlot)glyph;
T42_Size t42size = (T42_Size)size;
F... | 12,272 |
104,787 | 0 | void ExtensionService::AddExtension(const Extension* extension) {
scoped_refptr<const Extension> scoped_extension(extension);
if (!extensions_enabled() &&
!extension->is_theme() &&
extension->location() != Extension::COMPONENT &&
!Extension::IsExternalLocation(extension->location()))
return;
... | 12,273 |
155,509 | 0 | void DataReductionProxySettings::RecordDataReductionInit() const {
DCHECK(thread_checker_.CalledOnValidThread());
RecordStartupState(IsDataReductionProxyEnabled() ? PROXY_ENABLED
: PROXY_DISABLED);
RecordStartupSavings();
}
| 12,274 |
3,067 | 0 | static int devicendomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i, limit, code;
ref namesarray;
code = array_get(imemory, space, 1, &namesarray);
if (code < 0)
return code;
limit = r_size(&namesarray) * 2;
for (i = 0;i < limit;i+=2) {
ptr[i] = 0;
ptr[i+1] = 1;... | 12,275 |
66,575 | 0 | static int add_port(struct ports_device *portdev, u32 id)
{
char debugfs_name[16];
struct port *port;
struct port_buffer *buf;
dev_t devt;
unsigned int nr_added_bufs;
int err;
port = kmalloc(sizeof(*port), GFP_KERNEL);
if (!port) {
err = -ENOMEM;
goto fail;
}
kref_init(&port->kref);
port->portdev = por... | 12,276 |
159,342 | 0 | ChromeExtensionsAPIClient::ChromeExtensionsAPIClient() {}
| 12,277 |
96,178 | 0 | MagickExport MagickBooleanType SetQuantumPad(const Image *image,
QuantumInfo *quantum_info,const size_t pad)
{
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
assert(qua... | 12,278 |
169,977 | 0 | xsltApplyFallbacks(xsltTransformContextPtr ctxt, xmlNodePtr node,
xmlNodePtr inst) {
xmlNodePtr child;
int ret = 0;
if ((ctxt == NULL) || (node == NULL) || (inst == NULL) ||
(inst->children == NULL))
return(0);
child = inst->children;
while (child != NULL) {
if ((IS_XSLT_ELE... | 12,279 |
108,066 | 0 | void GLES2DecoderImpl::DoCopyTexImage2D(
GLenum target,
GLint level,
GLenum internal_format,
GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLint border) {
TextureManager::TextureInfo* info = GetTextureInfoForTarget(target);
if (!info) {
SetGLError(GL_INVALID_OPERATION,
"glCopyT... | 12,280 |
164,510 | 0 | static int cellInfoEqual(CellInfo *a, CellInfo *b){
if( a->nKey!=b->nKey ) return 0;
if( a->pPayload!=b->pPayload ) return 0;
if( a->nPayload!=b->nPayload ) return 0;
if( a->nLocal!=b->nLocal ) return 0;
if( a->nSize!=b->nSize ) return 0;
return 1;
}
| 12,281 |
89,256 | 0 | static MagickBooleanType InvokePostscriptDelegate(
const MagickBooleanType verbose,const char *command,char *message,
ExceptionInfo *exception)
{
int
status;
#if defined(MAGICKCORE_GS_DELEGATE) || defined(MAGICKCORE_WINDOWS_SUPPORT)
#define SetArgsStart(command,args_start) \
if (args_start == (const char *... | 12,282 |
124,199 | 0 | base::FilePath ContentBrowserClient::GetHyphenDictionaryDirectory() {
return base::FilePath();
}
| 12,283 |
95,944 | 0 | void CL_CheckTimeout( void ) {
if ( ( !CL_CheckPaused() || !sv_paused->integer )
&& clc.state >= CA_CONNECTED && clc.state != CA_CINEMATIC
&& cls.realtime - clc.lastPacketTime > cl_timeout->value*1000) {
if (++cl.timeoutcount > 5) { // timeoutcount saves debugger
Com_Printf ("\nServer connection timed out... | 12,284 |
61,764 | 0 | static int tcp_sendmsg_fastopen(struct sock *sk, struct msghdr *msg,
int *copied, size_t size)
{
struct tcp_sock *tp = tcp_sk(sk);
struct inet_sock *inet = inet_sk(sk);
int err, flags;
if (!(sysctl_tcp_fastopen & TFO_CLIENT_ENABLE))
return -EOPNOTSUPP;
if (tp->fastopen_req)
return -EALREADY; /* Another Fa... | 12,285 |
166,057 | 0 | void FileSystemManagerImpl::Create(const GURL& path,
bool exclusive,
bool is_directory,
bool recursive,
CreateCallback callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
FileS... | 12,286 |
42,224 | 0 | static void vhost_init_is_le(struct vhost_virtqueue *vq)
{
if (vhost_has_feature(vq, VIRTIO_F_VERSION_1))
vq->is_le = true;
}
| 12,287 |
119,436 | 0 | void RenderThreadImpl::SetGamepadListener(blink::WebGamepadListener* listener) {
gamepad_shared_memory_reader_->SetGamepadListener(listener);
}
| 12,288 |
98,288 | 0 | void FrameLoaderClient::didChangeTitle(WebCore::DocumentLoader *l)
{
setTitle(l->title(), l->url());
}
| 12,289 |
5,863 | 0 | static void ahci_init_d2h(AHCIDevice *ad)
{
IDEState *ide_state = &ad->port.ifs[0];
AHCIPortRegs *pr = &ad->port_regs;
if (ad->init_d2h_sent) {
return;
}
if (ahci_write_fis_d2h(ad)) {
ad->init_d2h_sent = true;
/* We're emulating receiving the first Reg H2D Fis from the devi... | 12,290 |
134,851 | 0 | virtual GURL TestUrl() {
return GURL(kAboutBlankURL);
}
| 12,291 |
135,005 | 0 | void AppCacheUpdateJob::HandleManifestRefetchCompleted(
URLFetcher* fetcher) {
DCHECK(internal_state_ == REFETCH_MANIFEST);
DCHECK(manifest_fetcher_ == fetcher);
manifest_fetcher_ = NULL;
net::URLRequest* request = fetcher->request();
int response_code = request->status().is_success()
? request->Ge... | 12,292 |
139,569 | 0 | static String ValueFontName(const EditorInternalCommand&,
LocalFrame& frame,
Event*) {
return ValueStyle(frame, CSSPropertyFontFamily);
}
| 12,293 |
21,116 | 0 | bool mem_cgroup_reclaimable(struct mem_cgroup *memcg, bool noswap)
{
return test_mem_cgroup_node_reclaimable(memcg, 0, noswap);
}
| 12,294 |
160,809 | 0 | void RenderViewImpl::OnSelectWordAroundCaret() {
bool did_select = false;
int start_adjust = 0;
int end_adjust = 0;
if (webview()) {
WebLocalFrame* focused_frame = GetWebView()->FocusedFrame();
if (focused_frame) {
input_handler_->set_handling_input_event(true);
blink::WebRange initial_rang... | 12,295 |
95,291 | 0 | AcpiNsGetType (
ACPI_NAMESPACE_NODE *Node)
{
ACPI_FUNCTION_TRACE (NsGetType);
if (!Node)
{
ACPI_WARNING ((AE_INFO, "Null Node parameter"));
return_UINT8 (ACPI_TYPE_ANY);
}
return_UINT8 (Node->Type);
}
| 12,296 |
54,151 | 0 | void nf_nat_masquerade_ipv4_register_notifier(void)
{
/* check if the notifier was already set */
if (atomic_inc_return(&masquerade_notifier_refcount) > 1)
return;
/* Register for device down reports */
register_netdevice_notifier(&masq_dev_notifier);
/* Register IP address change reports */
register_inetaddr_... | 12,297 |
36,141 | 0 | kadm5_create_principal_3(void *server_handle,
kadm5_principal_ent_t entry, long mask,
int n_ks_tuple, krb5_key_salt_tuple *ks_tuple,
char *password)
{
krb5_db_entry *kdb;
osa_princ_ent_rec adb;
kadm5_policy_en... | 12,298 |
10,198 | 0 | Move_CVT_Stretched( EXEC_OP_ FT_ULong idx,
FT_F26Dot6 value )
{
CUR.cvt[idx] += FT_DivFix( value, CURRENT_Ratio() );
}
| 12,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.