unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
135,781 | 0 | bool SelectionController::HandleGestureLongPress(
const HitTestResult& hit_test_result) {
TRACE_EVENT0("blink", "SelectionController::handleGestureLongPress");
if (!Selection().IsAvailable())
return false;
if (hit_test_result.IsLiveLink())
return false;
Node* inner_node = hit_test_result.InnerNode... | 14,300 |
177,708 | 0 | int equalizer_enable(effect_context_t *context)
{
equalizer_context_t *eq_ctxt = (equalizer_context_t *)context;
ALOGV("%s", __func__);
if (!offload_eq_get_enable_flag(&(eq_ctxt->offload_eq))) {
offload_eq_set_enable_flag(&(eq_ctxt->offload_eq), true);
if (eq_ctxt->ctl)
offload_eq_send_para... | 14,301 |
74,633 | 0 | static int lowprobe_topology(blkid_probe pr)
{
/* enable topology probing only */
blkid_probe_enable_topology(pr, 1);
blkid_probe_enable_superblocks(pr, 0);
blkid_probe_enable_partitions(pr, 0);
return blkid_do_fullprobe(pr);
}
| 14,302 |
174,419 | 0 | void set_defaults_(FLAC__StreamDecoder *decoder)
{
#if FLAC__HAS_OGG
decoder->private_->is_ogg = false;
#endif
decoder->private_->read_callback = 0;
decoder->private_->seek_callback = 0;
decoder->private_->tell_callback = 0;
decoder->private_->length_callback = 0;
decoder->private_->eof_callback = 0;
decoder->pr... | 14,303 |
45,845 | 0 | static int mcryptd_init_queue(struct mcryptd_queue *queue,
unsigned int max_cpu_qlen)
{
int cpu;
struct mcryptd_cpu_queue *cpu_queue;
queue->cpu_queue = alloc_percpu(struct mcryptd_cpu_queue);
pr_debug("mqueue:%p mcryptd_cpu_queue %p\n", queue, queue->cpu_queue);
if (!queue->cpu_queue)
return -ENOMEM;
... | 14,304 |
61,211 | 0 | nautilus_mime_types_group_get_name (gint group_index)
{
g_return_val_if_fail (group_index < G_N_ELEMENTS (mimetype_groups), NULL);
return gettext (mimetype_groups[group_index].name);
}
| 14,305 |
34,162 | 0 | static int ccid3_hc_tx_parse_options(struct sock *sk, u8 packet_type,
u8 option, u8 *optval, u8 optlen)
{
struct ccid3_hc_tx_sock *hc = ccid3_hc_tx_sk(sk);
__be32 opt_val;
switch (option) {
case TFRC_OPT_RECEIVE_RATE:
case TFRC_OPT_LOSS_EVENT_RATE:
/* Must be ignored on Data packets, cf. RFC 4342 8.3 a... | 14,306 |
175,281 | 0 | static void dispatchSimAuthentication(Parcel &p, RequestInfo *pRI)
{
RIL_SimAuthentication pf;
int32_t t;
status_t status;
memset(&pf, 0, sizeof(pf));
status = p.readInt32(&t);
pf.authContext = (int) t;
pf.authData = strdupReadString(p);
pf.aid = strdupReadString(p);
startRequest;
... | 14,307 |
3,832 | 0 | static BOOL init_backtrace()
{
HMODULE hmodDbgHelp = LoadLibraryA("dbghelp");
/*
#define GETFUNC(x) \
p##x = (typeof(x)*)GetProcAddress(hmodDbgHelp, #x); \
if (!p##x) \
{ \
return FALSE; \
}
*/
#define FUNC(x) #x
pStackWalk = (BOOL (WINAPI *)(
DWORD MachineType,
HANDLE hPr... | 14,308 |
160,115 | 0 | void BackendIO::CancelSparseIO(EntryImpl* entry) {
operation_ = OP_CANCEL_IO;
entry_ = entry;
}
| 14,309 |
18,836 | 0 | static int cipso_v4_map_cat_rbm_valid(const struct cipso_v4_doi *doi_def,
const unsigned char *bitmap,
u32 bitmap_len)
{
int cat = -1;
u32 bitmap_len_bits = bitmap_len * 8;
u32 cipso_cat_size;
u32 *cipso_array;
switch (doi_def->type) {
case CIPSO_V4_MAP_PASS:
return 0;
case CIPSO_V4_MAP_TR... | 14,310 |
144,301 | 0 | WizardController* LoginDisplayHostWebUI::GetWizardController() {
return wizard_controller_.get();
}
| 14,311 |
18,883 | 0 | void inet_csk_reqsk_queue_prune(struct sock *parent,
const unsigned long interval,
const unsigned long timeout,
const unsigned long max_rto)
{
struct inet_connection_sock *icsk = inet_csk(parent);
struct request_sock_queue *queue = &icsk->icsk_accept_queue;
struct listen_sock *lopt = queue->listen_opt;
... | 14,312 |
43,152 | 0 | static int oz_usb_vendor_class_req(void *hpd, u8 req_id, u8 req_type,
u8 request, __le16 value, __le16 index, const u8 *data, int data_len)
{
struct oz_usb_ctx *usb_ctx = hpd;
struct oz_pd *pd = usb_ctx->pd;
struct oz_elt *elt;
struct oz_elt_buf *eb = &pd->elt_buff;
struct oz_elt_info *ei = oz_elt_info_alloc(&pd-... | 14,313 |
108,559 | 0 | int ScrollbarThemeWin::getThemeState(ScrollbarThemeClient* scrollbar, ScrollbarPart part) const
{
if (scrollbar->pressedPart() == ThumbPart) {
if (part == ThumbPart)
return SCRBS_PRESSED;
return (windowsVersion() < WindowsVista) ? SCRBS_NORMAL : SCRBS_HOVER;
}
if (!scrollbar->ena... | 14,314 |
171,600 | 0 | char16_t *strncpy16(char16_t *dst, const char16_t *src, size_t n)
{
char16_t *q = dst;
const char16_t *p = src;
char ch;
while (n) {
n--;
*q++ = ch = *p++;
if ( !ch )
break;
}
*q = 0;
return dst;
}
| 14,315 |
119,855 | 0 | void WebContentsImpl::RunJavaScriptMessage(
RenderViewHost* rvh,
const string16& message,
const string16& default_prompt,
const GURL& frame_url,
JavaScriptMessageType javascript_message_type,
bool user_gesture,
IPC::Message* reply_msg,
bool* did_suppress_message) {
bool suppress_this_m... | 14,316 |
45,377 | 0 | static void tree_move_down(struct btrfs_root *root,
struct btrfs_path *path,
int *level, int root_level)
{
BUG_ON(*level == 0);
path->nodes[*level - 1] = read_node_slot(root, path->nodes[*level],
path->slots[*level]);
path->slots[*level - 1] = 0;
(*level)--;
}
| 14,317 |
162,422 | 0 | MojoResult ScopedPlatformHandleToMojoPlatformHandle(
ScopedPlatformHandle handle,
MojoPlatformHandle* platform_handle) {
if (platform_handle->struct_size != sizeof(MojoPlatformHandle))
return MOJO_RESULT_INVALID_ARGUMENT;
if (!handle.is_valid()) {
platform_handle->type = MOJO_PLATFORM_HANDLE_TYPE_I... | 14,318 |
185,398 | 1 | void DistillerNativeJavaScript::EnsureServiceConnected() {
if (!distiller_js_service_) {
render_frame_->GetServiceRegistry()->ConnectToRemoteService(
mojo::GetProxy(&distiller_js_service_));
}
}
| 14,319 |
141,486 | 0 | void PaintLayerScrollableArea::ScrollbarFrameRectChanged() {
if (!HasOverlayScrollbars())
GetLayoutBox()->SetNeedsPaintPropertyUpdate();
}
| 14,320 |
169,169 | 0 | void RenderFrameHostImpl::OnUpdatePictureInPictureSurfaceId(
const viz::SurfaceId& surface_id,
const gfx::Size& natural_size) {
if (delegate_)
delegate_->UpdatePictureInPictureSurfaceId(surface_id, natural_size);
}
| 14,321 |
18,436 | 0 | int main(int argc, char *argv[]) {
SERVER *serve;
GArray *servers;
GError *err=NULL;
if (sizeof( struct nbd_request )!=28) {
fprintf(stderr,"Bad size of structure. Alignment problems?\n");
exit(EXIT_FAILURE) ;
}
memset(pidftemplate, '\0', 256);
logging();
config_file_pos = g_strdup(CFILE);
serve=cmdline... | 14,322 |
21,030 | 0 | static struct page_cgroup *lookup_page_cgroup_used(struct page *page)
{
struct page_cgroup *pc;
pc = lookup_page_cgroup(page);
/*
* Can be NULL while feeding pages into the page allocator for
* the first time, i.e. during boot or memory hotplug;
* or when mem_cgroup_disabled().
*/
if (likely(pc) && PageCgr... | 14,323 |
23,495 | 0 | static void nfs4_xdr_enc_setattr(struct rpc_rqst *req, struct xdr_stream *xdr,
struct nfs_setattrargs *args)
{
struct compound_hdr hdr = {
.minorversion = nfs4_xdr_minorversion(&args->seq_args),
};
encode_compound_hdr(xdr, req, &hdr);
encode_sequence(xdr, &args->seq_args, &hdr);
encode_putfh(xdr, args->fh,... | 14,324 |
32,763 | 0 | static void tg3_setup_flow_control(struct tg3 *tp, u32 lcladv, u32 rmtadv)
{
u8 autoneg;
u8 flowctrl = 0;
u32 old_rx_mode = tp->rx_mode;
u32 old_tx_mode = tp->tx_mode;
if (tg3_flag(tp, USE_PHYLIB))
autoneg = tp->mdio_bus->phy_map[TG3_PHY_MII_ADDR]->autoneg;
else
autoneg = tp->link_config.autoneg;
if (auton... | 14,325 |
156,064 | 0 | DidFinishNavigationObserver(content::WebContents* web_contents,
bool add_data_reduction_proxy_data)
: content::WebContentsObserver(web_contents),
add_data_reduction_proxy_data_(add_data_reduction_proxy_data) {}
| 14,326 |
66,208 | 0 | static int mailimf_month_name_parse(const char * message, size_t length,
size_t * indx, int * result)
{
size_t cur_token;
int month;
int guessed_month;
int r;
cur_token = * indx;
guessed_month = guess_month(message, length, cur_token);
if (guessed_month == -1)
return MAILIMF_ERROR_PARSE;
... | 14,327 |
71,256 | 0 | static long kvm_vcpu_ioctl(struct file *filp,
unsigned int ioctl, unsigned long arg)
{
struct kvm_vcpu *vcpu = filp->private_data;
void __user *argp = (void __user *)arg;
int r;
struct kvm_fpu *fpu = NULL;
struct kvm_sregs *kvm_sregs = NULL;
if (vcpu->kvm->mm != current->mm)
return -EIO;
if (unlikely(_... | 14,328 |
168,861 | 0 | PermissionsData::AccessType PermissionsData::GetPageAccess(
const Extension* extension,
const GURL& document_url,
int tab_id,
std::string* error) const {
base::AutoLock auto_lock(runtime_lock_);
const PermissionSet* tab_permissions = GetTabSpecificPermissions(tab_id);
return CanRunOnPage(
e... | 14,329 |
138,537 | 0 | static void cryptographicallyRandomValues(unsigned char* buffer, size_t length)
{
Platform::current()->cryptographicallyRandomValues(buffer, length);
}
| 14,330 |
109,476 | 0 | ProfileNameIdleTimeMap* ScriptProfiler::currentProfileNameIdleTimeMap()
{
AtomicallyInitializedStatic(WTF::ThreadSpecific<ProfileNameIdleTimeMap>*, map = new WTF::ThreadSpecific<ProfileNameIdleTimeMap>);
return *map;
}
| 14,331 |
158,546 | 0 | bool WebLocalFrameImpl::HasVisibleContent() const {
auto* layout_object = GetFrame()->OwnerLayoutObject();
if (layout_object &&
layout_object->StyleRef().Visibility() != EVisibility::kVisible) {
return false;
}
if (LocalFrameView* view = GetFrameView())
return view->Width() > 0 && view->Height() ... | 14,332 |
175,454 | 0 | static int in_dump(const struct audio_stream *stream, int fd)
{
(void)stream;
(void)fd;
return 0;
}
| 14,333 |
29,139 | 0 | static struct nfs4_createdata *nfs4_alloc_createdata(struct inode *dir,
struct qstr *name, struct iattr *sattr, u32 ftype)
{
struct nfs4_createdata *data;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data != NULL) {
struct nfs_server *server = NFS_SERVER(dir);
data->msg.rpc_proc = &nfs4_procedures[NFSPROC4... | 14,334 |
143,447 | 0 | void TokenPreloadScanner::scan(const HTMLToken& token, const SegmentedString& source, PreloadRequestStream& requests, ViewportDescriptionWrapper* viewport)
{
scanCommon(token, source, requests, viewport, nullptr);
}
| 14,335 |
173,927 | 0 | long long Segment::GetDuration() const {
assert(m_pInfo);
return m_pInfo->GetDuration();
}
| 14,336 |
46,184 | 0 | void free_anon_bdev(dev_t dev)
{
int slot = MINOR(dev);
spin_lock(&unnamed_dev_lock);
ida_remove(&unnamed_dev_ida, slot);
if (slot < unnamed_dev_start)
unnamed_dev_start = slot;
spin_unlock(&unnamed_dev_lock);
}
| 14,337 |
90,375 | 0 | megasas_ldio_outstanding_show(struct device *cdev, struct device_attribute *attr,
char *buf)
{
struct Scsi_Host *shost = class_to_shost(cdev);
struct megasas_instance *instance = (struct megasas_instance *)shost->hostdata;
return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&instance->ldio_outstanding));
}
| 14,338 |
84,700 | 0 | static int lo_read_simple(struct loop_device *lo, struct request *rq,
loff_t pos)
{
struct bio_vec bvec;
struct req_iterator iter;
struct iov_iter i;
ssize_t len;
rq_for_each_segment(bvec, rq, iter) {
iov_iter_bvec(&i, ITER_BVEC, &bvec, 1, bvec.bv_len);
len = vfs_iter_read(lo->lo_backing_file, &i, &pos, 0);... | 14,339 |
77,378 | 0 | ofproto_set_datapath_id(struct ofproto *p, uint64_t datapath_id)
{
uint64_t old_dpid = p->datapath_id;
p->datapath_id = datapath_id ? datapath_id : pick_datapath_id(p);
if (p->datapath_id != old_dpid) {
/* Force all active connections to reconnect, since there is no way to
* notify a contro... | 14,340 |
74,219 | 0 | leap_month(
u_long sec /* current NTP second */
)
{
int leap;
int32 year, month;
u_int32 ndays;
ntpcal_split tmp;
vint64 tvl;
/* --*-- expand time and split to days */
tvl = ntpcal_ntp_to_ntp(sec, NULL);
tmp = ntpcal_daysplit(&tvl);
/* --*-- split to years and days in year */
tmp ... | 14,341 |
8,945 | 0 | void vrend_set_uniform_buffer(struct vrend_context *ctx,
uint32_t shader,
uint32_t index,
uint32_t offset,
uint32_t length,
uint32_t res_handle)
{
struct vrend_resourc... | 14,342 |
42,007 | 0 | static inline int pipelined_send(struct msg_queue *msq, struct msg_msg *msg)
{
struct msg_receiver *msr, *t;
list_for_each_entry_safe(msr, t, &msq->q_receivers, r_list) {
if (testmsg(msg, msr->r_msgtype, msr->r_mode) &&
!security_msg_queue_msgrcv(msq, msg, msr->r_tsk,
msr->r_msgtype, msr->r_mode)... | 14,343 |
36,796 | 0 | krb5_gss_unwrap_iov(OM_uint32 *minor_status,
gss_ctx_id_t context_handle,
int *conf_state,
gss_qop_t *qop_state,
gss_iov_buffer_desc *iov,
int iov_count)
{
OM_uint32 major_status;
major_status = kg_unseal_iov(mi... | 14,344 |
18,343 | 0 | dump_config_as_events() {
g_hash_table_foreach(uzbl.comm.proto_var, dump_var_hash_as_event, NULL);
}
| 14,345 |
44,070 | 0 | is_config_change(xmlNode *xml)
{
GListPtr gIter = NULL;
xml_private_t *p = NULL;
xmlNode *config = first_named_child(xml, XML_CIB_TAG_CONFIGURATION);
if(config) {
p = config->_private;
}
if(p && is_set(p->flags, xpf_dirty)) {
return TRUE;
}
if(xml->doc && xml->doc->_pri... | 14,346 |
30,043 | 0 | static void vhost_net_enable_zcopy(int vq)
{
vhost_net_zcopy_mask |= 0x1 << vq;
}
| 14,347 |
52,066 | 0 | static inline u32 perc(u32 count, u32 total)
{
return (count * 100 + (total / 2)) / total;
}
| 14,348 |
20,177 | 0 | int sock_no_accept(struct socket *sock, struct socket *newsock, int flags)
{
return -EOPNOTSUPP;
}
| 14,349 |
155,581 | 0 | base::string16 AuthenticatorGenericErrorSheetModel::GetStepDescription() const {
return description_;
}
| 14,350 |
100,893 | 0 | bool ExtensionInstallUI::Prompt::HasAbortButtonLabel() const {
return kAbortButtonIds[type_] > 0;
}
| 14,351 |
181,061 | 1 | l2tp_accm_print(netdissect_options *ndo, const u_char *dat)
{
const uint16_t *ptr = (const uint16_t *)dat;
uint16_t val_h, val_l;
ptr++; /* skip "Reserved" */
val_h = EXTRACT_16BITS(ptr); ptr++;
val_l = EXTRACT_16BITS(ptr); ptr++;
ND_PRINT((ndo, "send=%08x ", (val_h<<16) + val_l));
val_h = EXTRACT_16BITS(ptr); pt... | 14,352 |
163,345 | 0 | RenderThreadImpl::HostAllocateSharedMemoryBuffer(size_t size) {
return ChildThreadImpl::AllocateSharedMemory(size);
}
| 14,353 |
154,305 | 0 | bool GLES2DecoderImpl::InitializeSRGBConverter(
const char* function_name) {
if (!srgb_converter_.get()) {
LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER(function_name);
srgb_converter_.reset(
new SRGBConverter(feature_info_.get()));
srgb_converter_->InitializeSRGBConverter(this);
if (LOCAL_PEEK_GL_... | 14,354 |
21,449 | 0 | static void fill_elf_header(struct elfhdr *elf, int segs,
u16 machine, u32 flags, u8 osabi)
{
memset(elf, 0, sizeof(*elf));
memcpy(elf->e_ident, ELFMAG, SELFMAG);
elf->e_ident[EI_CLASS] = ELF_CLASS;
elf->e_ident[EI_DATA] = ELF_DATA;
elf->e_ident[EI_VERSION] = EV_CURRENT;
elf->e_ident[EI_OSABI] = ELF_OSABI... | 14,355 |
10,445 | 0 | static bool megasas_frame_is_sgl64(MegasasCmd *cmd)
{
return cmd->flags & MFI_FRAME_SGL64;
}
| 14,356 |
93,128 | 0 | inline int web_client_api_request_v1_alarm_variables(RRDHOST *host, struct web_client *w, char *url) {
return web_client_api_request_single_chart(host, w, url, health_api_v1_chart_variables2json);
}
| 14,357 |
46,535 | 0 | static int unix_mknod(const char *sun_path, umode_t mode, struct path *res)
{
struct dentry *dentry;
struct path path;
int err = 0;
/*
* Get the parent directory, calculate the hash for last
* component.
*/
dentry = kern_path_create(AT_FDCWD, sun_path, &path, 0);
err = PTR_ERR(dentry);
if (IS_ERR(dentry))
... | 14,358 |
67,958 | 0 | static void jp2_colr_dumpdata(jp2_box_t *box, FILE *out)
{
jp2_colr_t *colr = &box->data.colr;
fprintf(out, "method=%d; pri=%d; approx=%d\n", (int)colr->method, (int)colr->pri, (int)colr->approx);
switch (colr->method) {
case JP2_COLR_ENUM:
fprintf(out, "csid=%d\n", (int)colr->csid);
break;
case JP2_COLR_ICC:
... | 14,359 |
161,728 | 0 | bool PlatformSensor::IsActiveForTesting() const {
return is_active_;
}
| 14,360 |
53,320 | 0 | static void prepare_vmcs12(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12,
u32 exit_reason, u32 exit_intr_info,
unsigned long exit_qualification)
{
/* update guest state fields: */
vmcs12->guest_cr0 = vmcs12_guest_cr0(vcpu, vmcs12);
vmcs12->guest_cr4 = vmcs12_guest_cr4(vcpu, vmcs12);
vmcs12->guest_rsp = ... | 14,361 |
178,602 | 1 | report_error (const char *format, ...)
#else
report_error (format, va_alist)
const char *format;
va_dcl
#endif
{
va_list args;
error_prolog (1);
SH_VA_START (args, format);
vfprintf (stderr, format, args);
fprintf (stderr, "\n");
va_end (args);
if (exit_immediately_on_error)
exit_shell (1);
}
| 14,362 |
48,755 | 0 | static u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb)
{
struct sock *sk = skb->sk;
int queue_index = sk_tx_queue_get(sk);
if (queue_index < 0 || skb->ooo_okay ||
queue_index >= dev->real_num_tx_queues) {
int new_index = get_xps_queue(dev, skb);
if (new_index < 0)
new_index = skb_tx_ha... | 14,363 |
181,393 | 1 | static int crypto_ccm_auth(struct aead_request *req, struct scatterlist *plain,
unsigned int cryptlen)
{
struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req);
struct crypto_aead *aead = crypto_aead_reqtfm(req);
struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead);
AHASH_REQUEST_ON_STACK(ahreq, ctx->mac);
unsigne... | 14,364 |
102,343 | 0 | ExtensionPrefs::~ExtensionPrefs() {
}
| 14,365 |
84,627 | 0 | floor_at_intervals(int x, int step)
{
int mo = x % step;
if (mo > 0)
x -= mo;
else if (mo < 0)
x += step - mo;
return x;
}
| 14,366 |
68,557 | 0 | gst_asf_demux_handle_src_query (GstPad * pad, GstObject * parent,
GstQuery * query)
{
GstASFDemux *demux;
gboolean res = FALSE;
demux = GST_ASF_DEMUX (parent);
GST_DEBUG ("handling %s query",
gst_query_type_get_name (GST_QUERY_TYPE (query)));
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_D... | 14,367 |
34,861 | 0 | static int nlmclnt_async_call(struct rpc_cred *cred, struct nlm_rqst *req, u32 proc, const struct rpc_call_ops *tk_ops)
{
struct rpc_message msg = {
.rpc_argp = &req->a_args,
.rpc_resp = &req->a_res,
.rpc_cred = cred,
};
struct rpc_task *task;
int err;
task = __nlm_async_call(req, proc, &msg, tk_ops);
if (... | 14,368 |
38,106 | 0 | static int whiteheat_tiocmget(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
struct whiteheat_private *info = usb_get_serial_port_data(port);
unsigned int modem_signals = 0;
firm_get_dtr_rts(port);
if (info->mcr & UART_MCR_DTR)
modem_signals |= TIOCM_DTR;
if (info->mcr & UART_MCR_RT... | 14,369 |
115,176 | 0 | views::View* OmniboxViewWin::AddToView(views::View* parent) {
native_view_host_ = new OmniboxViewWrapper(this);
parent->AddChildView(native_view_host_);
native_view_host_->set_focus_view(parent);
native_view_host_->Attach(GetNativeView());
return native_view_host_;
}
| 14,370 |
98,833 | 0 | GURL GetURLFromCookiePair(
const net::CookieMonster::CookieListPair& cookie_pair) {
const std::string& domain_key = cookie_pair.first;
const net::CookieMonster::CanonicalCookie& cookie = cookie_pair.second;
const std::string scheme =
cookie.IsSecure() ? chrome::kHttpsScheme : chrome::kHttpScheme;
con... | 14,371 |
157,544 | 0 | std::unique_ptr<net::URLRequest> CreateAndExecuteRequest(const GURL& url) {
std::unique_ptr<net::URLRequest> request(context_.CreateRequest(
url, net::IDLE, &delegate_, TRAFFIC_ANNOTATION_FOR_TESTS));
request->Start();
drp_test_context_->RunUntilIdle();
return request;
}
| 14,372 |
63,158 | 0 | char *MSG_ReadString( msg_t *msg ) {
static char string[MAX_STRING_CHARS];
int l,c;
l = 0;
do {
c = MSG_ReadByte(msg); // use ReadByte so -1 is out of bounds
if ( c == -1 || c == 0 ) {
break;
}
if ( c == '%' ) {
c = '.';
}
if ( c > 127 ) {
c = '.';
}
string[l] = c;
l++;
} while (l <... | 14,373 |
95,591 | 0 | int Com_EventLoop( void ) {
sysEvent_t ev;
netadr_t evFrom;
byte bufData[MAX_MSGLEN];
msg_t buf;
MSG_Init( &buf, bufData, sizeof( bufData ) );
while ( 1 ) {
ev = Com_GetEvent();
if ( ev.evType == SE_NONE ) {
while ( NET_GetLoopPacket( NS_CLIENT, &evFrom, &buf ) ) {
CL_PacketEvent( evFrom, &buf );
... | 14,374 |
14,317 | 0 | bool address_space_rw(AddressSpace *as, hwaddr addr, uint8_t *buf,
int len, bool is_write)
{
hwaddr l;
uint8_t *ptr;
uint64_t val;
hwaddr addr1;
MemoryRegion *mr;
bool error = false;
while (len > 0) {
l = len;
mr = address_space_translate(as, addr, &add... | 14,375 |
84,544 | 0 | sig_chld(int signo)
{
int p_stat;
pid_t pid;
#ifdef HAVE_WAITPID
while ((pid = waitpid(-1, &p_stat, WNOHANG)) > 0)
#elif HAVE_WAIT3
while ((pid = wait3(&p_stat, WNOHANG, NULL)) > 0)
#else
if ((pid = wait(&p_stat)) > 0)
#endif
{
DownloadList *d;
if (WIFEXITED(p_stat)) {
for (d = FirstDL;... | 14,376 |
3,581 | 0 | static int ca_dn_cmp(const X509_NAME *const *a, const X509_NAME *const *b)
{
return (X509_NAME_cmp(*a, *b));
}
| 14,377 |
174,045 | 0 | u32 NextPacket(u8 **pStrm)
{
u32 index;
u32 maxIndex;
u32 zeroCount;
u8 *stream;
u8 byte;
static u32 prevIndex=0;
/* For default stream mode all the stream is in first packet */
if (!packetize && !nalUnitStream)
return 0;
index = 0;
stream = *pStrm + prevIndex;
maxIndex = (u32)(st... | 14,378 |
179,752 | 1 | int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size)
{
kuid_t euid;
kgid_t egid;
int id;
int next_id = ids->next_id;
if (size > IPCMNI)
size = IPCMNI;
if (ids->in_use >= size)
return -ENOSPC;
idr_preload(GFP_KERNEL);
spin_lock_init(&new->lock);
new->deleted = false;
rcu_read_lock();
spin_lock(&ne... | 14,379 |
49,367 | 0 | static void __exit nfnetlink_exit(void)
{
pr_info("Removing netfilter NETLINK layer.\n");
unregister_pernet_subsys(&nfnetlink_net_ops);
}
| 14,380 |
4,592 | 0 | PHP_FUNCTION(openssl_pkey_new)
{
struct php_x509_request req;
zval * args = NULL;
zval *data;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|a!", &args) == FAILURE) {
return;
}
RETVAL_FALSE;
if (args && Z_TYPE_P(args) == IS_ARRAY) {
EVP_PKEY *pkey;
if ((data = zend_hash_str_find(Z_ARRVAL_P(args), "rsa", s... | 14,381 |
107,497 | 0 | static Eina_Bool _ewk_view_smart_run_javascript_prompt(Ewk_View_Smart_Data* smartData, Evas_Object* frame, const char* message, const char* defaultValue, char** value)
{
*value = strdup("test");
Eina_Bool result = true;
INF("javascript prompt:\n"
"\t message: %s\n"
"\tdefault value: %s\... | 14,382 |
127,980 | 0 | void AwContents::ClearMatches(JNIEnv* env, jobject obj) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
GetFindHelper()->ClearMatches();
}
| 14,383 |
39,443 | 0 | static int transfer_size(int ssize, int max_sector, int max_size)
{
SUPBOUND(max_sector, fsector_t + max_size);
/* alignment */
max_sector -= (max_sector % _floppy->sect) % ssize;
/* transfer size, beginning not aligned */
current_count_sectors = max_sector - fsector_t;
return max_sector;
}
| 14,384 |
45,692 | 0 | static void crypto_rfc3686_exit_tfm(struct crypto_tfm *tfm)
{
struct crypto_rfc3686_ctx *ctx = crypto_tfm_ctx(tfm);
crypto_free_ablkcipher(ctx->child);
}
| 14,385 |
150,090 | 0 | static void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {}
| 14,386 |
80,948 | 0 | static int handle_desc(struct kvm_vcpu *vcpu)
{
WARN_ON(!(vcpu->arch.cr4 & X86_CR4_UMIP));
return emulate_instruction(vcpu, 0) == EMULATE_DONE;
}
| 14,387 |
76,883 | 0 | encode_SAMPLE(const struct ofpact_sample *sample,
enum ofp_version ofp_version OVS_UNUSED, struct ofpbuf *out)
{
if (sample->ofpact.raw == NXAST_RAW_SAMPLE3
|| sample->direction != NX_ACTION_SAMPLE_DEFAULT) {
encode_SAMPLE2(sample, put_NXAST_SAMPLE3(out));
} else if (sample->ofpact... | 14,388 |
122,702 | 0 | bool Extension::LoadThemeDisplayProperties(const DictionaryValue* theme_value,
string16* error) {
const DictionaryValue* display_properties_value = NULL;
if (theme_value->GetDictionary(keys::kThemeDisplayProperties,
&display_properties_valu... | 14,389 |
63,980 | 0 | static void update_lf_deltas(VP8Context *s)
{
VP56RangeCoder *c = &s->c;
int i;
for (i = 0; i < 4; i++) {
if (vp8_rac_get(c)) {
s->lf_delta.ref[i] = vp8_rac_get_uint(c, 6);
if (vp8_rac_get(c))
s->lf_delta.ref[i] = -s->lf_delta.ref[i];
}
}
fo... | 14,390 |
1,758 | 0 | void IRCView::dropEvent(QDropEvent* e)
{
if (e->mimeData() && e->mimeData()->hasUrls())
emit urlsDropped(KUrl::List::fromMimeData(e->mimeData(), KUrl::List::PreferLocalUrls));
}
| 14,391 |
159,095 | 0 | const char* DownloadItemImpl::DebugDownloadStateString(
DownloadInternalState state) {
switch (state) {
case INITIAL_INTERNAL:
return "INITIAL";
case TARGET_PENDING_INTERNAL:
return "TARGET_PENDING";
case INTERRUPTED_TARGET_PENDING_INTERNAL:
return "INTERRUPTED_TARGET_PENDING";
c... | 14,392 |
93,124 | 0 | char *url_encode(char *str) {
char *buf, *pbuf;
pbuf = buf = mallocz(strlen(str) * 3 + 1);
while (*str) {
if (isalnum(*str) || *str == '-' || *str == '_' || *str == '.' || *str == '~')
*pbuf++ = *str;
else if (*str == ' ')
*pbuf++ = '+';
else
*... | 14,393 |
104,926 | 0 | int32 ResourceTracker::AddVar(Var* var) {
if (last_var_id_ == std::numeric_limits<int32>::max() >> kPPIdTypeBits)
return 0;
int32 new_id = MakeTypedId(++last_var_id_, PP_ID_TYPE_VAR);
live_vars_.insert(std::make_pair(new_id, std::make_pair(var, 1)));
ObjectVar* object_var = var->AsObjectVar();
if (objec... | 14,394 |
79,915 | 0 | xfs_attr3_leaf_hdr_from_disk(
struct xfs_da_geometry *geo,
struct xfs_attr3_icleaf_hdr *to,
struct xfs_attr_leafblock *from)
{
int i;
ASSERT(from->hdr.info.magic == cpu_to_be16(XFS_ATTR_LEAF_MAGIC) ||
from->hdr.info.magic == cpu_to_be16(XFS_ATTR3_LEAF_MAGIC));
if (from->hdr.info.magic == cpu_to_be16(XF... | 14,395 |
146,554 | 0 | void WebGLRenderingContextBase::texSubImage2D(
ExecutionContext* execution_context,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
HTMLCanvasElement* canvas,
ExceptionState& exception_state) {
TexImageHelperHTMLCanvasElement(
execution_c... | 14,396 |
96,006 | 0 | void CL_WriteDemoMessage ( msg_t *msg, int headerBytes ) {
int len, swlen;
len = clc.serverMessageSequence;
swlen = LittleLong( len );
FS_Write (&swlen, 4, clc.demofile);
len = msg->cursize - headerBytes;
swlen = LittleLong(len);
FS_Write (&swlen, 4, clc.demofile);
FS_Write ( msg->data + headerBytes, len, clc... | 14,397 |
131,361 | 0 | static void documentTypeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjectPythonV8Internal::documentTypeAttributeAttributeSetter(jsValue, info);
TRACE_EVENT_SET_S... | 14,398 |
182,872 | 1 | static void Sp_search(js_State *J)
{
js_Regexp *re;
const char *text;
Resub m;
text = checkstring(J, 0);
if (js_isregexp(J, 1))
js_copy(J, 1);
else if (js_isundefined(J, 1))
js_newregexp(J, "", 0);
else
js_newregexp(J, js_tostring(J, 1), 0);
re = js_toregexp(J, -1);
if (!js_regexec(re->prog, text, &m, 0))
js_pushn... | 14,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.