unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
52,372 | 0 | static void trace_packet(struct net *net,
const struct sk_buff *skb,
unsigned int hook,
const struct net_device *in,
const struct net_device *out,
const char *tablename,
const struct xt_table_info *private,
const struct ip6t_entry *e)
{
const struct ip6t_entry *root;
const char *hookname, ... | 2,300 |
102,781 | 0 | virtual void drawLayers()
{
CCLayerTreeHostImpl::drawLayers();
m_testHooks->drawLayersOnCCThread(this);
}
| 2,301 |
116,853 | 0 | WebKit::WebPlugin* RenderViewImpl::CreatePlugin(
WebKit::WebFrame* frame,
const webkit::WebPluginInfo& info,
const WebKit::WebPluginParams& params) {
bool pepper_plugin_was_registered = false;
scoped_refptr<webkit::ppapi::PluginModule> pepper_module(
pepper_delegate_.CreatePepperPluginModule(info,... | 2,302 |
139,045 | 0 | scoped_refptr<UsbDeviceHandle> WaitForResult() {
run_loop_.Run();
return device_handle_;
}
| 2,303 |
82,240 | 0 | int __sys_listen(int fd, int backlog)
{
struct socket *sock;
int err, fput_needed;
int somaxconn;
sock = sockfd_lookup_light(fd, &err, &fput_needed);
if (sock) {
somaxconn = sock_net(sock->sk)->core.sysctl_somaxconn;
if ((unsigned int)backlog > somaxconn)
backlog = somaxconn;
err = security_socket_liste... | 2,304 |
113,151 | 0 | internal::FocusCycler* Launcher::GetFocusCycler() {
return delegate_view_->focus_cycler();
}
| 2,305 |
53,785 | 0 | static void __init e820_add_kernel_range(void)
{
u64 start = __pa_symbol(_text);
u64 size = __pa_symbol(_end) - start;
/*
* Complain if .text .data and .bss are not marked as E820_RAM and
* attempt to fix it by adding the range. We may have a confused BIOS,
* or the user may have used memmap=exactmap or memma... | 2,306 |
142,924 | 0 | bool HTMLMediaElement::SupportsSave() const {
if (GetDocument().GetSettings() &&
GetDocument().GetSettings()->GetHideDownloadUI()) {
return false;
}
if (current_src_.IsNull() || current_src_.IsEmpty())
return false;
if (network_state_ == kNetworkEmpty || network_state_ == kNetworkNoSource)
r... | 2,307 |
61,062 | 0 | file_deleted_callback (GFile *file,
GError *error,
gpointer callback_data)
{
DeleteData *data = callback_data;
CommonJob *job;
SourceInfo *source_info;
TransferInfo *transfer_info;
GFileType file_type;
char *primary;
char *secondary;
ch... | 2,308 |
99,510 | 0 | static void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled)
{
notImplemented();
}
| 2,309 |
185,778 | 1 | bool isUserInteractionEventForSlider(Event* event, LayoutObject* layoutObject) {
// It is unclear if this can be converted to isUserInteractionEvent(), since
// mouse* events seem to be eaten during a drag anyway. crbug.com/516416 .
if (isUserInteractionEvent(event))
return true;
// Some events are only captured duri... | 2,310 |
64,631 | 0 | static unsigned int ip6_dst_mtu_forward(const struct dst_entry *dst)
{
unsigned int mtu;
struct inet6_dev *idev;
if (dst_metric_locked(dst, RTAX_MTU)) {
mtu = dst_metric_raw(dst, RTAX_MTU);
if (mtu)
return mtu;
}
mtu = IPV6_MIN_MTU;
rcu_read_lock();
idev = __in6_dev_get(dst->dev);
if (idev)
mtu = ide... | 2,311 |
72,793 | 0 | int jas_stream_display(jas_stream_t *stream, FILE *fp, int n)
{
unsigned char buf[16];
int i;
int j;
int m;
int c;
int display;
int cnt;
cnt = n - (n % 16);
display = 1;
for (i = 0; i < n; i += 16) {
if (n > 16 && i > 0) {
display = (i >= cnt) ? 1 : 0;
}
if (display) {
fprintf(fp, "%08x:", i);
... | 2,312 |
170,228 | 0 | bool HasMediaRouterActionAtInit() const {
const std::set<std::string>& component_ids =
ToolbarActionsModel::Get(browser()->profile())
->component_actions_factory()
->GetInitialComponentIds();
return base::ContainsKey(
component_ids, ComponentToolbarActionsFactory::kMed... | 2,313 |
163,806 | 0 | bool ChromeContentBrowserClientExtensionsPart::DoesSiteRequireDedicatedProcess(
content::BrowserContext* browser_context,
const GURL& effective_site_url) {
const Extension* extension = ExtensionRegistry::Get(browser_context)
->enabled_extensions()
... | 2,314 |
141,702 | 0 | void V8Console::tableCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ConsoleHelper(info).reportCall(ConsoleAPIType::kTable);
}
| 2,315 |
518 | 0 | static void pdf_run_dquote(fz_context *ctx, pdf_processor *proc, float aw, float ac, char *string, int string_len)
{
pdf_run_processor *pr = (pdf_run_processor *)proc;
pdf_gstate *gstate = pr->gstate + pr->gtop;
gstate->text.word_space = aw;
gstate->text.char_space = ac;
pdf_tos_newline(&pr->tos, gstate->text.lead... | 2,316 |
50,276 | 0 | int sock_sendmsg(struct socket *sock, struct msghdr *msg)
{
int err = security_socket_sendmsg(sock, msg,
msg_data_left(msg));
return err ?: sock_sendmsg_nosec(sock, msg);
}
| 2,317 |
69,128 | 0 | ZEND_API int ZEND_FASTCALL _zend_handle_numeric_str_ex(const char *key, size_t length, zend_ulong *idx)
{
register const char *tmp = key;
const char *end = key + length;
if (*tmp == '-') {
tmp++;
}
if ((*tmp == '0' && length > 1) /* numbers with leading zeros */
|| (end - tmp > MAX_LENGTH_OF_LONG - 1) /* nu... | 2,318 |
20,371 | 0 | static void kvm_mmu_notifier_invalidate_range_end(struct mmu_notifier *mn,
struct mm_struct *mm,
unsigned long start,
unsigned long end)
{
struct kvm *kvm = mmu_notifier_to_kvm(mn);
spin_lock(&kvm->mmu_lock);
/*
* This sequence increase will notify the kvm page fault that
* the page that... | 2,319 |
9,707 | 0 | FT_Stream_ReadFields( FT_Stream stream,
const FT_Frame_Field* fields,
void* structure )
{
FT_Error error;
FT_Bool frame_accessed = 0;
FT_Byte* cursor;
if ( !fields || !stream )
return FT_Err_Invalid_Argument;
... | 2,320 |
123,458 | 0 | ScriptPromise ImageBitmapFactories::createImageBitmap(EventTarget& eventTarget, HTMLCanvasElement* canvas, ExceptionState& exceptionState)
{
return createImageBitmap(eventTarget, canvas, 0, 0, canvas->width(), canvas->height(), exceptionState);
}
| 2,321 |
109,429 | 0 | BlobRegistryContext(const KURL& url, PassRefPtr<RawData> streamData)
: url(url.copy())
, streamData(streamData)
{
}
| 2,322 |
187,918 | 1 | static bool getCoverageFormat4(vector<uint32_t>& coverage, const uint8_t* data, size_t size) {
const size_t kSegCountOffset = 6;
const size_t kEndCountOffset = 14;
const size_t kHeaderSize = 16;
const size_t kSegmentSize = 8; // total size of array elements for one segment
if (kEndCountOffset > size) {
return fal... | 2,323 |
81,834 | 0 | static int ecc_check_pubkey_order(ecc_key* key, ecc_point* pubkey, mp_int* a,
mp_int* prime, mp_int* order)
{
ecc_point* inf = NULL;
int err;
if (key == NULL)
return BAD_FUNC_ARG;
inf = wc_ecc_new_point_h(key->heap);
if (inf == NULL)
err = MEMORY_E;
else {
#ifdef... | 2,324 |
149,837 | 0 | void LayerTreeHost::SetElementIdsForTesting() {
LayerTreeHostCommon::CallFunctionForEveryLayer(this, SetElementIdForTesting);
}
| 2,325 |
115,824 | 0 | SafeBrowsingBlockingPage* GetSafeBrowsingBlockingPage() {
InterstitialPage* interstitial =
InterstitialPage::GetInterstitialPage(contents());
if (!interstitial)
return NULL;
return static_cast<SafeBrowsingBlockingPage*>(interstitial);
}
| 2,326 |
103,252 | 0 | void WebSocketJob::OnConnected(
SocketStream* socket, int max_pending_send_allowed) {
if (state_ == CLOSED)
return;
DCHECK_EQ(CONNECTING, state_);
if (delegate_)
delegate_->OnConnected(socket, max_pending_send_allowed);
}
| 2,327 |
10,769 | 0 | int SSL_clear(SSL *s)
{
if (s->method == NULL)
{
SSLerr(SSL_F_SSL_CLEAR,SSL_R_NO_METHOD_SPECIFIED);
return(0);
}
if (ssl_clear_bad_session(s))
{
SSL_SESSION_free(s->session);
s->session=NULL;
}
s->error=0;
s->hit=0;
s->shutdown=0;
#if 0 /* Disabled since version 1.10 of this file (early return... | 2,328 |
34,505 | 0 | static void bm_evict_inode(struct inode *inode)
{
clear_inode(inode);
kfree(inode->i_private);
}
| 2,329 |
166,980 | 0 | void CSSStyleSheet::SetLoadCompleted(bool completed) {
if (completed == load_completed_)
return;
load_completed_ = completed;
if (completed)
contents_->ClientLoadCompleted(this);
else
contents_->ClientLoadStarted(this);
}
| 2,330 |
87,644 | 0 | LIBOPENMPT_MODPLUG_API unsigned int ModPlug_NumSamples(ModPlugFile* file)
{
if(!file) return 0;
return openmpt_module_get_num_samples(file->mod);
}
| 2,331 |
99,975 | 0 | bool WebPluginDelegateImpl::Initialize(
const GURL& url,
const std::vector<std::string>& arg_names,
const std::vector<std::string>& arg_values,
WebPlugin* plugin,
bool load_manually) {
plugin_ = plugin;
instance_->set_web_plugin(plugin_);
if (quirks_ & PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANC... | 2,332 |
61,139 | 0 | set_permissions_file (SetPermissionsJob *job,
GFile *file,
GFileInfo *info)
{
CommonJob *common;
GFileInfo *child_info;
gboolean free_info;
guint32 current;
guint32 value;
guint32 mask;
GFileEnumerator *enumerator;
GFile *ch... | 2,333 |
25,088 | 0 | static struct inet_peer *lookup_rcu(const struct inetpeer_addr *daddr,
struct inet_peer_base *base)
{
struct inet_peer *u = rcu_dereference(base->root);
int count = 0;
while (u != peer_avl_empty) {
int cmp = addr_compare(daddr, &u->daddr);
if (cmp == 0) {
/* Before taking a reference, check if this e... | 2,334 |
77,090 | 0 | parse_pop_vlan(struct ofpbuf *ofpacts)
{
ofpact_put_STRIP_VLAN(ofpacts)->ofpact.raw = OFPAT_RAW11_POP_VLAN;
return NULL;
}
| 2,335 |
168,321 | 0 | void BrowserView::NativeThemeUpdated(const ui::NativeTheme* theme) {
if (!initialized_)
return;
if (!handling_theme_changed_)
UserChangedTheme();
MaybeShowInvertBubbleView(this);
}
| 2,336 |
45,929 | 0 | static int encrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
struct scatterlist *src, unsigned int nbytes)
{
struct priv *ctx = crypto_blkcipher_ctx(desc->tfm);
struct blkcipher_walk w;
blkcipher_walk_init(&w, dst, src, nbytes);
return crypt(desc, &w, ctx, crypto_cipher_alg(ctx->tweak)->cia_encryp... | 2,337 |
144,500 | 0 | RenderFrameHostImpl* WebContentsImpl::FindFrameByFrameTreeNodeId(
int frame_tree_node_id) {
FrameTreeNode* frame = frame_tree_.FindByID(frame_tree_node_id);
return frame ? frame->current_frame_host() : nullptr;
}
| 2,338 |
182,771 | 1 | MagickExport Image *ComplexImages(const Image *images,const ComplexOperator op,
ExceptionInfo *exception)
{
#define ComplexImageTag "Complex/Image"
CacheView
*Ai_view,
*Ar_view,
*Bi_view,
*Br_view,
*Ci_view,
*Cr_view;
const char
*artifact;
const Image
*Ai_image,
*Ar_image,
*Bi_image,
*Br_image;
double
snr;
Image
... | 2,339 |
33,433 | 0 | static inline int can_use_console(unsigned int cpu)
{
return cpu_online(cpu) || have_callable_console();
}
| 2,340 |
16,484 | 0 | check_domain_attributes()
{
/* Make sure the FILESYSTEM_DOMAIN and UID_DOMAIN attributes
are set to something reasonable. If they're not already
defined, we default to our own full hostname. Moved this
to its own function so we're sure we have our full hostname
by the time we call this. -Derek W... | 2,341 |
183,206 | 1 | print_decnet_ctlmsg(netdissect_options *ndo,
register const union routehdr *rhp, u_int length,
u_int caplen)
{
int mflags = EXTRACT_LE_8BITS(rhp->rh_short.sh_flags);
register const union controlmsg *cmp = (const union controlmsg *)rhp;
int src, dst, info, blksize, eco, u... | 2,342 |
131,607 | 0 | static void promiseAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
V8TRYCATCH_VOID(ScriptPromise, cppValue, ScriptPromise(jsValue, info.GetIsolate()));
imp->setPromiseAttribute(cppValue)... | 2,343 |
57,820 | 0 | static int attach_recursive_mnt(struct mount *source_mnt,
struct mount *dest_mnt,
struct mountpoint *dest_mp,
struct path *parent_path)
{
HLIST_HEAD(tree_list);
struct mount *child, *p;
struct hlist_node *n;
int err;
if (IS_MNT_SHARED(dest_mnt)) {
err = invent_group_ids(source_mnt, true);
if (err)
... | 2,344 |
35,328 | 0 | static struct ip_tunnel *ipgre_tunnel_find(struct net *net,
struct ip_tunnel_parm *parms,
int type)
{
__be32 remote = parms->iph.daddr;
__be32 local = parms->iph.saddr;
__be32 key = parms->i_key;
int link = parms->link;
struct ip_tunnel *t;
struct ip_tunnel __rcu **tp;
struct ipgre_net *ign = net... | 2,345 |
107,314 | 0 | TabContents* Browser::OpenApplication(
Profile* profile,
const Extension* extension,
extension_misc::LaunchContainer container,
TabContents* existing_tab) {
TabContents* tab = NULL;
UMA_HISTOGRAM_ENUMERATION("Extensions.AppLaunchContainer", container, 100);
switch (container) {
case extensio... | 2,346 |
5,221 | 0 | static inline int build_assignment_string(PGconn *pg_link, smart_str *querystr, HashTable *ht, int where_cond, const char *pad, int pad_len, zend_ulong opt) /* {{{ */
{
char *tmp;
char buf[256];
zend_ulong num_idx;
zend_string *fld;
zval *val;
ZEND_HASH_FOREACH_KEY_VAL(ht, num_idx, fld, val) {
if (fld == NULL)... | 2,347 |
107,596 | 0 | void ewk_view_restore_state(Evas_Object* ewkView, Evas_Object* frame)
{
evas_object_smart_callback_call(ewkView, "restore", frame);
}
| 2,348 |
75,976 | 0 | garp_group_interface_handler(vector_t *strvec)
{
interface_t *ifp = if_get_by_ifname(strvec_slot(strvec, 1), IF_CREATE_IF_DYNAMIC);
if (!ifp) {
report_config_error(CONFIG_GENERAL_ERROR, "WARNING - interface %s specified for garp_group doesn't exist", FMT_STR_VSLOT(strvec, 1));
return;
}
if (ifp->garp_delay) {
... | 2,349 |
135,323 | 0 | void Document::platformColorsChanged()
{
if (!isActive())
return;
styleEngine().platformColorsChanged();
}
| 2,350 |
49,073 | 0 | void brcmf_free_vif(struct brcmf_cfg80211_vif *vif)
{
list_del(&vif->list);
kfree(vif);
}
| 2,351 |
42,974 | 0 | static void receive_buf(struct virtnet_info *vi, struct receive_queue *rq,
void *buf, unsigned int len)
{
struct net_device *dev = vi->dev;
struct virtnet_stats *stats = this_cpu_ptr(vi->stats);
struct sk_buff *skb;
struct virtio_net_hdr_mrg_rxbuf *hdr;
if (unlikely(len < vi->hdr_len + ETH_HLEN)) {
pr_debug(... | 2,352 |
149,480 | 0 | void ContentSecurityPolicy::setupSelf(const SecurityOrigin& securityOrigin) {
m_selfProtocol = securityOrigin.protocol();
m_selfSource = new CSPSource(this, m_selfProtocol, securityOrigin.host(),
securityOrigin.port(), String(),
CSPSource::NoWildcard, CS... | 2,353 |
9,949 | 0 | void Part::updateQuickExtractMenu(QAction *extractAction)
{
if (!extractAction) {
return;
}
QMenu *menu = extractAction->menu();
if (!menu) {
menu = new QMenu();
extractAction->setMenu(menu);
connect(menu, &QMenu::triggered,
this, &Part::slotQuickExtract... | 2,354 |
58,567 | 0 | BOOL transport_set_blocking_mode(rdpTransport* transport, BOOL blocking)
{
BOOL status;
status = TRUE;
transport->blocking = blocking;
if (transport->SplitInputOutput)
{
status &= tcp_set_blocking_mode(transport->TcpIn, blocking);
status &= tcp_set_blocking_mode(transport->TcpOut, blocking);
}
else
{
st... | 2,355 |
17,984 | 0 | ssh_packet_read_poll_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
{
struct session_state *state = ssh->state;
u_int reason, seqnr;
int r;
u_char *msg;
for (;;) {
msg = NULL;
if (compat20) {
r = ssh_packet_read_poll2(ssh, typep, seqnr_p);
if (r != 0)
return r;
if (*typep) {
state-... | 2,356 |
10,742 | 0 | static int xhci_epmask_to_eps_with_streams(XHCIState *xhci,
unsigned int slotid,
uint32_t epmask,
XHCIEPContext **epctxs,
USBEndpoint **eps)
{
X... | 2,357 |
114,804 | 0 | __xmlMemStrdup(void){
if (IS_MAIN_THREAD)
return (&xmlMemStrdup);
else
return (&xmlGetGlobalState()->xmlMemStrdup);
}
| 2,358 |
147,393 | 0 | void V8TestObject::Float32ArrayAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_float32ArrayAttribute_Getter");
test_object_v8_internal::Float32ArrayAttributeAttributeGetter(info);
}
| 2,359 |
49,226 | 0 | static int hash_sendmsg(struct socket *sock, struct msghdr *msg,
size_t ignored)
{
int limit = ALG_MAX_PAGES * PAGE_SIZE;
struct sock *sk = sock->sk;
struct alg_sock *ask = alg_sk(sk);
struct hash_ctx *ctx = ask->private;
long copied = 0;
int err;
if (limit > sk->sk_sndbuf)
limit = sk->sk_sndbuf;
lock_so... | 2,360 |
107,428 | 0 | bool JSArray::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
{
if (propertyName == exec->propertyNames().length) {
descriptor.setDescriptor(jsNumber(length()), DontDelete | DontEnum);
return true;
}
ArrayStorage* storage = m_storage... | 2,361 |
163,211 | 0 | void NavigationControllerImpl::SetPendingEntry(
std::unique_ptr<NavigationEntryImpl> entry) {
DiscardNonCommittedEntriesInternal();
pending_entry_ = entry.release();
DCHECK_EQ(-1, pending_entry_index_);
NotificationService::current()->Notify(
NOTIFICATION_NAV_ENTRY_PENDING,
Source<NavigationCont... | 2,362 |
111,206 | 0 | void WebPage::loadString(const BlackBerry::Platform::String& string, const BlackBerry::Platform::String& baseURL, const BlackBerry::Platform::String& mimeType, const BlackBerry::Platform::String& failingURL)
{
d->loadString(string, baseURL, mimeType, failingURL);
}
| 2,363 |
49,044 | 0 | s32 brcmf_cfg80211_up(struct net_device *ndev)
{
struct brcmf_if *ifp = netdev_priv(ndev);
struct brcmf_cfg80211_info *cfg = ifp->drvr->config;
s32 err = 0;
mutex_lock(&cfg->usr_sync);
err = __brcmf_cfg80211_up(ifp);
mutex_unlock(&cfg->usr_sync);
return err;
}
| 2,364 |
35,919 | 0 | static struct syscall_metadata *syscall_nr_to_meta(int nr)
{
if (!syscalls_metadata || nr >= NR_syscalls || nr < 0)
return NULL;
return syscalls_metadata[nr];
}
| 2,365 |
117,154 | 0 | static void webkitWebViewBaseSizeAllocate(GtkWidget* widget, GtkAllocation* allocation)
{
GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->size_allocate(widget, allocation);
WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
if (!gtk_widget_get_mapped(GTK_WIDGET(webViewBase)) && !webViewBas... | 2,366 |
65,106 | 0 | static MagickBooleanType ReadUncompressedRGB(Image *image, DDSInfo *dds_info,
ExceptionInfo *exception)
{
PixelPacket
*q;
ssize_t
x, y;
unsigned short
color;
if (dds_info->pixelformat.rgb_bitcount == 8)
(void) SetImageType(image,GrayscaleType);
else if (dds_info->pixelformat.rgb_bitcount ... | 2,367 |
114,731 | 0 | void SetupBlacklist(const std::string& json_blacklist) {
GpuBlacklist* blacklist = GpuBlacklist::GetInstance();
ASSERT_TRUE(blacklist->LoadGpuBlacklist(
"1.0", json_blacklist, GpuBlacklist::kAllOs));
blacklist->UpdateGpuDataManager();
}
| 2,368 |
154,622 | 0 | error::Error GLES2DecoderPassthroughImpl::DoDeleteSamplers(
GLsizei n,
const volatile GLuint* samplers) {
if (n < 0) {
InsertError(GL_INVALID_VALUE, "n cannot be negative.");
return error::kNoError;
}
return DeleteHelper(n, samplers, &resources_->sampler_id_map,
[this](GLsize... | 2,369 |
177,812 | 1 | void sum_update(const char *p, int32 len)
{
switch (cursum_type) {
case CSUM_MD5:
md5_update(&md, (uchar *)p, len);
break;
case CSUM_MD4:
case CSUM_MD4_OLD:
case CSUM_MD4_BUSTED:
if (len + sumresidue < CSUM_CHUNK) {
memcpy(md.buffer + sumresi... | 2,370 |
71,758 | 0 | static void TIFFIgnoreTags(TIFF *tiff)
{
char
*q;
const char
*p,
*tags;
Image
*image;
register ssize_t
i;
size_t
count;
TIFFFieldInfo
*ignore;
if (TIFFGetReadProc(tiff) != TIFFReadBlob)
return;
image=(Image *)TIFFClientdata(tiff);
tags=GetImageArtifact(image,"tiff:... | 2,371 |
17,615 | 0 | SProcRenderCreateGlyphSet(ClientPtr client)
{
REQUEST(xRenderCreateGlyphSetReq);
REQUEST_SIZE_MATCH(xRenderCreateGlyphSetReq);
swaps(&stuff->length);
swapl(&stuff->gsid);
swapl(&stuff->format);
return (*ProcRenderVector[stuff->renderReqType]) (client);
}
| 2,372 |
122,345 | 0 | void HTMLInputElement::setDefaultValue(const AtomicString& value)
{
setAttribute(valueAttr, value);
}
| 2,373 |
187,880 | 1 | long Cluster::ParseSimpleBlock(long long block_size, long long& pos,
long& len) {
const long long block_start = pos;
const long long block_stop = pos + block_size;
IMkvReader* const pReader = m_pSegment->m_pReader;
long long total, avail;
long status = pReader->Length(&total, &avail);
if (status < 0) // error
retur... | 2,374 |
128,912 | 0 | PassRefPtr<SerializedScriptValue> SerializedScriptValue::createFromWire(const String& data)
{
return adoptRef(new SerializedScriptValue(data));
}
| 2,375 |
106,145 | 0 | EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOrange(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwVMTypeError(exec);
JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(caste... | 2,376 |
92,816 | 0 | u32 get_sys_col(int idx)
{
u32 res;
DWORD val = GetSysColor(idx);
res = (val)&0xFF;
res<<=8;
res |= (val>>8)&0xFF;
res<<=8;
res |= (val>>16)&0xFF;
return res;
}
| 2,377 |
2,353 | 0 | bool ldb_dn_has_extended(struct ldb_dn *dn)
{
if ( ! dn || dn->invalid) return false;
if (dn->ext_linearized && (dn->ext_linearized[0] == '<')) return true;
return dn->ext_comp_num != 0;
}
| 2,378 |
128,143 | 0 | void CastCastView::UpdateLabel() {
if (cast_config_delegate_ == nullptr ||
cast_config_delegate_->HasCastExtension() == false)
return;
cast_config_delegate_->GetReceiversAndActivities(
base::Bind(&CastCastView::UpdateLabelCallback, base::Unretained(this)));
}
| 2,379 |
69,228 | 0 | get_oldroot_path (const char *path)
{
while (*path == '/')
path++;
return strconcat ("/oldroot/", path);
}
| 2,380 |
81,737 | 0 | int ff_mpv_export_qp_table(MpegEncContext *s, AVFrame *f, Picture *p, int qp_type)
{
AVBufferRef *ref = av_buffer_ref(p->qscale_table_buf);
int offset = 2*s->mb_stride + 1;
if(!ref)
return AVERROR(ENOMEM);
av_assert0(ref->size >= offset + s->mb_stride * ((f->height+15)/16));
ref->size -= off... | 2,381 |
46,854 | 0 | static int ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
struct scatterlist *src, unsigned int nbytes)
{
return glue_ecb_crypt_128bit(&camellia_enc, desc, dst, src, nbytes);
}
| 2,382 |
132,184 | 0 | void RenderFrameImpl::CreateFrame(
int routing_id,
int parent_routing_id,
int previous_sibling_routing_id,
int proxy_routing_id,
const FrameReplicationState& replicated_state,
CompositorDependencies* compositor_deps,
const FrameMsg_NewFrame_WidgetParams& widget_params) {
blink::WebLocalFra... | 2,383 |
148,263 | 0 | void PrintJobWorker::GetSettingsDone(PrintingContext::Result result) {
owner_->PostTask(FROM_HERE,
base::Bind(&PrintJobWorkerOwner::GetSettingsDone,
make_scoped_refptr(owner_),
printing_context_->settings(),
... | 2,384 |
12,943 | 0 | compress_buffer(struct ssh *ssh, struct sshbuf *in, struct sshbuf *out)
{
u_char buf[4096];
int r, status;
if (ssh->state->compression_out_started != 1)
return SSH_ERR_INTERNAL_ERROR;
/* This case is not handled below. */
if (sshbuf_len(in) == 0)
return 0;
/* Input is the contents of the input buffer. */
... | 2,385 |
103,622 | 0 | void InitRenderViewHostForExtensions(RenderViewHost* render_view_host) {
SiteInstance* site_instance = render_view_host->site_instance();
const GURL& site = site_instance->site();
if (!site.SchemeIs(chrome::kExtensionScheme))
return;
Profile* profile = site_instance->browsing_instance()->profile();
Exte... | 2,386 |
187,625 | 1 | static double abserr(PNG_CONST png_modifier *pm, int in_depth, int out_depth)
{
/* Absolute error permitted in linear values - affected by the bit depth of
* the calculations.
*/
if (pm->assume_16_bit_calculations ||
(pm->calculations_use_input_precision ? in_depth : out_depth) == 16)
return pm->maxabs... | 2,387 |
28,903 | 0 | void kvm_vcpu_reset(struct kvm_vcpu *vcpu)
{
atomic_set(&vcpu->arch.nmi_queued, 0);
vcpu->arch.nmi_pending = 0;
vcpu->arch.nmi_injected = false;
memset(vcpu->arch.db, 0, sizeof(vcpu->arch.db));
vcpu->arch.dr6 = DR6_FIXED_1;
vcpu->arch.dr7 = DR7_FIXED_1;
kvm_update_dr7(vcpu);
kvm_make_request(KVM_REQ_EVENT, vc... | 2,388 |
140,361 | 0 | void Editor::respondToChangedSelection(
const Position& oldSelectionStart,
FrameSelection::SetSelectionOptions options) {
spellChecker().respondToChangedSelection(oldSelectionStart, options);
client().respondToChangedSelection(&frame(),
frame()
... | 2,389 |
49,858 | 0 | SPL_METHOD(Array, seek)
{
long opos, position;
zval *object = getThis();
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
HashTable *aht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
int result;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &position) =... | 2,390 |
71,599 | 0 | static void PushRunlengthPacket(Image *image,const unsigned char *pixels,
size_t *length,PixelPacket *pixel,IndexPacket *index)
{
const unsigned char
*p;
p=pixels;
if (image->storage_class == PseudoClass)
{
*index=(IndexPacket) 0;
switch (image->depth)
{
case 32:
{
... | 2,391 |
61,253 | 0 | static int mboxlist_create_partition(const char *mboxname,
const char *part,
char **out)
{
mbentry_t *parent = NULL;
if (!part) {
int r = mboxlist_findparent(mboxname, &parent);
if (!r) part = parent->partition;
}
... | 2,392 |
139,071 | 0 | void SyncWithAllThreads() {
for (int i = 0; i < 20; ++i) {
base::RunLoop().RunUntilIdle();
SyncWith(BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
SyncWith(audio_manager_->GetWorkerTaskRunner());
}
}
| 2,393 |
60,014 | 0 | static void usb_mixer_selector_elem_free(struct snd_kcontrol *kctl)
{
int i, num_ins = 0;
if (kctl->private_data) {
struct usb_mixer_elem_info *cval = kctl->private_data;
num_ins = cval->max;
kfree(cval);
kctl->private_data = NULL;
}
if (kctl->private_value) {
char **itemlist = (char **)kctl->private_val... | 2,394 |
36,887 | 0 | struct inode *new_inode_pseudo(struct super_block *sb)
{
struct inode *inode = alloc_inode(sb);
if (inode) {
spin_lock(&inode->i_lock);
inode->i_state = 0;
spin_unlock(&inode->i_lock);
INIT_LIST_HEAD(&inode->i_sb_list);
}
return inode;
}
| 2,395 |
40,571 | 0 | static inline int nl_portid_hash_dilute(struct nl_portid_hash *hash, int len)
{
int avg = hash->entries >> hash->shift;
if (unlikely(avg > 1) && nl_portid_hash_rehash(hash, 1))
return 1;
if (unlikely(len > avg) && time_after(jiffies, hash->rehash_time)) {
nl_portid_hash_rehash(hash, 0);
return 1;
}
return... | 2,396 |
70,921 | 0 | BGD_DECLARE(int) gdImageSetInterpolationMethod(gdImagePtr im, gdInterpolationMethod id)
{
if (im == NULL || (uintmax_t)id > GD_METHOD_COUNT) {
return 0;
}
switch (id) {
case GD_NEAREST_NEIGHBOUR:
case GD_WEIGHTED4:
im->interpolation = NULL;
break;
/* generic versions*/
/* GD_BILINEAR_FIXED and GD_B... | 2,397 |
39,969 | 0 | cifs_find_fid_lock_conflict(struct cifs_fid_locks *fdlocks, __u64 offset,
__u64 length, __u8 type, struct cifsFileInfo *cfile,
struct cifsLockInfo **conf_lock, int rw_check)
{
struct cifsLockInfo *li;
struct cifsFileInfo *cur_cfile = fdlocks->cfile;
struct TCP_Server_Info *server = tlink_tcon(cfile->tl... | 2,398 |
53,935 | 0 | uint32_t ndp_msg_opt_route_lifetime(struct ndp_msg *msg, int offset)
{
struct __nd_opt_route_info *ri =
ndp_msg_payload_opts_offset(msg, offset);
return ntohl(ri->nd_opt_ri_lifetime);
}
| 2,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.