unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
148,591 | 0 | void WebContentsImpl::UpdateZoomIfNecessary(const std::string& scheme,
const std::string& host,
double level) {
NavigationEntry* entry = GetController().GetLastCommittedEntry();
if (!entry)
return;
GURL url = HostZoomMap:... | 1,300 |
129,662 | 0 | void AffineTransform::recompose(const DecomposedType& decomp)
{
this->setA(decomp.remainderA);
this->setB(decomp.remainderB);
this->setC(decomp.remainderC);
this->setD(decomp.remainderD);
this->setE(decomp.translateX);
this->setF(decomp.translateY);
this->rotateRadians(decomp.angle);
thi... | 1,301 |
142,056 | 0 | HRESULT CGaiaCredentialBase::GetBitmapValueImpl(DWORD field_id,
HBITMAP* phbmp) {
HRESULT hr = E_INVALIDARG;
switch (field_id) {
case FID_PROVIDER_LOGO:
*phbmp = ::LoadBitmap(CURRENT_MODULE(),
MAKEINTRESOURCE(IDB_GOOGLE_LOGO_SMALL... | 1,302 |
112,361 | 0 | void ResourceDispatcherHostImpl::RegisterDownloadedTempFile(
int child_id, int request_id, ShareableFileReference* reference) {
registered_temp_files_[child_id][request_id] = reference;
ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile(
child_id, reference->path());
reference->AddFinalReleas... | 1,303 |
175,711 | 0 | FLACSource::~FLACSource()
{
ALOGV("~FLACSource::FLACSource");
if (mStarted) {
stop();
}
}
| 1,304 |
30,738 | 0 | static int rfcomm_sock_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __user *optlen)
{
struct sock *sk = sock->sk;
struct bt_security sec;
int len, err = 0;
BT_DBG("sk %p", sk);
if (level == SOL_RFCOMM)
return rfcomm_sock_getsockopt_old(sock, optname, optval, optlen);
if (l... | 1,305 |
162,928 | 0 | void InitializeClientProcess(mojom::ProcessType process_type) {
mdm_ = MemoryDumpManager::CreateInstanceForTesting();
mdm_->set_dumper_registrations_ignored_for_testing(true);
const char* kServiceName = "TestServiceName";
ClientProcessImpl::Config config(nullptr, kServiceName, process_type);
confi... | 1,306 |
66,684 | 0 | static int dvb_usbv2_adapter_frontend_init(struct dvb_usb_adapter *adap)
{
int ret, i, count_registered = 0;
struct dvb_usb_device *d = adap_to_d(adap);
dev_dbg(&d->udev->dev, "%s: adap=%d\n", __func__, adap->id);
memset(adap->fe, 0, sizeof(adap->fe));
adap->active_fe = -1;
if (d->props->frontend_attach) {
re... | 1,307 |
84,378 | 0 | flatpak_proxy_client_update_unique_id_policy (FlatpakProxyClient *client,
const char *unique_id,
FlatpakPolicy policy)
{
if (policy > FLATPAK_POLICY_NONE)
{
FlatpakPolicy old_policy;
old_policy = ... | 1,308 |
106,929 | 0 | void RenderBox::setMarginAfter(LayoutUnit margin)
{
switch (style()->writingMode()) {
case TopToBottomWritingMode:
m_marginBottom = margin;
break;
case BottomToTopWritingMode:
m_marginTop = margin;
break;
case LeftToRightWritingMode:
m_marginRight = margin;
... | 1,309 |
48,901 | 0 | void netdev_upper_dev_unlink(struct net_device *dev,
struct net_device *upper_dev)
{
struct netdev_notifier_changeupper_info changeupper_info;
struct netdev_adjacent *i, *j;
ASSERT_RTNL();
changeupper_info.upper_dev = upper_dev;
changeupper_info.master = netdev_master_upper_dev_get(dev) == upper_dev;
cha... | 1,310 |
99,847 | 0 | WebPluginProxy::WebPluginProxy(
PluginChannel* channel,
int route_id,
const GURL& page_url,
gfx::NativeViewId containing_window,
int host_render_view_routing_id)
: channel_(channel),
route_id_(route_id),
cp_browsing_context_(0),
window_npobject_(NULL),
plugin_element_(NUL... | 1,311 |
158,309 | 0 | void RenderWidgetHostImpl::OnAutoscrollFling(const gfx::Vector2dF& velocity) {
WebGestureEvent event = SyntheticWebGestureEventBuilder::Build(
WebInputEvent::kGestureFlingStart,
blink::kWebGestureDeviceSyntheticAutoscroll);
event.data.fling_start.velocity_x = velocity.x();
event.data.fling_start.veloc... | 1,312 |
86,543 | 0 | void jpc_ft_invlift_col(jpc_fix_t *a, int numrows, int stride, int parity)
{
jpc_fix_t *lptr;
jpc_fix_t *hptr;
#if 0
register jpc_fix_t *lptr2;
register jpc_fix_t *hptr2;
register int i;
#endif
register int n;
int llen;
llen = (numrows + 1 - parity) >> 1;
if (numrows > 1) {
/* Apply the first lifting ste... | 1,313 |
146,264 | 0 | CreateContextProviderOnWorkerThread(
Platform::ContextAttributes context_attributes,
Platform::GraphicsInfo* gl_info,
const KURL& url) {
WaitableEvent waitable_event;
ContextProviderCreationInfo creation_info;
creation_info.context_attributes = context_attributes;
creation_info.gl_info = gl_info;
... | 1,314 |
3,740 | 0 | _dbus_get_is_errno_eagain_or_ewouldblock (void)
{
return errno == EAGAIN || errno == EWOULDBLOCK;
}
| 1,315 |
166,892 | 0 | bool Performance::IsResourceTimingBufferFull() {
return resource_timing_buffer_.size() >= resource_timing_buffer_size_;
}
| 1,316 |
33,038 | 0 | static int sctp_setsockopt_associnfo(struct sock *sk, char __user *optval, unsigned int optlen)
{
struct sctp_assocparams assocparams;
struct sctp_association *asoc;
if (optlen != sizeof(struct sctp_assocparams))
return -EINVAL;
if (copy_from_user(&assocparams, optval, optlen))
return -EFAULT;
asoc = sctp_i... | 1,317 |
167,875 | 0 | void Document::CheckCompleted() {
if (!ShouldComplete())
return;
if (frame_) {
frame_->Client()->RunScriptsAtDocumentIdle();
if (!frame_)
return;
if (!ShouldComplete())
return;
}
SetReadyState(kComplete);
if (LoadEventStillNeeded())
ImplicitClose();
if (!frame_ || !frame... | 1,318 |
54,417 | 0 | static ZIPARCHIVE_METHOD(getStream)
{
struct zip *intern;
zval *self = getThis();
struct zip_stat sb;
char *mode = "rb";
zend_string *filename;
php_stream *stream;
ze_zip_object *obj;
if (!self) {
RETURN_FALSE;
}
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "P", &filename) =... | 1,319 |
71,340 | 0 | static int parse_authenticate_response(
git_vector *www_authenticate,
http_subtransport *t,
int *allowed_types)
{
git_http_auth_context *context;
char *challenge;
size_t i;
git_vector_foreach(www_authenticate, i, challenge) {
if (auth_context_match(&context, t, challenge_match, challenge) < 0)
return -1;
... | 1,320 |
33,762 | 0 | static int evm_calc_hmac_or_hash(struct dentry *dentry,
const char *req_xattr_name,
const char *req_xattr_value,
size_t req_xattr_value_len,
char type, char *digest)
{
struct inode *inode = dentry->d_inode;
struct shash_desc *desc;
char **xattrname;
size_t xattr_size = 0;
char *xattr_value = NULL;
... | 1,321 |
113,649 | 0 | double AccessibilityUIElement::x()
{
if (!m_element || !ATK_IS_OBJECT(m_element))
return 0.0f;
int x, y;
atk_component_get_position(ATK_COMPONENT(m_element), &x, &y, ATK_XY_SCREEN);
return x;
}
| 1,322 |
46,580 | 0 | ssize_t rawexpread(off_t a, char *buf, size_t len, CLIENT *client) {
int fhandle;
off_t foffset;
size_t maxbytes;
if(get_filepos(client->export, a, &fhandle, &foffset, &maxbytes))
return -1;
if(maxbytes && len > maxbytes)
len = maxbytes;
DEBUG("(READ from fd %d offset %llu len %u), ", fhandle, (long long un... | 1,323 |
82,677 | 0 | static int archinfo(RAnal *anal, int q) {
return 2; /* :) */
}
| 1,324 |
21,036 | 0 | int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
gfp_t gfp_mask)
{
struct mem_cgroup *memcg = NULL;
enum charge_type type = MEM_CGROUP_CHARGE_TYPE_CACHE;
int ret;
if (mem_cgroup_disabled())
return 0;
if (PageCompound(page))
return 0;
if (unlikely(!mm))
mm = &init_mm;
if (!page_is_... | 1,325 |
4,830 | 0 | FilterRawEvents(const ClientPtr client, const GrabPtr grab, WindowPtr root)
{
XIClientPtr client_xi_version;
int cmp;
/* device not grabbed -> don't filter */
if (!grab)
return FALSE;
client_xi_version =
dixLookupPrivate(&client->devPrivates, XIClientPrivateKey);
cmp = version... | 1,326 |
47,373 | 0 | sha384_init(struct shash_desc *desc)
{
struct sha512_state *sctx = shash_desc_ctx(desc);
sctx->state[0] = SHA384_H0;
sctx->state[1] = SHA384_H1;
sctx->state[2] = SHA384_H2;
sctx->state[3] = SHA384_H3;
sctx->state[4] = SHA384_H4;
sctx->state[5] = SHA384_H5;
sctx->state[6] = SHA384_H6;
sctx->state[7] = SHA384_H7... | 1,327 |
179,221 | 1 | static int __ptrace_may_access(struct task_struct *task, unsigned int mode)
{
const struct cred *cred = current_cred(), *tcred;
/* May we inspect the given task?
* This check is used both for attaching with ptrace
* and for allowing access to sensitive information in /proc.
*
* ptrace_attach denies several cases that ... | 1,328 |
80,278 | 0 | GF_Err mvhd_Read(GF_Box *s, GF_BitStream *bs)
{
GF_MovieHeaderBox *ptr = (GF_MovieHeaderBox *)s;
if (ptr == NULL) return GF_BAD_PARAM;
if (ptr->version == 1) {
ptr->creationTime = gf_bs_read_u64(bs);
ptr->modificationTime = gf_bs_read_u64(bs);
ptr->timeScale = gf_bs_read_u32(bs);
ptr->duration = gf_bs_read_u... | 1,329 |
7,673 | 0 | static int handle_link(FsContext *ctx, V9fsPath *oldpath,
V9fsPath *dirpath, const char *name)
{
int oldfd, newdirfd, ret;
struct handle_data *data = (struct handle_data *)ctx->private;
oldfd = open_by_handle(data->mountfd, oldpath->data, O_PATH);
if (oldfd < 0) {
return ... | 1,330 |
173,241 | 0 | store_read_buffer_size(png_store *ps)
{
/* Return the bytes available for read in the current buffer. */
if (ps->next != &ps->current->data)
return STORE_BUFFER_SIZE;
return ps->current->datacount;
}
| 1,331 |
8,163 | 0 | void Gfx::opSetTextMatrix(Object args[], int numArgs) {
state->setTextMat(args[0].getNum(), args[1].getNum(),
args[2].getNum(), args[3].getNum(),
args[4].getNum(), args[5].getNum());
state->textMoveTo(0, 0);
out->updateTextMat(state);
out->updateTextPos(state);
fontChanged = gTrue;
}
| 1,332 |
49,742 | 0 | void arcmsr_clear_iop2drv_rqueue_buffer(struct AdapterControlBlock *acb)
{
uint32_t i;
if (acb->acb_flags & ACB_F_IOPDATA_OVERFLOW) {
for (i = 0; i < 15; i++) {
if (acb->acb_flags & ACB_F_IOPDATA_OVERFLOW) {
acb->acb_flags &= ~ACB_F_IOPDATA_OVERFLOW;
acb->rqbuf_getIndex = 0;
acb->rqbuf_putIndex = 0;... | 1,333 |
28,829 | 0 | void kvm_arch_async_page_ready(struct kvm_vcpu *vcpu, struct kvm_async_pf *work)
{
int r;
if ((vcpu->arch.mmu.direct_map != work->arch.direct_map) ||
work->wakeup_all)
return;
r = kvm_mmu_reload(vcpu);
if (unlikely(r))
return;
if (!vcpu->arch.mmu.direct_map &&
work->arch.cr3 != vcpu->arch.mmu.... | 1,334 |
80,282 | 0 | GF_Box *name_New()
{
ISOM_DECL_BOX_ALLOC(GF_NameBox, GF_ISOM_BOX_TYPE_NAME);
return (GF_Box *)tmp;
}
| 1,335 |
88,876 | 0 | static MagickBooleanType RenderPostscript(Image *image,
const DrawInfo *draw_info,const PointInfo *offset,TypeMetric *metrics)
{
char
filename[MaxTextExtent],
geometry[MaxTextExtent],
*text;
FILE
*file;
Image
*annotate_image;
ImageInfo
*annotate_info;
int
unique_file;
Magi... | 1,336 |
163,961 | 0 | void PaymentRequestState::AreRequestedMethodsSupported(
StatusCallback callback) {
if (!get_all_instruments_finished_) {
are_requested_methods_supported_callback_ = std::move(callback);
return;
}
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::BindOnce(&PaymentRequestState... | 1,337 |
548 | 0 | static void pdf_run_v(fz_context *ctx, pdf_processor *proc, float x2, float y2, float x3, float y3)
{
pdf_run_processor *pr = (pdf_run_processor *)proc;
fz_curvetov(ctx, pr->path, x2, y2, x3, y3);
}
| 1,338 |
43,610 | 0 | AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file,
const request_rec *r,
ap_filter_t *next_filter)
{
request_rec *rnew;
int res;
char *fdir;
apr_size_t fdirlen;
rnew = make_sub_requ... | 1,339 |
103,708 | 0 | void DevToolsAgent::runtimeFeatureStateChanged(
const WebKit::WebString& feature,
bool enabled) {
Send(new DevToolsHostMsg_RuntimePropertyChanged(
routing_id(),
feature.utf8(),
enabled ? "true" : "false"));
}
| 1,340 |
151,209 | 0 | Response InspectorNetworkAgent::canClearBrowserCache(bool* result) {
*result = true;
return Response::OK();
}
| 1,341 |
149,255 | 0 | void HTMLFormControlElement::formAction(USVStringOrTrustedURL& result) const {
const AtomicString& action = FastGetAttribute(kFormactionAttr);
if (action.IsEmpty()) {
result.SetUSVString(GetDocument().Url());
return;
}
result.SetUSVString(
GetDocument().CompleteURL(StripLeadingAndTrailingHTMLSpace... | 1,342 |
124,056 | 0 | bool BookmarksImportFunction::RunImpl() {
if (!EditBookmarksEnabled())
return false;
SelectFile(ui::SelectFileDialog::SELECT_OPEN_FILE);
return true;
}
| 1,343 |
110,391 | 0 | bool PluginModule::ReserveInstanceID(PP_Instance instance) {
if (reserve_instance_id_)
return PPBoolToBool(reserve_instance_id_(pp_module_, instance));
return true; // Instance ID is usable.
}
| 1,344 |
104,251 | 0 | MediaStreamList* RTCPeerConnection::remoteStreams() const
{
return m_remoteStreams.get();
}
| 1,345 |
116,949 | 0 | void IndexedDBDispatcher::OnWorkerRunLoopStopped() {
delete this;
}
| 1,346 |
154,773 | 0 | error::Error GLES2DecoderPassthroughImpl::DoReleaseTexImage2DCHROMIUM(
GLenum target,
GLint imageId) {
if (target != GL_TEXTURE_2D) {
InsertError(GL_INVALID_ENUM, "Invalid target");
return error::kNoError;
}
const BoundTexture& bound_texture =
bound_textures_[static_cast<size_t>(TextureTarg... | 1,347 |
49,364 | 0 | bool lockdep_nfnl_is_held(u8 subsys_id)
{
return lockdep_is_held(&table[subsys_id].mutex);
}
| 1,348 |
93,198 | 0 | set_dumper_capsicum_rights(pcap_dumper_t *p)
{
int fd = fileno(pcap_dump_file(p));
cap_rights_t rights;
cap_rights_init(&rights, CAP_SEEK, CAP_WRITE, CAP_FCNTL);
if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS) {
error("unable to limit dump descriptor");
}
if (cap_fcntls_limit(fd, CAP_FCNTL_GETFL) < 0... | 1,349 |
85,129 | 0 | SYSCALL_DEFINE2(clock_gettime, const clockid_t, which_clock,
struct timespec __user *,tp)
{
const struct k_clock *kc = clockid_to_kclock(which_clock);
struct timespec64 kernel_tp;
int error;
if (!kc)
return -EINVAL;
error = kc->clock_get(which_clock, &kernel_tp);
if (!error && put_timespec64(&kernel_tp, tp... | 1,350 |
84,811 | 0 | static int tm_cfpr_active(struct task_struct *target,
const struct user_regset *regset)
{
if (!cpu_has_feature(CPU_FTR_TM))
return -ENODEV;
if (!MSR_TM_ACTIVE(target->thread.regs->msr))
return 0;
return regset->n;
}
| 1,351 |
66,888 | 0 | static inline int private_mapping_ok(struct vm_area_struct *vma)
{
return 1;
}
| 1,352 |
15,574 | 0 | tilde_expand_paths(char **paths, u_int num_paths)
{
u_int i;
char *cp;
for (i = 0; i < num_paths; i++) {
cp = tilde_expand_filename(paths[i], original_real_uid);
free(paths[i]);
paths[i] = cp;
}
}
| 1,353 |
115,339 | 0 | static void didReceiveServerRedirectForProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
{
if (!WKFrameIsMainFrame(frame))
return;
webkitWebViewLoadChanged(WEBKIT_WEB_VIEW(clientInfo), WEBKIT_LOAD_REDIRECTED);
}
| 1,354 |
165,160 | 0 | void HTMLFormElement::Submit(Event* event,
HTMLFormControlElement* submit_button) {
LocalFrameView* view = GetDocument().View();
LocalFrame* frame = GetDocument().GetFrame();
if (!view || !frame || !frame->GetPage())
return;
if (!isConnected()) {
GetDocument().AddConsoleMes... | 1,355 |
43,317 | 0 | ushort * CLASS make_decoder_ref (const uchar **source)
{
int max, len, h, i, j;
const uchar *count;
ushort *huff;
count = (*source += 16) - 17;
for (max=16; max && !count[max]; max--);
huff = (ushort *) calloc (1 + (1 << max), sizeof *huff);
merror (huff, "make_decoder()");
huff[0] = max;
for (h=len=... | 1,356 |
181,419 | 1 | static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s,
AVFrame *p, AVPacket *avpkt)
{
AVDictionary *metadata = NULL;
uint32_t tag, length;
int decode_next_dat = 0;
int ret;
for (;;) {
length = bytestream2_get_bytes_left(&s->gb);
if (l... | 1,357 |
166,106 | 0 | void PaymentRequest::OnShippingOptionIdSelected(
std::string shipping_option_id) {
client_->OnShippingOptionChange(shipping_option_id);
}
| 1,358 |
125,398 | 0 | void GDataFileSystem::OnFileDownloaded(
const GetFileFromCacheParams& params,
GDataErrorCode status,
const GURL& content_url,
const FilePath& downloaded_file_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (status == GDATA_CANCELLED) {
cache_->GetCacheEntryOnUIThread(
... | 1,359 |
76,122 | 0 | fifo_close(notify_fifo_t* fifo)
{
if (fifo->fd != -1) {
close(fifo->fd);
fifo->fd = -1;
}
if (fifo->created_fifo)
unlink(fifo->name);
}
| 1,360 |
86,395 | 0 | long hugetlb_unreserve_pages(struct inode *inode, long start, long end,
long freed)
{
struct hstate *h = hstate_inode(inode);
struct resv_map *resv_map = inode_resv_map(inode);
long chg = 0;
struct hugepage_subpool *spool = subpool_inode(inode);
long gbl_reserve;
if (resv_map) {
chg = region_del(resv_m... | 1,361 |
184,006 | 1 | bool StopInputMethodProcess() {
if (!IBusConnectionsAreAlive()) {
LOG(ERROR) << "StopInputMethodProcess: IBus connection is not alive";
return false;
}
ibus_bus_exit_async(ibus_,
FALSE /* do not restart */,
-1 /* timeout */,
... | 1,362 |
106,589 | 0 | void WebPageProxy::printFrame(uint64_t frameID)
{
ASSERT(!m_isPerformingDOMPrintOperation);
m_isPerformingDOMPrintOperation = true;
WebFrameProxy* frame = process()->webFrame(frameID);
MESSAGE_CHECK(frame);
m_uiClient.printFrame(this, frame);
m_isPerformingDOMPrintOperation = false;
}
| 1,363 |
33,333 | 0 | static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
struct edgeport_serial *edge_serial;
struct usb_device *dev;
struct urb *urb;
int port_number;
int status;
u16 open_settings;
u8 transaction_timeout;
if (edge_port == ... | 1,364 |
98,857 | 0 | int WebSocketExperimentTask::DoWebSocketSendHello() {
DCHECK(websocket_);
next_state_ = STATE_WEBSOCKET_RECV_HELLO;
websocket_echo_start_time_ = base::TimeTicks::Now();
websocket_->Send(config_.websocket_hello_message);
SetTimeout(config_.websocket_hello_echoback_deadline_ms);
return net::ERR_IO_PENDING;
... | 1,365 |
132,223 | 0 | RenderFrameImpl::JavaScriptIsolatedWorldRequest::JavaScriptIsolatedWorldRequest(
int id,
bool notify_result,
int routing_id,
base::WeakPtr<RenderFrameImpl> render_frame_impl)
: id_(id),
notify_result_(notify_result),
routing_id_(routing_id),
render_frame_impl_(render_frame_impl) {
... | 1,366 |
84,957 | 0 | static int __init arp_tables_init(void)
{
int ret;
ret = register_pernet_subsys(&arp_tables_net_ops);
if (ret < 0)
goto err1;
/* No one else will be downing sem now, so we won't sleep */
ret = xt_register_targets(arpt_builtin_tg, ARRAY_SIZE(arpt_builtin_tg));
if (ret < 0)
goto err2;
/* Register setsockopt... | 1,367 |
61,425 | 0 | static int mov_read_dec3(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
enum AVAudioServiceType *ast;
int eac3info, acmod, lfeon, bsmod;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams-1];
ast = (enum AVAudioServiceType*)av_stream_new_side_data... | 1,368 |
182,397 | 1 | struct import_t* MACH0_(get_imports)(struct MACH0_(obj_t)* bin) {
struct import_t *imports;
int i, j, idx, stridx;
const char *symstr;
if (!bin->symtab || !bin->symstr || !bin->sects || !bin->indirectsyms)
return NULL;
if (bin->dysymtab.nundefsym < 1 || bin->dysymtab.nundefsym > 0xfffff) {
return NULL;
}
if (!(import... | 1,369 |
176,620 | 0 | xmlParseContent(xmlParserCtxtPtr ctxt) {
GROW;
while ((RAW != 0) &&
((RAW != '<') || (NXT(1) != '/')) &&
(ctxt->instate != XML_PARSER_EOF)) {
const xmlChar *test = CUR_PTR;
unsigned int cons = ctxt->input->consumed;
const xmlChar *cur = ctxt->input->cur;
/*
* First case : a Processing Instruction.
*/
i... | 1,370 |
49,474 | 0 | static void __implement(u8 *report, unsigned offset, int n, u32 value)
{
unsigned int idx = offset / 8;
unsigned int size = offset + n;
unsigned int bit_shift = offset % 8;
int bits_to_set = 8 - bit_shift;
u8 bit_mask = 0xff << bit_shift;
while (n - bits_to_set >= 0) {
report[idx] &= ~bit_mask;
report[idx] |... | 1,371 |
5,552 | 0 | g_proxy_list_new (DBusGProxy *first_proxy)
{
DBusGProxyList *list;
DBusGProxyPrivate *priv = DBUS_G_PROXY_GET_PRIVATE(first_proxy);
list = (void*) tristring_alloc_from_strings (G_STRUCT_OFFSET (DBusGProxyList, name),
priv->name,
... | 1,372 |
170,309 | 0 | bool UsbChooserContext::HasDevicePermission(
const GURL& requesting_origin,
const GURL& embedding_origin,
scoped_refptr<const device::UsbDevice> device) {
if (!device)
return false;
device::mojom::UsbDeviceInfoPtr device_info =
device::mojom::UsbDeviceInfo::From(*device);
DCHECK(device_info... | 1,373 |
187,288 | 1 | NetworkThrottleManagerImpl::NetworkThrottleManagerImpl()
: lifetime_median_estimate_(PercentileEstimator::kMedianPercentile,
kInitialMedianInMs),
outstanding_recomputation_timer_(
base::MakeUnique<base::Timer>(false /* retain_user_task */,
false /* is_repeating */)),
tick_clock_(new base::DefaultTickClock()),... | 1,374 |
170,204 | 0 | void DownloadAndVerifyFile(Browser* browser,
const base::FilePath& dir,
const base::FilePath& file) {
net::EmbeddedTestServer embedded_test_server;
base::FilePath test_data_directory;
GetTestDataDirectory(&test_data_directory);
embedded_test_server.ServeFile... | 1,375 |
55,434 | 0 | PHP_FUNCTION(escapeshellarg)
{
char *argument;
size_t argument_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &argument, &argument_len) == FAILURE) {
return;
}
if (argument) {
RETVAL_STR(php_escape_shell_arg(argument));
}
}
| 1,376 |
167,791 | 0 | void WebRuntimeFeatures::EnableWebGPU(bool enable) {
RuntimeEnabledFeatures::SetWebGPUEnabled(enable);
}
| 1,377 |
4,260 | 0 | PHP_FUNCTION(time_nanosleep)
{
long tv_sec, tv_nsec;
struct timespec php_req, php_rem;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &tv_sec, &tv_nsec) == FAILURE) {
return;
}
if (tv_sec < 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The seconds value must be greater than 0");
RETURN_FALS... | 1,378 |
61,451 | 0 | static int mov_read_pasp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
const int num = avio_rb32(pb);
const int den = avio_rb32(pb);
AVStream *st;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams-1];
if ((st->sample_aspect_ratio.den != 1 || st->sample_aspect... | 1,379 |
112,316 | 0 | net::Error CallbackAndReturn(
const DownloadResourceHandler::OnStartedCallback& started_cb,
net::Error net_error) {
if (started_cb.is_null())
return net_error;
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(started_cb, DownloadId::Invalid(), net_error));
return net_erro... | 1,380 |
154,718 | 0 | error::Error GLES2DecoderPassthroughImpl::DoGetUniformLocation(
GLuint program,
const char* name,
GLint* location) {
*location = api()->glGetUniformLocationFn(
GetProgramServiceID(program, resources_), name);
return error::kNoError;
}
| 1,381 |
72,088 | 0 | _kill_all_active_steps(uint32_t jobid, int sig, bool batch)
{
List steps;
ListIterator i;
step_loc_t *stepd;
int step_cnt = 0;
int fd;
steps = stepd_available(conf->spooldir, conf->node_name);
i = list_iterator_create(steps);
while ((stepd = list_next(i))) {
if (stepd->jobid != jobid) {
/* multiple jobs ... | 1,382 |
49,464 | 0 | static int show_timer(struct seq_file *m, void *v)
{
struct k_itimer *timer;
struct timers_private *tp = m->private;
int notify;
static const char * const nstr[] = {
[SIGEV_SIGNAL] = "signal",
[SIGEV_NONE] = "none",
[SIGEV_THREAD] = "thread",
};
timer = list_entry((struct list_head *)v, struct k_itimer, li... | 1,383 |
145,027 | 0 | bool CustomButton::ShouldEnterPushedState(const ui::Event& event) {
return IsTriggerableEvent(event);
}
| 1,384 |
53,430 | 0 | iperf_set_test_reverse(struct iperf_test *ipt, int reverse)
{
ipt->reverse = reverse;
if (ipt->reverse)
ipt->sender = ! ipt->sender;
check_sender_has_retransmits(ipt);
}
| 1,385 |
187,874 | 1 | long Segment::ParseCues(long long off, long long& pos, long& len) {
if (m_pCues)
return 0; // success
if (off < 0)
return -1;
long long total, avail;
const int status = m_pReader->Length(&total, &avail);
if (status < 0) // error
return status;
assert((total < 0) || (avail <= total));
pos = m_start + off;
if ((t... | 1,386 |
8,450 | 0 | pvscsi_ring_init_data(PVSCSIRingInfo *m, PVSCSICmdDescSetupRings *ri)
{
int i;
uint32_t txr_len_log2, rxr_len_log2;
uint32_t req_ring_size, cmp_ring_size;
m->rs_pa = ri->ringsStatePPN << VMW_PAGE_SHIFT;
req_ring_size = ri->reqRingNumPages * PVSCSI_MAX_NUM_REQ_ENTRIES_PER_PAGE;
cmp_ring_size = r... | 1,387 |
97,315 | 0 | static void startElementNsHandler(void* closure, const xmlChar* localname, const xmlChar* prefix, const xmlChar* uri, int nb_namespaces, const xmlChar** namespaces, int nb_attributes, int nb_defaulted, const xmlChar** libxmlAttributes)
{
if (hackAroundLibXMLEntityBug(closure))
return;
getTokenizer(clos... | 1,388 |
95,632 | 0 | static void S_AL_BufferUseDefault(sfxHandle_t sfx)
{
if(sfx == default_sfx)
Com_Error(ERR_FATAL, "Can't load default sound effect %s", knownSfx[sfx].filename);
knownSfx[sfx].isDefault = qtrue;
knownSfx[sfx].buffer = knownSfx[default_sfx].buffer;
}
| 1,389 |
50,557 | 0 | static inline void ModulateHCL(const double percent_hue,
const double percent_chroma,const double percent_luma,double *red,
double *green,double *blue)
{
double
hue,
luma,
chroma;
/*
Increase or decrease color luma, chroma, or hue.
*/
ConvertRGBToHCL(*red,*green,*blue,&hue,&chroma,&luma);
... | 1,390 |
108,387 | 0 | static int AddChannel(int val,
int adder) {
Fixed sum = static_cast<Fixed>(val) + static_cast<Fixed>(adder);
if (sum > max_value)
return max_value;
if (sum < min_value)
return min_value;
return static_cast<int>(sum);
}
| 1,391 |
101,398 | 0 | int64 MakeServerNodeForType(UserShare* share,
ModelType model_type) {
sync_pb::EntitySpecifics specifics;
syncable::AddDefaultExtensionValue(model_type, &specifics);
syncable::ScopedDirLookup dir(share->dir_manager.get(), share->name);
EXPECT_TRUE(dir.good());
syncable::WriteTransa... | 1,392 |
188,265 | 1 | Chapters::Chapters(
Segment* pSegment,
long long payload_start,
long long payload_size,
long long element_start,
long long element_size) :
m_pSegment(pSegment),
m_start(payload_start),
m_size(payload_size),
m_element_start(element_start),
m_element_size(element_size),
m_editi... | 1,393 |
187,820 | 1 | status_t BnOMX::onTransact(
uint32_t code, const Parcel &data, Parcel *reply, uint32_t flags) {
switch (code) {
case LIVES_LOCALLY:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
pid_t pid = (pid_t)data.readInt32();
reply->writeInt32(livesLocally(node, pid));
return OK;
}
case LIS... | 1,394 |
4,676 | 0 | static void add_assoc_name_entry(zval * val, char * key, X509_NAME * name, int shortname TSRMLS_DC) /* {{{ */
{
zval **data;
zval *subitem, *subentries;
int i;
char *sname;
int nid;
X509_NAME_ENTRY * ne;
ASN1_STRING * str = NULL;
ASN1_OBJECT * obj;
if (key != NULL) {
MAKE_STD_ZVAL(subitem);
array_init(sub... | 1,395 |
39,408 | 0 | static void process_fd_request(void)
{
cont = &rw_cont;
schedule_bh(redo_fd_request);
}
| 1,396 |
35,652 | 0 | file_strncmp(const char *s1, const char *s2, size_t len, uint32_t flags)
{
/*
* Convert the source args to unsigned here so that (1) the
* compare will be unsigned as it is in strncmp() and (2) so
* the ctype functions will work correctly without extra
* casting.
*/
const unsigned char *a = (const unsigned ... | 1,397 |
58,236 | 0 | static int tg_cfs_schedulable_down(struct task_group *tg, void *data)
{
struct cfs_schedulable_data *d = data;
struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth;
s64 quota = 0, parent_quota = -1;
if (!tg->parent) {
quota = RUNTIME_INF;
} else {
struct cfs_bandwidth *parent_b = &tg->parent->cfs_bandwidth;
qu... | 1,398 |
19,687 | 0 | static int hstate_next_node_to_alloc(struct hstate *h,
nodemask_t *nodes_allowed)
{
int nid;
VM_BUG_ON(!nodes_allowed);
nid = get_valid_node_allowed(h->next_nid_to_alloc, nodes_allowed);
h->next_nid_to_alloc = next_node_allowed(nid, nodes_allowed);
return nid;
}
| 1,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.