unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
11,442 | 0 | fbFetch_a2r2g2b2 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
{
const CARD8 *pixel = (const CARD8 *)bits + x;
const CARD8 *end = pixel + width;
while (pixel < end) {
CARD32 p = READ(pixel++);
CARD32 a,r,g,b;
a = ((p & 0xc0) * 0x55) << 18;
r... | 16,800 |
22,110 | 0 | void exit_fs(struct task_struct *tsk)
{
struct fs_struct * fs = tsk->fs;
if (fs) {
task_lock(tsk);
tsk->fs = NULL;
task_unlock(tsk);
put_fs_struct(fs);
}
}
| 16,801 |
7,369 | 0 | add_mlist(struct mlist *mlp, struct magic_map *map, size_t idx)
{
struct mlist *ml;
if ((ml = CAST(struct mlist *, emalloc(sizeof(*ml)))) == NULL)
return -1;
ml->map = idx == 0 ? map : NULL;
ml->magic = map->magic[idx];
ml->nmagic = map->nmagic[idx];
mlp->prev->next = ml;
ml->prev = mlp->prev;
ml->next = m... | 16,802 |
97,811 | 0 | PageClickTracker::PageClickTracker(RenderView* render_view)
: render_view_(render_view),
was_focused_(false) {
}
| 16,803 |
49,351 | 0 | static int fwnet_stop(struct net_device *net)
{
struct fwnet_device *dev = netdev_priv(net);
netif_stop_queue(net);
fwnet_broadcast_stop(dev);
return 0;
}
| 16,804 |
119,744 | 0 | bool NavigationControllerImpl::CanGoBack() const {
return entries_.size() > 1 && GetCurrentEntryIndex() > 0;
}
| 16,805 |
79,136 | 0 | static ssize_t ucma_join_ip_multicast(struct ucma_file *file,
const char __user *inbuf,
int in_len, int out_len)
{
struct rdma_ucm_join_ip_mcast cmd;
struct rdma_ucm_join_mcast join_cmd;
if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
return -EFAULT;
join_cmd.response = cmd.response;
join_cmd... | 16,806 |
114,248 | 0 | void GpuChannelHost::MessageFilter::AddRoute(
int route_id,
base::WeakPtr<IPC::Channel::Listener> listener,
scoped_refptr<MessageLoopProxy> loop) {
DCHECK(parent_->factory_->IsIOThread());
DCHECK(listeners_.find(route_id) == listeners_.end());
GpuListenerInfo info;
info.listener = listener;
info.l... | 16,807 |
36,355 | 0 | static inline int nested_symlink(struct path *path, struct nameidata *nd)
{
int res;
if (unlikely(current->link_count >= MAX_NESTED_LINKS)) {
path_put_conditional(path, nd);
path_put(&nd->path);
return -ELOOP;
}
BUG_ON(nd->depth >= MAX_NESTED_LINKS);
nd->depth++;
current->link_count++;
do {
struct pat... | 16,808 |
90,915 | 0 | std::string GenerateUserAgent()
{
srand((unsigned int)time(NULL));
int cversion = rand() % 0xFFFF;
int mversion = rand() % 3;
int sversion = rand() % 3;
std::stringstream sstr;
sstr << "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/" << (601 + sversion) << "." << (36+mversion) << " (KHTML, like Gecko) Chrome/"... | 16,809 |
90,928 | 0 | int SetThreadName(const std::thread::native_handle_type &thread, const char* threadName) {
DWORD dwThreadID = ::GetThreadId( static_cast<HANDLE>( thread ) );
THREADNAME_INFO info;
info.dwType = 0x1000;
info.szName = threadName;
info.dwThreadID = dwThreadID;
info.dwFlags = 0;
#pragma warning(push)
#pragma warning(... | 16,810 |
80,861 | 0 | GF_Err styl_dump(GF_Box *a, FILE * trace)
{
u32 i;
GF_TextStyleBox*p = (GF_TextStyleBox*)a;
gf_isom_box_dump_start(a, "TextStyleBox", trace);
fprintf(trace, ">\n");
for (i=0; i<p->entry_count; i++) tx3g_dump_style(trace, &p->styles[i]);
if (!p->size) {
fprintf(trace, "<StyleRecord startChar=\"\" endChar=\"\" fo... | 16,811 |
130,889 | 0 | static void methodWithUnsignedLongSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
if (UNLIKELY(info.Length() < 1)) {
throwTypeError(ExceptionMessages::failedToExecute("methodWithUnsignedLongSequence", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()... | 16,812 |
97,529 | 0 | FrameLoader::~FrameLoader()
{
setOpener(0);
HashSet<Frame*>::iterator end = m_openedFrames.end();
for (HashSet<Frame*>::iterator it = m_openedFrames.begin(); it != end; ++it)
(*it)->loader()->m_opener = 0;
m_client->frameLoaderDestroyed();
}
| 16,813 |
103,194 | 0 | void Browser::ShowBrokenPageTab(TabContents* contents) {
UserMetrics::RecordAction(UserMetricsAction("ReportBug"), profile_);
string16 page_title = contents->GetTitle();
NavigationEntry* entry = contents->controller().GetActiveEntry();
if (!entry)
return;
std::string page_url = entry->url().spec();
std:... | 16,814 |
64,470 | 0 | R_API void r_config_bump(RConfig *cfg, const char *key) {
char *orig = strdup (r_config_get (cfg, key));
r_config_set (cfg, key, orig);
free (orig);
}
| 16,815 |
77,976 | 0 | static void InitPSDInfo(const Image *image, PSDInfo *info)
{
info->version=1;
info->columns=image->columns;
info->rows=image->rows;
/* Setting the mode to a value that won't change the colorspace */
info->mode=10;
info->channels=1U;
if (image->storage_class == PseudoClass)
info->mode=2; // indexed mod... | 16,816 |
12,481 | 0 | static void cleanup1_doall(ADDED_OBJ *a)
{
a->obj->nid=0;
a->obj->flags|=ASN1_OBJECT_FLAG_DYNAMIC|
ASN1_OBJECT_FLAG_DYNAMIC_STRINGS|
ASN1_OBJECT_FLAG_DYNAMIC_DATA;
}
| 16,817 |
68,758 | 0 | static int klsi_105_prepare_write_buffer(struct usb_serial_port *port,
void *dest, size_t size)
{
unsigned char *buf = dest;
int count;
count = kfifo_out_locked(&port->write_fifo, buf + KLSI_HDR_LEN, size,
&port->lock);
put_unaligned_le16(count, buf);
return count + KLSI_HDR_LEN;
}
| 16,818 |
2,084 | 0 | RedChannelClient *red_channel_client_create(int size, RedChannel *channel, RedClient *client,
RedsStream *stream,
int monitor_latency,
int num_common_caps, uint32_t *common_caps,
... | 16,819 |
72,335 | 0 | after_select(fd_set *readset, fd_set *writeset)
{
struct sockaddr_un sunaddr;
socklen_t slen;
char buf[1024];
int len, sock, r;
u_int i, orig_alloc;
uid_t euid;
gid_t egid;
for (i = 0, orig_alloc = sockets_alloc; i < orig_alloc; i++)
switch (sockets[i].type) {
case AUTH_UNUSED:
break;
case AUTH_SOCKET... | 16,820 |
21,865 | 0 | void drm_crtc_convert_to_umode(struct drm_mode_modeinfo *out,
struct drm_display_mode *in)
{
out->clock = in->clock;
out->hdisplay = in->hdisplay;
out->hsync_start = in->hsync_start;
out->hsync_end = in->hsync_end;
out->htotal = in->htotal;
out->hskew = in->hskew;
out->vdisplay = in->vdisplay;
out->vs... | 16,821 |
150,462 | 0 | WebContents* NavigationControllerImpl::GetWebContents() const {
return delegate_->GetWebContents();
}
| 16,822 |
148,599 | 0 | WebContentsImpl::WebContentsTreeNode::WebContentsTreeNode(
WebContentsImpl* current_web_contents)
: current_web_contents_(current_web_contents),
outer_web_contents_(nullptr),
outer_contents_frame_tree_node_id_(
FrameTreeNode::kFrameTreeNodeInvalidId),
focused_web_contents_(current_we... | 16,823 |
173,345 | 0 | Parcel::Blob::Blob() :
mFd(-1), mData(NULL), mSize(0), mMutable(false) {
}
| 16,824 |
97,834 | 0 | void AutoFillManager::OnInfoBarClosed(bool should_save) {
if (should_save)
personal_data_->SaveImportedCreditCard();
UploadFormData();
}
| 16,825 |
31,267 | 0 | static int async_decrypt(struct ablkcipher_request *req)
{
struct crypto_tfm *tfm = req->base.tfm;
struct blkcipher_alg *alg = &tfm->__crt_alg->cra_blkcipher;
struct blkcipher_desc desc = {
.tfm = __crypto_blkcipher_cast(tfm),
.info = req->info,
.flags = req->base.flags,
};
return alg->decrypt(&desc, req->d... | 16,826 |
149,254 | 0 | const AtomicString& HTMLFormControlElement::autocapitalize() const {
if (!FastGetAttribute(kAutocapitalizeAttr).IsEmpty())
return HTMLElement::autocapitalize();
if (HTMLFormElement* form = Form())
return form->autocapitalize();
return g_empty_atom;
}
| 16,827 |
73,648 | 0 | MagickExport PixelPacket *QueueAuthenticPixelCacheNexus(Image *image,
const ssize_t x,const ssize_t y,const size_t columns,const size_t rows,
const MagickBooleanType clone,NexusInfo *nexus_info,ExceptionInfo *exception)
{
CacheInfo
*restrict cache_info;
MagickOffsetType
offset;
MagickSizeType
nu... | 16,828 |
89,238 | 0 | setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
{
int r = 0;
switch (NODE_TYPE(node)) {
case NODE_LIST:
{
Node* prev = NULL_NODE;
do {
r = setup_tree(NODE_CAR(node), reg, state, env);
if (IS_NOT_NULL(prev) && r == 0) {
r = next_setup(prev, NODE_CAR(node), r... | 16,829 |
81,061 | 0 | static int vmx_restore_vmx_ept_vpid_cap(struct vcpu_vmx *vmx, u64 data)
{
u64 vmx_ept_vpid_cap;
vmx_ept_vpid_cap = vmx_control_msr(vmx->nested.msrs.ept_caps,
vmx->nested.msrs.vpid_caps);
/* Every bit is either reserved or a feature bit. */
if (!is_bitwise_subset(vmx_ept_vpid_cap, data, -1ULL))
return -E... | 16,830 |
25,218 | 0 | static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
{
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp;
struct sk_buff *opt_skb = NULL;
/* Imagine: socket is IPv6. IPv4 packet arrives,
goes to IPv4 receive handler and backlogged.
From backlog it always goes here. Kerboom...
Fortunat... | 16,831 |
123,253 | 0 | bool ShouldSendPinchGesture() {
static bool pinch_allowed =
CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableViewport) ||
CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePinch);
return pinch_allowed;
}
| 16,832 |
61,237 | 0 | static int allmbox_cb(void *rock,
const char *key,
size_t keylen,
const char *data,
size_t datalen)
{
struct allmb_rock *mbrock = (struct allmb_rock *)rock;
if (!mbrock->mbentry) {
int r = mboxlist_parse_entry(&mbro... | 16,833 |
185,450 | 1 | void HTMLFormControlElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == formAttr) {
formAttributeChanged();
UseCounter::count(document(), UseCounter::FormAttribute);
} else if (name == disabledAttr) {
bool oldDisabled = m_disabled;
m_disabled = !value.isNull();
if (oldDisabled !=... | 16,834 |
180,850 | 1 | get_endpoints(struct usbtest_dev *dev, struct usb_interface *intf)
{
int tmp;
struct usb_host_interface *alt;
struct usb_host_endpoint *in, *out;
struct usb_host_endpoint *iso_in, *iso_out;
struct usb_host_endpoint *int_in, *int_out;
struct usb_device *udev;
for (tmp = 0; tmp < intf->num_altsetting; tmp++) {
unsig... | 16,835 |
112,699 | 0 | void DocumentLoader::setMainDocumentError(const ResourceError& error)
{
m_mainDocumentError = error;
frameLoader()->client()->setMainDocumentError(this, error);
}
| 16,836 |
32,215 | 0 | static void *ptype_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
struct packet_type *pt;
struct list_head *nxt;
int hash;
++*pos;
if (v == SEQ_START_TOKEN)
return ptype_get_idx(0);
pt = v;
nxt = pt->list.next;
if (pt->type == htons(ETH_P_ALL)) {
if (nxt != &ptype_all)
goto found;
hash = 0;
... | 16,837 |
8,755 | 0 | void FAST_FUNC udhcp_add_simple_option(struct dhcp_packet *packet, uint8_t code, uint32_t data)
{
const struct dhcp_optflag *dh;
for (dh = dhcp_optflags; dh->code; dh++) {
if (dh->code == code) {
uint8_t option[6], len;
option[OPT_CODE] = code;
len = dhcp_option_lengths[dh->flags & OPTION_TYPE_MASK];
... | 16,838 |
9,477 | 0 | static ALWAYS_INLINE double MIND(double a, double b)
{
if (a < b)
return a;
return b;
}
| 16,839 |
92,035 | 0 | void blk_start_request(struct request *req)
{
lockdep_assert_held(req->q->queue_lock);
WARN_ON_ONCE(req->q->mq_ops);
blk_dequeue_request(req);
if (test_bit(QUEUE_FLAG_STATS, &req->q->queue_flags)) {
req->io_start_time_ns = ktime_get_ns();
#ifdef CONFIG_BLK_DEV_THROTTLING_LOW
req->throtl_size = blk_rq_sectors(... | 16,840 |
165,504 | 0 | ContentSecurityPolicy::ContentSecurityPolicy()
: execution_context_(nullptr),
override_inline_style_allowed_(false),
script_hash_algorithms_used_(kContentSecurityPolicyHashAlgorithmNone),
style_hash_algorithms_used_(kContentSecurityPolicyHashAlgorithmNone),
sandbox_mask_(0),
treat_as_p... | 16,841 |
83,574 | 0 | static void update_read_synchronize(rdpUpdate* update, wStream* s)
{
Stream_Seek_UINT16(s); /* pad2Octets (2 bytes) */
/**
* The Synchronize Update is an artifact from the
* T.128 protocol and should be ignored.
*/
}
| 16,842 |
66,693 | 0 | static int dvb_usbv2_init(struct dvb_usb_device *d)
{
int ret;
dev_dbg(&d->udev->dev, "%s:\n", __func__);
dvb_usbv2_device_power_ctrl(d, 1);
if (d->props->read_config) {
ret = d->props->read_config(d);
if (ret < 0)
goto err;
}
ret = dvb_usbv2_i2c_init(d);
if (ret < 0)
goto err;
ret = dvb_usbv2_adap... | 16,843 |
13,259 | 0 | c_pdf14trans_is_closing(const gs_composite_t * composite_action, gs_composite_t ** ppcte,
gx_device *dev)
{
gs_pdf14trans_t *pct0 = (gs_pdf14trans_t *)composite_action;
int op0 = pct0->params.pdf14_op;
switch (op0) {
default: return_error(gs_error_unregistered); /* Must not ... | 16,844 |
159,099 | 0 | bool DeleteDownloadedFile(const base::FilePath& path) {
DCHECK(GetDownloadTaskRunner()->RunsTasksInCurrentSequence());
if (base::DirectoryExists(path))
return true;
return base::DeleteFile(path, false);
}
| 16,845 |
96,350 | 0 | static VOID MiniportEnableMSIInterrupt(
IN PVOID MiniportInterruptContext,
IN ULONG MessageId
)
{
PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)MiniportInterruptContext;
CParaNdisAbstractPath *path = GetPathByMessageId(pContext, MessageId);
path->EnableInterrupts();
}
| 16,846 |
37,804 | 0 | static int nop_on_interception(struct vcpu_svm *svm)
{
return 1;
}
| 16,847 |
34,170 | 0 | static inline u64 rfc3390_initial_rate(struct sock *sk)
{
const struct ccid3_hc_tx_sock *hc = ccid3_hc_tx_sk(sk);
const __u32 w_init = clamp_t(__u32, 4380U, 2 * hc->tx_s, 4 * hc->tx_s);
return scaled_div(w_init << 6, hc->tx_rtt);
}
| 16,848 |
137,255 | 0 | void Textfield::OnEnabledChanged() {
View::OnEnabledChanged();
if (GetInputMethod())
GetInputMethod()->OnTextInputTypeChanged(this);
SchedulePaint();
}
| 16,849 |
141,232 | 0 | void Document::SetLastFocusType(WebFocusType last_focus_type) {
last_focus_type_ = last_focus_type;
}
| 16,850 |
76,035 | 0 | vrrp_state_handler(vector_t *strvec)
{
char *str = strvec_slot(strvec, 1);
vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp);
if (!strcmp(str, "MASTER"))
vrrp->wantstate = VRRP_STATE_MAST;
else if (!strcmp(str, "BACKUP"))
{
if (vrrp->wantstate == VRRP_STATE_MAST)
report_config_error(CONFIG_GENERAL_ERROR, "(%s... | 16,851 |
45,327 | 0 | void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path,
u32 new_size, int from_end)
{
int slot;
struct extent_buffer *leaf;
struct btrfs_item *item;
u32 nritems;
unsigned int data_end;
unsigned int old_data_start;
unsigned int old_size;
unsigned int size_diff;
int i;
struct btrfs_map_to... | 16,852 |
56,797 | 0 | int usb_disable_ltm(struct usb_device *udev)
{
return 0;
}
| 16,853 |
146,921 | 0 | void Document::writeln(LocalDOMWindow* calling_window,
const Vector<String>& text,
ExceptionState& exception_state) {
DCHECK(calling_window);
StringBuilder builder;
for (const String& string : text)
builder.Append(string);
writeln(builder.ToString(), calling_win... | 16,854 |
84,771 | 0 | static int del_dac(struct task_struct *child, int slot)
{
if (slot == 1) {
if ((dbcr_dac(child) & (DBCR_DAC1R | DBCR_DAC1W)) == 0)
return -ENOENT;
child->thread.debug.dac1 = 0;
dbcr_dac(child) &= ~(DBCR_DAC1R | DBCR_DAC1W);
#ifdef CONFIG_PPC_ADV_DEBUG_DAC_RANGE
if (child->thread.debug.dbcr2 & DBCR2_DAC12MO... | 16,855 |
88,743 | 0 | int modbus_receive_confirmation(modbus_t *ctx, uint8_t *rsp)
{
if (ctx == NULL) {
errno = EINVAL;
return -1;
}
return _modbus_receive_msg(ctx, rsp, MSG_CONFIRMATION);
}
| 16,856 |
181,387 | 1 | static int set_registers(rtl8150_t * dev, u16 indx, u16 size, void *data)
{
return usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0),
RTL8150_REQ_SET_REGS, RTL8150_REQT_WRITE,
indx, 0, data, size, 500);
}
| 16,857 |
78,765 | 0 | static unsigned short muscle_parse_singleAcl(const sc_acl_entry_t* acl)
{
unsigned short acl_entry = 0;
while(acl) {
int key = acl->key_ref;
int method = acl->method;
switch(method) {
case SC_AC_NEVER:
return 0xFFFF;
/* Ignore... other items overwrite these */
case SC_AC_NONE:
case SC_AC_UNKNOWN:
... | 16,858 |
141,777 | 0 | ChromeMetricsServiceClient::CreateUploader(
base::StringPiece server_url,
base::StringPiece insecure_server_url,
base::StringPiece mime_type,
metrics::MetricsLogUploader::MetricServiceType service_type,
const metrics::MetricsLogUploader::UploadCallback& on_upload_complete) {
return std::make_uniqu... | 16,859 |
17,848 | 0 | static int fchmodat_nofollow(int dirfd, const char *name, mode_t mode)
{
int fd, ret;
/* FIXME: this should be handled with fchmodat(AT_SYMLINK_NOFOLLOW).
* Unfortunately, the linux kernel doesn't implement it yet. As an
* alternative, let's open the file and use fchmod() instead. This
* may fai... | 16,860 |
131,423 | 0 | static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution... | 16,861 |
187,419 | 1 | int validate_camera_metadata_structure(const camera_metadata_t *metadata,
const size_t *expected_size) {
if (metadata == NULL) {
ALOGE("%s: metadata is null!", __FUNCTION__);
return ERROR;
}
// Check that the metadata pointer is well-aligned first.
{
static const struct {
const char *name;
size_t alignment;
} alignme... | 16,862 |
45,049 | 0 | static apr_uint64_t ap_ntoh64(const apr_uint64_t *input)
{
apr_uint64_t rval;
unsigned char *data = (unsigned char *)&rval;
if (APR_IS_BIGENDIAN) {
return *input;
}
data[0] = *input >> 56;
data[1] = *input >> 48;
data[2] = *input >> 40;
data[3] = *input >> 32;
data[4] = ... | 16,863 |
34,136 | 0 | static int hci_sock_setsockopt(struct socket *sock, int level, int optname,
char __user *optval, unsigned int len)
{
struct hci_ufilter uf = { .opcode = 0 };
struct sock *sk = sock->sk;
int err = 0, opt = 0;
BT_DBG("sk %p, opt %d", sk, optname);
lock_sock(sk);
if (hci_pi(sk)->channel != HCI_CHANNEL_R... | 16,864 |
66,242 | 0 | static int mailimf_time_parse(const char * message, size_t length,
size_t * indx,
int * phour, int * pmin,
int * psec,
int * pzone)
{
size_t cur_token;
int hour;
int min;
int sec;
int zone;
int r;
cur_token = * indx;
r = mailimf_cfws_parse(message, length, &cur_tok... | 16,865 |
20,324 | 0 | pfn_t hva_to_pfn_atomic(struct kvm *kvm, unsigned long addr)
{
return hva_to_pfn(kvm, addr, true, NULL, true, NULL);
}
| 16,866 |
154,579 | 0 | error::Error GLES2DecoderPassthroughImpl::DoBlendFunc(GLenum sfactor,
GLenum dfactor) {
api()->glBlendFuncFn(sfactor, dfactor);
return error::kNoError;
}
| 16,867 |
182,568 | 1 | static int ocfs2_dio_get_block(struct inode *inode, sector_t iblock,
struct buffer_head *bh_result, int create)
{
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct ocfs2_inode_info *oi = OCFS2_I(inode);
struct ocfs2_write_ctxt *wc;
struct ocfs2_write_cluster_desc *desc = NULL;
struct ocfs2_dio_write_ctxt *dwc = N... | 16,868 |
96,220 | 0 | int sm_skip_attr_write(p_fm_config_conx_hdlt hdl, fm_mgr_type_t mgr, int argc, char *argv[]) {
fm_mgr_config_errno_t res;
fm_msg_ret_code_t ret_code;
unsigned int attrSkip = 0;
if (argc > 1) {
printf("Error: only 1 argument or less expected\n");
return 0;
}
if ((argc==0) || ((argc==1) && (strcmp(argv[0],"-h... | 16,869 |
86,221 | 0 | static int __init i8042_init(void)
{
struct platform_device *pdev;
int err;
dbg_init();
err = i8042_platform_init();
if (err)
return err;
err = i8042_controller_check();
if (err)
goto err_platform_exit;
pdev = platform_create_bundle(&i8042_driver, i8042_probe, NULL, 0, NULL, 0);
if (IS_ERR(pdev)) {
e... | 16,870 |
151,168 | 0 | void InspectorNetworkAgent::DidReceiveData(unsigned long identifier,
DocumentLoader* loader,
const char* data,
int data_length) {
String request_id = IdentifiersFactory::RequestId(identifie... | 16,871 |
59,107 | 0 | static int check_cond_jmp_op(struct bpf_verifier_env *env,
struct bpf_insn *insn, int *insn_idx)
{
struct bpf_verifier_state *other_branch, *this_branch = env->cur_state;
struct bpf_reg_state *regs = this_branch->regs, *dst_reg;
u8 opcode = BPF_OP(insn->code);
int err;
if (opcode > BPF_JSLE) {
verbose(e... | 16,872 |
32,759 | 0 | static int tg3_setup_fiber_by_hand(struct tg3 *tp, u32 mac_status)
{
int current_link_up = 0;
if (!(mac_status & MAC_STATUS_PCS_SYNCED))
goto out;
if (tp->link_config.autoneg == AUTONEG_ENABLE) {
u32 txflags, rxflags;
int i;
if (fiber_autoneg(tp, &txflags, &rxflags)) {
u32 local_adv = 0, remote_adv = 0... | 16,873 |
31,380 | 0 | static int check_reqid(struct xfrm_policy *xp, int dir, int count, void *ptr)
{
int i;
u32 reqid = *(u32*)ptr;
for (i=0; i<xp->xfrm_nr; i++) {
if (xp->xfrm_vec[i].reqid == reqid)
return -EEXIST;
}
return 0;
}
| 16,874 |
121,258 | 0 | void HTMLInputElement::setSize(unsigned size)
{
setAttribute(sizeAttr, String::number(size));
}
| 16,875 |
73,199 | 0 | static int file_read(jas_stream_obj_t *obj, char *buf, int cnt)
{
jas_stream_fileobj_t *fileobj = JAS_CAST(jas_stream_fileobj_t *, obj);
return read(fileobj->fd, buf, cnt);
}
| 16,876 |
166,095 | 0 | void FileSystemManagerImpl::Write(
const GURL& file_path,
const std::string& blob_uuid,
int64_t position,
blink::mojom::FileSystemCancellableOperationRequest op_request,
blink::mojom::FileSystemOperationListenerPtr listener) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
FileSystemURL url(context_->... | 16,877 |
26,665 | 0 | static int nl80211_authenticate(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
struct ieee80211_channel *chan;
const u8 *bssid, *ssid, *ie = NULL;
int err, ssid_len, ie_len = 0;
enum nl80211_auth_type auth_typ... | 16,878 |
172,981 | 0 | static int rpng2_x_msb(ulg u32val)
{
int i;
for (i = 31; i >= 0; --i) {
if (u32val & 0x80000000L)
break;
u32val <<= 1;
}
return i;
}
| 16,879 |
110,956 | 0 | void RootWindowHostLinux::SetFocusWhenShown(bool focus_when_shown) {
static const char* k_NET_WM_USER_TIME = "_NET_WM_USER_TIME";
focus_when_shown_ = focus_when_shown;
if (IsWindowManagerPresent() && !focus_when_shown_) {
ui::SetIntProperty(xwindow_,
k_NET_WM_USER_TIME,
... | 16,880 |
45,422 | 0 | static unsigned long ecryptfs_get_zeroed_pages(gfp_t gfp_mask,
unsigned int order)
{
struct page *page;
page = alloc_pages(gfp_mask | __GFP_ZERO, order);
if (page)
return (unsigned long) page_address(page);
return 0;
}
| 16,881 |
48,516 | 0 | static void ion_buffer_add(struct ion_device *dev,
struct ion_buffer *buffer)
{
struct rb_node **p = &dev->buffers.rb_node;
struct rb_node *parent = NULL;
struct ion_buffer *entry;
while (*p) {
parent = *p;
entry = rb_entry(parent, struct ion_buffer, node);
if (buffer < entry) {
p = &(*p)->rb_left;... | 16,882 |
64,893 | 0 | static void rle_write_trns(struct rle_context *rlectx, int num_trns)
{
iw_byte dstbuf[4];
int num_remaining = num_trns;
int num_to_write;
while(num_remaining>0) {
num_to_write = num_remaining;
if(num_to_write>255) num_to_write=255;
dstbuf[0]=0x00; // 00 02 = Delta
dstbuf[1]=0x02;
dstbuf[2]=(iw_byte)num_t... | 16,883 |
40,023 | 0 | cifs_update_eof(struct cifsInodeInfo *cifsi, loff_t offset,
unsigned int bytes_written)
{
loff_t end_of_write = offset + bytes_written;
if (end_of_write > cifsi->server_eof)
cifsi->server_eof = end_of_write;
}
| 16,884 |
37,593 | 0 | static pfn_t spte_to_pfn(u64 pte)
{
return (pte & PT64_BASE_ADDR_MASK) >> PAGE_SHIFT;
}
| 16,885 |
89,414 | 0 | void irc_servers_reconnect_deinit(void)
{
signal_remove("server connect copy", (SIGNAL_FUNC) sig_server_connect_copy);
signal_remove("server reconnect save status", (SIGNAL_FUNC) sig_server_reconnect_save_status);
signal_remove("event connected", (SIGNAL_FUNC) sig_connected);
signal_remove("event 436", (SIGNAL_FUNC... | 16,886 |
110,609 | 0 | bool GLES2DecoderImpl::Initialize(
const scoped_refptr<gfx::GLSurface>& surface,
const scoped_refptr<gfx::GLContext>& context,
bool offscreen,
const gfx::Size& size,
const DisallowedFeatures& disallowed_features,
const char* allowed_extensions,
const std::vector<int32>& attribs) {
TRACE_EV... | 16,887 |
81,272 | 0 | static void *eval_map_start(struct seq_file *m, loff_t *pos)
{
union trace_eval_map_item *v;
loff_t l = 0;
mutex_lock(&trace_eval_mutex);
v = trace_eval_maps;
if (v)
v++;
while (v && l < *pos) {
v = eval_map_next(m, v, &l);
}
return v;
}
| 16,888 |
135,063 | 0 | void AppCacheHost::DoPendingSwapCache() {
DCHECK_EQ(false, pending_swap_cache_callback_.is_null());
bool success = false;
if (associated_cache_.get() && associated_cache_->owning_group()) {
if (associated_cache_->owning_group()->is_obsolete()) {
success = true;
AssociateNoCache(GURL());
} els... | 16,889 |
13,505 | 0 | void js_unref(js_State *J, const char *ref)
{
js_delregistry(J, ref);
}
| 16,890 |
131,079 | 0 | static void stringAttrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjectV8Internal::stringAttrWithGetterExceptionAttributeSetter(jsValue, info);
TRACE_E... | 16,891 |
66,924 | 0 | static int decode_frame_png(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
PNGDecContext *const s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AVFrame *p;
int64_t sig;
int re... | 16,892 |
118,850 | 0 | void WebContentsImpl::DidEndColorChooser() {
Send(new ViewMsg_DidEndColorChooser(GetRoutingID(),
color_chooser_identifier_));
color_chooser_.reset();
color_chooser_identifier_ = 0;
}
| 16,893 |
151,821 | 0 | void BackgroundLoaderOfflinerTest::OnCompletion(
const SavePageRequest& request,
Offliner::RequestStatus status) {
DCHECK(!completion_callback_called_); // Expect 1 callback per request.
completion_callback_called_ = true;
request_status_ = status;
}
| 16,894 |
4,308 | 0 | PHPAPI int _php_error_log(int opt_err, char *message, char *opt, char *headers TSRMLS_DC) /* {{{ */
{
return _php_error_log_ex(opt_err, message, (opt_err == 3) ? strlen(message) : 0, opt, headers TSRMLS_CC);
}
/* }}} */
| 16,895 |
69,202 | 0 | ZEND_API void ZEND_FASTCALL zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, merge_checker_func_t pMergeSource, void *pParam)
{
uint32_t idx;
Bucket *p;
zval *t;
IS_CONSISTENT(source);
IS_CONSISTENT(target);
HT_ASSERT(GC_REFCOUNT(target) == 1);
for (idx = 0; idx < sou... | 16,896 |
182,099 | 1 | int ff_mms_asf_header_parser(MMSContext *mms)
{
uint8_t *p = mms->asf_header;
uint8_t *end;
int flags, stream_id;
mms->stream_num = 0;
if (mms->asf_header_size < sizeof(ff_asf_guid) * 2 + 22 ||
memcmp(p, ff_asf_header, sizeof(ff_asf_guid))) {
av_log(NULL, AV_LOG_ERROR,
"Corrupt stream (invalid ASF header, size=%d)\n",... | 16,897 |
179,881 | 1 | static bool cgroupfs_mount_cgroup(void *hdata, const char *root, int type)
{
size_t bufsz = strlen(root) + sizeof("/sys/fs/cgroup");
char *path = NULL;
char **parts = NULL;
char *dirname = NULL;
char *abs_path = NULL;
char *abs_path2 = NULL;
struct cgfs_data *cgfs_d;
struct cgroup_process_info *info, *base_info;
int r,... | 16,898 |
109,202 | 0 | Page* InspectorController::inspectedPage() const
{
return m_page;
}
| 16,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.