unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
58,479 | 0 | _SSL_recv (SSL * ssl, char *buf, int len)
{
int num;
num = SSL_read (ssl, buf, len);
switch (SSL_get_error (ssl, num))
{
case SSL_ERROR_SSL:
/* ??? */
__SSL_fill_err_buf ("SSL_read");
fprintf (stderr, "%s\n", err_buf);
break;
case SSL_ERROR_SYSCALL:
/* ??? */
if (!would_block ())
perror ("SSL_re... | 15,500 |
85,312 | 0 | add_printer(cupsd_client_t *con, /* I - Client connection */
ipp_attribute_t *uri) /* I - URI of printer */
{
http_status_t status; /* Policy status */
int i; /* Looping var */
char scheme[HTTP_MAX_URI], /* Method portion of URI */
username[HTTP_MAX_URI], /* Username portion of URI */
host[... | 15,501 |
46,457 | 0 | krb5_recvauth_version(krb5_context context,
krb5_auth_context *auth_context,
/* IN */
krb5_pointer fd,
krb5_principal server,
krb5_int32 flags,
krb5_keytab keytab,
/*... | 15,502 |
143,240 | 0 | void Document::postInspectorTask(const WebTraceLocation& location, std::unique_ptr<ExecutionContextTask> task)
{
m_taskRunner->postInspectorTask(location, std::move(task));
}
| 15,503 |
122,253 | 0 | void HTMLFormControlElement::ancestorDisabledStateWasChanged()
{
m_ancestorDisabledState = AncestorDisabledStateUnknown;
disabledAttributeChanged();
}
| 15,504 |
107,031 | 0 | void QQuickWebView::mousePressEvent(QMouseEvent* event)
{
Q_D(QQuickWebView);
forceActiveFocus();
d->pageView->eventHandler()->handleMousePressEvent(event);
}
| 15,505 |
30,337 | 0 | static int vsock_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock,
struct msghdr *msg, size_t len)
{
int err;
struct sock *sk;
struct vsock_sock *vsk;
struct sockaddr_vm *remote_addr;
if (msg->msg_flags & MSG_OOB)
return -EOPNOTSUPP;
/* For now, MSG_DONTWAIT is always assumed... */
err = 0;
... | 15,506 |
131,610 | 0 | static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptionGetterLongAttribute", "TestObjectPython", info.Holder... | 15,507 |
61,317 | 0 | static void close_input_file(InputFile *ifile)
{
int i;
/* close decoder for each stream */
for (i = 0; i < ifile->nb_streams; i++)
if (ifile->streams[i].st->codecpar->codec_id != AV_CODEC_ID_NONE)
avcodec_free_context(&ifile->streams[i].dec_ctx);
av_freep(&ifile->streams);
ifi... | 15,508 |
120,463 | 0 | static void checkForEmptyStyleChange(Element* element, RenderStyle* style)
{
if (!style && !element->styleAffectedByEmpty())
return;
if (!style || (element->styleAffectedByEmpty() && (!style->emptyState() || element->hasChildNodes())))
element->setNeedsStyleRecalc();
}
| 15,509 |
27,237 | 0 | arch_get_unmapped_area_1(unsigned long addr, unsigned long len,
unsigned long limit)
{
struct vm_area_struct *vma = find_vma(current->mm, addr);
while (1) {
/* At this point: (!vma || addr < vma->vm_end). */
if (limit - len < addr)
return -ENOMEM;
if (!vma || addr + len <= vma->vm_start)
retu... | 15,510 |
112,160 | 0 | DictionaryValue* AppSpecificsToValue(
const sync_pb::AppSpecifics& proto) {
DictionaryValue* value = new DictionaryValue();
SET(extension, ExtensionSpecificsToValue);
SET(notification_settings, AppSettingsToValue);
SET_STR(app_launch_ordinal);
SET_STR(page_ordinal);
return value;
}
| 15,511 |
111,299 | 0 | void WebPage::removeCompositingThreadOverlay(WebOverlay* overlay)
{
#if USE(ACCELERATED_COMPOSITING)
ASSERT(Platform::userInterfaceThreadMessageClient()->isCurrentThread());
if (d->compositor())
d->compositor()->removeOverlay(overlay->d->layerCompositingThread());
overlay->d->clear();
overlay->d... | 15,512 |
123,058 | 0 | void RenderWidgetHostImpl::SetInputMethodActive(bool activate) {
Send(new ViewMsg_SetInputMethodActive(GetRoutingID(), activate));
}
| 15,513 |
82,887 | 0 | static int bin_pe_parse_imports(struct PE_(r_bin_pe_obj_t)* bin,
struct r_bin_pe_import_t** importp, int* nimp,
const char* dll_name,
PE_DWord OriginalFirstThunk,
PE_DWord FirstThunk) {
char ... | 15,514 |
135,946 | 0 | bool ContainerNode::getLowerRightCorner(FloatPoint& point) const
{
if (!layoutObject())
return false;
LayoutObject* o = layoutObject();
if (!o->isInline() || o->isReplaced()) {
LayoutBox* box = toLayoutBox(o);
point = o->localToAbsolute(FloatPoint(box->size()), UseTransforms);
... | 15,515 |
73,876 | 0 | static int __einj_get_available_error_type(u32 *type)
{
struct apei_exec_context ctx;
int rc;
einj_exec_ctx_init(&ctx);
rc = apei_exec_run(&ctx, ACPI_EINJ_GET_ERROR_TYPE);
if (rc)
return rc;
*type = apei_exec_ctx_get_output(&ctx);
return 0;
}
| 15,516 |
128,936 | 0 | void doWriteNumber(double number)
{
append(reinterpret_cast<uint8_t*>(&number), sizeof(number));
}
| 15,517 |
53,756 | 0 | static int fixed_mtrr_seg_unit_range_index(int seg, int unit)
{
struct fixed_mtrr_segment *mtrr_seg = &fixed_seg_table[seg];
WARN_ON(mtrr_seg->start + unit * fixed_mtrr_seg_unit_size(seg)
> mtrr_seg->end);
/* each unit has 8 ranges. */
return mtrr_seg->range_start + 8 * unit;
}
| 15,518 |
69,656 | 0 | choose_guard_selection(const or_options_t *options,
const networkstatus_t *live_ns,
const guard_selection_t *old_selection,
guard_selection_type_t *type_out)
{
tor_assert(options);
tor_assert(type_out);
if (options->UseBridges) {
*type_out ... | 15,519 |
70,178 | 0 | static void TIFFReadDirEntryCheckedSbyte(TIFF* tif, TIFFDirEntry* direntry, int8* value)
{
(void) tif;
*value=*(int8*)(&direntry->tdir_offset);
}
| 15,520 |
17,042 | 0 | void OxideQQuickWebViewPrivate::LoadingChanged() {
Q_Q(OxideQQuickWebView);
emit q->loadingStateChanged();
}
| 15,521 |
84,854 | 0 | static int copy_everything_to_user(struct ebt_table *t, void __user *user,
const int *len, int cmd)
{
struct ebt_replace tmp;
const struct ebt_counter *oldcounters;
unsigned int entries_size, nentries;
int ret;
char *entries;
if (cmd == EBT_SO_GET_ENTRIES) {
entries_size = t->private->entries_size;
ne... | 15,522 |
151,191 | 0 | bool LoadsFromCacheOnly(const ResourceRequest& request) {
switch (request.GetCachePolicy()) {
case WebCachePolicy::kUseProtocolCachePolicy:
case WebCachePolicy::kValidatingCacheData:
case WebCachePolicy::kBypassingCache:
case WebCachePolicy::kReturnCacheDataElseLoad:
return false;
case WebCa... | 15,523 |
159,043 | 0 | void ChromeDownloadManagerDelegate::CheckClientDownloadDone(
uint32_t download_id,
safe_browsing::DownloadCheckResult result) {
DownloadItem* item = download_manager_->GetDownload(download_id);
if (!item || (item->GetState() != DownloadItem::IN_PROGRESS))
return;
DVLOG(2) << __func__ << "() download ... | 15,524 |
98,955 | 0 | bool HTMLLinkElement::sheetLoaded()
{
if (!isLoading() && !isDisabled() && !isAlternate()) {
document()->removePendingSheet();
return true;
}
return false;
}
| 15,525 |
161,007 | 0 | void ChromeClientImpl::SetTouchAction(LocalFrame* frame,
TouchAction touch_action) {
DCHECK(frame);
WebLocalFrameImpl* web_frame = WebLocalFrameImpl::FromFrame(frame);
WebFrameWidgetBase* widget = web_frame->LocalRoot()->FrameWidget();
if (!widget)
return;
if (WebWid... | 15,526 |
117,175 | 0 | static gboolean detachCallback(WebKitWebInspector*, InspectorTest* test)
{
return test->detach();
}
| 15,527 |
146,209 | 0 | void WebGL2RenderingContextBase::uniform4ui(
const WebGLUniformLocation* location,
GLuint v0,
GLuint v1,
GLuint v2,
GLuint v3) {
if (isContextLost() || !location)
return;
if (location->Program() != current_program_) {
SynthesizeGLError(GL_INVALID_OPERATION, "uniform4ui",
... | 15,528 |
166,986 | 0 | void CSSStyleSheet::StartLoadingDynamicSheet() {
SetLoadCompleted(false);
owner_node_->StartLoadingDynamicSheet();
}
| 15,529 |
97,826 | 0 | void AutoFillManager::FormsSeen(const std::vector<FormData>& forms) {
if (!IsAutoFillEnabled())
return;
if (personal_data_->profiles().empty() &&
personal_data_->credit_cards().empty())
return;
ParseForms(forms);
}
| 15,530 |
125,607 | 0 | void RenderViewHost::FilterURL(const RenderProcessHost* process,
bool empty_allowed,
GURL* url) {
RenderViewHostImpl::FilterURL(ChildProcessSecurityPolicyImpl::GetInstance(),
process, empty_allowed, url);
}
| 15,531 |
120,120 | 0 | gfx::Vector2d Layer::MaxScrollOffset() const {
if (scroll_clip_layer_id_ == INVALID_ID)
return gfx::Vector2d();
gfx::Size scaled_scroll_bounds(bounds());
Layer const* current_layer = this;
Layer const* page_scale_layer = layer_tree_host()->page_scale_layer();
float scale_factor = 1.f;
do {
if (curr... | 15,532 |
43,791 | 0 | iakerb_gss_wrap_iov_length(OM_uint32 *minor_status,
gss_ctx_id_t context_handle, int conf_req_flag,
gss_qop_t qop_req, int *conf_state,
gss_iov_buffer_desc *iov, int iov_count)
{
iakerb_ctx_id_t ctx = (iakerb_ctx_id_t)context_handle;
... | 15,533 |
37,030 | 0 | static void crash_vmclear_local_loaded_vmcss(void)
{
int cpu = raw_smp_processor_id();
struct loaded_vmcs *v;
if (!crash_local_vmclear_enabled(cpu))
return;
list_for_each_entry(v, &per_cpu(loaded_vmcss_on_cpu, cpu),
loaded_vmcss_on_cpu_link)
vmcs_clear(v->vmcs);
}
| 15,534 |
77,531 | 0 | ofputil_decode_port_stats(struct ofputil_port_stats *ps, struct ofpbuf *msg)
{
enum ofperr error;
enum ofpraw raw;
memset(&(ps->stats), 0xFF, sizeof (ps->stats));
error = (msg->header ? ofpraw_decode(&raw, msg->header)
: ofpraw_pull(&raw, msg));
if (error) {
return error;
... | 15,535 |
96,131 | 0 | static int timer_serialize(Unit *u, FILE *f, FDSet *fds) {
Timer *t = TIMER(u);
assert(u);
assert(f);
assert(fds);
unit_serialize_item(u, f, "state", timer_state_to_string(t->state));
unit_serialize_item(u, f, "result", timer_result_to_string(t->result));
if (t... | 15,536 |
90,352 | 0 | megasas_get_ld_list(struct megasas_instance *instance)
{
int ret = 0, ld_index = 0, ids = 0;
struct megasas_cmd *cmd;
struct megasas_dcmd_frame *dcmd;
struct MR_LD_LIST *ci;
dma_addr_t ci_h = 0;
u32 ld_count;
ci = instance->ld_list_buf;
ci_h = instance->ld_list_buf_h;
cmd = megasas_get_cmd(instance);
if (!... | 15,537 |
48,731 | 0 | struct net_device *__dev_get_by_index(struct net *net, int ifindex)
{
struct net_device *dev;
struct hlist_head *head = dev_index_hash(net, ifindex);
hlist_for_each_entry(dev, head, index_hlist)
if (dev->ifindex == ifindex)
return dev;
return NULL;
}
| 15,538 |
19,464 | 0 | static int efx_ethtool_set_coalesce(struct net_device *net_dev,
struct ethtool_coalesce *coalesce)
{
struct efx_nic *efx = netdev_priv(net_dev);
struct efx_channel *channel;
unsigned int tx_usecs, rx_usecs;
bool adaptive, rx_may_override_tx;
int rc;
if (coalesce->use_adaptive_tx_coalesce)
return -EINVA... | 15,539 |
80,374 | 0 | GF_Err saio_Size(GF_Box *s)
{
GF_SampleAuxiliaryInfoOffsetBox *ptr = (GF_SampleAuxiliaryInfoOffsetBox*)s;
if (ptr->aux_info_type || ptr->aux_info_type_parameter) {
ptr->flags |= 1;
}
if (ptr->offsets_large) {
ptr->version = 1;
}
if (ptr->flags & 1) ptr->size += 8;
ptr->size += 4;
switch (ptr->aux_info_typ... | 15,540 |
105,179 | 0 | ShadowRoot::~ShadowRoot()
{
ASSERT(!m_prev);
ASSERT(!m_next);
if (hasRareData())
clearRareData();
}
| 15,541 |
87,978 | 0 | static blk_status_t pcd_queue_rq(struct blk_mq_hw_ctx *hctx,
const struct blk_mq_queue_data *bd)
{
struct pcd_unit *cd = hctx->queue->queuedata;
if (rq_data_dir(bd->rq) != READ) {
blk_mq_start_request(bd->rq);
return BLK_STS_IOERR;
}
spin_lock_irq(&pcd_lock);
list_add_tail(&bd->rq->queuelist, &cd->rq_li... | 15,542 |
42,893 | 0 | static off_t copyfd_sparse(int src_fd, int dst_fd1, int dst_fd2, off_t size2)
{
off_t total = 0;
int last_was_seek = 0;
#if CONFIG_FEATURE_COPYBUF_KB <= 4
char buffer[CONFIG_FEATURE_COPYBUF_KB * 1024];
enum { buffer_size = sizeof(buffer) };
#else
char *buffer;
int buffer_size;
/* We want page-aligned buffer, ju... | 15,543 |
164,127 | 0 | void AppCacheDatabase::ReadNamespaceRecord(
const sql::Statement* statement, NamespaceRecord* record) {
record->cache_id = statement->ColumnInt64(0);
record->origin = url::Origin::Create(GURL(statement->ColumnString(1)));
record->namespace_.type =
static_cast<AppCacheNamespaceType>(statement->ColumnInt(... | 15,544 |
186,207 | 1 | void TestingPlatformSupport::cryptographicallyRandomValues(unsigned char* buffer, size_t length)
{
}
| 15,545 |
88,632 | 0 | static int __dwc3_gadget_get_frame(struct dwc3 *dwc)
{
u32 reg;
reg = dwc3_readl(dwc->regs, DWC3_DSTS);
return DWC3_DSTS_SOFFN(reg);
}
| 15,546 |
159,280 | 0 | DownloadManagerDelegate::ApplicationClientIdForFileScanning() const {
return std::string();
}
| 15,547 |
67,018 | 0 | int ff_alloc_packet(AVPacket *avpkt, int size)
{
return ff_alloc_packet2(NULL, avpkt, size, 0);
}
| 15,548 |
98,392 | 0 | guint webkit_web_frame_get_pending_unload_event_count(WebKitWebFrame* frame)
{
g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), 0);
return core(frame)->domWindow()->pendingUnloadEventListeners();
}
| 15,549 |
144,152 | 0 | png_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran,
int num_trans, int color_type)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_tRNS;
#endif
png_byte buf[6];
png_debug(1, "in png_write_tRNS");
if (color_type == PNG_COLOR_TYPE_PALETTE)
{
if (num_trans <= 0 || num_trans > (int)png_ptr-... | 15,550 |
140,283 | 0 | bool GIFImageReader::parse(GIFImageDecoder::GIFParseQuery query)
{
ASSERT(m_bytesRead <= m_data->size());
return parseData(m_bytesRead, m_data->size() - m_bytesRead, query);
}
| 15,551 |
43,681 | 0 | static inline void put_link(struct nameidata *nd)
{
struct saved *last = nd->stack + --nd->depth;
struct inode *inode = last->inode;
if (last->cookie && inode->i_op->put_link)
inode->i_op->put_link(inode, last->cookie);
if (!(nd->flags & LOOKUP_RCU))
path_put(&last->link);
}
| 15,552 |
10,240 | 0 | FT_Get_First_Char( FT_Face face,
FT_UInt *agindex )
{
FT_ULong result = 0;
FT_UInt gindex = 0;
if ( face && face->charmap && face->num_glyphs )
{
gindex = FT_Get_Char_Index( face, 0 );
if ( gindex == 0 || gindex >= (FT_UInt)face->num_glyphs )
result =... | 15,553 |
71,633 | 0 | static MagickBooleanType DecodeImage(Image *image, unsigned char *pixels,
const size_t length)
{
#define RLE_MODE_NONE -1
#define RLE_MODE_COPY 0
#define RLE_MODE_RUN 1
int data = 0, count = 0;
unsigned char *p;
int mode = RLE_MODE_NONE;
for (p = pixels; p < pixels + length; p++) {
... | 15,554 |
139,922 | 0 | const AtomicString& VideoKindToString(
WebMediaPlayerClient::VideoTrackKind kind) {
switch (kind) {
case WebMediaPlayerClient::VideoTrackKindNone:
return emptyAtom;
case WebMediaPlayerClient::VideoTrackKindAlternative:
return VideoTrack::alternativeKeyword();
case WebMediaPlayerClient::Vid... | 15,555 |
130,689 | 0 | static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjectV8Internal::conditionalAttr3AttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V... | 15,556 |
142,809 | 0 | bool HTMLMediaElement::HasPendingActivity() const {
if (should_delay_load_event_)
return true;
if (!media_source_ && network_state_ == kNetworkLoading)
return true;
{
base::AutoReset<bool> scope(&official_playback_position_needs_update_,
false);
if (CouldPlayIfEn... | 15,557 |
143,737 | 0 | void ShellMainDelegate::ZygoteForked() {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableCrashReporter)) {
std::string process_type =
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kProcessType);
breakpad::InitCrashReporter(process_... | 15,558 |
96,484 | 0 | static int AppLayerProtoDetectPMRegisterPattern(uint8_t ipproto, AppProto alproto,
const char *pattern,
uint16_t depth, uint16_t offset,
uint8_t direction,
... | 15,559 |
177,703 | 0 | virtual void SetUp() {
InitializeConfig();
SetMode(encoding_mode_);
}
| 15,560 |
172,958 | 0 | int readpng_get_bgcolor(uch *red, uch *green, uch *blue)
{
return 1;
}
| 15,561 |
153,098 | 0 | bool PDFiumEngineExports::RenderPDFPageToBitmap(
const void* pdf_buffer,
int pdf_buffer_size,
int page_number,
const RenderingSettings& settings,
void* bitmap_buffer) {
FPDF_DOCUMENT doc =
FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr);
if (!doc)
return false;
FPDF_PAGE p... | 15,562 |
111,015 | 0 | void FileSystemOperation::DoCreateDirectory(
const StatusCallback& callback,
bool exclusive, bool recursive) {
FileSystemFileUtilProxy::CreateDirectory(
&operation_context_,
src_util_, src_path_, exclusive, recursive,
base::Bind(&FileSystemOperation::DidFinishFileOperation,
... | 15,563 |
13,511 | 0 | static int dv_extract_audio(uint8_t* frame, uint8_t* ppcm[4],
const DVprofile *sys)
{
int size, chan, i, j, d, of, smpls, freq, quant, half_ch;
uint16_t lc, rc;
const uint8_t* as_pack;
uint8_t *pcm, ipcm;
as_pack = dv_extract_pack(frame, dv_audio_source);
if (!as_pac... | 15,564 |
39,098 | 0 | bittoint4(PG_FUNCTION_ARGS)
{
VarBit *arg = PG_GETARG_VARBIT_P(0);
uint32 result;
bits8 *r;
/* Check that the bit string is not too long */
if (VARBITLEN(arg) > sizeof(result) * BITS_PER_BYTE)
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("integer out of range")));
result... | 15,565 |
81,835 | 0 | static void ecc_ctx_init(ecEncCtx* ctx, int flags)
{
if (ctx) {
XMEMSET(ctx, 0, sizeof(ecEncCtx));
ctx->encAlgo = ecAES_128_CBC;
ctx->kdfAlgo = ecHKDF_SHA256;
ctx->macAlgo = ecHMAC_SHA256;
ctx->protocol = (byte)flags;
if (flags == REQ_RESP_CLIENT)
ctx... | 15,566 |
182,980 | 1 | seamless_process(STREAM s)
{
unsigned int pkglen;
char *buf;
pkglen = s->end - s->p;
/* str_handle_lines requires null terminated strings */
buf = xmalloc(pkglen + 1);
STRNCPY(buf, (char *) s->p, pkglen + 1);
str_handle_lines(buf, &seamless_rest, seamless_line_handler, NULL);
xfree(buf);
}
| 15,567 |
148,538 | 0 | void WebContentsImpl::Replace(const base::string16& word) {
RenderFrameHost* focused_frame = GetFocusedFrame();
if (!focused_frame)
return;
focused_frame->GetFrameInputHandler()->Replace(word);
}
| 15,568 |
136,460 | 0 | ConversionContext::~ConversionContext() {
while (state_stack_.size()) {
if (state_stack_.back().type == StateEntry::kEffect)
EndEffect();
else
EndClip();
}
EndTransform();
if (translated_for_layer_offset_)
AppendRestore(1);
}
| 15,569 |
37,163 | 0 | static bool pi_test_and_clear_on(struct pi_desc *pi_desc)
{
return test_and_clear_bit(POSTED_INTR_ON,
(unsigned long *)&pi_desc->control);
}
| 15,570 |
142,567 | 0 | void ShelfWidget::DelegateView::ReorderChildLayers(ui::Layer* parent_layer) {
views::View::ReorderChildLayers(parent_layer);
parent_layer->StackAtBottom(&opaque_background_);
}
| 15,571 |
88,829 | 0 | irqreturn_t floppy_interrupt(int irq, void *dev_id)
{
int do_print;
unsigned long f;
void (*handler)(void) = do_floppy;
lasthandler = handler;
interruptjiffies = jiffies;
f = claim_dma_lock();
fd_disable_dma();
release_dma_lock(f);
do_floppy = NULL;
if (fdc >= N_FDC || FDCS->address == -1) {
/* we don't ... | 15,572 |
44,366 | 0 | static inline void rt_free(struct rtable *rt)
{
call_rcu(&rt->dst.rcu_head, dst_rcu_free);
}
| 15,573 |
7,447 | 0 | void zend_ts_hash_display(TsHashTable *ht)
{
begin_read(ht);
zend_hash_display(TS_HASH(ht));
end_read(ht);
}
| 15,574 |
35,129 | 0 | static void release_pte_pages(pte_t *pte, pte_t *_pte)
{
while (--_pte >= pte) {
pte_t pteval = *_pte;
if (!pte_none(pteval))
release_pte_page(pte_page(pteval));
}
}
| 15,575 |
129,117 | 0 | bool PermissionsData::HasAPIPermissionForTab(
int tab_id,
APIPermission::ID permission) const {
if (HasAPIPermission(permission))
return true;
scoped_refptr<const PermissionSet> tab_permissions =
GetTabSpecificPermissions(tab_id);
base::AutoLock auto_lock(runtime_lock_);
return tab_permissio... | 15,576 |
177,803 | 1 | static void build_l4proto_sctp(const struct nf_conntrack *ct, struct nethdr *n)
{
ct_build_group(ct, ATTR_GRP_ORIG_PORT, n, NTA_PORT,
sizeof(struct nfct_attr_grp_port));
if (!nfct_attr_is_set(ct, ATTR_SCTP_STATE))
return;
ct_build_u8(ct, ATTR_SCTP_STATE, n, NTA_SCTP_STATE);
ct_build_u32(ct, ATTR_SCTP_VTAG_ORI... | 15,577 |
58,260 | 0 | static struct page *__dma_alloc_buffer(struct device *dev, size_t size, gfp_t gfp)
{
unsigned long order = get_order(size);
struct page *page, *p, *e;
page = alloc_pages(gfp, order);
if (!page)
return NULL;
/*
* Now split the huge page and free the excess pages
*/
split_page(page, order);
for (p = page +... | 15,578 |
181,941 | 1 | static int dynamicGetbuf(gdIOCtxPtr ctx, void *buf, int len)
{
int rlen, remain;
dpIOCtxPtr dctx;
dynamicPtr *dp;
dctx = (dpIOCtxPtr) ctx;
dp = dctx->dp;
remain = dp->logicalSize - dp->pos;
if(remain >= len) {
rlen = len;
} else {
if(remain == 0) {
/* 2.0.34: EOF is incorrect. We use 0 for
* errors and EOF, just li... | 15,579 |
103,615 | 0 | GURL ChromeContentBrowserClient::GetEffectiveURL(Profile* profile,
const GURL& url) {
if (!profile || !profile->GetExtensionService())
return url;
const Extension* extension =
profile->GetExtensionService()->GetExtensionByWebExtent(url);
if (!extension)
... | 15,580 |
156,853 | 0 | const AtomicString& Document::linkColor() const {
return BodyAttributeValue(linkAttr);
}
| 15,581 |
114,685 | 0 | void Navigate(const char* url, int page_id) {
contents()->TestDidNavigate(
contents()->GetRenderViewHost(), page_id, GURL(url),
content::PAGE_TRANSITION_TYPED);
}
| 15,582 |
175,839 | 0 | static THREAD_FUNCTION thread_decoding_proc(void *p_data)
{
int ithread = ((DECODETHREAD_DATA *)p_data)->ithread;
VP8D_COMP *pbi = (VP8D_COMP *)(((DECODETHREAD_DATA *)p_data)->ptr1);
MB_ROW_DEC *mbrd = (MB_ROW_DEC *)(((DECODETHREAD_DATA *)p_data)->ptr2);
ENTROPY_CONTEXT_PLANES mb_row_left_context;
while ... | 15,583 |
87,619 | 0 | static unsigned zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in,
size_t insize, const LodePNGCompressSettings* settings)
{
if(settings->custom_zlib)
{
return settings->custom_zlib(out, outsize, in, insize, settings);
}
else
{
return lodepng_zli... | 15,584 |
143,520 | 0 | void OnSwapBuffersCompleted(std::vector<ui::LatencyInfo> latency_info,
gfx::Size swap_size,
const gpu::SwapBuffersCompleteParams& params) {
client_->DidReceiveSwapBuffersAck();
swap_buffers_callback_.Run(swap_size);
UpdateLatencyInfoOnSwap(params... | 15,585 |
96,671 | 0 | static __poll_t f_hidg_poll(struct file *file, poll_table *wait)
{
struct f_hidg *hidg = file->private_data;
__poll_t ret = 0;
poll_wait(file, &hidg->read_queue, wait);
poll_wait(file, &hidg->write_queue, wait);
if (WRITE_COND)
ret |= EPOLLOUT | EPOLLWRNORM;
if (READ_COND)
ret |= EPOLLIN | EPOLLRDNORM;
... | 15,586 |
157,479 | 0 | void IsPinnedToTaskbarHelper::GetState(
std::unique_ptr<service_manager::Connector> connector,
const ErrorCallback& error_callback,
const ResultCallback& result_callback) {
new IsPinnedToTaskbarHelper(std::move(connector), error_callback,
result_callback);
}
| 15,587 |
58,617 | 0 | SecHandle* sspi_SecureHandleAlloc()
{
SecHandle* handle = (SecHandle*) malloc(sizeof(SecHandle));
sspi_SecureHandleInit(handle);
return handle;
}
| 15,588 |
66,499 | 0 | static inline struct sk_buff *pull_skb(rtl8150_t *dev)
{
struct sk_buff *skb;
int i;
for (i = 0; i < RX_SKB_POOL_SIZE; i++) {
if (dev->rx_skb_pool[i]) {
skb = dev->rx_skb_pool[i];
dev->rx_skb_pool[i] = NULL;
return skb;
}
}
return NULL;
}
| 15,589 |
156,057 | 0 | void OverlayWindowViews::UpdateVideoSize(const gfx::Size& natural_size) {
DCHECK(!natural_size.IsEmpty());
natural_size_ = natural_size;
SetAspectRatio(gfx::SizeF(natural_size_));
SetBounds(CalculateAndUpdateWindowBounds());
}
| 15,590 |
106,651 | 0 | void WebPageProxy::startDragDrop(const IntPoint& imageOrigin, const IntPoint& dragPoint, uint64_t okEffect,
const HashMap<UINT, Vector<String> >& dataMap, const IntSize& dragImageSize, const SharedMemory::Handle& dragImageHandle, bool isLinkDrag)
{
COMPtr<WCDataObject> dataObject;
WCDataObject::createInsta... | 15,591 |
118,125 | 0 | void WebContentsAndroid::AddStyleSheetByURL(
JNIEnv* env,
jobject obj,
jstring url) {
web_contents_->GetMainFrame()->Send(new FrameMsg_AddStyleSheetByURL(
web_contents_->GetMainFrame()->GetRoutingID(),
ConvertJavaStringToUTF8(env, url)));
}
| 15,592 |
132,742 | 0 | void ChromotingInstance::OnVideoDecodeError() {
Disconnect();
OnConnectionState(protocol::ConnectionToHost::FAILED,
protocol::INCOMPATIBLE_PROTOCOL);
}
| 15,593 |
186,983 | 1 | WebContents* TabsCaptureVisibleTabFunction::GetWebContentsForID(
int window_id,
std::string* error) {
Browser* browser = NULL;
if (!GetBrowserFromWindowID(chrome_details_, window_id, &browser, error))
return nullptr;
WebContents* contents = browser->tab_strip_model()->GetActiveWebContents();
if (!contents) {
*error = ... | 15,594 |
83,859 | 0 | static int mac80211_hwsim_sta_add(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta)
{
hwsim_check_magic(vif);
hwsim_set_sta_magic(sta);
return 0;
}
| 15,595 |
179,146 | 1 | static inline void sem_getref_and_unlock(struct sem_array *sma)
{
ipc_rcu_getref(sma);
ipc_unlock(&(sma)->sem_perm);
}
| 15,596 |
46,054 | 0 | xdr_gpol_ret(XDR *xdrs, gpol_ret *objp)
{
if (!xdr_ui_4(xdrs, &objp->api_version)) {
return (FALSE);
}
if (!xdr_kadm5_ret_t(xdrs, &objp->code)) {
return (FALSE);
}
if(objp->code == KADM5_OK) {
if (!_xdr_kadm5_policy_ent_rec(xdrs, &objp->rec,
objp->api_version))
return (FALSE);
}
return (TRUE)... | 15,597 |
109,601 | 0 | PassRefPtr<Comment> Document::createComment(const String& data)
{
return Comment::create(*this, data);
}
| 15,598 |
32,212 | 0 | int netif_rx_ni(struct sk_buff *skb)
{
int err;
preempt_disable();
err = netif_rx(skb);
if (local_softirq_pending())
do_softirq();
preempt_enable();
return err;
}
| 15,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.