unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
29,834 | 0 | cifs_sb_tlink(struct cifs_sb_info *cifs_sb)
{
int ret;
kuid_t fsuid = current_fsuid();
struct tcon_link *tlink, *newtlink;
if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER))
return cifs_get_tlink(cifs_sb_master_tlink(cifs_sb));
spin_lock(&cifs_sb->tlink_tree_lock);
tlink = tlink_rb_search(&cifs_sb->tlink_... | 16,200 |
171,417 | 0 | static int do_explicit_dump(pid_t tid, bool dump_backtrace) {
fprintf(stdout, "Sending request to dump task %d.\n", tid);
if (dump_backtrace) {
fflush(stdout);
if (dump_backtrace_to_file(tid, fileno(stdout)) < 0) {
fputs("Error dumping backtrace.\n", stderr);
return 1;
}
} else {
char tombstone_path[... | 16,201 |
22,121 | 0 | static int ptrace_do_wait(struct task_struct *tsk, int *notask_error,
enum pid_type type, struct pid *pid, int options,
struct siginfo __user *infop, int __user *stat_addr,
struct rusage __user *ru)
{
struct task_struct *p;
/*
* Traditionally we see ptrace'd stopped tasks regardless of options.
*/... | 16,202 |
132,103 | 0 | bool LayoutBlockFlow::mustDiscardMarginBefore() const
{
return style()->marginBeforeCollapse() == MDISCARD || (m_rareData && m_rareData->m_discardMarginBefore);
}
| 16,203 |
106,213 | 0 | void setJSTestObjLongLongSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
{
JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
TestObj* impl = static_cast<TestObj*>(castedThis->impl());
impl->setLongLongSequenceAttr(toNativeArray<long long>(exec, value));
}
| 16,204 |
134,114 | 0 | void InputMethodIBus::OnTextInputTypeChanged(const TextInputClient* client) {
if (IsTextInputClientFocused(client)) {
ResetContext();
UpdateContextFocusState();
if (previous_textinput_type_ != client->GetTextInputType())
OnInputMethodChanged();
}
InputMethodBase::OnTextInputTypeChanged(client);
... | 16,205 |
97,490 | 0 | void FrameLoader::setOpener(Frame* opener)
{
if (m_opener)
m_opener->loader()->m_openedFrames.remove(m_frame);
if (opener)
opener->loader()->m_openedFrames.add(m_frame);
m_opener = opener;
if (m_frame->document()) {
m_frame->document()->initSecurityContext();
m_frame->do... | 16,206 |
43,428 | 0 | SYSCALL_DEFINE5(execveat,
int, fd, const char __user *, filename,
const char __user *const __user *, argv,
const char __user *const __user *, envp,
int, flags)
{
int lookup_flags = (flags & AT_EMPTY_PATH) ? LOOKUP_EMPTY : 0;
return do_execveat(fd,
getname_flags(filename, lookup_flags, NULL),
argv... | 16,207 |
175,636 | 0 | void SoftAACEncoder::onQueueFilled(OMX_U32 portIndex) {
if (mSignalledError) {
return;
}
List<BufferInfo *> &inQueue = getPortQueue(0);
List<BufferInfo *> &outQueue = getPortQueue(1);
if (!mSentCodecSpecificData) {
if (outQueue.empty()) {
return;
}
BufferInfo *outInfo = *outQueue.begin();
OMX_BUFF... | 16,208 |
147,720 | 0 | void V8TestObject::RaisesExceptionLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_raisesExceptionLongAttribute_Getter");
test_object_v8_internal::RaisesExceptionLongAttributeAttributeGetter(inf... | 16,209 |
158,663 | 0 | void BackRenderbuffer::Create() {
ScopedGLErrorSuppressor suppressor("BackRenderbuffer::Create",
decoder_->state_.GetErrorState());
Destroy();
api()->glGenRenderbuffersEXTFn(1, &id_);
}
| 16,210 |
188,174 | 1 | void install_local_socket(asocket* s) {
adb_mutex_lock(&socket_list_lock);
s->id = local_socket_next_id++;
// Socket ids should never be 0.
if (local_socket_next_id == 0) {
local_socket_next_id = 1;
}
insert_local_socket(s, &local_socket_list);
adb_mutex_unlock(&socket_list_lock);
}
| 16,211 |
56,225 | 0 | compat_user_backtrace(struct compat_frame_tail __user *tail,
struct perf_callchain_entry *entry)
{
struct compat_frame_tail buftail;
unsigned long err;
/* Also check accessibility of one struct frame_tail beyond */
if (!access_ok(VERIFY_READ, tail, sizeof(buftail)))
return NULL;
pagefault_disable();
e... | 16,212 |
179,226 | 1 | void br_mdb_notify(struct net_device *dev, struct net_bridge_port *port,
struct br_ip *group, int type)
{
struct br_mdb_entry entry;
entry.ifindex = port->dev->ifindex;
entry.addr.proto = group->proto;
entry.addr.u.ip4 = group->u.ip4;
#if IS_ENABLED(CONFIG_IPV6)
entry.addr.u.ip6 = group->u.ip6;
#endif
... | 16,213 |
13,327 | 0 | pdf14_pop_transparency_mask(pdf14_ctx *ctx, gs_gstate *pgs, gx_device *dev)
{
pdf14_buf *tos = ctx->stack;
byte *new_data_buf;
int icc_match;
cmm_profile_t *des_profile = tos->parent_color_info_procs->icc_profile; /* If set, this should be a gray profile */
cmm_profile_t *src_profile;
gsicc_rend... | 16,214 |
175,456 | 0 | static size_t in_get_buffer_size(const struct audio_stream *stream)
{
struct stream_in *in = (struct stream_in *)stream;
return get_input_buffer_size(in->requested_rate,
in_get_format(stream),
audio_channel_count_from_in_mask(in->main_channels),
... | 16,215 |
175,061 | 0 | void SoundPool::addToStopList(SoundChannel* channel)
{
Mutex::Autolock lock(&mRestartLock);
if (!mQuit) {
mStop.push_back(channel);
mCondition.signal();
}
}
| 16,216 |
21,851 | 0 | static void write_register_operand(struct operand *op)
{
/* The 4-byte case *is* correct: in 64-bit mode we zero-extend. */
switch (op->bytes) {
case 1:
*(u8 *)op->addr.reg = (u8)op->val;
break;
case 2:
*(u16 *)op->addr.reg = (u16)op->val;
break;
case 4:
*op->addr.reg = (u32)op->val;
break; /* 64b: zer... | 16,217 |
18,079 | 0 | XcursorLibraryLoadImage (const char *file, const char *theme, int size)
{
FILE *f = NULL;
XcursorImage *image = NULL;
if (!file)
return NULL;
if (theme)
f = XcursorScanTheme (theme, file);
if (!f)
f = XcursorScanTheme ("default", file);
if (f == XCURSOR_SCAN_CORE)
return NULL... | 16,218 |
185,546 | 1 | bool ChromeContentUtilityClient::OnMessageReceived(
const IPC::Message& message) {
if (filter_messages_ && !ContainsKey(message_id_whitelist_, message.type()))
return false;
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(ChromeContentUtilityClient, message)
IPC_MESSAGE_HANDLER(ChromeUtilityMsg_DecodeImag... | 16,219 |
50,353 | 0 | int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, umode_t *i_mode)
{
struct posix_acl *default_acl, *acl;
int rc;
cache_no_acl(inode);
rc = posix_acl_create(dir_i, i_mode, &default_acl, &acl);
if (rc)
return rc;
if (default_acl) {
set_cached_acl(inode, ACL_TYPE_DEFAULT, default_acl);
posix... | 16,220 |
119,137 | 0 | bool CancelableSyncSocket::CreatePair(CancelableSyncSocket* socket_a,
CancelableSyncSocket* socket_b) {
return CreatePairImpl(&socket_a->handle_, &socket_b->handle_, true);
}
| 16,221 |
175,075 | 0 | void SoundChannel::init(SoundPool* soundPool)
{
mSoundPool = soundPool;
}
| 16,222 |
58,026 | 0 | int nft_register_set(struct nft_set_ops *ops)
{
nfnl_lock(NFNL_SUBSYS_NFTABLES);
list_add_tail_rcu(&ops->list, &nf_tables_set_ops);
nfnl_unlock(NFNL_SUBSYS_NFTABLES);
return 0;
}
| 16,223 |
39,157 | 0 | static void nfs_flush_error(struct nfs_pageio_descriptor *desc,
struct nfs_pgio_header *hdr)
{
set_bit(NFS_IOHDR_REDO, &hdr->flags);
while (!list_empty(&hdr->rpc_list)) {
struct nfs_write_data *data = list_first_entry(&hdr->rpc_list,
struct nfs_write_data, list);
list_del(&data->list);
nfs_writedata_relea... | 16,224 |
99,669 | 0 | VaapiVideoDecodeAccelerator::InputBuffer::~InputBuffer() {
}
| 16,225 |
23,836 | 0 | static void addr_hash_set(u32 *mask, const u8 *addr)
{
int n = ether_crc(ETH_ALEN, addr) >> 26;
mask[n >> 5] |= (1 << (n & 31));
}
| 16,226 |
80,056 | 0 | GF_Box *dmax_New()
{
ISOM_DECL_BOX_ALLOC(GF_DMAXBox, GF_ISOM_BOX_TYPE_DMAX);
return (GF_Box *)tmp;
}
| 16,227 |
92,859 | 0 | static u32 FFD_RegisterMimeTypes(const GF_InputService *plug) {
u32 i;
for (i = 0 ; FFD_MIME_TYPES[i]; i+=3)
gf_service_register_mime(plug, FFD_MIME_TYPES[i], FFD_MIME_TYPES[i+1], FFD_MIME_TYPES[i+2]);
return i/3;
}
| 16,228 |
94,744 | 0 | MagickExport void DestroyImageProperties(Image *image)
{
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
image->filename);
if (image->properties != (void *) NULL)
image->prop... | 16,229 |
178,105 | 1 | static ssize_t eth_rx(NetClientState *nc, const uint8_t *buf, size_t size)
{
struct xlx_ethlite *s = qemu_get_nic_opaque(nc);
unsigned int rxbase = s->rxbuf * (0x800 / 4);
/* DA filter. */
if (!(buf[0] & 0x80) && memcmp(&s->conf.macaddr.a[0], buf, 6))
return size;
if (s->regs[rxbase + R_R... | 16,230 |
28,600 | 0 | void qeth_print_status_message(struct qeth_card *card)
{
switch (card->info.type) {
case QETH_CARD_TYPE_OSD:
case QETH_CARD_TYPE_OSM:
case QETH_CARD_TYPE_OSX:
/* VM will use a non-zero first character
* to indicate a HiperSockets like reporting
* of the level OSA sets the first character to zero
* */
i... | 16,231 |
60,920 | 0 | istr_set_insert (GHashTable *table,
const char *istr)
{
char *key;
key = g_strdup (istr);
g_hash_table_replace (table, key, key);
}
| 16,232 |
89,774 | 0 | drop_cap_bounding_set (bool drop_all)
{
if (!drop_all)
prctl_caps (requested_caps, TRUE, FALSE);
else
{
uint32_t no_caps[2] = {0, 0};
prctl_caps (no_caps, TRUE, FALSE);
}
}
| 16,233 |
179,084 | 1 | static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp)
{
ns->shm_tot -= (shp->shm_segsz + PAGE_SIZE - 1) >> PAGE_SHIFT;
shm_rmid(ns, shp);
shm_unlock(shp);
if (!is_file_hugepages(shp->shm_file))
shmem_lock(shp->shm_file, 0, shp->mlock_user);
else if (shp->mlock_user)
user_shm_unlock(file_inode... | 16,234 |
10,479 | 0 | static union mfi_sgl *megasas_sgl_next(MegasasCmd *cmd,
union mfi_sgl *sgl)
{
uint8_t *next = (uint8_t *)sgl;
if (megasas_frame_is_ieee_sgl(cmd)) {
next += sizeof(struct mfi_sg_skinny);
} else if (megasas_frame_is_sgl64(cmd)) {
next += sizeof(struct mf... | 16,235 |
117,963 | 0 | Frame* ScriptController::retrieveFrameForCurrentContext()
{
return V8Proxy::retrieveFrameForCurrentContext();
}
| 16,236 |
168,356 | 0 | bool BrowserView::ShouldShowWindowIcon() const {
return ShouldShowWindowTitle();
}
| 16,237 |
131,964 | 0 | static void voidMethodStringArgLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjectPythonV8Internal::voidMethodStringArgLongArgMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
| 16,238 |
112,164 | 0 | DictionaryValue* ChromiumExtensionActivityToValue(
const sync_pb::ChromiumExtensionsActivity& proto) {
DictionaryValue* value = new DictionaryValue();
SET_STR(extension_id);
SET_INT32(bookmark_writes_since_last_commit);
return value;
}
| 16,239 |
20,625 | 0 | int kvm_highest_pending_irq(struct kvm_vcpu *vcpu)
{
struct vpd *vpd = to_host(vcpu->kvm, vcpu->arch.vpd);
if (vpd->irr[0] & (1UL << NMI_VECTOR))
return NMI_VECTOR;
if (vpd->irr[0] & (1UL << ExtINT_VECTOR))
return ExtINT_VECTOR;
return find_highest_bits((int *)&vpd->irr[0]);
}
| 16,240 |
82,586 | 0 | void jswrap_graphics_setRotation(JsVar *parent, int rotation, bool reflect) {
JsGraphics gfx; if (!graphicsGetFromVar(&gfx, parent)) return;
gfx.data.flags &= (JsGraphicsFlags)~(JSGRAPHICSFLAGS_SWAP_XY | JSGRAPHICSFLAGS_INVERT_X | JSGRAPHICSFLAGS_INVERT_Y);
switch (rotation) {
case 0:
break;
case 1... | 16,241 |
107,408 | 0 | void Scrollbar::updateThumb()
{
#ifdef THUMB_POSITION_AFFECTS_BUTTONS
invalidate();
#else
theme()->invalidateParts(this, ForwardTrackPart | BackTrackPart | ThumbPart);
#endif
}
| 16,242 |
158,270 | 0 | void RenderWidgetHostImpl::ForwardMouseEvent(const WebMouseEvent& mouse_event) {
if (GetView()->IsInVR() &&
(is_in_gesture_scroll_[blink::kWebGestureDeviceTouchpad] ||
is_in_touchpad_gesture_fling_)) {
return;
}
ForwardMouseEventWithLatencyInfo(mouse_event,
ui:... | 16,243 |
70,148 | 0 | TIFFReadDirEntryCheckRangeLongSlong8(int64 value)
{
if ((value < 0) || (value > (int64) TIFF_UINT32_MAX))
return(TIFFReadDirEntryErrRange);
else
return(TIFFReadDirEntryErrOk);
}
| 16,244 |
69,295 | 0 | int tls1_final_finish_mac(SSL *s, const char *str, int slen, unsigned char *out)
{
int hashlen;
unsigned char hash[EVP_MAX_MD_SIZE];
if (!ssl3_digest_cached_records(s, 0))
return 0;
hashlen = ssl_handshake_hash(s, hash, sizeof(hash));
if (hashlen == 0)
return 0;
if (!tls1_PRF... | 16,245 |
64,963 | 0 | IW_IMPL(const char*) iw_get_option(struct iw_context *ctx, const char *name)
{
int i;
for(i=0; i<ctx->req.options_count; i++) {
if(ctx->req.options[i].name && !strcmp(ctx->req.options[i].name, name)) {
return ctx->req.options[i].val;
}
}
return NULL;
}
| 16,246 |
13,159 | 0 | xps_identify_font_encoding(fz_font *font, int idx, int *pid, int *eid)
{
FT_Face face = font->ft_face;
*pid = face->charmaps[idx]->platform_id;
*eid = face->charmaps[idx]->encoding_id;
}
| 16,247 |
105,884 | 0 | JSObject* createReferenceError(JSGlobalObject* globalObject, const UString& message)
{
ASSERT(!message.isEmpty());
return ErrorInstance::create(globalObject->globalData(), globalObject->referenceErrorConstructor()->errorStructure(), message);
}
| 16,248 |
154,480 | 0 | bool GLES2DecoderPassthroughImpl::MakeCurrent() {
if (!context_.get())
return false;
if (WasContextLost()) {
LOG(ERROR) << " GLES2DecoderPassthroughImpl: Trying to make lost context "
"current.";
return false;
}
if (!context_->MakeCurrent(surface_.get())) {
LOG(ERROR)
... | 16,249 |
49,290 | 0 | static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
u8 type, u8 code, int offset, __be32 info)
{
const struct ipv6hdr *hdr = (const struct ipv6hdr *)skb->data;
const struct tcphdr *th = (struct tcphdr *)(skb->data+offset);
struct net *net = dev_net(skb->dev);
struct request_sock *fastopen;
st... | 16,250 |
128,842 | 0 | void SVGDocumentExtensions::addTimeContainer(SVGSVGElement* element)
{
m_timeContainers.add(element);
}
| 16,251 |
104,370 | 0 | PassRefPtr<StylePropertySet> CSSComputedStyleDeclaration::makeMutable()
{
return copy();
}
| 16,252 |
80,080 | 0 | GF_Err edts_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_EditBox *ptr = (GF_EditBox *)s;
if (ptr->editList && gf_list_count(ptr->editList->entryList)) {
e = gf_isom_box_write_header(s, bs);
if (e) return e;
e = gf_isom_box_write((GF_Box *) ptr->editList, bs);
if (e) return e;
}
return GF_OK;
}
| 16,253 |
101,391 | 0 | BaseNode::~BaseNode() {}
| 16,254 |
6,556 | 0 | void Smb4KGlobal::clearHostsList()
{
mutex.lock();
while ( !p->hostsList.isEmpty() )
{
delete p->hostsList.takeFirst();
}
mutex.unlock();
}
| 16,255 |
62,419 | 0 | handle_reassoc_request(netdissect_options *ndo,
const u_char *p, u_int length)
{
struct mgmt_body_t pbody;
int offset = 0;
int ret;
memset(&pbody, 0, sizeof(pbody));
if (!ND_TTEST2(*p, IEEE802_11_CAPINFO_LEN + IEEE802_11_LISTENINT_LEN +
IEEE802_11_AP_LEN))
return 0;
if (length < IE... | 16,256 |
88,630 | 0 | static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
{
struct dwc3 *dwc = dep->dwc;
if (!dep->endpoint.desc) {
dev_err(dwc->dev, "%s: can't queue to disabled endpoint\n",
dep->name);
return -ESHUTDOWN;
}
if (WARN(req->dep != dep, "request %pK belongs to '%s'\n",
&req->requ... | 16,257 |
48,617 | 0 | void vfio_pci_intx_mask(struct vfio_pci_device *vdev)
{
struct pci_dev *pdev = vdev->pdev;
unsigned long flags;
spin_lock_irqsave(&vdev->irqlock, flags);
/*
* Masking can come from interrupt, ioctl, or config space
* via INTx disable. The latter means this can get called
* even when not using intx delivery... | 16,258 |
187,015 | 1 | ChromeContentBrowserClient::CreateThrottlesForNavigation(
content::NavigationHandle* handle) {
std::vector<std::unique_ptr<content::NavigationThrottle>> throttles;
// MetricsNavigationThrottle requires that it runs before NavigationThrottles
// that may delay or cancel navigations, so only NavigationThrottles that
// ... | 16,259 |
172,018 | 0 | static void btsock_l2cap_free(l2cap_socket *sock)
{
pthread_mutex_lock(&state_lock);
btsock_l2cap_free_l(sock);
pthread_mutex_unlock(&state_lock);
}
| 16,260 |
99,026 | 0 | bool WebGraphicsContext3DDefaultImpl::supportsMapSubCHROMIUM()
{
return false;
}
| 16,261 |
8,554 | 0 | static int ssh_channelcmp(void *av, void *bv)
{
struct ssh_channel *a = (struct ssh_channel *) av;
struct ssh_channel *b = (struct ssh_channel *) bv;
if (a->localid < b->localid)
return -1;
if (a->localid > b->localid)
return +1;
return 0;
}
| 16,262 |
141,599 | 0 | std::unique_ptr<EventMatcher> EventBindings::ParseEventMatcher(
std::unique_ptr<base::DictionaryValue> filter) {
return base::WrapUnique(new EventMatcher(
std::move(filter), context()->GetRenderFrame()->GetRoutingID()));
}
| 16,263 |
54,896 | 0 | static void add_pending_tree(struct rev_info *revs, struct tree *tree)
{
add_pending_object(revs, &tree->object, "");
}
| 16,264 |
52,906 | 0 | void ib_uverbs_srq_event_handler(struct ib_event *event, void *context_ptr)
{
struct ib_uevent_object *uobj;
uobj = container_of(event->element.srq->uobject,
struct ib_uevent_object, uobject);
ib_uverbs_async_handler(context_ptr, uobj->uobject.user_handle,
event->event, &uobj->event_list,
&uobj->eve... | 16,265 |
98,828 | 0 | void AppendMatchingCookiesToList(
net::CookieStore* cookie_store, const std::string& store_id,
const GURL& url, const DictionaryValue* details,
const Extension* extension,
ListValue* match_list) {
net::CookieMonster::CookieList all_cookies = GetCookieListFromStore(
cookie_store, url);
net::Coo... | 16,266 |
136,799 | 0 | double LocalDOMWindow::devicePixelRatio() const {
if (!GetFrame())
return 0.0;
return GetFrame()->DevicePixelRatio();
}
| 16,267 |
7,163 | 0 | cf2_hintmask_isNew( const CF2_HintMask hintmask )
{
return hintmask->isNew;
}
| 16,268 |
73,621 | 0 | static Cache GetImagePixelCache(Image *image,const MagickBooleanType clone,
ExceptionInfo *exception)
{
CacheInfo
*restrict cache_info;
MagickBooleanType
destroy,
status;
static MagickSizeType
cpu_throttle = 0,
cycles = 0,
time_limit = 0;
static time_t
cache_timestamp = 0;
st... | 16,269 |
108,541 | 0 | bool SetTemporaryGlobalOverrideQuotaOnDBThread(int64* new_quota,
QuotaDatabase* database) {
DCHECK(database);
if (!database->SetQuotaConfigValue(
QuotaDatabase::kTemporaryQuotaOverrideKey, *new_quota)) {
*new_quota = -1;
return false;
}
return tru... | 16,270 |
4,833 | 0 | FixUpEventFromWindow(SpritePtr pSprite,
xEvent *xE, WindowPtr pWin, Window child, Bool calcChild)
{
int evtype;
if (calcChild)
child = FindChildForEvent(pSprite, pWin);
if ((evtype = xi2_get_type(xE))) {
xXIDeviceEvent *event = (xXIDeviceEvent *) xE;
switch (e... | 16,271 |
170,342 | 0 | static bool AdjustChannelsAndRate(uint32_t fourcc, uint32_t *channels, uint32_t *rate) {
if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_AMR_NB, FourCC2MIME(fourcc))) {
*channels = 1;
*rate = 8000;
return true;
} else if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_AMR_WB, FourCC2MIME(fourcc))) {
*channels = 1;
*rate = 16000;
return... | 16,272 |
125,936 | 0 | DragTargetDropAckNotificationObserver::DragTargetDropAckNotificationObserver(
AutomationProvider* automation,
IPC::Message* reply_message)
: automation_(automation->AsWeakPtr()),
reply_message_(reply_message) {
registrar_.Add(
this,
content::NOTIFICATION_RENDER_VIEW_HOST_DID_RECEIVE_DRAG... | 16,273 |
178,625 | 1 | static int nbd_negotiate_drop_sync(QIOChannel *ioc, size_t size)
{
ssize_t ret;
uint8_t *buffer = g_malloc(MIN(65536, size));
while (size > 0) {
size_t count = MIN(65536, size);
ret = nbd_negotiate_read(ioc, buffer, count);
if (ret < 0) {
g_free(buffer);
retur... | 16,274 |
100,653 | 0 | int GetIndexOfSingletonTab(browser::NavigateParams* params) {
if (params->disposition != SINGLETON_TAB)
return -1;
GURL rewritten_url(params->url);
bool reverse_on_redirect = false;
BrowserURLHandler::GetInstance()->RewriteURLIfNecessary(
&rewritten_url,
params->browser->profile(),
&rever... | 16,275 |
26,860 | 0 | static struct dentry *proc_lookupfdinfo(struct inode *dir,
struct dentry *dentry,
struct nameidata *nd)
{
return proc_lookupfd_common(dir, dentry, proc_fdinfo_instantiate);
}
| 16,276 |
157,245 | 0 | void WebMediaPlayerImpl::OnAudioConfigChange(const AudioDecoderConfig& config) {
DCHECK(main_task_runner_->BelongsToCurrentThread());
DCHECK_NE(ready_state_, WebMediaPlayer::kReadyStateHaveNothing);
const bool codec_change =
pipeline_metadata_.audio_decoder_config.codec() != config.codec();
pipeline_meta... | 16,277 |
158,903 | 0 | bool PDFiumEngine::CheckPageAvailable(int index, std::vector<int>* pending) {
if (!doc_)
return false;
const int num_pages = static_cast<int>(pages_.size());
if (index < num_pages && pages_[index]->available())
return true;
if (!FPDFAvail_IsPageAvail(fpdf_availability_, index, &download_hints_)) {
... | 16,278 |
57,972 | 0 | static int nf_tables_getgen(struct sock *nlsk, struct sk_buff *skb,
const struct nlmsghdr *nlh,
const struct nlattr * const nla[])
{
struct net *net = sock_net(skb->sk);
struct sk_buff *skb2;
int err;
skb2 = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
if (skb2 == NULL)
return -ENOMEM;
err = nf_tables... | 16,279 |
138,663 | 0 | void RenderFrameHostImpl::DidSelectPopupMenuItem(int selected_index) {
Send(new FrameMsg_SelectPopupMenuItem(routing_id_, selected_index));
}
| 16,280 |
79,736 | 0 | png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
/* Note: this does not properly handle profiles that are > 64K under DOS */
{
png_const_charp errmsg = NULL; /* error message output, or no error */
int finished = 0; /* crc checked */
png_debug(1, "in png_handle_iCCP");
if ((p... | 16,281 |
63,121 | 0 | int Huff_Receive (node_t *node, int *ch, byte *fin) {
while (node && node->symbol == INTERNAL_NODE) {
if (get_bit(fin)) {
node = node->right;
} else {
node = node->left;
}
}
if (!node) {
return 0;
}
return (*ch = node->symbol);
}
| 16,282 |
79,696 | 0 | R_API RBinJavaCPTypeObj *r_bin_java_class_cp_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz) {
ut8 tag = buffer[0];
int quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_CLASS, tag, sz, "Class");
if (quick_check > 0) {
return NULL;
}
RBinJavaCPTypeObj *obj = R_NEW0 (RBinJavaCPTypeObj);
if (obj) {
obj->tag = tag... | 16,283 |
149,177 | 0 | void LockScreenMediaControlsView::MediaSessionPositionChanged(
const base::Optional<media_session::MediaPosition>& position) {
if (hide_controls_timer_->IsRunning())
return;
position_ = position;
if (!position.has_value()) {
if (progress_->GetVisible()) {
progress_->SetVisible(false);
La... | 16,284 |
14,104 | 0 | SProcRenderCreateRadialGradient (ClientPtr client)
{
register int n;
int len;
REQUEST (xRenderCreateRadialGradientReq);
REQUEST_AT_LEAST_SIZE (xRenderCreateRadialGradientReq);
swaps(&stuff->length, n);
swapl(&stuff->pid, n);
swapl(&stuff->inner.x, n);
swapl(&stuff->inner.y, n);
swap... | 16,285 |
81,400 | 0 | void trace_free_pid_list(struct trace_pid_list *pid_list)
{
vfree(pid_list->pids);
kfree(pid_list);
}
| 16,286 |
125,229 | 0 | RenderMessageCompletionCallback(RenderMessageFilter* filter,
IPC::Message* reply_msg)
: filter_(filter),
reply_msg_(reply_msg) {
}
| 16,287 |
175,600 | 0 | status_t NuMediaExtractor::setDataSource(
const sp<IMediaHTTPService> &httpService,
const char *path,
const KeyedVector<String8, String8> *headers) {
Mutex::Autolock autoLock(mLock);
if (mImpl != NULL) {
return -EINVAL;
}
sp<DataSource> dataSource =
DataSource::CreateFromURI(httpService, path, headers);
... | 16,288 |
84,517 | 0 | mouse_scroll_line(void)
{
if (relative_wheel_scroll)
return (relative_wheel_scroll_ratio * LASTLINE + 99) / 100;
else
return fixed_wheel_scroll_count;
}
| 16,289 |
95,977 | 0 | void CL_PacketEvent( netadr_t from, msg_t *msg ) {
int headerBytes;
clc.lastPacketTime = cls.realtime;
if ( msg->cursize >= 4 && *(int *)msg->data == -1 ) {
CL_ConnectionlessPacket( from, msg );
return;
}
if ( clc.state < CA_CONNECTED ) {
return; // can't be a valid sequenced packet
}
if ( msg->cursi... | 16,290 |
46,399 | 0 | static long vmsplice_to_user(struct file *file, const struct iovec __user *uiov,
unsigned long nr_segs, unsigned int flags)
{
struct pipe_inode_info *pipe;
struct splice_desc sd;
long ret;
struct iovec iovstack[UIO_FASTIOV];
struct iovec *iov = iovstack;
struct iov_iter iter;
ssize_t count = 0;
pipe = ... | 16,291 |
63,597 | 0 | gsm_xsmp_server_new (GsmStore *client_store)
{
if (xsmp_server_object != NULL) {
g_object_ref (xsmp_server_object);
} else {
xsmp_server_object = g_object_new (GSM_TYPE_XSMP_SERVER,
"client-store", client_store,
... | 16,292 |
126,060 | 0 | V8HeapStatsObserver::V8HeapStatsObserver(
AutomationProvider* automation,
IPC::Message* reply_message,
base::ProcessId renderer_id)
: automation_(automation->AsWeakPtr()),
reply_message_(reply_message),
renderer_id_(renderer_id) {
registrar_.Add(
this,
chrome::NOTIFICATION_REND... | 16,293 |
149,680 | 0 | base::string16 SaveCardBubbleControllerImpl::GetWindowTitle() const {
return l10n_util::GetStringUTF16(
is_uploading_ ? IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_TO_CLOUD
: IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_LOCAL);
}
| 16,294 |
118,882 | 0 | const NavigationControllerImpl& WebContentsImpl::GetController() const {
return controller_;
}
| 16,295 |
75,984 | 0 | static_track_group_group_handler(vector_t *strvec)
{
static_track_group_t *tgroup = LIST_TAIL_DATA(vrrp_data->static_track_groups);
if (tgroup->iname) {
report_config_error(CONFIG_GENERAL_ERROR, "Group list already specified for sync group %s", tgroup->gname);
skip_block(true);
return;
}
tgroup->iname = rea... | 16,296 |
20,841 | 0 | static int kvm_vcpu_ioctl_x86_setup_mce(struct kvm_vcpu *vcpu,
u64 mcg_cap)
{
int r;
unsigned bank_num = mcg_cap & 0xff, bank;
r = -EINVAL;
if (!bank_num || bank_num >= KVM_MAX_MCE_BANKS)
goto out;
if (mcg_cap & ~(KVM_MCE_CAP_SUPPORTED | 0xff | 0xff0000))
goto out;
r = 0;
vcpu->arch.mcg_cap = mcg_cap;
... | 16,297 |
187,984 | 1 | int SoundPool::load(int fd, int64_t offset, int64_t length, int priority __unused)
{
ALOGV("load: fd=%d, offset=%" PRId64 ", length=%" PRId64 ", priority=%d",
fd, offset, length, priority);
Mutex::Autolock lock(&mLock);
sp<Sample> sample = new Sample(++mNextSampleID, fd, offset, length);
mSamples.add(sample... | 16,298 |
139,974 | 0 | DocumentElementSetMap& documentToElementSetMap() {
DEFINE_STATIC_LOCAL(DocumentElementSetMap, map, (new DocumentElementSetMap));
return map;
}
| 16,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.