unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
185,973 | 1 | void EventBindings::AttachFilteredEvent(
const v8::FunctionCallbackInfo<v8::Value>& args) {
CHECK_EQ(2, args.Length());
CHECK(args[0]->IsString());
CHECK(args[1]->IsObject());
std::string event_name = *v8::String::Utf8Value(args[0]);
if (!context()->HasAccessOrThrowError(event_name))
return;
std::unique_ptr<base::Dic... | 17,300 |
58,912 | 0 | static struct sock *__l2cap_get_chan_by_scid(struct l2cap_chan_list *l, u16 cid)
{
struct sock *s;
for (s = l->head; s; s = l2cap_pi(s)->next_c) {
if (l2cap_pi(s)->scid == cid)
break;
}
return s;
}
| 17,301 |
44,376 | 0 | int cg_chown(const char *path, uid_t uid, gid_t gid)
{
struct fuse_context *fc = fuse_get_context();
char *cgdir = NULL, *fpath = NULL, *path1, *path2, *controller;
struct cgfs_files *k = NULL;
const char *cgroup;
int ret;
if (!fc)
return -EIO;
if (strcmp(path, "/cgroup") == 0)
return -EINVAL;
controller... | 17,302 |
3,334 | 0 | static uint32_t fdctrl_read_statusB(FDCtrl *fdctrl)
{
uint32_t retval = fdctrl->srb;
FLOPPY_DPRINTF("status register B: 0x%02x\n", retval);
return retval;
}
| 17,303 |
156,492 | 0 | bool DevToolsAgentHostClient::MayDiscoverTargets() {
return true;
}
| 17,304 |
119,093 | 0 | void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
char buf[17] = { '\0' };
handler->HandleOutput("0x");
internal::itoa_r(reinterpret_cast<intptr_t>(pointer),
buf, sizeof(buf), 16, 12);
handler->HandleOutput(buf);
}
| 17,305 |
157,970 | 0 | void RenderViewImpl::PrintPage(WebLocalFrame* frame) {
UMA_HISTOGRAM_BOOLEAN("PrintPreview.InitiatedByScript",
frame->Top() == frame);
UMA_HISTOGRAM_BOOLEAN("PrintPreview.OutOfProcessSubframe",
frame->Top()->IsWebRemoteFrame());
RenderFrameImpl::FromWebFrame(frame... | 17,306 |
12,531 | 0 | WhoIsThisWithName(struct rx_call *acall, struct ubik_trans *at, afs_int32 *aid,
char *aname)
{
/* aid is set to the identity of the caller, if known, else ANONYMOUSID */
/* returns -1 and sets aid to ANONYMOUSID on any failure */
struct rx_connection *tconn;
afs_int32 code;
char tcell[MAXKTCREAL... | 17,307 |
170,348 | 0 | static void MakeFourCCString(uint32_t x, char *s) {
s[0] = x >> 24;
s[1] = (x >> 16) & 0xff;
s[2] = (x >> 8) & 0xff;
s[3] = x & 0xff;
s[4] = '\0';
}
| 17,308 |
69,087 | 0 | static void TIFFWarnings(const char *module,const char *format,va_list warning)
{
char
message[MaxTextExtent];
ExceptionInfo
*exception;
#if defined(MAGICKCORE_HAVE_VSNPRINTF)
(void) vsnprintf(message,MaxTextExtent,format,warning);
#else
(void) vsprintf(message,format,warning);
#endif
(void) Concate... | 17,309 |
99,262 | 0 | Clipboard* ResourceMessageFilter::GetClipboard() {
static Clipboard* clipboard = new Clipboard;
return clipboard;
}
| 17,310 |
46,092 | 0 | void auth_gssapi_display_status(
char *msg,
OM_uint32 major,
OM_uint32 minor)
{
auth_gssapi_display_status_1(msg, major, GSS_C_GSS_CODE, 0);
auth_gssapi_display_status_1(msg, minor, GSS_C_MECH_CODE, 0);
}
| 17,311 |
15,407 | 0 | dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
{
hm_fragment *frag = NULL;
pitem *item = NULL;
int i = -1, is_complete;
unsigned char seq64be[8];
unsigned long frag_len = msg_hdr->frag_len, max_len;
if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len)
goto err;
/* Determine maximum... | 17,312 |
112,235 | 0 | void HostPortAllocatorSession::ConfigReady(cricket::PortConfiguration* config) {
for (cricket::PortConfiguration::RelayList::iterator relay =
config->relays.begin(); relay != config->relays.end(); ++relay) {
cricket::PortConfiguration::PortList filtered_ports;
for (cricket::PortConfiguration::PortL... | 17,313 |
16,236 | 0 | GahpClient::unicore_job_status(const char * job_contact,
char **job_status)
{
static const char* command = "UNICORE_JOB_STATUS";
if (server->m_commands_supported->contains_anycase(command)==FALSE) {
return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
}
if (!job_contact) job_contact=NULLSTRING;
std::string reqline;
int... | 17,314 |
65,571 | 0 | static void nfsd4_close_open_stateid(struct nfs4_ol_stateid *s)
{
struct nfs4_client *clp = s->st_stid.sc_client;
bool unhashed;
LIST_HEAD(reaplist);
s->st_stid.sc_type = NFS4_CLOSED_STID;
spin_lock(&clp->cl_lock);
unhashed = unhash_open_stateid(s, &reaplist);
if (clp->cl_minorversion) {
if (unhashed)
put... | 17,315 |
185,473 | 1 | static inline bool shouldSetStrutOnBlock(const LayoutBlockFlow& block, const RootInlineBox& lineBox, LayoutUnit lineLogicalOffset, int lineIndex, LayoutUnit remainingLogicalHeight)
{
bool wantsStrutOnBlock = false;
if (!block.style()->hasAutoOrphans() && block.style()->orphans() >= lineIndex) {
// Not enough orphans he... | 17,316 |
45,233 | 0 | psf_fwrite (const void *ptr, sf_count_t bytes, sf_count_t items, SF_PRIVATE *psf)
{ sf_count_t total = 0 ;
ssize_t count ;
if (psf->virtual_io)
return psf->vio.write (ptr, bytes*items, psf->vio_user_data) / bytes ;
items *= bytes ;
/* Do this check after the multiplication above. */
if (items <= 0)
return 0... | 17,317 |
85,873 | 0 | static int dm_blk_open(struct block_device *bdev, fmode_t mode)
{
struct mapped_device *md;
spin_lock(&_minor_lock);
md = bdev->bd_disk->private_data;
if (!md)
goto out;
if (test_bit(DMF_FREEING, &md->flags) ||
dm_deleting_md(md)) {
md = NULL;
goto out;
}
dm_get(md);
atomic_inc(&md->open_count);
... | 17,318 |
65,534 | 0 | nfs4_put_stid(struct nfs4_stid *s)
{
struct nfs4_file *fp = s->sc_file;
struct nfs4_client *clp = s->sc_client;
might_lock(&clp->cl_lock);
if (!atomic_dec_and_lock(&s->sc_count, &clp->cl_lock)) {
wake_up_all(&close_wq);
return;
}
idr_remove(&clp->cl_stateids, s->sc_stateid.si_opaque.so_id);
spin_unlock(&cl... | 17,319 |
131,719 | 0 | static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
v8SetReturnValueFast(info, WTF::getPtr(imp->shadowRootAttribute()), imp);
}
| 17,320 |
96,460 | 0 | static int fsmMkfile(rpmfi fi, const char *dest, rpmfiles files,
rpmpsm psm, int nodigest, int *setmeta,
int * firsthardlink)
{
int rc = 0;
int numHardlinks = rpmfiFNlink(fi);
if (numHardlinks > 1) {
/* Create first hardlinked file empty */
if (*firsthardlink < 0) {
*firsthardlink = rp... | 17,321 |
121,975 | 0 | string16 GetAppListShortcutName() {
chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
if (channel == chrome::VersionInfo::CHANNEL_CANARY)
return l10n_util::GetStringUTF16(IDS_APP_LIST_SHORTCUT_NAME_CANARY);
return l10n_util::GetStringUTF16(IDS_APP_LIST_SHORTCUT_NAME);
}
| 17,322 |
4,216 | 0 | cff_index_forget_element( CFF_Index idx,
FT_Byte** pbytes )
{
if ( idx->bytes == 0 )
{
FT_Stream stream = idx->stream;
FT_FRAME_RELEASE( *pbytes );
}
}
| 17,323 |
44,300 | 0 | static int write_note_info(struct elf_note_info *info,
struct coredump_params *cprm)
{
bool first = true;
struct elf_thread_core_info *t = info->thread;
do {
int i;
if (!writenote(&t->notes[0], cprm))
return 0;
if (first && !writenote(&info->psinfo, cprm))
return 0;
if (first && !writenote(&in... | 17,324 |
90,988 | 0 | void CWebServer::Cmd_GetAuth(WebEmSession & session, const request& req, Json::Value &root)
{
root["status"] = "OK";
root["title"] = "GetAuth";
if (session.rights != -1)
{
root["version"] = szAppVersion;
}
root["user"] = session.username;
root["rights"] = session.rights;
}
| 17,325 |
100,405 | 0 | RenderWidgetHostView* RenderViewHostDelegateViewHelper::CreateNewWidget(
int route_id, bool activatable, RenderProcessHost* process) {
RenderWidgetHost* widget_host =
new RenderWidgetHost(process, route_id);
RenderWidgetHostView* widget_view =
RenderWidgetHostView::CreateViewForWidget(widget_host);
... | 17,326 |
2,852 | 0 | gst_pngdec_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_pngdec_src_pad_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_... | 17,327 |
119,730 | 0 | void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet* parent)
{
m_parentStyleSheet = parent;
}
| 17,328 |
114,922 | 0 | void TestingAutomationProvider::GetInstantInfo(Browser* browser,
DictionaryValue* args,
IPC::Message* reply_message) {
DictionaryValue* info = new DictionaryValue;
if (browser->instant()) {
InstantController* instant =... | 17,329 |
72,455 | 0 | static int row_prop_exists(zval *object, zval *member, int check_empty, const zend_literal *key TSRMLS_DC)
{
pdo_stmt_t * stmt = (pdo_stmt_t *) zend_object_store_get_object(object TSRMLS_CC);
int colno = -1;
if (stmt) {
if (Z_TYPE_P(member) == IS_LONG) {
return Z_LVAL_P(member) >= 0 && Z_LVAL_P(member) < stmt-... | 17,330 |
60,831 | 0 | logger_day_changed_signal_cb (const void *pointer, void *data,
const char *signal,
const char *type_data, void *signal_data)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) signal;
(void) type_data;
(void) signal_data;... | 17,331 |
161,416 | 0 | void ServiceWorkerHandler::OnWorkerVersionUpdated(
const std::vector<ServiceWorkerVersionInfo>& versions) {
using Version = ServiceWorker::ServiceWorkerVersion;
std::unique_ptr<protocol::Array<Version>> result =
protocol::Array<Version>::create();
for (const auto& version : versions) {
base::flat_se... | 17,332 |
77,902 | 0 | test_bson_build_child_deep_1 (bson_t *b, int *count)
{
bson_t child;
(*count)++;
BSON_ASSERT (bson_append_document_begin (b, "b", -1, &child));
BSON_ASSERT (!(b->flags & BSON_FLAG_INLINE));
BSON_ASSERT ((b->flags & BSON_FLAG_IN_CHILD));
BSON_ASSERT (!(child.flags & BSON_FLAG_INLINE));
BSON_ASSERT... | 17,333 |
156,482 | 0 | bool ShouldCreateDevToolsForNode(FrameTreeNode* ftn) {
return !ftn->parent() || ftn->current_frame_host()->IsCrossProcessSubframe();
}
| 17,334 |
167,311 | 0 | void ScrollableShelfView::ScrollToYOffset(float y_target_offset,
bool animating) {
y_target_offset = CalculateClampedScrollOffset(y_target_offset);
const int old_y = scroll_offset_.y();
scroll_offset_.set_y(y_target_offset);
Layout();
const float diff = y_target_offse... | 17,335 |
18,302 | 0 | static void write_and_free(conn *c, char *buf, int bytes) {
if (buf) {
c->write_and_free = buf;
c->wcurr = buf;
c->wbytes = bytes;
conn_set_state(c, conn_write);
c->write_and_go = conn_new_cmd;
} else {
out_string(c, "SERVER_ERROR out of memory writing stats");
... | 17,336 |
35,419 | 0 | void __init early_trap_init(void)
{
set_intr_gate_ist(X86_TRAP_DB, &debug, DEBUG_STACK);
/* int3 can be called from all */
set_system_intr_gate_ist(X86_TRAP_BP, &int3, DEBUG_STACK);
#ifdef CONFIG_X86_32
set_intr_gate(X86_TRAP_PF, page_fault);
#endif
load_idt(&idt_descr);
}
| 17,337 |
34,618 | 0 | static void __sctp_unhash_endpoint(struct sctp_endpoint *ep)
{
struct sctp_hashbucket *head;
struct sctp_ep_common *epb;
epb = &ep->base;
if (hlist_unhashed(&epb->node))
return;
epb->hashent = sctp_ep_hashfn(epb->bind_addr.port);
head = &sctp_ep_hashtable[epb->hashent];
sctp_write_lock(&head->lock);
__hl... | 17,338 |
137,650 | 0 | void RenderThreadImpl::OnMemoryPressure(
base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) {
base::allocator::ReleaseFreeMemory();
if (webkit_platform_support_ && blink::mainThreadIsolate()) {
blink::mainThreadIsolate()->LowMemoryNotification();
}
if (memory_pressure_level ==
... | 17,339 |
147,216 | 0 | static void BooleanOrDOMStringOrUnrestrictedDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
TestObject* impl = V8TestObject::ToImpl(info.Holder());
BooleanOrStringOrUnrestrictedDouble result;
impl->booleanOrDOMStringOrUnrestrictedDoubleMethod(result);
V8SetReturnValue(info, result);
}
| 17,340 |
79,540 | 0 | char *imap_set_flags(struct ImapData *idata, struct Header *h, char *s, int *server_changes)
{
struct Context *ctx = idata->ctx;
struct ImapHeader newh = { 0 };
struct ImapHeaderData old_hd;
bool readonly;
int local_changes;
local_changes = h->changed;
struct ImapHeaderData *hd = h->data;
newh.data = ... | 17,341 |
55,048 | 0 | static void alloc_objects(unsigned int cnt)
{
struct object_entry_pool *b;
b = xmalloc(sizeof(struct object_entry_pool)
+ cnt * sizeof(struct object_entry));
b->next_pool = blocks;
b->next_free = b->entries;
b->end = b->entries + cnt;
blocks = b;
alloc_count += cnt;
}
| 17,342 |
171,539 | 0 | void SimpleSoftOMXComponent::onSendCommand(
OMX_COMMANDTYPE cmd, OMX_U32 param) {
switch (cmd) {
case OMX_CommandStateSet:
{
onChangeState((OMX_STATETYPE)param);
break;
}
case OMX_CommandPortEnable:
case OMX_CommandPortDisable:
{
onPortEnable(param, cmd == OMX_CommandPortEnable)... | 17,343 |
155,607 | 0 | base::string16 AuthenticatorWelcomeSheetModel::GetStepTitle() const {
return l10n_util::GetStringFUTF16(IDS_WEBAUTHN_WELCOME_SCREEN_TITLE,
GetRelyingPartyIdString(dialog_model()));
}
| 17,344 |
160,830 | 0 | void RenderViewImpl::SetTouchAction(blink::WebTouchAction touchAction) {
RenderWidget::SetTouchAction(touchAction);
}
| 17,345 |
20,622 | 0 | static uint32_t kvm_get_exit_reason(struct kvm_vcpu *vcpu)
{
struct exit_ctl_data *p_exit_data;
p_exit_data = kvm_get_exit_data(vcpu);
return p_exit_data->exit_reason;
}
| 17,346 |
82,270 | 0 | static long sock_do_ioctl(struct net *net, struct socket *sock,
unsigned int cmd, unsigned long arg)
{
int err;
void __user *argp = (void __user *)arg;
err = sock->ops->ioctl(sock, cmd, arg);
/*
* If this ioctl is unknown try to hand it down
* to the NIC driver.
*/
if (err != -ENOIOCTLCMD)
return er... | 17,347 |
157,047 | 0 | void MultibufferDataSource::SetPreload(Preload preload) {
DVLOG(1) << __func__ << "(" << preload << ")";
DCHECK(render_task_runner_->BelongsToCurrentThread());
preload_ = preload;
UpdateBufferSizes();
}
| 17,348 |
46,943 | 0 | static int crc32c_intel_setkey(struct crypto_shash *hash, const u8 *key,
unsigned int keylen)
{
u32 *mctx = crypto_shash_ctx(hash);
if (keylen != sizeof(u32)) {
crypto_shash_set_flags(hash, CRYPTO_TFM_RES_BAD_KEY_LEN);
return -EINVAL;
}
*mctx = le32_to_cpup((__le32 *)key);
return 0;
}
| 17,349 |
166,542 | 0 | bool BrowserCommandController::IsCommandEnabled(int id) const {
return command_updater_.IsCommandEnabled(id);
}
| 17,350 |
99,028 | 0 | void WebGraphicsContext3DDefaultImpl::texImage2D(unsigned target, unsigned level, unsigned internalFormat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, const void* pixels)
{
OwnArrayPtr<uint8> zero;
if (!pixels) {
size_t size = imageSizeInBytes(width, height, format,... | 17,351 |
118,659 | 0 | void UserCloudPolicyManagerFactoryChromeOS::BrowserContextDestroyed(
content::BrowserContext* context) {
Profile* profile = static_cast<Profile*>(context);
managers_.erase(profile);
BrowserContextKeyedBaseFactory::BrowserContextDestroyed(context);
}
| 17,352 |
121,100 | 0 | void BaseMultipleFieldsDateAndTimeInputType::restoreFormControlState(const FormControlState& state)
{
if (!m_dateTimeEditElement)
return;
DateTimeFieldsState dateTimeFieldsState = DateTimeFieldsState::restoreFormControlState(state);
m_dateTimeEditElement->setValueAsDateTimeFieldsState(dateTimeFields... | 17,353 |
178,909 | 1 | void bnep_net_setup(struct net_device *dev)
{
memset(dev->broadcast, 0xff, ETH_ALEN);
dev->addr_len = ETH_ALEN;
ether_setup(dev);
dev->netdev_ops = &bnep_netdev_ops;
dev->watchdog_timeo = HZ * 2;
}
| 17,354 |
53,578 | 0 | x86_Convert(struct _7zip *zip, uint8_t *data, size_t size)
{
static const uint8_t kMaskToAllowedStatus[8] = {1, 1, 1, 0, 1, 0, 0, 0};
static const uint8_t kMaskToBitNumber[8] = {0, 1, 2, 2, 3, 3, 3, 3};
size_t bufferPos, prevPosT;
uint32_t ip, prevMask;
if (size < 5)
return 0;
bufferPos = 0;
prevPosT = zip->... | 17,355 |
181,332 | 1 | int svc_rdma_xdr_encode_error(struct svcxprt_rdma *xprt,
struct rpcrdma_msg *rmsgp,
enum rpcrdma_errcode err, __be32 *va)
{
__be32 *startp = va;
*va++ = rmsgp->rm_xid;
*va++ = rmsgp->rm_vers;
*va++ = xprt->sc_fc_credits;
*va++ = rdma_error;
*va++ = cpu_to_be32(err);
if (err == ERR_VERS) {
*va... | 17,356 |
84,246 | 0 | static int attach_to_pi_state(u32 __user *uaddr, u32 uval,
struct futex_pi_state *pi_state,
struct futex_pi_state **ps)
{
pid_t pid = uval & FUTEX_TID_MASK;
u32 uval2;
int ret;
/*
* Userspace might have messed up non-PI and PI futexes [3]
*/
if (unlikely(!pi_state))
return -EINVAL;
/*
... | 17,357 |
106,723 | 0 | WebCore::DragOperation WebView::keyStateToDragOperation(DWORD grfKeyState) const
{
if (!m_page)
return DragOperationNone;
DragOperation operation = m_page->dragOperation();
if ((grfKeyState & (MK_CONTROL | MK_SHIFT)) == (MK_CONTROL | MK_SHIFT))
operation = DragOperationLink;
else if ((... | 17,358 |
147,064 | 0 | bool WebLocalFrameImpl::SelectWordAroundCaret() {
TRACE_EVENT0("blink", "WebLocalFrameImpl::selectWordAroundCaret");
FrameSelection& selection = GetFrame()->Selection();
GetFrame()->GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets();
if (selection.ComputeVisibleSelectionInDOMTree().IsNone() ||
... | 17,359 |
28,364 | 0 | static struct sock *ping_get_first(struct seq_file *seq, int start)
{
struct sock *sk;
struct ping_iter_state *state = seq->private;
struct net *net = seq_file_net(seq);
for (state->bucket = start; state->bucket < PING_HTABLE_SIZE;
++state->bucket) {
struct hlist_nulls_node *node;
struct hlist_nulls_head... | 17,360 |
170,379 | 0 | status_t MPEG4Extractor::readMetaData() {
if (mInitCheck != NO_INIT) {
return mInitCheck;
}
off64_t offset = 0;
status_t err;
while (true) {
off64_t orig_offset = offset;
err = parseChunk(&offset, 0);
if (err != OK && err != UNKNOWN_ERROR) {
break;
} else if (offset <= orig_offset) {
ALO... | 17,361 |
61,034 | 0 | custom_full_name_to_string (char *format,
va_list va)
{
GFile *file;
file = va_arg (va, GFile *);
return g_file_get_parse_name (file);
}
| 17,362 |
88,789 | 0 | static void compose_notify(char *type, char *host, char *buf, size_t len)
{
char usn[256];
if (type) {
if (!strcmp(type, SSDP_ST_ALL))
type = NULL;
else
snprintf(usn, sizeof(usn), "%s::%s", uuid, type);
}
if (!type) {
type = usn;
strncpy(usn, uuid, sizeof(usn));
}
snprintf(buf, len, "NOTIFY * HTT... | 17,363 |
159,830 | 0 | static bool StartsClosingScriptTagAt(const String& string, size_t start) {
if (start + 7 >= string.length())
return false;
StringView script("</script");
return EqualIgnoringASCIICase(StringView(string, start, script.length()),
script);
}
| 17,364 |
183,953 | 1 | virtual bool InputMethodIsActivated(const std::string& input_method_id) {
scoped_ptr<InputMethodDescriptors> active_input_method_descriptors(
GetActiveInputMethods());
for (size_t i = 0; i < active_input_method_descriptors->size(); ++i) {
if (active_input_method_descriptors->at(i).id == input_method_id) {
r... | 17,365 |
23,258 | 0 | static int decode_attr_filehandle(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs_fh *fh)
{
__be32 *p;
int len;
if (fh != NULL)
memset(fh, 0, sizeof(*fh));
if (unlikely(bitmap[0] & (FATTR4_WORD0_FILEHANDLE - 1U)))
return -EIO;
if (likely(bitmap[0] & FATTR4_WORD0_FILEHANDLE)) {
p = xdr_inline_decode(xd... | 17,366 |
69,892 | 0 | connection_ap_handshake_process_socks(entry_connection_t *conn)
{
socks_request_t *socks;
int sockshere;
const or_options_t *options = get_options();
int had_reply = 0;
connection_t *base_conn = ENTRY_TO_CONN(conn);
tor_assert(conn);
tor_assert(base_conn->type == CONN_TYPE_AP);
tor_assert(base_conn->st... | 17,367 |
30,461 | 0 | static int send_msg(struct kiocb *iocb, struct socket *sock,
struct msghdr *m, size_t total_len)
{
struct sock *sk = sock->sk;
struct tipc_port *tport = tipc_sk_port(sk);
struct sockaddr_tipc *dest = (struct sockaddr_tipc *)m->msg_name;
int needs_conn;
long timeout_val;
int res = -EINVAL;
if (unlikely(!de... | 17,368 |
122,796 | 0 | void GpuProcessHost::OnAcceleratedSurfaceRelease(
const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) {
TRACE_EVENT0("gpu", "GpuProcessHost::OnAcceleratedSurfaceRelease");
gfx::PluginWindowHandle handle =
GpuSurfaceTracker::Get()->GetSurfaceWindowHandle(params.surface_id);
if (!handle) {
#if def... | 17,369 |
78,215 | 0 | authentic_sm_free_wrapped_apdu(struct sc_card *card, struct sc_apdu *plain, struct sc_apdu **sm_apdu)
{
struct sc_context *ctx = card->ctx;
LOG_FUNC_CALLED(ctx);
if (!sm_apdu)
LOG_FUNC_RETURN(ctx, SC_ERROR_INVALID_ARGUMENTS);
if (!(*sm_apdu))
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
if (plain) {
i... | 17,370 |
137,634 | 0 | void MockDownloadController::StartContextMenuDownload(
const content::ContextMenuParams& params,
content::WebContents* web_contents,
bool is_link, const std::string& extra_headers) {
}
| 17,371 |
44,553 | 0 | static bool lxc_list_controllers(char ***list)
{
return false;
}
| 17,372 |
177,612 | 0 | void SetFrameBuffer(int idx, vpx_codec_frame_buffer_t *fb) {
ASSERT_TRUE(fb != NULL);
fb->data = ext_fb_list_[idx].data;
fb->size = ext_fb_list_[idx].size;
ASSERT_EQ(0, ext_fb_list_[idx].in_use);
ext_fb_list_[idx].in_use = 1;
fb->priv = &ext_fb_list_[idx];
}
| 17,373 |
10,478 | 0 | static uint32_t megasas_sgl_get_len(MegasasCmd *cmd,
union mfi_sgl *sgl)
{
uint32_t len;
if (megasas_frame_is_ieee_sgl(cmd)) {
len = le32_to_cpu(sgl->sg_skinny->len);
} else if (megasas_frame_is_sgl64(cmd)) {
len = le32_to_cpu(sgl->sg64->len);
} else ... | 17,374 |
142,915 | 0 | void HTMLMediaElement::SourceWasRemoved(HTMLSourceElement* source) {
BLINK_MEDIA_LOG << "sourceWasRemoved(" << (void*)this << ", " << source
<< ")";
KURL url = source->GetNonEmptyURLAttribute(kSrcAttr);
BLINK_MEDIA_LOG << "sourceWasRemoved(" << (void*)this << ") - 'src' is "
<... | 17,375 |
121,187 | 0 | bool HTMLInputElement::isSearchField() const
{
return m_inputType->isSearchField();
}
| 17,376 |
9,038 | 0 | static void vmxnet3_put_tx_stats_to_file(QEMUFile *f,
struct UPT1_TxStats *tx_stat)
{
qemu_put_be64(f, tx_stat->TSOPktsTxOK);
qemu_put_be64(f, tx_stat->TSOBytesTxOK);
qemu_put_be64(f, tx_stat->ucastPktsTxOK);
qemu_put_be64(f, tx_stat->ucastBytesTxOK);
qemu_put_be64(f, tx_stat->mcastPktsTxOK);
... | 17,377 |
129,668 | 0 | AffineTransform& AffineTransform::scaleNonUniform(double sx, double sy)
{
return scale(sx, sy);
}
| 17,378 |
102,015 | 0 | OffScreenRootWindow()
{
++refCount;
}
| 17,379 |
187,043 | 1 | void FrameLoader::Trace(blink::Visitor* visitor) {
visitor->Trace(frame_);
visitor->Trace(progress_tracker_);
visitor->Trace(document_loader_);
visitor->Trace(provisional_document_loader_);
}
| 17,380 |
128,376 | 0 | bool FrameView::wheelEvent(const PlatformWheelEvent& wheelEvent)
{
bool allowScrolling = userInputScrollable(HorizontalScrollbar) || userInputScrollable(VerticalScrollbar);
#if !USE(RUBBER_BANDING)
if (!isScrollable())
allowScrolling = false;
#endif
if (allowScrolling && ScrollableArea::handleWhee... | 17,381 |
164,730 | 0 | void TestClearSectionWithNode(const char* html, bool unowned) {
LoadHTML(html);
WebLocalFrame* web_frame = GetMainFrame();
ASSERT_NE(nullptr, web_frame);
FormCache form_cache(web_frame);
std::vector<FormData> forms = form_cache.ExtractNewForms();
ASSERT_EQ(1U, forms.size());
WebInputElem... | 17,382 |
21,218 | 0 | static inline void cow_user_page(struct page *dst, struct page *src, unsigned long va, struct vm_area_struct *vma)
{
/*
* If the source page was a PFN mapping, we don't have
* a "struct page" for it. We do a best-effort copy by
* just copying from the original user address. If that
* fails, we just zero-fill i... | 17,383 |
115,734 | 0 | void ConnectionToClient::NotifyIfChannelsReady() {
if (control_connected_ && input_connected_ && video_connected_)
handler_->OnConnectionOpened(this);
}
| 17,384 |
151,344 | 0 | void InspectorTraceEvents::Dispose() {
instrumenting_agents_->removeInspectorTraceEvents(this);
instrumenting_agents_ = nullptr;
}
| 17,385 |
187,670 | 1 | image_transform_png_set_strip_16_add(image_transform *this,
PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth)
{
UNUSED(colour_type)
this->next = *that;
*that = this;
return bit_depth > 8;
}
| 17,386 |
41,678 | 0 | static int btrfs_setsize(struct inode *inode, struct iattr *attr)
{
struct btrfs_root *root = BTRFS_I(inode)->root;
struct btrfs_trans_handle *trans;
loff_t oldsize = i_size_read(inode);
loff_t newsize = attr->ia_size;
int mask = attr->ia_valid;
int ret;
/*
* The regular truncate() case without ATTR_CTIME and... | 17,387 |
29,690 | 0 | static int is_seen(struct ctl_table_set *set)
{
return ¤t->nsproxy->net_ns->sysctls == set;
}
| 17,388 |
78,792 | 0 | static int esteid_detect_card(sc_pkcs15_card_t *p15card)
{
if (is_esteid_card(p15card->card))
return SC_SUCCESS;
else
return SC_ERROR_WRONG_CARD;
}
| 17,389 |
47,740 | 0 | bool netlink_capable(const struct sk_buff *skb, int cap)
{
return netlink_ns_capable(skb, &init_user_ns, cap);
}
| 17,390 |
37,796 | 0 | static void nested_svm_vmloadsave(struct vmcb *from_vmcb, struct vmcb *to_vmcb)
{
to_vmcb->save.fs = from_vmcb->save.fs;
to_vmcb->save.gs = from_vmcb->save.gs;
to_vmcb->save.tr = from_vmcb->save.tr;
to_vmcb->save.ldtr = from_vmcb->save.ldtr;
to_vmcb->save.kernel_gs_base = from_vmcb->save.kernel_gs_base;
to_vmcb->... | 17,391 |
178,244 | 1 | PHP_METHOD(Phar, extractTo)
{
char *error = NULL;
php_stream *fp;
php_stream_statbuf ssb;
phar_entry_info *entry;
char *pathto, *filename;
size_t pathto_len, filename_len;
int ret, i;
int nelems;
zval *zval_files = NULL;
zend_bool overwrite = 0;
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(),... | 17,392 |
13,641 | 0 | int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file)
{
int error_code;
STACK_OF(SRP_gN) *SRP_gN_tab = sk_SRP_gN_new_null();
char *last_index = NULL;
int i;
char **pp;
SRP_gN *gN = NULL;
SRP_user_pwd *user_pwd = NULL;
TXT_DB *tmpdb = NULL;
BIO *in = BIO_new(BIO_s_file());
err... | 17,393 |
20,520 | 0 | static int ext4_remount(struct super_block *sb, int *flags, char *data)
{
struct ext4_super_block *es;
struct ext4_sb_info *sbi = EXT4_SB(sb);
ext4_fsblk_t n_blocks_count = 0;
unsigned long old_sb_flags;
struct ext4_mount_options old_opts;
int enable_quota = 0;
ext4_group_t g;
unsigned int journal_ioprio = DEFA... | 17,394 |
32,734 | 0 | static void tg3_rx_prodring_free(struct tg3 *tp,
struct tg3_rx_prodring_set *tpr)
{
int i;
if (tpr != &tp->napi[0].prodring) {
for (i = tpr->rx_std_cons_idx; i != tpr->rx_std_prod_idx;
i = (i + 1) & tp->rx_std_ring_mask)
tg3_rx_data_free(tp, &tpr->rx_std_buffers[i],
tp->rx_pkt_map_sz);
if (t... | 17,395 |
115,342 | 0 | static void didSameDocumentNavigationForFrame(WKPageRef page, WKFrameRef frame, WKSameDocumentNavigationType, WKTypeRef, const void* clientInfo)
{
if (!WKFrameIsMainFrame(frame))
return;
webkitWebViewUpdateURI(WEBKIT_WEB_VIEW(clientInfo));
}
| 17,396 |
89,664 | 0 | static u16 llcp_tlv_lto(u8 *tlv)
{
return llcp_tlv8(tlv, LLCP_TLV_LTO);
}
| 17,397 |
55,453 | 0 | SYSCALL_DEFINE3(sched_setattr, pid_t, pid, struct sched_attr __user *, uattr,
unsigned int, flags)
{
struct sched_attr attr;
struct task_struct *p;
int retval;
if (!uattr || pid < 0 || flags)
return -EINVAL;
retval = sched_copy_attr(uattr, &attr);
if (retval)
return retval;
if ((int)attr.sched_p... | 17,398 |
83,414 | 0 | ReturnError(HANDLE pipe, DWORD error, LPCWSTR func, DWORD count, LPHANDLE events)
{
DWORD result_len;
LPWSTR result = L"0xffffffff\nFormatMessage failed\nCould not return result";
DWORD_PTR args[] = {
(DWORD_PTR) error,
(DWORD_PTR) func,
(DWORD_PTR) ""
};
if (error != ERROR_... | 17,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.