unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
64,892 | 0 | static int rle_patch_file_size(struct iwbmpwcontext *wctx,size_t rlesize)
{
iw_byte buf[4];
size_t fileheader_size;
int ret;
if(!wctx->iodescr->seek_fn) {
iw_set_error(wctx->ctx,"Writing compressed BMP requires a seek function");
return 0;
}
if(wctx->include_file_header) {
ret=(*wctx->iodescr->seek_fn)(wc... | 8,600 |
40,241 | 0 | static int pn_ioctl(struct sock *sk, int cmd, unsigned long arg)
{
struct sk_buff *skb;
int answ;
switch (cmd) {
case SIOCINQ:
lock_sock(sk);
skb = skb_peek(&sk->sk_receive_queue);
answ = skb ? skb->len : 0;
release_sock(sk);
return put_user(answ, (int __user *)arg);
case SIOCPNADDRESOURCE:
case SIOCP... | 8,601 |
180,111 | 1 | ZEND_API void zend_objects_store_del_ref_by_handle_ex(zend_object_handle handle, const zend_object_handlers *handlers TSRMLS_DC) /* {{{ */
{
struct _store_object *obj;
int failure = 0;
if (!EG(objects_store).object_buckets) {
return;
}
obj = &EG(objects_store).object_buckets[handle].bucket.obj;
/* Make sure ... | 8,602 |
64,954 | 0 | static iw_tmpsample x_to_linear_sample(iw_tmpsample v, const struct iw_csdescr *csdescr)
{
switch(csdescr->cstype) {
case IW_CSTYPE_SRGB:
return srgb_to_linear_sample(v);
case IW_CSTYPE_LINEAR:
return v;
case IW_CSTYPE_GAMMA:
return gamma_to_linear_sample(v,csdescr->gamma);
case IW_CSTYPE_REC709:
return re... | 8,603 |
41,776 | 0 | static int addrconf_ifid_gre(u8 *eui, struct net_device *dev)
{
return __ipv6_isatap_ifid(eui, *(__be32 *)dev->dev_addr);
}
| 8,604 |
29,248 | 0 | ip_vs_edit_service(struct ip_vs_service *svc, struct ip_vs_service_user_kern *u)
{
struct ip_vs_scheduler *sched, *old_sched;
int ret = 0;
/*
* Lookup the scheduler, by 'u->sched_name'
*/
sched = ip_vs_scheduler_get(u->sched_name);
if (sched == NULL) {
pr_info("Scheduler module ip_vs_%s not found\n", u->sch... | 8,605 |
96,847 | 0 | SYSCALL_DEFINE1(pipe, int __user *, fildes)
{
return do_pipe2(fildes, 0);
}
| 8,606 |
70,014 | 0 | void dictListDestructor(void *privdata, void *val)
{
DICT_NOTUSED(privdata);
listRelease((list*)val);
}
| 8,607 |
142,253 | 0 | void ManualFillingControllerImpl::Hide(FillingSource source) {
if (source == FillingSource::AUTOFILL &&
!base::FeatureList::IsEnabled(
autofill::features::kAutofillKeyboardAccessory)) {
return;
}
visible_sources_.erase(source);
if (visible_sources_.empty())
view_->Hide();
}
| 8,608 |
150,714 | 0 | base::string16 GetSoundSettingString(ContentSetting setting) {
return PageInfoUI::PermissionActionToUIString(
profile(), CONTENT_SETTINGS_TYPE_SOUND, setting, default_setting_,
content_settings::SettingSource::SETTING_SOURCE_USER);
}
| 8,609 |
120,144 | 0 | static void RunCopyCallbackOnMainThread(scoped_ptr<CopyOutputRequest> request,
scoped_ptr<CopyOutputResult> result) {
request->SendResult(result.Pass());
}
| 8,610 |
1,090 | 0 | GfxColorSpace *GfxColorSpace::parse(Object *csObj) {
GfxColorSpace *cs;
Object obj1;
cs = NULL;
if (csObj->isName()) {
if (csObj->isName("DeviceGray") || csObj->isName("G")) {
cs = new GfxDeviceGrayColorSpace();
} else if (csObj->isName("DeviceRGB") || csObj->isName("RGB")) {
cs = new GfxDe... | 8,611 |
63,152 | 0 | float MSG_ReadDeltaKeyFloat( msg_t *msg, int key, float oldV ) {
if ( MSG_ReadBits( msg, 1 ) ) {
floatint_t fi;
fi.i = MSG_ReadBits( msg, 32 ) ^ key;
return fi.f;
}
return oldV;
}
| 8,612 |
51,429 | 0 | int gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, int a)
{
int c;
int ct = -1;
int op = -1;
long rd, gd, bd, ad, dist;
long mindist = 4 * 255 * 255; /* init to max poss dist */
if (im->trueColor)
{
return gdTrueColorAlpha (r, g, b, a);
}
for (c = 0; c < im->colorsTotal; c++)... | 8,613 |
39,283 | 0 | int security_mls_enabled(void)
{
return policydb.mls_enabled;
}
| 8,614 |
140,347 | 0 | void Editor::pasteAsPlainText(EditorCommandSource source) {
if (tryDHTMLPaste(PlainTextOnly))
return;
if (!canPaste())
return;
spellChecker().updateMarkersForWordsAffectedByEditing(false);
pasteAsPlainTextWithPasteboard(Pasteboard::generalPasteboard());
}
| 8,615 |
164,404 | 0 | PermissionsData::PageAccess PermissionsData::CanRunOnPage(
const GURL& document_url,
int tab_id,
const URLPatternSet& permitted_url_patterns,
const URLPatternSet& withheld_url_patterns,
const URLPatternSet* tab_url_patterns,
std::string* error) const {
runtime_lock_.AssertAcquired();
if (loc... | 8,616 |
180,514 | 1 | static struct sock *tcp_v6_syn_recv_sock(const struct sock *sk, struct sk_buff *skb,
struct request_sock *req,
struct dst_entry *dst,
struct request_sock *req_unhash,
bool *own_req)
{
struct inet_request_sock *ireq;
struct ipv6_pinfo *newnp;
const struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp6_sock *newtcp6sk;
struc... | 8,617 |
31,662 | 0 | static int intel_alt_er(int idx)
{
if (!(x86_pmu.er_flags & ERF_HAS_RSP_1))
return idx;
if (idx == EXTRA_REG_RSP_0)
return EXTRA_REG_RSP_1;
if (idx == EXTRA_REG_RSP_1)
return EXTRA_REG_RSP_0;
return idx;
}
| 8,618 |
102,111 | 0 | SyncBackendHost::Core::DoInitializeOptions::~DoInitializeOptions() {}
| 8,619 |
113,132 | 0 | DownloadManagerTest()
: ui_thread_(content::BrowserThread::UI, &message_loop_),
file_thread_(content::BrowserThread::FILE, &message_loop_),
next_download_id_(0) {
}
| 8,620 |
76,607 | 0 | static int fsck_msg_type(enum fsck_msg_id msg_id,
struct fsck_options *options)
{
int msg_type;
assert(msg_id >= 0 && msg_id < FSCK_MSG_MAX);
if (options->msg_type)
msg_type = options->msg_type[msg_id];
else {
msg_type = msg_id_info[msg_id].msg_type;
if (options->strict && msg_type == FSCK_WARN)
msg_typ... | 8,621 |
168,945 | 0 | void DevToolsSession::AttachToAgent(
const blink::mojom::DevToolsAgentAssociatedPtr& agent) {
blink::mojom::DevToolsSessionHostAssociatedPtrInfo host_ptr_info;
binding_.Bind(mojo::MakeRequest(&host_ptr_info));
agent->AttachDevToolsSession(
std::move(host_ptr_info), mojo::MakeRequest(&session_ptr_),
... | 8,622 |
179,189 | 1 | static int udp_v6_push_pending_frames(struct sock *sk)
{
struct sk_buff *skb;
struct udphdr *uh;
struct udp_sock *up = udp_sk(sk);
struct inet_sock *inet = inet_sk(sk);
struct flowi6 *fl6 = &inet->cork.fl.u.ip6;
int err = 0;
int is_udplite = IS_UDPLITE(sk);
__wsum csum = 0;
/* Grab the skbuff where UDP header space ... | 8,623 |
155,583 | 0 | base::string16 AttestationPermissionRequestSheetModel::GetStepDescription()
const {
return l10n_util::GetStringFUTF16(
IDS_WEBAUTHN_REQUEST_ATTESTATION_PERMISSION_DESC,
GetRelyingPartyIdString(dialog_model()));
}
| 8,624 |
188,203 | 1 | void SoftHEVC::onQueueFilled(OMX_U32 portIndex) {
UNUSED(portIndex);
if (mSignalledError) {
return;
}
if (mOutputPortSettingsChange != NONE) {
return;
}
if (NULL == mCodecCtx) {
if (OK != initDecoder()) {
return;
}
}
if (outputBufferWidth() != mStride) {
/* Set the run-time (dynamic) parameters */
mStride = outputBuf... | 8,625 |
17,838 | 0 | rsa_sign (gcry_sexp_t *r_sig, gcry_sexp_t s_data, gcry_sexp_t keyparms)
{
gpg_err_code_t rc;
struct pk_encoding_ctx ctx;
gcry_mpi_t data = NULL;
RSA_secret_key sk = {NULL, NULL, NULL, NULL, NULL, NULL};
RSA_public_key pk;
gcry_mpi_t sig = NULL;
gcry_mpi_t result = NULL;
_gcry_pk_util_init_encoding_ctx ... | 8,626 |
119,601 | 0 | bool endLineMatched() const { return m_endLineMatched; }
| 8,627 |
142,953 | 0 | double HTMLMediaElement::duration() const {
return duration_;
}
| 8,628 |
23,460 | 0 | static void nfs4_xdr_enc_exchange_id(struct rpc_rqst *req,
struct xdr_stream *xdr,
struct nfs41_exchange_id_args *args)
{
struct compound_hdr hdr = {
.minorversion = args->client->cl_mvops->minor_version,
};
encode_compound_hdr(xdr, req, &hdr);
encode_exchange_id(xdr, args, &hdr);
encode_nops(... | 8,629 |
39,939 | 0 | static void sock_spd_release(struct splice_pipe_desc *spd, unsigned int i)
{
put_page(spd->pages[i]);
}
| 8,630 |
174,254 | 0 | status_t Camera3Device::RequestThread::queueTrigger(
RequestTrigger trigger[],
size_t count) {
Mutex::Autolock l(mTriggerMutex);
status_t ret;
for (size_t i = 0; i < count; ++i) {
ret = queueTriggerLocked(trigger[i]);
if (ret != OK) {
return ret;
}
}
return OK;
}
| 8,631 |
188,560 | 1 | void EncoderTest::InitializeConfig() {
const vpx_codec_err_t res = codec_->DefaultEncoderConfig(&cfg_, 0);
ASSERT_EQ(VPX_CODEC_OK, res);
}
| 8,632 |
52,214 | 0 | PHP_FUNCTION(locale_parse)
{
const char* loc_name = NULL;
int loc_name_len = 0;
int grOffset = 0;
intl_error_reset( NULL TSRMLS_CC );
if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s",
&loc_name, &loc_name_len ) == FAILURE)
{
intl_error_set... | 8,633 |
52,367 | 0 | ip6t_get_target_c(const struct ip6t_entry *e)
{
return ip6t_get_target((struct ip6t_entry *)e);
}
| 8,634 |
182,410 | 1 | void mp_decode_to_lua_array(lua_State *L, mp_cur *c, size_t len) {
assert(len <= UINT_MAX);
int index = 1;
lua_newtable(L);
while(len--) {
lua_pushnumber(L,index++);
mp_decode_to_lua_type(L,c);
if (c->err) return;
lua_settable(L,-3);
}
}
| 8,635 |
9,911 | 0 | void Part::selectionChanged()
{
m_infoPanel->setIndexes(m_view->selectionModel()->selectedRows());
}
| 8,636 |
72,146 | 0 | _set_batch_job_limits(slurm_msg_t *msg)
{
int i;
uint32_t alloc_lps = 0, last_bit = 0;
bool cpu_log = slurm_get_debug_flags() & DEBUG_FLAG_CPU_BIND;
slurm_cred_arg_t arg;
batch_job_launch_msg_t *req = (batch_job_launch_msg_t *)msg->data;
if (slurm_cred_get_args(req->cred, &arg) != SLURM_SUCCESS)
return;
req->... | 8,637 |
52,909 | 0 | int uverbs_dealloc_mw(struct ib_mw *mw)
{
struct ib_pd *pd = mw->pd;
int ret;
ret = mw->device->dealloc_mw(mw);
if (!ret)
atomic_dec(&pd->usecnt);
return ret;
}
| 8,638 |
86,373 | 0 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, unsigned int flags)
{
pte_t *ptep, entry;
spinlock_t *ptl;
int ret;
u32 hash;
pgoff_t idx;
struct page *page = NULL;
struct page *pagecache_page = NULL;
struct hstate *h = hstate_vma(vma);
struct address_space *mappin... | 8,639 |
123,570 | 0 | void FreeMenuItem(const PP_Flash_MenuItem* menu_item) {
if (menu_item->name)
delete [] menu_item->name;
if (menu_item->submenu)
FreeMenu(menu_item->submenu);
}
| 8,640 |
85,310 | 0 | add_job_subscriptions(
cupsd_client_t *con, /* I - Client connection */
cupsd_job_t *job) /* I - Newly created job */
{
int i; /* Looping var */
ipp_attribute_t *prev, /* Previous attribute */
*next, /* Next attribute */
*attr; /* Current attribute */
cupsd_subscription_t *sub; /* Subscr... | 8,641 |
176,673 | 0 | xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) {
const xmlChar *ptr;
xmlChar cur;
xmlChar *name;
xmlEntityPtr entity = NULL;
if ((str == NULL) || (*str == NULL)) return(NULL);
ptr = *str;
cur = *ptr;
if (cur != '%')
return(NULL);
ptr++;
name = xmlParseStringName(c... | 8,642 |
77,032 | 0 | ofpacts_verify_nested(const struct ofpact *a, enum ofpact_type outer_action)
{
const struct mf_field *field = ofpact_get_mf_dst(a);
if (field && field_requires_ct(field->id) && outer_action != OFPACT_CT) {
VLOG_WARN("cannot set CT fields outside of ct action");
return OFPERR_OFPBAC_BAD_SET_ARGU... | 8,643 |
90,244 | 0 | static void sender(void *send_info,
struct ipmi_smi_msg *msg)
{
struct smi_info *smi_info = send_info;
unsigned long flags;
debug_timestamp("Enqueue");
if (smi_info->run_to_completion) {
/*
* If we are running to completion, start it. Upper
* layer will call flush_messages to cl... | 8,644 |
183,018 | 1 | rx_cache_insert(netdissect_options *ndo,
const u_char *bp, const struct ip *ip, int dport)
{
struct rx_cache_entry *rxent;
const struct rx_header *rxh = (const struct rx_header *) bp;
if (ndo->ndo_snapend - bp + 1 <= (int)(sizeof(struct rx_header) + sizeof(int32_t)))
return;
rxent = &rx_cache[rx_cache_next];
if (++r... | 8,645 |
160,680 | 0 | void RenderFrameImpl::OnSelectAll() {
AutoResetMember<bool> handling_select_range(
this, &RenderFrameImpl::handling_select_range_, true);
frame_->ExecuteCommand(WebString::FromUTF8("SelectAll"));
}
| 8,646 |
5,281 | 0 | grow_hunkmax (void)
{
hunkmax *= 2;
assert (p_line && p_len && p_Char);
if ((p_line = (char **) realloc (p_line, hunkmax * sizeof (*p_line)))
&& (p_len = (size_t *) realloc (p_len, hunkmax * sizeof (*p_len)))
&& (p_Char = realloc (p_Char, hunkmax * sizeof (*p_Char))))
return true;
if (!using_pla... | 8,647 |
138,776 | 0 | void RenderFrameHostImpl::OnUpdateTitle(
const base::string16& title,
blink::WebTextDirection title_direction) {
if (frame_tree_node_->parent())
return;
if (title.length() > kMaxTitleChars) {
NOTREACHED() << "Renderer sent too many characters in title.";
return;
}
delegate_->UpdateTitle(
... | 8,648 |
30,773 | 0 | __releases(ax25_list_lock)
{
spin_unlock_bh(&ax25_list_lock);
}
| 8,649 |
4,829 | 0 | EventSuppressForWindow(WindowPtr pWin, ClientPtr client,
Mask mask, Bool *checkOptional)
{
int i, freed;
if (mask & ~PropagateMask) {
client->errorValue = mask;
return BadValue;
}
if (pWin->dontPropagate)
DontPropagateRefCnts[pWin->dontPropagate]--;
if... | 8,650 |
162,666 | 0 | bool CanonicalizeScheme(const base::char16* spec,
const Component& scheme,
CanonOutput* output,
Component* out_scheme) {
return DoScheme<base::char16, base::char16>(spec, scheme, output, out_scheme);
}
| 8,651 |
90,885 | 0 | MagickPrivate ssize_t FormatLocaleStringList(char *magick_restrict string,
const size_t length,const char *magick_restrict format,va_list operands)
{
ssize_t
n;
#if defined(MAGICKCORE_LOCALE_SUPPORT) && defined(MAGICKCORE_HAVE_VSNPRINTF_L)
{
locale_t
locale;
locale=AcquireCLocale();
if (lo... | 8,652 |
25,259 | 0 | static inline int armv7_pmnc_counter_has_overflowed(unsigned long pmnc,
enum armv7_counters counter)
{
int ret = 0;
if (counter == ARMV7_CYCLE_COUNTER)
ret = pmnc & ARMV7_FLAG_C;
else if ((counter >= ARMV7_COUNTER0) && (counter <= ARMV7_COUNTER_LAST))
ret = pmnc & ARMV7_FLAG_P(counter);
else
pr_err("CPU... | 8,653 |
6,878 | 0 | enum act_parse_ret parse_http_set_status(const char **args, int *orig_arg, struct proxy *px,
struct act_rule *rule, char **err)
{
char *error;
rule->action = ACT_CUSTOM;
rule->action_ptr = action_http_set_status;
/* Check if an argument is available */
if (!*args[*orig_ar... | 8,654 |
146,786 | 0 | HTMLLinkElement* Document::LinkManifest() const {
HTMLHeadElement* head = this->head();
if (!head)
return 0;
for (HTMLLinkElement* link_element =
Traversal<HTMLLinkElement>::FirstChild(*head);
link_element;
link_element = Traversal<HTMLLinkElement>::NextSibling(*link_element)) {
... | 8,655 |
100,652 | 0 | Browser* GetBrowserForDisposition(browser::NavigateParams* params) {
if (!params->source_contents && params->browser)
params->source_contents =
params->browser->GetSelectedTabContentsWrapper();
Profile* profile =
params->browser ? params->browser->profile() : params->profile;
switch (params->d... | 8,656 |
63,127 | 0 | static void add_bit (char bit, byte *fout) {
if ((bloc&7) == 0) {
fout[(bloc>>3)] = 0;
}
fout[(bloc>>3)] |= bit << (bloc&7);
bloc++;
}
| 8,657 |
106,813 | 0 | FloatQuad RenderBox::absoluteContentQuad() const
{
IntRect rect = contentBoxRect();
return localToAbsoluteQuad(FloatRect(rect));
}
| 8,658 |
114,105 | 0 | static Ewk_View_Smart_Class* miniBrowserViewSmartClass()
{
static Ewk_View_Smart_Class ewkViewClass = EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION("MiniBrowser_View");
return &ewkViewClass;
}
| 8,659 |
91,244 | 0 | static int handle_ipmb_get_msg_rsp(struct ipmi_smi *intf,
struct ipmi_smi_msg *msg)
{
struct ipmi_ipmb_addr ipmb_addr;
struct ipmi_recv_msg *recv_msg;
/*
* This is 11, not 10, because the response must contain a
* completion code.
*/
if (msg->rsp_size < 11) {
/* Message not big enough, just ignore ... | 8,660 |
136,816 | 0 | const AtomicString& LocalDOMWindow::name() const {
if (!IsCurrentlyDisplayedInFrame())
return g_null_atom;
return GetFrame()->Tree().GetName();
}
| 8,661 |
144,127 | 0 | png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
int bit_depth, int color_type, int compression_type, int filter_type,
int interlace_type)
{
#ifdef PNG_USE_LOCAL_ARRAYS
PNG_IHDR;
#endif
int ret;
png_byte buf[13]; /* Buffer to store the IHDR info */
png_debug(1, "in png_writ... | 8,662 |
88,038 | 0 | static const struct genl_family *genl_family_find_byid(unsigned int id)
{
return idr_find(&genl_fam_idr, id);
}
| 8,663 |
46,867 | 0 | int __camellia_setkey(struct camellia_ctx *cctx, const unsigned char *key,
unsigned int key_len, u32 *flags)
{
if (key_len != 16 && key_len != 24 && key_len != 32) {
*flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
return -EINVAL;
}
cctx->key_length = key_len;
switch (key_len) {
case 16:
camellia_setup128(key... | 8,664 |
134,105 | 0 | void InputMethodIBus::ExtractCompositionText(
const chromeos::IBusText& text,
uint32 cursor_position,
CompositionText* out_composition) const {
out_composition->Clear();
out_composition->text = UTF8ToUTF16(text.text());
if (out_composition->text.empty())
return;
std::vector<size_t> char16_offs... | 8,665 |
164,220 | 0 | void Verify_LoadCache_Far_Hit() {
EXPECT_TRUE(delegate()->loaded_cache_.get());
EXPECT_TRUE(delegate()->loaded_cache_->HasOneRef());
EXPECT_EQ(1, delegate()->loaded_cache_id_);
EXPECT_TRUE(delegate()->loaded_cache_->owning_group());
EXPECT_TRUE(delegate()->loaded_cache_->owning_group()->HasOneRef... | 8,666 |
125,191 | 0 | void RenderMessageFilter::OnCacheableMetadataAvailable(
const GURL& url,
double expected_response_time,
const std::vector<char>& data) {
if (!CheckPreparsedJsCachingEnabled())
return;
net::HttpCache* cache = request_context_->GetURLRequestContext()->
http_transaction_factory()->GetCache();
... | 8,667 |
152,468 | 0 | void RenderFrameImpl::PepperCaretPositionChanged(
PepperPluginInstanceImpl* instance) {
if (instance != focused_pepper_plugin_)
return;
GetLocalRootRenderWidget()->UpdateSelectionBounds();
}
| 8,668 |
127,943 | 0 | bool BrowserViewRenderer::IsVisible() const {
return view_visible_ && (!attached_to_window_ || window_visible_);
}
| 8,669 |
46,810 | 0 | static int sha512_sparc64_init(struct shash_desc *desc)
{
struct sha512_state *sctx = shash_desc_ctx(desc);
sctx->state[0] = SHA512_H0;
sctx->state[1] = SHA512_H1;
sctx->state[2] = SHA512_H2;
sctx->state[3] = SHA512_H3;
sctx->state[4] = SHA512_H4;
sctx->state[5] = SHA512_H5;
sctx->state[6] = SHA512_H6;
sctx->s... | 8,670 |
145,450 | 0 | void QuicStreamHost::Initialize(QuicTransportHost* transport_host,
P2PQuicStream* p2p_stream) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
DCHECK(transport_host);
DCHECK(p2p_stream);
transport_host_ = transport_host;
p2p_stream_ = p2p_stream;
p2p_stream_->SetDelegate(thi... | 8,671 |
33,803 | 0 | static int vhost_poll_wakeup(wait_queue_t *wait, unsigned mode, int sync,
void *key)
{
struct vhost_poll *poll = container_of(wait, struct vhost_poll, wait);
if (!((unsigned long)key & poll->mask))
return 0;
vhost_poll_queue(poll);
return 0;
}
| 8,672 |
100,940 | 0 | void ScriptableHandle::Unref(ScriptableHandle** handle) {
if (*handle != NULL) {
(*handle)->Unref();
*handle = NULL;
}
}
| 8,673 |
86,401 | 0 | static int is_vma_resv_set(struct vm_area_struct *vma, unsigned long flag)
{
VM_BUG_ON_VMA(!is_vm_hugetlb_page(vma), vma);
return (get_vma_private_data(vma) & flag) != 0;
}
| 8,674 |
56,663 | 0 | int ext4_force_commit(struct super_block *sb)
{
journal_t *journal;
if (sb->s_flags & MS_RDONLY)
return 0;
journal = EXT4_SB(sb)->s_journal;
return ext4_journal_force_commit(journal);
}
| 8,675 |
161,944 | 0 | void PrintRenderFrameHelper::PrepareFrameForPreviewDocument() {
reset_prep_frame_view_ = false;
if (!print_pages_params_ || CheckForCancel()) {
DidFinishPrinting(FAIL_PREVIEW);
return;
}
if (prep_frame_view_ && prep_frame_view_->IsLoadingSelection()) {
reset_prep_frame_view_ = true;
return;
... | 8,676 |
33,943 | 0 | void mon_st_callback(stonith_t *st, stonith_event_t *e)
{
char *desc = g_strdup_printf(
"Operation %s requested by %s for peer %s: %s (ref=%s)",
e->operation, e->origin, e->target, pcmk_strerror(e->result), e->id);
if (snmp_target) {
send_snmp_trap(e->target, NULL, e->operation, pcmk_o... | 8,677 |
160,921 | 0 | DOMWindow::~DOMWindow() {
DCHECK(!frame_);
}
| 8,678 |
79,230 | 0 | void StreamTcpStreamCleanup(TcpStream *stream)
{
if (stream != NULL) {
StreamTcpSackFreeList(stream);
StreamTcpReturnStreamSegments(stream);
StreamingBufferClear(&stream->sb);
}
}
| 8,679 |
64,507 | 0 | MagickExport MagickBooleanType CopyImagePixels(Image *image,
const Image *source_image,const RectangleInfo *geometry,
const OffsetInfo *offset,ExceptionInfo *exception)
{
#define CopyImageTag "Copy/Image"
CacheView
*image_view,
*source_view;
MagickBooleanType
status;
MagickOffsetType
progr... | 8,680 |
178,946 | 1 | static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev)
{
unsigned long pmnc;
struct perf_sample_data data;
struct cpu_hw_events *cpuc;
struct pt_regs *regs;
int idx;
/*
* Get and reset the IRQ flags
*/
pmnc = armv7_pmnc_getreset_flags();
/*
* Did an overflow occur?
*/
if (!armv7_pmnc_has_overflowed(pmnc))
ret... | 8,681 |
49,154 | 0 | static bool __tpacket_has_room(struct packet_sock *po, int pow_off)
{
int idx, len;
len = po->rx_ring.frame_max + 1;
idx = po->rx_ring.head;
if (pow_off)
idx += len >> pow_off;
if (idx >= len)
idx -= len;
return packet_lookup_frame(po, &po->rx_ring, idx, TP_STATUS_KERNEL);
}
| 8,682 |
180,331 | 1 | dissect_spoolss_keybuffer(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, dcerpc_info *di, guint8 *drep)
{
guint32 size;
int end_offset;
if (di->conformant_run)
return offset;
/* Dissect size and data */
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
hf_keybuffer_size, &size);
end_... | 8,683 |
145,376 | 0 | void SaveImpl(const char* name,
v8::Local<v8::Value> value,
v8::Local<v8::Context> context) {
CHECK(!value.IsEmpty() && value->IsObject()) << name;
context->Global()
->SetPrivate(context, MakeKey(name, context->GetIsolate()), value)
.FromJust();
}
| 8,684 |
19,445 | 0 | static int efx_ethtool_fill_self_tests(struct efx_nic *efx,
struct efx_self_tests *tests,
struct ethtool_string *strings,
u64 *data)
{
struct efx_channel *channel;
unsigned int n = 0, i;
enum efx_loopback_mode mode;
efx_fill_test(n++, strings, data, &tests->phy_alive,
"phy"... | 8,685 |
118,897 | 0 | base::TimeTicks WebContentsImpl::GetLastSelectedTime() const {
return last_selected_time_;
}
| 8,686 |
73,341 | 0 | static int ass_detect_change(ASS_Renderer *priv)
{
ASS_Image *img, *img2;
int diff;
if (priv->state.has_clips)
return 2;
img = priv->prev_images_root;
img2 = priv->images_root;
diff = 0;
while (img && diff < 2) {
ASS_Image *next, *next2;
next = img->next;
if... | 8,687 |
3,069 | 0 | static int devicenrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i, limit, code;
PS_colour_space_t *cspace;
ref altspace;
code = array_get(imemory, space, 1, &altspace);
if (code < 0)
return code;
code = get_space_object(i_ctx_p, &altspace, &cspace);
if (code < 0)
... | 8,688 |
94,498 | 0 | static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp)
{
DECLARE_WAITQUEUE(wait, current);
struct rfcomm_dev *dev;
struct rfcomm_dlc *dlc;
unsigned long flags;
int err, id;
id = tty->index;
BT_DBG("tty %p id %d", tty, id);
/* We don't leak this refcount. For reasons which are not entirely
... | 8,689 |
55,499 | 0 | cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)
{
struct rq *rq = cpu_rq(cpu);
struct sched_domain *tmp;
/* Remove the sched domains which do not contribute to scheduling. */
for (tmp = sd; tmp; ) {
struct sched_domain *parent = tmp->parent;
if (!parent)
break;
if (sd_parent_d... | 8,690 |
32,485 | 0 | static int fiber_autoneg(struct tg3 *tp, u32 *txflags, u32 *rxflags)
{
int res = 0;
struct tg3_fiber_aneginfo aninfo;
int status = ANEG_FAILED;
unsigned int tick;
u32 tmp;
tw32_f(MAC_TX_AUTO_NEG, 0);
tmp = tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK;
tw32_f(MAC_MODE, tmp | MAC_MODE_PORT_MODE_GMII);
udelay(40);
... | 8,691 |
161,825 | 0 | bool PlatformSensorWin::CheckSensorConfiguration(
const PlatformSensorConfiguration& configuration) {
DCHECK(task_runner_->BelongsToCurrentThread());
double minimal_reporting_interval_ms =
sensor_reader_->GetMinimalReportingIntervalMs();
if (minimal_reporting_interval_ms == 0)
return true;
double ... | 8,692 |
128,931 | 0 | void doWriteAlgorithmId(blink::WebCryptoAlgorithmId id)
{
switch (id) {
case blink::WebCryptoAlgorithmIdAesCbc:
return doWriteUint32(AesCbcTag);
case blink::WebCryptoAlgorithmIdHmac:
return doWriteUint32(HmacTag);
case blink::WebCryptoAlgorithmIdRsaSsaPkcs... | 8,693 |
100,861 | 0 | int ClearAppCacheFunction::GetRemovalMask() const {
return BrowsingDataRemover::REMOVE_APPCACHE;
}
| 8,694 |
109,279 | 0 | static bool decodeBuffer(const char* buffer, unsigned size, const String& textEncodingName, String* result)
{
if (buffer) {
WTF::TextEncoding encoding(textEncodingName);
if (!encoding.isValid())
encoding = WindowsLatin1Encoding();
*result = encoding.decode(buffer, size);
... | 8,695 |
83,521 | 0 | NSC_CONTEXT* nsc_context_new(void)
{
NSC_CONTEXT* context;
context = (NSC_CONTEXT*) calloc(1, sizeof(NSC_CONTEXT));
if (!context)
return NULL;
context->priv = (NSC_CONTEXT_PRIV*) calloc(1, sizeof(NSC_CONTEXT_PRIV));
if (!context->priv)
goto error;
context->priv->log = WLog_Get("com.freerdp.codec.nsc");
W... | 8,696 |
48,438 | 0 | Strsubstr(Str s, int beg, int len)
{
Str new_s;
int i;
STR_LENGTH_CHECK(s);
new_s = Strnew();
if (beg >= s->length)
return new_s;
for (i = 0; i < len && beg + i < s->length; i++)
Strcat_char(new_s, s->ptr[beg + i]);
return new_s;
}
| 8,697 |
128,620 | 0 | bool SkipConditionalFeatureEntry(const FeatureEntry& entry) {
version_info::Channel channel = chrome::GetChannel();
#if defined(OS_ANDROID)
if (!strcmp("enable-data-reduction-proxy-dev", entry.internal_name) &&
channel != version_info::Channel::BETA &&
channel != version_info::Channel::DEV) {
return... | 8,698 |
8,167 | 0 | void Gfx::opShFill(Object args[], int numArgs) {
GfxShading *shading;
GfxPath *savedPath;
double xMin, yMin, xMax, yMax;
if (!(shading = res->lookupShading(args[0].getName(), this))) {
return;
}
savedPath = state->getPath()->copy();
saveState();
if (shading->getHasBBox()) {
shading->getBBox(&... | 8,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.