unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
74,734 | 0 | void kernel_bad_stack(struct pt_regs *regs)
{
printk(KERN_EMERG "Bad kernel stack pointer %lx at %lx\n",
regs->gpr[1], regs->nip);
die("Bad kernel stack pointer", regs, SIGABRT);
}
| 3,600 |
57,454 | 0 | void ext4_ext_truncate(struct inode *inode)
{
struct address_space *mapping = inode->i_mapping;
struct super_block *sb = inode->i_sb;
ext4_lblk_t last_block;
handle_t *handle;
int err = 0;
/*
* probably first extent we're gonna free will be last in block
*/
err = ext4_writepage_trans_blocks(inode);
handle ... | 3,601 |
7,467 | 0 | t1_decoder_init( T1_Decoder decoder,
FT_Face face,
FT_Size size,
FT_GlyphSlot slot,
FT_Byte** glyph_names,
PS_Blend blend,
FT_Bool ... | 3,602 |
134,700 | 0 | void SynchronousCompositorImpl::SetClient(
SynchronousCompositorClient* compositor_client) {
DCHECK(CalledOnValidThread());
DCHECK_IMPLIES(compositor_client, !compositor_client_);
DCHECK_IMPLIES(!compositor_client, compositor_client_);
if (!compositor_client) {
SynchronousCompositorRegistry::GetInstanc... | 3,603 |
177,996 | 1 | context_length_arg (char const *str, int *out)
{
uintmax_t value;
if (! (xstrtoumax (str, 0, 10, &value, "") == LONGINT_OK
&& 0 <= (*out = value)
&& *out == value))
{
error (EXIT_TROUBLE, 0, "%s: %s", str,
_("invalid context length argument"));
}
page size, unless a read yields a partial page. */... | 3,604 |
93,251 | 0 | vldb_reply_print(netdissect_options *ndo,
register const u_char *bp, int length, int32_t opcode)
{
const struct rx_header *rxh;
unsigned long i;
if (length < (int)sizeof(struct rx_header))
return;
rxh = (const struct rx_header *) bp;
/*
* Print out the afs call we're invoking. The table us... | 3,605 |
132,656 | 0 | std::string BlinkTestRunner::PathToLocalResource(const std::string& resource) {
#if defined(OS_WIN)
if (resource.find("/tmp/") == 0) {
GURL base_url = net::FilePathToFileURL(test_config_.temp_path);
return base_url.Resolve(resource.substr(strlen("/tmp/"))).spec();
}
#endif
std::string result = resource;
... | 3,606 |
176,698 | 0 | xmlSAXUserParseFile(xmlSAXHandlerPtr sax, void *user_data,
const char *filename) {
int ret = 0;
xmlParserCtxtPtr ctxt;
ctxt = xmlCreateFileParserCtxt(filename);
if (ctxt == NULL) return -1;
if (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler)
xmlFree(ctxt->sax);
ctxt->sax = sax;
xmlDetectSAX... | 3,607 |
183,199 | 1 | bootp_print(netdissect_options *ndo,
register const u_char *cp, u_int length)
{
register const struct bootp *bp;
static const u_char vm_cmu[4] = VM_CMU;
static const u_char vm_rfc1048[4] = VM_RFC1048;
bp = (const struct bootp *)cp;
ND_TCHECK(bp->bp_op);
ND_PRINT((ndo, "BOOTP/DHCP, %s",
tok2str(bootp_op... | 3,608 |
19,167 | 0 | static int l2tp_ip_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
{
struct inet_sock *inet = inet_sk(sk);
struct sockaddr_l2tpip *addr = (struct sockaddr_l2tpip *) uaddr;
int ret = -EINVAL;
int chk_addr_ret;
ret = -EADDRINUSE;
read_lock_bh(&l2tp_ip_lock);
if (__l2tp_ip_bind_lookup(&init_net, addr->... | 3,609 |
145,968 | 0 | void DestroyTabletModeWindowManager() {
Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(
false);
EXPECT_FALSE(tablet_mode_window_manager());
}
| 3,610 |
116,333 | 0 | bool QQuickWebViewExperimental::useDefaultContentItemSize() const
{
Q_D(const QQuickWebView);
return d->m_useDefaultContentItemSize;
}
| 3,611 |
56,265 | 0 | SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, zend_bool duplicate, zend_bool replace TSRMLS_DC)
{
sapi_header_line ctr = {0};
int r;
ctr.line = header_line;
ctr.line_len = header_line_len;
r = sapi_header_op(replace ? SAPI_HEADER_REPLACE : SAPI_HEADER_ADD,
&ctr TSRMLS_CC);
if (!d... | 3,612 |
116,804 | 0 | void WebRTCAudioDeviceTest::SetAudioUtilCallback(AudioUtilInterface* callback) {
audio_hardware::ResetCache();
audio_util_callback_ = callback;
}
| 3,613 |
125,686 | 0 | void RenderViewHostImpl::OnShowView(int route_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
bool user_gesture) {
if (!is_swapped_out_) {
delegate_->ShowCreatedWindow(
route_id... | 3,614 |
759 | 0 | poppler_form_field_mapping_new (void)
{
return (PopplerFormFieldMapping *) g_new0 (PopplerFormFieldMapping, 1);
}
| 3,615 |
155,107 | 0 | void OmniboxViewViews::EnterKeywordModeForDefaultSearchProvider() {
model()->EnterKeywordModeForDefaultSearchProvider(
OmniboxEventProto::KEYBOARD_SHORTCUT);
}
| 3,616 |
83,173 | 0 | envadjust(mrb_state *mrb, mrb_value *oldbase, mrb_value *newbase, size_t size)
{
mrb_callinfo *ci = mrb->c->cibase;
if (newbase == oldbase) return;
while (ci <= mrb->c->ci) {
struct REnv *e = ci->env;
mrb_value *st;
if (e && MRB_ENV_STACK_SHARED_P(e) &&
(st = e->stack) && oldbase <= st && st... | 3,617 |
70,255 | 0 | Luv24toRGB(LogLuvState* sp, uint8* op, tmsize_t n)
{
uint32* luv = (uint32*) sp->tbuf;
uint8* rgb = (uint8*) op;
while (n-- > 0) {
float xyz[3];
LogLuv24toXYZ(*luv++, xyz);
XYZtoRGB24(xyz, rgb);
rgb += 3;
}
}
| 3,618 |
67,797 | 0 | static void sig_print_starting(TEXT_DEST_REC *dest)
{
NETJOIN_SERVER_REC *rec;
if (printing_joins)
return;
if (!IS_IRC_SERVER(dest->server))
return;
if (!(dest->level & MSGLEVEL_PUBLIC))
return;
if (!server_ischannel(dest->server, dest->target))
return;
rec = netjoin_find_server(IRC_SERVER(dest->serv... | 3,619 |
132,400 | 0 | const GritResourceMap* GetKeyboardExtensionResources(size_t* size) {
static const GritResourceMap kKeyboardResources[] = {
{"keyboard/locales/en.js", IDR_KEYBOARD_LOCALES_EN},
{"keyboard/config/m-emoji.js", IDR_KEYBOARD_CONFIG_EMOJI},
{"keyboard/config/m-hwt.js", IDR_KEYBOARD_CONFIG_HWT},
{"ke... | 3,620 |
76,890 | 0 | encode_SET_IPV4_addr(const struct ofpact_ipv4 *ipv4,
enum ofp_version ofp_version,
enum ofp_raw_action_type raw, enum mf_field_id field,
struct ofpbuf *out)
{
ovs_be32 addr = ipv4->ipv4;
if (ofp_version < OFP12_VERSION) {
ofpact_put_raw(out,... | 3,621 |
30,739 | 0 | static int rfcomm_sock_getsockopt_old(struct socket *sock, int optname, char __user *optval, int __user *optlen)
{
struct sock *sk = sock->sk;
struct rfcomm_conninfo cinfo;
struct l2cap_conn *conn = l2cap_pi(sk)->chan->conn;
int len, err = 0;
u32 opt;
BT_DBG("sk %p", sk);
if (get_user(len, optlen))
return -E... | 3,622 |
76,593 | 0 | int ws_svr_broadcast_text(ws_svr *svr, char *message)
{
return broadcast_message(svr, 0x1, message, strlen(message));
}
| 3,623 |
115,599 | 0 | void GraphicsContext::drawLineForText(const FloatPoint& pt,
float width,
bool printing)
{
if (paintingDisabled())
return;
if (width <= 0)
return;
int thickness = SkMax32(static_cast<int>(strokeThickness()), 1);
... | 3,624 |
123,174 | 0 | ui::InputMethod* RenderWidgetHostViewAura::GetInputMethod() const {
aura::RootWindow* root_window = window_->GetRootWindow();
if (!root_window)
return NULL;
return root_window->GetProperty(aura::client::kRootWindowInputMethodKey);
}
| 3,625 |
11,473 | 0 | fbStore_a4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
{
int i;
for (i = 0; i < width; ++i) {
Store4(bits, i + x, READ(values + i)>>28);
}
}
| 3,626 |
164,995 | 0 | SkFilterQuality HTMLCanvasElement::FilterQuality() const {
if (!isConnected())
return kLow_SkFilterQuality;
const ComputedStyle* style = GetComputedStyle();
if (!style) {
GetDocument().UpdateStyleAndLayoutTreeForNode(this);
HTMLCanvasElement* non_const_this = const_cast<HTMLCanvasElement*>(this);
... | 3,627 |
81,822 | 0 | void xrevrangeCommand(client *c) {
xrangeGenericCommand(c,1);
}
| 3,628 |
44,072 | 0 | static gboolean patch_legacy_mode(void)
{
static gboolean init = TRUE;
static gboolean legacy = FALSE;
if(init) {
init = FALSE;
legacy = daemon_option_enabled("cib", "legacy");
if(legacy) {
crm_notice("Enabled legacy mode");
}
}
return legacy;
}
| 3,629 |
15,788 | 0 | static void sysbus_ahci_register_types(void)
{
type_register_static(&sysbus_ahci_info);
}
| 3,630 |
25,379 | 0 | static void mipspmu_start(struct perf_event *event, int flags)
{
struct hw_perf_event *hwc = &event->hw;
if (!mipspmu)
return;
if (flags & PERF_EF_RELOAD)
WARN_ON_ONCE(!(hwc->state & PERF_HES_UPTODATE));
hwc->state = 0;
/* Set the period for the event. */
mipspmu_event_set_period(event, hwc, hwc->idx);
... | 3,631 |
60,376 | 0 | send_data_or_handle(char type, u_int32_t id, const u_char *data, int dlen)
{
struct sshbuf *msg;
int r;
if ((msg = sshbuf_new()) == NULL)
fatal("%s: sshbuf_new failed", __func__);
if ((r = sshbuf_put_u8(msg, type)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_string(msg, data, dlen)) !... | 3,632 |
127,535 | 0 | void LayerWebKitThread::setIsMask(bool isMask)
{
m_isMask = isMask;
if (isMask && m_tiler)
m_tiler->setNeedsBacking(true);
}
| 3,633 |
105,740 | 0 | const char* PropTypeToString(int prop_type) {
switch (static_cast<IBusPropType>(prop_type)) {
case PROP_TYPE_NORMAL:
return "NORMAL";
case PROP_TYPE_TOGGLE:
return "TOGGLE";
case PROP_TYPE_RADIO:
return "RADIO";
case PROP_TYPE_MENU:
return "MENU";
case PROP_TYPE_SEPARATOR:
... | 3,634 |
184,754 | 1 | void InputMethodBase::OnInputMethodChanged() const {
TextInputClient* client = GetTextInputClient();
if (client && client->GetTextInputType() != TEXT_INPUT_TYPE_NONE)
client->OnInputMethodChanged();
}
| 3,635 |
121,854 | 0 | void IOThread::EnableSpdy(const std::string& mode) {
static const char kOff[] = "off";
static const char kSSL[] = "ssl";
static const char kDisableSSL[] = "no-ssl";
static const char kDisablePing[] = "no-ping";
static const char kExclude[] = "exclude"; // Hosts to exclude
static const char kDisableCompress... | 3,636 |
24,630 | 0 | static void fuse_request_send_nowait(struct fuse_conn *fc, struct fuse_req *req)
{
spin_lock(&fc->lock);
if (fc->connected) {
fuse_request_send_nowait_locked(fc, req);
spin_unlock(&fc->lock);
} else {
req->out.h.error = -ENOTCONN;
request_end(fc, req);
}
}
| 3,637 |
163,114 | 0 | void BlobStorageContext::RunOnConstructionComplete(
const std::string& uuid,
const BlobStatusCallback& done) {
BlobEntry* entry = registry_.GetEntry(uuid);
DCHECK(entry);
if (BlobStatusIsPending(entry->status())) {
entry->building_state_->build_completion_callbacks.push_back(done);
return;
}
d... | 3,638 |
39,954 | 0 | vhost_net_ubuf_alloc(struct vhost_virtqueue *vq, bool zcopy)
{
struct vhost_net_ubuf_ref *ubufs;
/* No zero copy backend? Nothing to count. */
if (!zcopy)
return NULL;
ubufs = kmalloc(sizeof(*ubufs), GFP_KERNEL);
if (!ubufs)
return ERR_PTR(-ENOMEM);
atomic_set(&ubufs->refcount, 1);
init_waitqueue_head(&ubufs... | 3,639 |
173,414 | 0 | void omx_vdec::append_user_extradata(OMX_OTHER_EXTRADATATYPE *extra,
OMX_OTHER_EXTRADATATYPE *p_user)
{
int userdata_size = 0;
struct msm_vidc_stream_userdata_payload *userdata_payload = NULL;
userdata_payload =
(struct msm_vidc_stream_userdata_payload *)(void *)p_user->data;
userdata_size = p_us... | 3,640 |
6,468 | 0 | int EC_GROUP_get_basis_type(const EC_GROUP *group)
{
int i = 0;
if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) !=
NID_X9_62_characteristic_two_field)
/* everything else is currently not supported */
return 0;
while (group->poly[i] != 0)
i++;
if (i == 4)
... | 3,641 |
145,661 | 0 | void ExtensionOptionsGuest::OnPreferredSizeChanged(const gfx::Size& pref_size) {
extension_options_internal::PreferredSizeChangedOptions options;
options.width = PhysicalPixelsToLogicalPixels(pref_size.width());
options.height = PhysicalPixelsToLogicalPixels(pref_size.height());
DispatchEventToView(make_scoped_... | 3,642 |
117,661 | 0 | void RegisterComponentsForUpdate(const CommandLine& command_line) {
ComponentUpdateService* cus = g_browser_process->component_updater();
if (!cus)
return;
RegisterRecoveryComponent(cus, g_browser_process->local_state());
RegisterPepperFlashComponent(cus);
RegisterNPAPIFlashComponent(cus);
RegisterSwift... | 3,643 |
87,184 | 0 | BOOL IsVolumeClassFilterRegistered ()
{
UNICODE_STRING name;
NTSTATUS status;
BOOL registered = FALSE;
PKEY_VALUE_PARTIAL_INFORMATION data;
RtlInitUnicodeString (&name, L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Class\\{71A27CDD-812A-11D0-BEC7-08002BE2092F}");
status = TCReadRegistryKey (&name, ... | 3,644 |
53,060 | 0 | static int bpf_prog_charge_memlock(struct bpf_prog *prog)
{
struct user_struct *user = get_current_user();
unsigned long memlock_limit;
memlock_limit = rlimit(RLIMIT_MEMLOCK) >> PAGE_SHIFT;
atomic_long_add(prog->pages, &user->locked_vm);
if (atomic_long_read(&user->locked_vm) > memlock_limit) {
atomic_long_sub... | 3,645 |
172,776 | 0 | static bool underQTMetaPath(const Vector<uint32_t> &path, int32_t depth) {
return path.size() >= 2
&& path[0] == FOURCC('m', 'o', 'o', 'v')
&& path[1] == FOURCC('m', 'e', 't', 'a')
&& (depth == 2
|| (depth == 3
&& (path[2] == FOURCC('h', 'd', 'l', 'r')
|| path[2] == FOURCC('i', 'l', 's', 't')
|| path[2] == FO... | 3,646 |
9,916 | 0 | void Part::setupView()
{
m_view->setContextMenuPolicy(Qt::CustomContextMenu);
m_view->setModel(m_model);
connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged,
this, &Part::updateActions);
connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged,
... | 3,647 |
165,197 | 0 | DragState& DragController::GetDragState() {
if (!drag_state_)
drag_state_ = new DragState;
return *drag_state_;
}
| 3,648 |
134,362 | 0 | const views::View* TabStrip::GetViewByID(int view_id) const {
if (tab_count() > 0) {
if (view_id == VIEW_ID_TAB_LAST) {
return tab_at(tab_count() - 1);
} else if ((view_id >= VIEW_ID_TAB_0) && (view_id < VIEW_ID_TAB_LAST)) {
int index = view_id - VIEW_ID_TAB_0;
if (index >= 0 && index < tab_... | 3,649 |
124,301 | 0 | ExtensionSystemImpl::serial_connection_manager() {
return serial_connection_manager_.get();
}
| 3,650 |
135,247 | 0 | void Document::exitPointerLock()
{
if (!page())
return;
if (Element* target = page()->pointerLockController().element()) {
if (target->document() != this)
return;
}
page()->pointerLockController().requestPointerUnlock();
}
| 3,651 |
154,764 | 0 | error::Error GLES2DecoderPassthroughImpl::DoPostSubBufferCHROMIUM(
uint64_t swap_id,
GLint x,
GLint y,
GLint width,
GLint height,
GLbitfield flags) {
if (!surface_->SupportsPostSubBuffer()) {
InsertError(GL_INVALID_OPERATION,
"glPostSubBufferCHROMIUM is not supported for th... | 3,652 |
74,599 | 0 | enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path)
{
enum ovl_path_type type = ovl_path_type(dentry);
if (type == OVL_PATH_LOWER)
ovl_path_lower(dentry, path);
else
ovl_path_upper(dentry, path);
return type;
}
| 3,653 |
19,987 | 0 | static int nfs4_proc_rename(struct inode *old_dir, struct qstr *old_name,
struct inode *new_dir, struct qstr *new_name)
{
struct nfs4_exception exception = { };
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(old_dir),
_nfs4_proc_rename(old_dir, old_name,
new_dir, new_name),
&exception);
} whi... | 3,654 |
59,526 | 0 | xmlParseVersionNum(xmlParserCtxtPtr ctxt) {
xmlChar *buf = NULL;
int len = 0;
int size = 10;
xmlChar cur;
buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
if (buf == NULL) {
xmlErrMemory(ctxt, NULL);
return(NULL);
}
cur = CUR;
if (!((cur >= '0') && (cur <= '9'))) {
xmlF... | 3,655 |
77,150 | 0 | OVS_REQUIRES(ofproto_mutex)
{
uint32_t mid;
mid = ofpacts_get_meter(ofpacts, ofpacts_len);
if (mid && get_provider_meter_id(ofproto, mid) == UINT32_MAX) {
return OFPERR_OFPMMFC_INVALID_METER;
}
const struct ofpact_group *a;
OFPACT_FOR_EACH_TYPE_FLATTENED (a, GROUP, ofpacts, ofpacts... | 3,656 |
17,578 | 0 | ProcRenderCreateConicalGradient(ClientPtr client)
{
PicturePtr pPicture;
int len;
int error = 0;
xFixed *stops;
xRenderColor *colors;
REQUEST(xRenderCreateConicalGradientReq);
REQUEST_AT_LEAST_SIZE(xRenderCreateConicalGradientReq);
LEGAL_NEW_RESOURCE(stuff->pid, client);
len = (c... | 3,657 |
138,357 | 0 | ServiceManagerContext::~ServiceManagerContext() {
if (in_process_context_)
in_process_context_->ShutDown();
if (ServiceManagerConnection::GetForProcess())
ServiceManagerConnection::DestroyForProcess();
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&DestroyConne... | 3,658 |
22,688 | 0 | static inline unsigned long perf_ip_adjust(struct pt_regs *regs)
{
unsigned long mmcra = regs->dsisr;
if ((mmcra & MMCRA_SAMPLE_ENABLE) && !(ppmu->flags & PPMU_ALT_SIPR)) {
unsigned long slot = (mmcra & MMCRA_SLOT) >> MMCRA_SLOT_SHIFT;
if (slot > 1)
return 4 * (slot - 1);
}
return 0;
}
| 3,659 |
186,112 | 1 | void CallbackAndDie(bool succeeded) {
v8::Isolate* isolate = context_->isolate();
v8::HandleScope handle_scope(isolate);
v8::Local<v8::Value> args[] = {v8::Boolean::New(isolate, succeeded)};
context_->CallFunction(v8::Local<v8::Function>::New(isolate, callback_),
arraysize(arg... | 3,660 |
10,523 | 0 | static void iscsi_refresh_limits(BlockDriverState *bs, Error **errp)
{
/* We don't actually refresh here, but just return data queried in
* iscsi_open(): iscsi targets don't change their limits. */
IscsiLun *iscsilun = bs->opaque;
uint32_t max_xfer_len = iscsilun->use_16_for_rw ? 0xffffffff : 0xffff;
... | 3,661 |
71,518 | 0 | ModuleExport size_t RegisterDPXImage(void)
{
MagickInfo
*entry;
static const char
*DPXNote =
{
"Digital Moving Picture Exchange Bitmap, Version 2.0.\n"
"See SMPTE 268M-2003 specification at http://www.smtpe.org\n"
};
entry=SetMagickInfo("DPX");
entry->decoder=(DecodeImageHandler *)... | 3,662 |
74,050 | 0 | static Image *ReadPICTImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
char
geometry[MagickPathExtent],
header_ole[4];
Image
*image;
int
c,
code;
MagickBooleanType
jpeg,
status;
PICTRectangle
frame;
PICTPixmap
pixmap;
Quantum
index;
register... | 3,663 |
136,518 | 0 | static FloatRect ComputeRightDelta(const FloatPoint& location,
const FloatSize& old_size,
const FloatSize& new_size) {
float delta = new_size.Width() - old_size.Width();
if (delta > 0) {
return FloatRect(location.X() + old_size.Width(), locat... | 3,664 |
9,894 | 0 | KConfigSkeleton *Part::config() const
{
return ArkSettings::self();
}
| 3,665 |
157,478 | 0 | base::string16 GetProfileIdFromPath(const base::FilePath& profile_path) {
if (profile_path.empty())
return base::string16();
base::FilePath default_user_data_dir;
if (chrome::GetDefaultUserDataDirectory(&default_user_data_dir) &&
profile_path.DirName() == default_user_data_dir &&
profile_path.Bas... | 3,666 |
170,582 | 0 | void VirtualizerGetSpeakerAngles(audio_channel_mask_t channelMask __unused,
audio_devices_t deviceType __unused, int32_t *pSpeakerAngles) {
*pSpeakerAngles++ = (int32_t) AUDIO_CHANNEL_OUT_FRONT_LEFT;
*pSpeakerAngles++ = -90; // azimuth
*pSpeakerAngles++ = 0; // elevation
*pSpeakerAngles++ = (int32_t) AUDIO_CHANNEL... | 3,667 |
30,729 | 0 | static struct sock *rfcomm_sock_alloc(struct net *net, struct socket *sock, int proto, gfp_t prio)
{
struct rfcomm_dlc *d;
struct sock *sk;
sk = sk_alloc(net, PF_BLUETOOTH, prio, &rfcomm_proto);
if (!sk)
return NULL;
sock_init_data(sock, sk);
INIT_LIST_HEAD(&bt_sk(sk)->accept_q);
d = rfcomm_dlc_alloc(prio);... | 3,668 |
50,641 | 0 | static void srpt_cm_rep_error(struct ib_cm_id *cm_id)
{
pr_info("Received IB REP error for cm_id %p.\n", cm_id);
srpt_drain_channel(cm_id);
}
| 3,669 |
42,940 | 0 | static void sctp_v4_get_saddr(struct sctp_sock *sk,
struct sctp_transport *t,
struct flowi *fl)
{
union sctp_addr *saddr = &t->saddr;
struct rtable *rt = (struct rtable *)t->dst;
if (rt) {
saddr->v4.sin_family = AF_INET;
saddr->v4.sin_addr.s_addr = fl->u.ip4.saddr;
}
}
| 3,670 |
76,241 | 0 | static int cdrom_ioctl_reset(struct cdrom_device_info *cdi,
struct block_device *bdev)
{
cd_dbg(CD_DO_IOCTL, "entering CDROM_RESET\n");
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
if (!CDROM_CAN(CDC_RESET))
return -ENOSYS;
invalidate_bdev(bdev);
return cdi->ops->reset(cdi);
}
| 3,671 |
91,798 | 0 | void comps_objrtree_destroy_u(COMPS_Object *obj) {
comps_objrtree_destroy((COMPS_ObjRTree*)obj);
}
| 3,672 |
123,495 | 0 | void SafeBrowsingBlockingPageV2::PopulateStringDictionary(
DictionaryValue* strings,
const string16& title,
const string16& headline,
const string16& description1,
const string16& description2,
const string16& description3) {
strings->SetString("title", title);
strings->SetString("headLine",... | 3,673 |
160,951 | 0 | void ChromeClientImpl::DidOverscroll(const FloatSize& overscroll_delta,
const FloatSize& accumulated_overscroll,
const FloatPoint& position_in_viewport,
const FloatSize& velocity_in_viewport,
... | 3,674 |
26,659 | 0 | static int get_rdev_dev_by_info_ifindex(struct genl_info *info,
struct cfg80211_registered_device **rdev,
struct net_device **dev)
{
struct nlattr **attrs = info->attrs;
int ifindex;
if (!attrs[NL80211_ATTR_IFINDEX])
return -EINVAL;
ifindex = nla_get_u32(attrs[NL80211_ATTR_IFINDEX]);
*dev... | 3,675 |
160,571 | 0 | WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
const NavigationPolicyInfo& info) {
bool is_content_initiated =
info.extra_data ? static_cast<DocumentState*>(info.extra_data)
->navigation_state()
->IsContentInitiated()
... | 3,676 |
81,557 | 0 | int create_event_filter(struct trace_event_call *call,
char *filter_str, bool set_str,
struct event_filter **filterp)
{
return create_filter(call, filter_str, set_str, filterp);
}
| 3,677 |
53,850 | 0 | int acpi_os_map_generic_address(struct acpi_generic_address *gas)
{
u64 addr;
void __iomem *virt;
if (gas->space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY)
return 0;
/* Handle possible alignment issues */
memcpy(&addr, &gas->address, sizeof(addr));
if (!addr || !gas->bit_width)
return -EINVAL;
virt = acpi_os_map... | 3,678 |
21,363 | 0 | static void mincore_unmapped_range(struct vm_area_struct *vma,
unsigned long addr, unsigned long end,
unsigned char *vec)
{
unsigned long nr = (end - addr) >> PAGE_SHIFT;
int i;
if (vma->vm_file) {
pgoff_t pgoff;
pgoff = linear_page_index(vma, addr);
for (i = 0; i < nr; i++, pgoff++)
vec[i] = minc... | 3,679 |
107,763 | 0 | void FrameLoader::ReplaceDocumentWhileExecutingJavaScriptURL(
const String& source,
Document* owner_document) {
Document* document = frame_->GetDocument();
if (!document_loader_ ||
document->PageDismissalEventBeingDispatched() != Document::kNoDismissal)
return;
UseCounter::Count(*document, WebF... | 3,680 |
133,982 | 0 | bool AppListSyncableService::ProcessSyncItemSpecifics(
const sync_pb::AppListSpecifics& specifics) {
const std::string& item_id = specifics.item_id();
if (item_id.empty()) {
LOG(ERROR) << "AppList item with empty ID";
return false;
}
SyncItem* sync_item = FindSyncItem(item_id);
if (sync_item) {
... | 3,681 |
25,378 | 0 | mipspmu_perf_event_encode(const struct mips_perf_event *pev)
{
/*
* Top 8 bits for range, next 16 bits for cntr_mask, lowest 8 bits for
* event_id.
*/
#ifdef CONFIG_MIPS_MT_SMP
return ((unsigned int)pev->range << 24) |
(pev->cntr_mask & 0xffff00) |
(pev->event_id & 0xff);
#else
return (pev->cntr_mask & 0xffff0... | 3,682 |
188,441 | 1 | long ContentEncoding::ParseContentEncodingEntry(long long start,
long long size,
IMkvReader* pReader) {
assert(pReader);
long long pos = start;
const long long stop = start + size;
// Count ContentCompression and ContentEncryption elements.
int compression_count = 0;
in... | 3,683 |
114,595 | 0 | void RenderThreadImpl::OnDOMStorageEvent(
const DOMStorageMsg_Event_Params& params) {
if (!dom_storage_event_dispatcher_.get()) {
EnsureWebKitInitialized();
dom_storage_event_dispatcher_.reset(WebStorageEventDispatcher::create());
}
dom_storage_event_dispatcher_->dispatchStorageEvent(params.key,
... | 3,684 |
47,730 | 0 | static void do_one_broadcast(struct sock *sk,
struct netlink_broadcast_data *p)
{
struct netlink_sock *nlk = nlk_sk(sk);
int val;
if (p->exclude_sk == sk)
return;
if (nlk->portid == p->portid || p->group - 1 >= nlk->ngroups ||
!test_bit(p->group - 1, nlk->groups))
return;
if (!net_eq(sock_net(s... | 3,685 |
116,412 | 0 | bool ChromeContentRendererClient::ShouldPumpEventsDuringCookieMessage() {
return false;
}
| 3,686 |
125,695 | 0 | void RenderViewHostImpl::OnUpdateEncoding(const std::string& encoding_name) {
delegate_->UpdateEncoding(this, encoding_name);
}
| 3,687 |
82,087 | 0 | mrb_define_module_id(mrb_state *mrb, mrb_sym name)
{
return define_module(mrb, name, mrb->object_class);
}
| 3,688 |
188,107 | 1 | IMPEG2D_ERROR_CODES_T impeg2d_dec_seq_hdr(dec_state_t *ps_dec)
{
stream_t *ps_stream;
ps_stream = &ps_dec->s_bit_stream;
UWORD16 u2_height;
UWORD16 u2_width;
if (impeg2d_bit_stream_nxt(ps_stream,START_CODE_LEN) != SEQUENCE_HEADER_CODE)
{
impeg2d_bit_stream_flush(ps_stream,START_CODE_LEN);
return IMPEG2D_FRM_HDR_START_... | 3,689 |
24,833 | 0 | void __init kmem_cache_init(void)
{
int i;
int caches = 0;
init_alloc_cpu();
#ifdef CONFIG_NUMA
/*
* Must first have the slab cache available for the allocations of the
* struct kmem_cache_node's. There is special bootstrap code in
* kmem_cache_open for slab_state == DOWN.
*/
create_kmalloc_cache(&kmallo... | 3,690 |
129,905 | 0 | void SpeechSynthesis::startSpeakingImmediately()
{
SpeechSynthesisUtterance* utterance = currentSpeechUtterance();
ASSERT(utterance);
utterance->setStartTime(monotonicallyIncreasingTime());
m_isPaused = false;
m_platformSpeechSynthesizer->speak(utterance->platformUtterance());
}
| 3,691 |
38,148 | 0 | static void magicmouse_input_configured(struct hid_device *hdev,
struct hid_input *hi)
{
struct magicmouse_sc *msc = hid_get_drvdata(hdev);
int ret = magicmouse_setup_input(msc->input, hdev);
if (ret) {
hid_err(hdev, "magicmouse setup input failed (%d)\n", ret);
/* clean msc->input to notify probe() of the f... | 3,692 |
150,501 | 0 | void SafeBrowsingPrivateEventRouter::OnSecurityInterstitialShown(
const GURL& url,
const std::string& reason,
int net_error_code) {
api::safe_browsing_private::InterstitialInfo params;
params.url = url.spec();
params.reason = reason;
if (net_error_code < 0) {
params.net_error_code =
std:... | 3,693 |
13,454 | 0 | static void js_outofmemory(js_State *J)
{
STACK[TOP].type = JS_TLITSTR;
STACK[TOP].u.litstr = "out of memory";
++TOP;
js_throw(J);
}
| 3,694 |
66,274 | 0 | IW_IMPL(unsigned int) iw_get_ui32_e(const iw_byte *b, int endian)
{
if(endian==IW_ENDIAN_LITTLE)
return iw_get_ui32le(b);
return iw_get_ui32be(b);
}
| 3,695 |
51,250 | 0 | static PHP_NAMED_FUNCTION(zif_zip_entry_open)
{
zval * zip;
zval * zip_entry;
char *mode = NULL;
int mode_len = 0;
zip_read_rsrc * zr_rsrc;
zip_rsrc *z_rsrc;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr|s", &zip, &zip_entry, &mode, &mode_len) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(zr_rsrc,... | 3,696 |
21,282 | 0 | static inline unsigned long zap_pud_range(struct mmu_gather *tlb,
struct vm_area_struct *vma, pgd_t *pgd,
unsigned long addr, unsigned long end,
struct zap_details *details)
{
pud_t *pud;
unsigned long next;
pud = pud_offset(pgd, addr);
do {
next = pud_addr_end(addr, end);
if (pud_none_or_clear_bad... | 3,697 |
169,902 | 0 | static void xsltFixImportedCompSteps(xsltStylesheetPtr master,
xsltStylesheetPtr style) {
xsltStylesheetPtr res;
xmlHashScan(style->templatesHash,
(xmlHashScanner) xsltNormalizeCompSteps, master);
master->extrasNr += style->extrasNr;
for (res = style->imports; res != NULL; res = res->nex... | 3,698 |
75,053 | 0 | map_num_persons(void)
{
return s_num_persons;
}
| 3,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.