unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
5,324 | 0 | clump_splay_walk_bwd_init(clump_splay_walker *sw, const gs_ref_memory_t *mem)
{
clump_t *cp = mem->root;
if (cp)
{
SANITY_CHECK(cp);
sw->from = SPLAY_FROM_RIGHT;
while (cp->right)
{
cp = cp->right;
}
}
sw->cp = cp;
sw->end = NULL;
return ... | 10,400 |
105,676 | 0 | void TypedUrlModelAssociator::AbortAssociation() {
}
| 10,401 |
48,835 | 0 | static int napi_gro_complete(struct sk_buff *skb)
{
struct packet_offload *ptype;
__be16 type = skb->protocol;
struct list_head *head = &offload_base;
int err = -ENOENT;
BUILD_BUG_ON(sizeof(struct napi_gro_cb) > sizeof(skb->cb));
if (NAPI_GRO_CB(skb)->count == 1) {
skb_shinfo(skb)->gso_size = 0;
goto out;
... | 10,402 |
142,411 | 0 | SkColor GetBaseColor(SkColor color) {
return SkColorSetRGB(SkColorGetR(color), SkColorGetG(color),
SkColorGetB(color));
}
| 10,403 |
165,646 | 0 | std::wstring GetClientStateKeyPath() {
return GetClientStateKeyPath(GetAppGuid());
}
| 10,404 |
185,426 | 1 | Node::InsertionNotificationRequest HTMLBodyElement::insertedInto(ContainerNode* insertionPoint)
{
HTMLElement::insertedInto(insertionPoint);
if (insertionPoint->inDocument()) {
// FIXME: It's surprising this is web compatible since it means a marginwidth
// and marginheight attribute can magically a... | 10,405 |
176,269 | 0 | static PropertyDetails GetDetailsImpl(JSObject* holder, uint32_t entry) {
FixedArray* parameter_map = FixedArray::cast(holder->elements());
uint32_t length = parameter_map->length() - 2;
if (entry < length) {
return PropertyDetails(kData, NONE, 0, PropertyCellType::kNoCell);
}
FixedArray* arguments = FixedArray:... | 10,406 |
65,947 | 0 | static __printf(2,3) void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) {}
| 10,407 |
98,573 | 0 | bool UpdateWindowFunction::RunImpl() {
int window_id;
EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &window_id));
DictionaryValue* update_props;
EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(1, &update_props));
Browser* browser = GetBrowserInProfileWithId(profile(), window_id,
... | 10,408 |
103,151 | 0 | void Browser::OpenHelpTab() {
GURL help_url(kHelpContentUrl);
GURL localized_help_url = google_util::AppendGoogleLocaleParam(help_url);
AddSelectedTabWithURL(localized_help_url, PageTransition::AUTO_BOOKMARK);
}
| 10,409 |
172,809 | 0 | static const void* get_profile_interface (const char *profile_id)
{
LOG_INFO("get_profile_interface %s", profile_id);
/* sanity check */
if (interface_ready() == FALSE)
return NULL;
/* check for supported profile interfaces */
if (is_profile(profile_id, BT_PROFILE_HANDSFREE_ID))
return btif_hf_get_interface... | 10,410 |
74,060 | 0 | dwarf_elf_object_access_get_section_info(
void* obj_in,
Dwarf_Half section_index,
Dwarf_Obj_Access_Section* ret_scn,
int* error)
{
dwarf_elf_object_access_internals_t*obj =
(dwarf_elf_object_access_internals_t*)obj_in;
Elf32_Shdr *shdr32 = 0;
#ifdef HAVE_ELF64_GETSHDR
Elf64_Shdr *s... | 10,411 |
32,477 | 0 | static void __tg3_set_mac_addr(struct tg3 *tp, int skip_mac_1)
{
u32 addr_high, addr_low;
int i;
addr_high = ((tp->dev->dev_addr[0] << 8) |
tp->dev->dev_addr[1]);
addr_low = ((tp->dev->dev_addr[2] << 24) |
(tp->dev->dev_addr[3] << 16) |
(tp->dev->dev_addr[4] << 8) |
(tp->dev->dev_addr[5] ... | 10,412 |
77,463 | 0 | ofputil_append_group_stats(struct ovs_list *replies,
const struct ofputil_group_stats *gs)
{
size_t bucket_counter_size;
struct ofp11_bucket_counter *bucket_counters;
size_t length;
bucket_counter_size = gs->n_buckets * sizeof(struct ofp11_bucket_counter);
switch (ofpmp_... | 10,413 |
69,645 | 0 | rend_service_use_direct_connection(const or_options_t* options,
const extend_info_t* ei)
{
/* We'll connect directly all reachable addresses, whether preferred or not.
* The prefer_ipv6 argument to fascist_firewall_allows_address_addr is
* ignored, because pref_only is 0. */
... | 10,414 |
135,816 | 0 | static Position ComputePositionForChildrenRemoval(const Position& position,
ContainerNode& container) {
Node* node = position.ComputeContainerNode();
if (container.ContainsIncludingHostElements(*node))
return Position::FirstPositionInNode(container);
return po... | 10,415 |
95,597 | 0 | sysEvent_t Com_GetEvent( void ) {
if ( com_pushedEventsHead > com_pushedEventsTail ) {
com_pushedEventsTail++;
return com_pushedEvents[ ( com_pushedEventsTail - 1 ) & ( MAX_PUSHED_EVENTS - 1 ) ];
}
return Com_GetRealEvent();
}
| 10,416 |
30,235 | 0 | ftrace_suspend_notifier_call(struct notifier_block *bl, unsigned long state,
void *unused)
{
switch (state) {
case PM_HIBERNATION_PREPARE:
pause_graph_tracing();
break;
case PM_POST_HIBERNATION:
unpause_graph_tracing();
break;
}
return NOTIFY_DONE;
}
| 10,417 |
162,066 | 0 | void CreateProcessResourceCoordinator(
RenderProcessHostImpl* render_process_host,
resource_coordinator::mojom::ProcessCoordinationUnitRequest request) {
render_process_host->GetProcessResourceCoordinator()->AddBinding(
std::move(request));
}
| 10,418 |
107,417 | 0 | void JSArray::checkConsistency(ConsistencyCheckType type)
{
ArrayStorage* storage = m_storage;
ASSERT(storage);
if (type == SortConsistencyCheck)
ASSERT(!storage->m_sparseValueMap);
unsigned numValuesInVector = 0;
for (unsigned i = 0; i < m_vectorLength; ++i) {
if (JSValue value = ... | 10,419 |
106,094 | 0 | JSValue jsTestObjCONST_VALUE_11(ExecState* exec, JSValue, const Identifier&)
{
UNUSED_PARAM(exec);
return jsNumber(static_cast<int>(0xffffffff));
}
| 10,420 |
180,449 | 1 | cJSON *cJSON_CreateObject( void )
{
cJSON *item = cJSON_New_Item();
if ( item )
item->type = cJSON_Object;
return item;
}
| 10,421 |
167,488 | 0 | MojoResult DataPipeProducerDispatcher::AddWatcherRef(
const scoped_refptr<WatcherDispatcher>& watcher,
uintptr_t context) {
base::AutoLock lock(lock_);
if (is_closed_ || in_transit_)
return MOJO_RESULT_INVALID_ARGUMENT;
return watchers_.Add(watcher, context, GetHandleSignalsStateNoLock());
}
| 10,422 |
94,993 | 0 | ext4_xattr_block_find(struct inode *inode, struct ext4_xattr_info *i,
struct ext4_xattr_block_find *bs)
{
struct super_block *sb = inode->i_sb;
int error;
ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
i->name_index, i->name, i->value, (long)i->value_len);
if (EXT4_I(inode)->i_file_acl) {
/... | 10,423 |
113,978 | 0 | void BluetoothDeviceConnectError() {
}
| 10,424 |
5,354 | 0 | static void Direct_Move_X( EXEC_OPS PGlyph_Zone zone,
Int point,
TT_F26Dot6 distance )
{ (void)exc;
zone->cur_x[point] += distance;
zone->touch[point] |= TT_Flag_Touched_X;
}
| 10,425 |
20,754 | 0 | void kvm_before_handle_nmi(struct kvm_vcpu *vcpu)
{
__this_cpu_write(current_vcpu, vcpu);
}
| 10,426 |
64,796 | 0 | static int skcipher_next_copy(struct skcipher_walk *walk)
{
struct skcipher_walk_buffer *p;
u8 *tmp = walk->page;
skcipher_map_src(walk);
memcpy(tmp, walk->src.virt.addr, walk->nbytes);
skcipher_unmap_src(walk);
walk->src.virt.addr = tmp;
walk->dst.virt.addr = tmp;
if (!(walk->flags & SKCIPHER_WALK_PHYS))
... | 10,427 |
76,998 | 0 | ofpact_parse(enum ofpact_type type, char *value, struct ofpbuf *ofpacts,
enum ofputil_protocol *usable_protocols)
{
switch (type) {
#define OFPACT(ENUM, STRUCT, MEMBER, NAME) \
case OFPACT_##ENUM: \
return parse_... | 10,428 |
159,700 | 0 | void set_os_state(shell_integration::DefaultWebClientState value) {
os_state_ = value;
}
| 10,429 |
68,215 | 0 | struct sk_buff *llc_alloc_frame(struct sock *sk, struct net_device *dev,
u8 type, u32 data_size)
{
int hlen = type == LLC_PDU_TYPE_U ? 3 : 4;
struct sk_buff *skb;
hlen += llc_mac_header_len(dev->type);
skb = alloc_skb(hlen + data_size, GFP_ATOMIC);
if (skb) {
skb_reset_mac_header(skb);
skb_reserve(skb, h... | 10,430 |
105,346 | 0 | void AutofillManager::OnFormsSeen(const std::vector<FormData>& forms) {
bool enabled = IsAutofillEnabled();
if (!has_logged_autofill_enabled_) {
metric_logger_->LogIsAutofillEnabledAtPageLoad(enabled);
has_logged_autofill_enabled_ = true;
}
if (!enabled)
return;
ParseForms(forms);
}
| 10,431 |
176,678 | 0 | xmlParseXMLDecl(xmlParserCtxtPtr ctxt) {
xmlChar *version;
/*
* This value for standalone indicates that the document has an
* XML declaration but it does not have a standalone attribute.
* It will be overwritten later if a standalone attribute is found.
*/
ctxt->input->standalone = -2;
... | 10,432 |
62,051 | 0 | u32 ip_idents_reserve(u32 hash, int segs)
{
u32 *p_tstamp = ip_tstamps + hash % IP_IDENTS_SZ;
atomic_t *p_id = ip_idents + hash % IP_IDENTS_SZ;
u32 old = ACCESS_ONCE(*p_tstamp);
u32 now = (u32)jiffies;
u32 new, delta = 0;
if (old != now && cmpxchg(p_tstamp, old, now) == old)
delta = prandom_u32_max(now - old);... | 10,433 |
114,851 | 0 | void TestingAutomationProvider::AutofillHighlightSuggestion(
Browser* browser,
DictionaryValue* args,
IPC::Message* reply_message) {
int tab_index;
if (!args->GetInteger("tab_index", &tab_index)) {
AutomationJSONReply(this, reply_message).SendError(
"Invalid or missing args");
return;
... | 10,434 |
41,414 | 0 | static gpa_t translate_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access)
{
return gpa;
}
| 10,435 |
77,970 | 0 | static int GetCutColors(Image *image,ExceptionInfo *exception)
{
Quantum
intensity,
scale_intensity;
register Quantum
*q;
ssize_t
x,
y;
intensity=0;
scale_intensity=ScaleCharToQuantum(16);
for (y=0; y < (ssize_t) image->rows; y++)
{
q=GetAuthenticPixels(image,0,y,image->columns,... | 10,436 |
64,964 | 0 | IW_IMPL(void) iw_get_output_colorspace(struct iw_context *ctx, struct iw_csdescr *csdescr)
{
*csdescr = ctx->img2cs; // struct copy
}
| 10,437 |
34,280 | 0 | static int btrfs_add_nondir(struct btrfs_trans_handle *trans,
struct inode *dir, struct dentry *dentry,
struct inode *inode, int backref, u64 index)
{
int err = btrfs_add_link(trans, dir, inode,
dentry->d_name.name, dentry->d_name.len,
backref, index);
if (err > 0)
err = -EEXIST;
return err... | 10,438 |
93,272 | 0 | static void tun_cleanup(void)
{
misc_deregister(&tun_miscdev);
rtnl_link_unregister(&tun_link_ops);
unregister_netdevice_notifier(&tun_notifier_block);
}
| 10,439 |
109,286 | 0 | void InspectorPageAgent::didRecalculateStyle()
{
if (m_enabled)
m_overlay->update();
}
| 10,440 |
100,991 | 0 | void CountOriginType(const std::set<GURL>& origins,
SpecialStoragePolicy* policy,
size_t* protected_origins,
size_t* unlimited_origins) {
DCHECK(protected_origins);
DCHECK(unlimited_origins);
*protected_origins = 0;
*unlimited_origins = 0;
if (!po... | 10,441 |
42,150 | 0 | mm_is_monitor(void)
{
/*
* m_pid is only set in the privileged part, and
* points to the unprivileged child.
*/
return (pmonitor && pmonitor->m_pid > 0);
}
| 10,442 |
67,778 | 0 | static inline int php_tcp_sockop_accept(php_stream *stream, php_netstream_data_t *sock,
php_stream_xport_param *xparam STREAMS_DC)
{
int clisock;
xparam->outputs.client = NULL;
clisock = php_network_accept_incoming(sock->socket,
xparam->want_textaddr ? &xparam->outputs.textaddr : NULL,
xparam->want_addr ? ... | 10,443 |
164,196 | 0 | void ScheduleNextTask() {
DCHECK(io_runner->BelongsToCurrentThread());
if (task_stack_.empty()) {
return;
}
base::SequencedTaskRunnerHandle::Get()->PostTask(
FROM_HERE, std::move(task_stack_.top()));
task_stack_.pop();
}
| 10,444 |
161,607 | 0 | void AudioHandler::CheckNumberOfChannelsForInput(AudioNodeInput* input) {
DCHECK(Context()->IsAudioThread());
DCHECK(Context()->IsGraphOwner());
DCHECK(inputs_.Contains(input));
if (!inputs_.Contains(input))
return;
input->UpdateInternalBus();
}
| 10,445 |
7,086 | 0 | tt_cmap12_get_info( TT_CMap cmap,
TT_CMapInfo *cmap_info )
{
FT_Byte* p = cmap->data + 8;
cmap_info->format = 12;
cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p );
return FT_Err_Ok;
}
| 10,446 |
175,696 | 0 | MediaBuffer *readBuffer() {
return readBuffer(false, 0LL);
}
| 10,447 |
150,034 | 0 | void LayerTreeHostImpl::SetElementFilterMutated(
ElementId element_id,
ElementListType list_type,
const FilterOperations& filters) {
if (list_type == ElementListType::ACTIVE) {
SetTreeLayerFilterMutated(element_id, active_tree(), filters);
} else {
SetTreeLayerFilterMutated(element_id, pending_t... | 10,448 |
71,176 | 0 | unsigned long gfn_to_hva_memslot_prot(struct kvm_memory_slot *slot,
gfn_t gfn, bool *writable)
{
unsigned long hva = __gfn_to_hva_many(slot, gfn, NULL, false);
if (!kvm_is_error_hva(hva) && writable)
*writable = !memslot_is_readonly(slot);
return hva;
}
| 10,449 |
52,086 | 0 | static int tipc_nl_compat_net_dump(struct tipc_nl_compat_msg *msg,
struct nlattr **attrs)
{
__be32 id;
struct nlattr *net[TIPC_NLA_NET_MAX + 1];
int err;
if (!attrs[TIPC_NLA_NET])
return -EINVAL;
err = nla_parse_nested(net, TIPC_NLA_NET_MAX, attrs[TIPC_NLA_NET],
NULL);
if (err)
return err;
... | 10,450 |
71,847 | 0 | static double util_pointsize( wmfAPI* API, wmfFont* font, char* str, double font_height)
{
wmf_magick_t
*ddata = WMF_MAGICK_GetData(API);
Image
*image = ddata->image;
TypeMetric
metrics;
DrawInfo
*draw_info;
double
pointsize = 0;
draw_info=ddata->draw_info;
if (draw_info == (const... | 10,451 |
116,010 | 0 | void ExtensionGlobalError::set_cancel_callback(
ExtensionGlobalErrorCallback callback) {
cancel_callback_ = callback;
}
| 10,452 |
95,046 | 0 | static int aio_ring_mmap(struct file *file, struct vm_area_struct *vma)
{
vma->vm_flags |= VM_DONTEXPAND;
vma->vm_ops = &generic_file_vm_ops;
return 0;
}
| 10,453 |
13,052 | 0 | _gcry_mpi_point_get (gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t z,
mpi_point_t point)
{
if (x)
mpi_set (x, point->x);
if (y)
mpi_set (y, point->y);
if (z)
mpi_set (z, point->z);
}
| 10,454 |
109,224 | 0 | void InspectorOverlay::drawGutter()
{
evaluateInOverlay("drawGutter", "");
}
| 10,455 |
127,857 | 0 | static bool CheckCaf(const uint8* buffer, int buffer_size) {
RCHECK(buffer_size >= 52);
BitReader reader(buffer, buffer_size);
RCHECK(ReadBits(&reader, 32) == TAG('c', 'a', 'f', 'f'));
RCHECK(ReadBits(&reader, 16) == 1);
reader.SkipBits(16);
RCHECK(ReadBits(&reader, 32) == TAG('d', 'e', 's', 'c'));
RC... | 10,456 |
37,548 | 0 | static int mmu_unsync_walk(struct kvm_mmu_page *sp,
struct kvm_mmu_pages *pvec)
{
if (!sp->unsync_children)
return 0;
mmu_pages_add(pvec, sp, 0);
return __mmu_unsync_walk(sp, pvec);
}
| 10,457 |
131,045 | 0 | static void removeEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "removeEventListener", "TestObject", info.Holder(), info.GetIsolate());
EventTarget* impl = V8TestObject::toNative(info.Holder());
if (DOMWindow* window = ... | 10,458 |
167,697 | 0 | void WebRuntimeFeatures::EnableCompositorTouchAction(bool enable) {
RuntimeEnabledFeatures::SetCompositorTouchActionEnabled(enable);
}
| 10,459 |
66,285 | 0 | IW_IMPL(int) iw_parse_number_list(const char *s,
int max_numbers, // max number of numbers to parse
double *results) // array of doubles to hold the results
{
int n;
int charsread;
int curpos=0;
int ret;
int numresults = 0;
for(n=0;n<max_numbers;n++) {
ret=iw_parse_number_internal(&s[curpos], &results[n], &c... | 10,460 |
130,020 | 0 | bool VariationsSeedStore::ReadSeedData(std::string* seed_data) {
std::string base64_seed_data =
local_state_->GetString(prefs::kVariationsCompressedSeed);
const bool is_compressed = !base64_seed_data.empty();
if (!is_compressed)
base64_seed_data = local_state_->GetString(prefs::kVariationsSeed);
if (... | 10,461 |
45,294 | 0 | int btrfs_compare_trees(struct btrfs_root *left_root,
struct btrfs_root *right_root,
btrfs_changed_cb_t changed_cb, void *ctx)
{
int ret;
int cmp;
struct btrfs_path *left_path = NULL;
struct btrfs_path *right_path = NULL;
struct btrfs_key left_key;
struct btrfs_key right_key;
char *tmp_buf = NULL;
int lef... | 10,462 |
13,767 | 0 | ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, const zend_function *fptr, int error_type TSRMLS_DC) /* {{{ */
{
char lcname[16];
int name_len;
/* we don't care if the function name is longer, in fact lowercasing only
* the beginning of the name speeds up the check process */
nam... | 10,463 |
42,022 | 0 | static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp)
{
struct file *shm_file;
shm_file = shp->shm_file;
shp->shm_file = NULL;
ns->shm_tot -= (shp->shm_segsz + PAGE_SIZE - 1) >> PAGE_SHIFT;
shm_rmid(ns, shp);
shm_unlock(shp);
if (!is_file_hugepages(shm_file))
shmem_lock(shm_file, 0, shp-... | 10,464 |
138,247 | 0 | void AXObjectCacheImpl::handleAttributeChanged(const QualifiedName& attrName,
Element* element) {
if (attrName == roleAttr)
handleAriaRoleChanged(element);
else if (attrName == altAttr || attrName == titleAttr)
textChanged(element);
else if (attrName == forAt... | 10,465 |
12,033 | 0 | void rand_drbg_cleanup_entropy(RAND_DRBG *drbg,
unsigned char *out, size_t outlen)
{
if (drbg->seed_pool == NULL) {
if (drbg->secure)
OPENSSL_secure_clear_free(out, outlen);
else
OPENSSL_clear_free(out, outlen);
}
}
| 10,466 |
120,298 | 0 | void FolderHeaderView::Layout() {
gfx::Rect rect(GetContentsBounds());
if (rect.IsEmpty())
return;
gfx::Rect back_bounds(rect);
back_bounds.set_width(kIconDimension + 2 * kPadding);
back_button_->SetBoundsRect(back_bounds);
gfx::Rect text_bounds(rect);
int text_char_num = folder_item_->name().size()... | 10,467 |
69,339 | 0 | static int aes_wrap_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
EVP_AES_WRAP_CTX *wctx = EVP_C_DATA(EVP_AES_WRAP_CTX,ctx);
if (!iv && !key)
return 1;
if (key) {
if (EVP_CIPHER_CTX_encrypting(ctx))
AES_se... | 10,468 |
120,417 | 0 | content::RenderViewHost* GetRenderViewHost() {
return GetWebContents()->GetRenderViewHost();
}
| 10,469 |
69,246 | 0 | DECLAREreadFunc(readSeparateTilesIntoBuffer)
{
int status = 1;
uint32 imagew = TIFFRasterScanlineSize(in);
uint32 tilew = TIFFTileRowSize(in);
int iskew = imagew - tilew*spp;
tsize_t tilesize = TIFFTileSize(in);
tdata_t tilebuf;
uint8* bufp = (uint8*) buf;
uint32 tw, tl;
uint32 row;
uint16 bps = 0, bytes_per... | 10,470 |
180,628 | 1 | static void skcipher_release(void *private)
{
crypto_free_skcipher(private);
}
| 10,471 |
27,817 | 0 | static void br_multicast_group_expired(unsigned long data)
{
struct net_bridge_mdb_entry *mp = (void *)data;
struct net_bridge *br = mp->br;
struct net_bridge_mdb_htable *mdb;
spin_lock(&br->multicast_lock);
if (!netif_running(br->dev) || timer_pending(&mp->timer))
goto out;
if (!hlist_unhashed(&mp->mglist))
... | 10,472 |
28,403 | 0 | int fib6_del(struct rt6_info *rt, struct nl_info *info)
{
struct net *net = info->nl_net;
struct fib6_node *fn = rt->rt6i_node;
struct rt6_info **rtp;
#if RT6_DEBUG >= 2
if (rt->dst.obsolete>0) {
WARN_ON(fn != NULL);
return -ENOENT;
}
#endif
if (!fn || rt == net->ipv6.ip6_null_entry)
return -ENOENT;
WARN... | 10,473 |
80,817 | 0 | GF_Err pdin_dump(GF_Box *a, FILE * trace)
{
u32 i;
GF_ProgressiveDownloadBox *p = (GF_ProgressiveDownloadBox *)a;
gf_isom_box_dump_start(a, "ProgressiveDownloadBox", trace);
fprintf(trace, ">\n");
if (p->size) {
for (i=0; i<p->count; i++) {
fprintf(trace, "<DownloadInfo rate=\"%d\" estimatedTime=\"%d\" />\n"... | 10,474 |
116,355 | 0 | void CreateTruncatedEntry(std::string raw_headers, MockHttpCache* cache) {
disk_cache::Entry* entry;
ASSERT_TRUE(cache->CreateBackendEntry(kRangeGET_TransactionOK.url, &entry,
NULL));
raw_headers = net::HttpUtil::AssembleRawHeaders(raw_headers.data(),
... | 10,475 |
77,753 | 0 | static inline bool vmacache_valid_mm(struct mm_struct *mm)
{
return current->mm == mm && !(current->flags & PF_KTHREAD);
}
| 10,476 |
127,476 | 0 | void createColorTransform(const ColorProfile& colorProfile, bool hasAlpha)
{
if (m_transform)
qcms_transform_release(m_transform);
m_transform = 0;
if (colorProfile.isEmpty())
return;
qcms_profile* deviceProfile = ImageDecoder::qcmsOutputDeviceProfile();
... | 10,477 |
90,350 | 0 | int megasas_get_device_list(struct megasas_instance *instance)
{
memset(instance->pd_list, 0,
(MEGASAS_MAX_PD * sizeof(struct megasas_pd_list)));
memset(instance->ld_ids, 0xff, MEGASAS_MAX_LD_IDS);
if (instance->enable_fw_dev_list) {
if (megasas_host_device_list_query(instance, true))
return FAILED;
}... | 10,478 |
2,408 | 0 | static NTSTATUS smb1cli_inbuf_parse_chain(uint8_t *buf, TALLOC_CTX *mem_ctx,
struct iovec **piov, int *pnum_iov)
{
struct iovec *iov;
int num_iov;
size_t buflen;
size_t taken;
size_t remaining;
uint8_t *hdr;
uint8_t cmd;
uint32_t wct_ofs;
NTSTATUS status;
size_t min_size = MIN_SMB_SIZE;
buflen = smb_... | 10,479 |
163,422 | 0 | mojom::RenderMessageFilter* RenderThreadImpl::current_render_message_filter() {
if (g_render_message_filter_for_testing)
return g_render_message_filter_for_testing;
DCHECK(current());
return current()->render_message_filter();
}
| 10,480 |
186,842 | 1 | void VideoCaptureImpl::OnBufferCreated(int32_t buffer_id,
mojo::ScopedSharedBufferHandle handle) {
DVLOG(1) << __func__ << " buffer_id: " << buffer_id;
DCHECK(io_thread_checker_.CalledOnValidThread());
DCHECK(handle.is_valid());
base::SharedMemoryHandle memory_handle;
size_t memory_size = 0;
bool read_only_flag = fa... | 10,481 |
84,280 | 0 | static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_state)
{
u32 uninitialized_var(curval), newval;
struct task_struct *new_owner;
bool postunlock = false;
DEFINE_WAKE_Q(wake_q);
int ret = 0;
new_owner = rt_mutex_next_owner(&pi_state->pi_mutex);
if (WARN_ON_ONCE(!new_owner)) {
/*
... | 10,482 |
163,466 | 0 | void WasmResponseExtensions::Initialize(v8::Isolate* isolate) {
if (RuntimeEnabledFeatures::WebAssemblyStreamingEnabled()) {
isolate->SetWasmCompileStreamingCallback(WasmCompileStreamingImpl);
}
}
| 10,483 |
119,745 | 0 | bool NavigationControllerImpl::CanGoForward() const {
int index = GetCurrentEntryIndex();
return index >= 0 && index < (static_cast<int>(entries_.size()) - 1);
}
| 10,484 |
141,574 | 0 | ForeignSessionHelper::ForeignSessionHelper(Profile* profile)
: profile_(profile) {
sync_sessions::SessionSyncService* service =
SessionSyncServiceFactory::GetInstance()->GetForProfile(profile);
if (service) {
foreign_session_updated_subscription_ =
service->SubscribeToForeignSessionsChanged(b... | 10,485 |
12,685 | 0 | void DTLS_RECORD_LAYER_resync_write(RECORD_LAYER *rl)
{
memcpy(rl->write_sequence, rl->read_sequence, sizeof(rl->write_sequence));
}
| 10,486 |
144,810 | 0 | std::unique_ptr<content::WebContents> CreateAndNavigateWebContents() {
std::unique_ptr<content::WebContents> web_contents =
CreateTestWebContents();
ResourceCoordinatorTabHelper::CreateForWebContents(web_contents.get());
content::WebContentsTester::For(web_contents.get())
->NavigateAndComm... | 10,487 |
52,201 | 0 | static inline void map_to_unicode(unsigned code, const enc_to_uni *table, unsigned *res)
{
/* only single byte encodings are currently supported; assumed code <= 0xFF */
*res = table->inner[ENT_ENC_TO_UNI_STAGE1(code)]->uni_cp[ENT_ENC_TO_UNI_STAGE2(code)];
}
| 10,488 |
149,333 | 0 | void IndexedDBConnection::ForceClose() {
if (!callbacks_.get())
return;
base::WeakPtr<IndexedDBConnection> this_obj = weak_factory_.GetWeakPtr();
scoped_refptr<IndexedDBDatabaseCallbacks> callbacks(callbacks_);
database_->Close(this, true /* forced */);
if (this_obj) {
database_ = nullptr;
callba... | 10,489 |
37,818 | 0 | static int shutdown_interception(struct vcpu_svm *svm)
{
struct kvm_run *kvm_run = svm->vcpu.run;
/*
* VMCB is undefined after a SHUTDOWN intercept
* so reinitialize it.
*/
clear_page(svm->vmcb);
init_vmcb(svm);
kvm_run->exit_reason = KVM_EXIT_SHUTDOWN;
return 0;
}
| 10,490 |
49,305 | 0 | static void tcp_v6_restore_cb(struct sk_buff *skb)
{
/* We need to move header back to the beginning if xfrm6_policy_check()
* and tcp_v6_fill_cb() are going to be called again.
* ip6_datagram_recv_specific_ctl() also expects IP6CB to be there.
*/
memmove(IP6CB(skb), &TCP_SKB_CB(skb)->header.h6,
sizeof(struct... | 10,491 |
121,963 | 0 | void AppListController::DismissAppList() {
if (IsAppListVisible() && can_close_app_list_) {
current_view_->GetWidget()->Hide();
timer_.Stop();
FreeAnyKeepAliveForView();
}
}
| 10,492 |
117,481 | 0 | void TestingAutomationProvider::LockScreen(DictionaryValue* args,
IPC::Message* reply_message) {
new ScreenLockUnlockObserver(this, reply_message, true);
DBusThreadManager::Get()->GetPowerManagerClient()->
NotifyScreenLockRequested();
}
| 10,493 |
169,629 | 0 | std::string TestURLLoader::TestFollowURLRedirect() {
pp::URLRequestInfo request(instance_);
std::string redirect_prefix("/server-redirect?");
std::string redirect_url =
GetReachableAbsoluteURL("test_url_loader_data/hello.txt");
request.SetURL(redirect_prefix.append(redirect_url));
return LoadAndCompareB... | 10,494 |
79,139 | 0 | static ssize_t ucma_migrate_id(struct ucma_file *new_file,
const char __user *inbuf,
int in_len, int out_len)
{
struct rdma_ucm_migrate_id cmd;
struct rdma_ucm_migrate_resp resp;
struct ucma_context *ctx;
struct fd f;
struct ucma_file *cur_file;
int ret = 0;
if (copy_from_user(&cmd, inbuf, s... | 10,495 |
79,800 | 0 | static int uvesafb_vbe_find_mode(struct uvesafb_par *par,
int xres, int yres, int depth, unsigned char flags)
{
int i, match = -1, h = 0, d = 0x7fffffff;
for (i = 0; i < par->vbe_modes_cnt; i++) {
h = abs(par->vbe_modes[i].x_res - xres) +
abs(par->vbe_modes[i].y_res - yres) +
abs(depth - par->vbe_mod... | 10,496 |
24,571 | 0 | static inline int prev_slot(struct b43_dmaring *ring, int slot)
{
B43_WARN_ON(!(slot >= 0 && slot <= ring->nr_slots - 1));
if (slot == 0)
return ring->nr_slots - 1;
return slot - 1;
}
| 10,497 |
166,555 | 0 | void BrowserCommandController::TabRestoreServiceChanged(
sessions::TabRestoreService* service) {
UpdateTabRestoreCommandState();
}
| 10,498 |
67,268 | 0 | static void __d_free(struct rcu_head *head)
{
struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu);
kmem_cache_free(dentry_cache, dentry);
}
| 10,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.