unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
91,093 | 0 | int peernet2id_alloc(struct net *net, struct net *peer)
{
bool alloc = false, alive = false;
int id;
if (refcount_read(&net->count) == 0)
return NETNSA_NSID_NOT_ASSIGNED;
spin_lock_bh(&net->nsid_lock);
/*
* When peer is obtained from RCU lists, we may race with
* its cleanup. Check whether it's alive, and t... | 10,900 |
144,896 | 0 | void EmbedCallback(bool result) {
if (!result)
DVLOG(1) << "embed failed";
}
| 10,901 |
141,816 | 0 | int64_t MetricsLog::GetCurrentTime() {
return (base::TimeTicks::Now() - base::TimeTicks()).InSeconds();
}
| 10,902 |
163,591 | 0 | htmlDoRead(htmlParserCtxtPtr ctxt, const char *URL, const char *encoding,
int options, int reuse)
{
htmlDocPtr ret;
htmlCtxtUseOptions(ctxt, options);
ctxt->html = 1;
if (encoding != NULL) {
xmlCharEncodingHandlerPtr hdlr;
hdlr = xmlFindCharEncodingHandler(encoding);
if (hdlr != NU... | 10,903 |
187,648 | 1 | image_transform_png_set_expand_16_add(image_transform *this,
PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth)
{
UNUSED(colour_type)
this->next = *that;
*that = this;
/* expand_16 does something unless the bit depth is already 16. */
return bit_depth < 16;
}
| 10,904 |
81,893 | 0 | int wc_ecc_get_oid(word32 oidSum, const byte** oid, word32* oidSz)
{
int x;
if (oidSum == 0) {
return BAD_FUNC_ARG;
}
/* find matching OID sum (based on encoded value) */
for (x = 0; ecc_sets[x].size != 0; x++) {
if (ecc_sets[x].oidSum == oidSum) {
int ret = 0;
... | 10,905 |
134,962 | 0 | bool mounted() const { return drivefs_has_mounted_ && !mount_path_.empty(); }
| 10,906 |
19,879 | 0 | static int nfs4_call_sync_sequence(struct rpc_clnt *clnt,
struct nfs_server *server,
struct rpc_message *msg,
struct nfs4_sequence_args *args,
struct nfs4_sequence_res *res,
int privileged)
{
int ret;
struct rpc_task *task;
struct nfs41_call_sync_data data = {
.seq_server = serve... | 10,907 |
60,639 | 0 | int crypto_register_rngs(struct rng_alg *algs, int count)
{
int i, ret;
for (i = 0; i < count; i++) {
ret = crypto_register_rng(algs + i);
if (ret)
goto err;
}
return 0;
err:
for (--i; i >= 0; --i)
crypto_unregister_rng(algs + i);
return ret;
}
| 10,908 |
154,702 | 0 | error::Error GLES2DecoderPassthroughImpl::DoGetRequestableExtensionsCHROMIUM(
const char** extensions) {
*extensions = reinterpret_cast<const char*>(
api()->glGetStringFn(GL_REQUESTABLE_EXTENSIONS_ANGLE));
return error::kNoError;
}
| 10,909 |
104,191 | 0 | bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) {
switch (cap) {
case GL_SCISSOR_TEST:
enable_scissor_test_ = enabled;
return true;
case GL_DEPTH_TEST: {
if (enable_depth_test_ != enabled) {
enable_depth_test_ = enabled;
state_dirty_ = true;
}
... | 10,910 |
130,204 | 0 | String base64Encode(const char* data, unsigned length, Base64EncodePolicy policy)
{
Vector<char> result;
base64Encode(data, length, result, policy);
return String(result.data(), result.size());
}
| 10,911 |
31,282 | 0 | static int blkcipher_walk_next(struct blkcipher_desc *desc,
struct blkcipher_walk *walk)
{
struct crypto_blkcipher *tfm = desc->tfm;
unsigned int alignmask = crypto_blkcipher_alignmask(tfm);
unsigned int bsize;
unsigned int n;
int err;
n = walk->total;
if (unlikely(n < crypto_blkcipher_blocksize(tfm))... | 10,912 |
6,985 | 0 | tt_face_get_name( TT_Face face,
FT_UShort nameid,
FT_String** name )
{
FT_Memory memory = face->root.memory;
FT_Error error = FT_Err_Ok;
FT_String* result = NULL;
FT_UShort n;
TT_NameEntryRec* rec;
FT_Int ... | 10,913 |
109,877 | 0 | String Document::webkitVisibilityState() const
{
return pageVisibilityStateString(visibilityState());
}
| 10,914 |
68,417 | 0 | static int perf_tp_filter_match(struct perf_event *event,
struct perf_sample_data *data)
{
void *record = data->raw->frag.data;
/* only top level events have filters set */
if (event->parent)
event = event->parent;
if (likely(!event->filter) || filter_match_preds(event->filter, record))
return 1;
return ... | 10,915 |
116,483 | 0 | static Value* CreateDebuggeeId(int tab_id) {
DictionaryValue* debuggeeId = new DictionaryValue();
debuggeeId->SetInteger(keys::kTabIdKey, tab_id);
return debuggeeId;
}
| 10,916 |
38,061 | 0 | cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
uint32_t offs, cdf_property_info_t **info, size_t *count, size_t *maxcount)
{
const cdf_section_header_t *shp;
cdf_section_header_t sh;
const uint8_t *p, *q, *e;
int16_t s16;
int32_t s32;
uint32_t u32;
int64_t s64;
uint64_t u64;
cdf_tim... | 10,917 |
154,488 | 0 | error::Error GLES2DecoderPassthroughImpl::PatchGetNumericResults(GLenum pname,
GLsizei length,
T* params) {
if (length < 1) {
return error::kNoError;
}
switch (pname) {
case G... | 10,918 |
179,720 | 1 | static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
u32 val, ktime_t *abs_time, u32 bitset,
u32 __user *uaddr2)
{
struct hrtimer_sleeper timeout, *to = NULL;
struct rt_mutex_waiter rt_waiter;
struct rt_mutex *pi_mutex = NULL;
struct futex_hash_bucket *hb;
union futex_key key2 = FUTEX_... | 10,919 |
113,992 | 0 | void RecheckGDataOperations() {
Profile* profile = ProfileManager::GetDefaultProfile();
if (!gdata::util::IsGDataAvailable(profile))
return;
GDataSystemService* system_service =
GDataSystemServiceFactory::FindForProfile(profile);
if (!system_service || !system_service->file_system())
... | 10,920 |
60,086 | 0 | static Sdb *store_versioninfo_gnu_versym(ELFOBJ *bin, Elf_(Shdr) *shdr, int sz) {
int i;
const ut64 num_entries = sz / sizeof (Elf_(Versym));
const char *section_name = "";
const char *link_section_name = "";
Elf_(Shdr) *link_shdr = NULL;
Sdb *sdb = sdb_new0();
if (!sdb) {
return NULL;
}
if (!bin->version_in... | 10,921 |
156,394 | 0 | std::string EncodeImage(const gfx::Image& image,
const std::string& format,
int quality) {
DCHECK(!image.IsEmpty());
scoped_refptr<base::RefCountedMemory> data;
if (format == kPng) {
data = image.As1xPNGBytes();
} else if (format == kJpeg) {
scoped_refptr... | 10,922 |
12,145 | 0 | const char* XMLRPC_GetResponseFaultString (XMLRPC_REQUEST response) {
return XMLRPC_GetValueFaultString( XMLRPC_RequestGetData(response) );
}
| 10,923 |
47,808 | 0 | int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
u_int64_t mask)
{
struct snd_pcm_hw_constraints *constrs = &runtime->hw_constraints;
struct snd_mask *maskp = constrs_mask(constrs, var);
maskp->bits[0] &= (u_int32_t)mask;
maskp->bits[1] &= (u_int32_t)(mask >> 32);
mems... | 10,924 |
81,924 | 0 | static int wc_ecc_shared_secret_gen_async(ecc_key* private_key,
ecc_point* point, byte* out, word32 *outlen,
ecc_curve_spec* curve)
{
int err;
#if defined(HAVE_CAVIUM_V) || defined(HAVE_INTEL_QA)
#ifdef HAVE_CAVIUM_V
/* verify the curve is supported by hardware */
if (NitroxEccIsCur... | 10,925 |
180,887 | 1 | process_open(u_int32_t id)
{
u_int32_t pflags;
Attrib a;
char *name;
int r, handle, fd, flags, mode, status = SSH2_FX_FAILURE;
if ((r = sshbuf_get_cstring(iqueue, &name, NULL)) != 0 ||
(r = sshbuf_get_u32(iqueue, &pflags)) != 0 || /* portable flags */
(r = decode_attrib(iqueue, &a)) != 0)
fatal("%s: buffer error: %s",... | 10,926 |
98,223 | 0 | LayerTilerChromium::~LayerTilerChromium()
{
reset();
}
| 10,927 |
34,376 | 0 | static struct extent_map *create_pinned_em(struct inode *inode, u64 start,
u64 len, u64 orig_start,
u64 block_start, u64 block_len,
u64 orig_block_len, int type)
{
struct extent_map_tree *em_tree;
struct extent_map *em;
struct btrfs_root *root = BTRFS_I(inode)->root;
int ret;
em_tree = &BT... | 10,928 |
81,907 | 0 | int wc_ecc_make_key(WC_RNG* rng, int keysize, ecc_key* key)
{
return wc_ecc_make_key_ex(rng, keysize, key, ECC_CURVE_DEF);
}
| 10,929 |
144,483 | 0 | void WebContentsImpl::DidNavigateMainFramePreCommit(
bool navigation_is_within_page) {
if (navigation_is_within_page) {
return;
}
if (IsFullscreenForCurrentTab(GetRenderViewHost()->GetWidget()))
ExitFullscreen(false);
DCHECK(!IsFullscreenForCurrentTab(GetRenderViewHost()->GetWidget()));
}
| 10,930 |
26,019 | 0 | static u64 perf_calculate_period(struct perf_event *event, u64 nsec, u64 count)
{
u64 frequency = event->attr.sample_freq;
u64 sec = NSEC_PER_SEC;
u64 divisor, dividend;
int count_fls, nsec_fls, frequency_fls, sec_fls;
count_fls = fls64(count);
nsec_fls = fls64(nsec);
frequency_fls = fls64(frequency);
sec_fls... | 10,931 |
126,797 | 0 | void BrowserView::HideDevToolsContainer() {
devtools_focus_tracker_->FocusLastFocusedExternalView();
devtools_container_->SetVisible(false);
contents_split_->InvalidateLayout();
Layout();
}
| 10,932 |
170,689 | 0 | static EAS_RESULT Parse_cdl (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 size, EAS_U32 *pValue)
{
EAS_RESULT result;
EAS_U32 stack[CDL_STACK_SIZE];
EAS_U16 opcode;
EAS_INT stackPtr;
EAS_U32 x, y;
DLSID dlsid;
stackPtr = -1;
*pValue = 0;
x = 0;
while (size)
{
/* read the opcode */
if (... | 10,933 |
79,467 | 0 | void nntp_delete_group_cache(struct NntpData *nntp_data)
{
if (!nntp_data || !nntp_data->nserv || !nntp_data->nserv->cacheable)
return;
#ifdef USE_HCACHE
char file[PATH_MAX];
nntp_hcache_namer(nntp_data->group, file, sizeof(file));
cache_expand(file, sizeof(file), &nntp_data->nserv->conn->account, file);
... | 10,934 |
65,819 | 0 | nfsd4_encode_open_downgrade(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_open_downgrade *od)
{
struct xdr_stream *xdr = &resp->xdr;
if (!nfserr)
nfserr = nfsd4_encode_stateid(xdr, &od->od_stateid);
return nfserr;
}
| 10,935 |
6,275 | 0 | PHP_FUNCTION(idate)
{
char *format;
int format_len;
long ts = 0;
int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &format, &format_len, &ts) == FAILURE) {
RETURN_FALSE;
}
if (format_len != 1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "idate format is one char");
RETURN_F... | 10,936 |
104,308 | 0 | static void FixupHost(const std::string& text,
const url_parse::Component& part,
bool has_scheme,
const std::string& desired_tld,
std::string* url) {
if (!part.is_valid())
return;
std::string domain(text, part.begin, part.l... | 10,937 |
91,838 | 0 | int index_directory(char *dir, char *title)
{
struct dirent *dirbuf;
int numdir;
struct dirent **array;
struct stat statbuf;
char http_filename[MAX_FILE_LENGTH * 3];
char html_filename[MAX_FILE_LENGTH * 6];
char escaped_filename[MAX_FILE_LENGTH * 18]; /* *both* http and html escape */
in... | 10,938 |
144,234 | 0 | LoginBigUserView* LockContentsView::TestApi::opt_secondary_big_view() const {
return view_->opt_secondary_big_view_;
}
| 10,939 |
102,716 | 0 | void CCThreadProxy::initializeLayerRendererOnCCThread(GraphicsContext3D* contextPtr, CCCompletionEvent* completion, bool* initializeSucceeded, LayerRendererCapabilities* capabilities, int* compositorIdentifier)
{
TRACE_EVENT("CCThreadProxy::initializeLayerRendererOnCCThread", this, 0);
ASSERT(isImplThread());
... | 10,940 |
128,228 | 0 | bool FrameView::contentsInCompositedLayer() const
{
RenderView* renderView = this->renderView();
if (renderView && renderView->compositingState() == PaintsIntoOwnBacking) {
GraphicsLayer* layer = renderView->layer()->compositedLayerMapping()->mainGraphicsLayer();
if (layer && layer->drawsContent... | 10,941 |
94,440 | 0 | __releases(ptl)
{
struct page *old_page, *new_page = NULL;
pte_t entry;
int ret = 0;
int page_mkwrite = 0;
struct page *dirty_page = NULL;
unsigned long mmun_start = 0; /* For mmu_notifiers */
unsigned long mmun_end = 0; /* For mmu_notifiers */
old_page = vm_normal_page(vma, address, orig_pte);
if (!old_page... | 10,942 |
30,578 | 0 | static int afiucv_hs_callback_synfin(struct sock *sk, struct sk_buff *skb)
{
struct iucv_sock *iucv = iucv_sk(sk);
if (!iucv)
goto out;
if (sk->sk_state != IUCV_BOUND)
goto out;
bh_lock_sock(sk);
sk->sk_state = IUCV_DISCONN;
sk->sk_state_change(sk);
bh_unlock_sock(sk);
out:
kfree_skb(skb);
return NET_RX_S... | 10,943 |
126,925 | 0 | void BrowserTabStripController::StartHighlightTabsForCommand(
TabStripModel::ContextMenuCommand command_id,
BaseTab* tab) {
if (command_id == TabStripModel::CommandCloseOtherTabs ||
command_id == TabStripModel::CommandCloseTabsToRight) {
int model_index = tabstrip_->GetModelIndexOfBaseTab(tab);
... | 10,944 |
78,209 | 0 | authentic_select_aid(struct sc_card *card, unsigned char *aid, size_t aid_len,
unsigned char *out, size_t *out_len)
{
struct sc_apdu apdu;
unsigned char apdu_resp[SC_MAX_APDU_BUFFER_SIZE];
int rv;
/* Select Card Manager (to deselect previously selected application) */
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_... | 10,945 |
90,696 | 0 | static int empty(Renode *node)
{
if (!node) return 1;
switch (node->type) {
default: return 1;
case P_CAT: return empty(node->x) && empty(node->y);
case P_ALT: return empty(node->x) || empty(node->y);
case P_REP: return empty(node->x) || node->m == 0;
case P_PAR: return empty(node->x);
case P_REF: return empty(... | 10,946 |
59,957 | 0 | static int build_audio_procunit(struct mixer_build *state, int unitid,
void *raw_desc, struct procunit_info *list,
char *name)
{
struct uac_processing_unit_descriptor *desc = raw_desc;
int num_ins = desc->bNrInPins;
struct usb_mixer_elem_info *cval;
struct snd_kcontrol *kctl;
int i, err, nameid, type, len;... | 10,947 |
69,806 | 0 | node_ipv6_dir_preferred(const node_t *node)
{
const or_options_t *options = get_options();
tor_addr_port_t ipv4_addr;
node_assert_ok(node);
/* node->ipv6_preferred is set from fascist_firewall_prefer_ipv6_orport(),
* so we can't use it to determine DirPort IPv6 preference.
* This means that bridge client... | 10,948 |
127,534 | 0 | void LayerWebKitThread::setFrame(const FloatRect& rect)
{
if (rect == m_frame)
return;
m_frame = rect;
setNeedsDisplay();
}
| 10,949 |
154,675 | 0 | error::Error GLES2DecoderPassthroughImpl::DoGetActiveUniformBlockiv(
GLuint program,
GLuint index,
GLenum pname,
GLsizei bufSize,
GLsizei* length,
GLint* params) {
api()->glGetActiveUniformBlockivRobustANGLEFn(
GetProgramServiceID(program, resources_), index, pname, bufSize, length,
... | 10,950 |
172,122 | 0 | static uint16_t transmit_data(serial_data_type_t type, uint8_t *data, uint16_t length) {
if (type == DATA_TYPE_ACL) {
return transmit_data_on(uart_fds[CH_ACL_OUT], data, length);
} else if (type == DATA_TYPE_COMMAND) {
return transmit_data_on(uart_fds[CH_CMD], data, length);
}
LOG_ERROR("%s invalid data type: %... | 10,951 |
83,477 | 0 | void __init idt_setup_early_traps(void)
{
idt_setup_from_table(idt_table, early_idts, ARRAY_SIZE(early_idts),
true);
load_idt(&idt_descr);
}
| 10,952 |
174,950 | 0 | void CameraClient::handleGenericData(int32_t msgType,
const sp<IMemory>& dataPtr, camera_frame_metadata_t *metadata) {
sp<ICameraClient> c = mRemoteCallback;
mLock.unlock();
if (c != 0) {
c->dataCallback(msgType, dataPtr, metadata);
}
}
| 10,953 |
31,047 | 0 | static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
{
struct net *net = sock_net(skb->sk);
struct ifinfomsg *ifm;
char ifname[IFNAMSIZ];
struct nlattr *tb[IFLA_MAX+1];
struct net_device *dev = NULL;
struct sk_buff *nskb;
int err;
u32 ext_filter_mask = 0;
err = nlmsg_parse(nlh, sizeof... | 10,954 |
79,507 | 0 | static int nntp_mbox_sync(struct Context *ctx, int *index_hint)
{
struct NntpData *nntp_data = ctx->data;
int rc;
#ifdef USE_HCACHE
header_cache_t *hc = NULL;
#endif
/* check for new articles */
nntp_data->nserv->check_time = 0;
rc = check_mailbox(ctx);
if (rc)
return rc;
#ifdef USE_HCACHE
nntp_da... | 10,955 |
38,110 | 0 | static int kye_probe(struct hid_device *hdev, const struct hid_device_id *id)
{
int ret;
ret = hid_parse(hdev);
if (ret) {
hid_err(hdev, "parse failed\n");
goto err;
}
ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
if (ret) {
hid_err(hdev, "hw start failed\n");
goto err;
}
switch (id->product) {
cas... | 10,956 |
175,959 | 0 | void smp_send_pair_rsp(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
SMP_TRACE_DEBUG("%s", __func__);
p_cb->local_i_key &= p_cb->peer_i_key;
p_cb->local_r_key &= p_cb->peer_r_key;
if (smp_send_cmd(SMP_OPCODE_PAIRING_RSP, p_cb)) {
if (p_cb->selected_association_model == SMP_MODEL_SEC_CONN_OOB)
smp_use_oob_priv... | 10,957 |
75,389 | 0 | static int opfcmov(RAsm *a, ut8 *data, const Opcode *op) {
int l = 0;
char* fcmov = op->mnemonic + strlen("fcmov");
switch (op->operands_count) {
case 2:
if ( op->operands[0].type & OT_FPUREG & ~OT_REGALL && op->operands[0].reg == 0 &&
op->operands[1].type & OT_FPUREG & ~OT_REGALL ) {
if ( !strcmp( fcmo... | 10,958 |
22,042 | 0 | raptor_rss_parse_chunk(raptor_parser* rdf_parser,
const unsigned char *s, size_t len,
int is_end)
{
raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context;
if(rdf_parser->failed)
return 1;
raptor_sax2_parse_chunk(rss_parser->sax2, s, len, is_... | 10,959 |
67,465 | 0 | const char *vfs_get_link(struct dentry *dentry, struct delayed_call *done)
{
const char *res = ERR_PTR(-EINVAL);
struct inode *inode = d_inode(dentry);
if (d_is_symlink(dentry)) {
res = ERR_PTR(security_inode_readlink(dentry));
if (!res)
res = inode->i_op->get_link(dentry, inode, done);
}
return res;
}
| 10,960 |
50,820 | 0 | isoent_clone_tree(struct archive_write *a, struct isoent **nroot,
struct isoent *root)
{
struct isoent *np, *xroot, *newent;
np = root;
xroot = NULL;
do {
newent = isoent_clone(np);
if (newent == NULL) {
archive_set_error(&a->archive, ENOMEM,
"Can't allocate memory");
return (ARCHIVE_FATAL);
... | 10,961 |
159,534 | 0 | bool WebGLImageConversion::PackImageData(
Image* image,
const void* pixels,
GLenum format,
GLenum type,
bool flip_y,
AlphaOp alpha_op,
DataFormat source_format,
unsigned source_image_width,
unsigned source_image_height,
const IntRect& source_image_sub_rectangle,
int depth,
... | 10,962 |
52,572 | 0 | static int is_idle_stream_id(h2o_http2_conn_t *conn, uint32_t stream_id)
{
return (h2o_http2_stream_is_push(stream_id) ? conn->push_stream_ids.max_open : conn->pull_stream_ids.max_open) < stream_id;
}
| 10,963 |
105,325 | 0 | AutofillManager::AutofillManager(TabContentsWrapper* tab_contents,
PersonalDataManager* personal_data)
: TabContentsObserver(tab_contents->tab_contents()),
tab_contents_wrapper_(tab_contents),
personal_data_(personal_data),
download_manager_(NULL),
disable_do... | 10,964 |
163,970 | 0 | std::string PaymentRequestState::GetAuthenticatedEmail() const {
return payment_request_delegate_->GetAuthenticatedEmail();
}
| 10,965 |
93,271 | 0 | static ssize_t tun_chr_write_iter(struct kiocb *iocb, struct iov_iter *from)
{
struct file *file = iocb->ki_filp;
struct tun_struct *tun = tun_get(file);
struct tun_file *tfile = file->private_data;
ssize_t result;
if (!tun)
return -EBADFD;
result = tun_get_user(tun, tfile, NULL, from,
file->f_flags ... | 10,966 |
157,524 | 0 | TestDataReductionProxyConfig::GetInFlightWarmupProxyDetails() const {
if (in_flight_warmup_proxy_details_)
return in_flight_warmup_proxy_details_;
return DataReductionProxyConfig::GetInFlightWarmupProxyDetails();
}
| 10,967 |
119,695 | 0 | void RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread(ShapeInsideInfo*& shapeInsideInfo, LineLayoutState& layoutState)
{
ASSERT(layoutState.flowThread());
LayoutUnit lineHeight = this->lineHeight(layoutState.lineInfo().isFirstLine(), isHorizontalWritingMode() ? HorizontalLine : VerticalLine, Posit... | 10,968 |
141,140 | 0 | static bool IsValidElementName(Document* document, const String& name) {
bool is_valid_dom_name = Document::IsValidName(name);
bool is_valid_html_name = IsValidElementNamePerHTMLParser(name);
if (UNLIKELY(is_valid_html_name != is_valid_dom_name)) {
UseCounter::Count(document,
is_valid_do... | 10,969 |
138,523 | 0 | void WorkerThread::terminateAndWait()
{
stop();
m_terminationEvent->wait();
}
| 10,970 |
151,244 | 0 | void InspectorPageAgent::FrameStoppedLoading(LocalFrame* frame) {
GetFrontend()->frameStoppedLoading(IdentifiersFactory::FrameId(frame));
}
| 10,971 |
40,558 | 0 | static struct sock *netlink_seq_socket_idx(struct seq_file *seq, loff_t pos)
{
struct nl_seq_iter *iter = seq->private;
int i, j;
struct sock *s;
loff_t off = 0;
for (i = 0; i < MAX_LINKS; i++) {
struct nl_portid_hash *hash = &nl_table[i].hash;
for (j = 0; j <= hash->mask; j++) {
sk_for_each(s, &hash->tab... | 10,972 |
91,368 | 0 | static MagickBooleanType ReadPSDChannelPixels(Image *image,
const size_t channels,const ssize_t row,const ssize_t type,
const unsigned char *pixels,ExceptionInfo *exception)
{
Quantum
pixel;
register const unsigned char
*p;
register Quantum
*q;
register ssize_t
x;
size_t
packet_siz... | 10,973 |
138,520 | 0 | void WorkerThread::stop()
{
SafePointScope safePointScope(ThreadState::HeapPointersOnStack);
stopInternal();
}
| 10,974 |
127,382 | 0 | void StyleResolver::initWatchedSelectorRules(const Vector<RefPtr<StyleRule> >& watchedSelectors)
{
if (!watchedSelectors.size())
return;
m_watchedSelectorsRules = RuleSet::create();
for (unsigned i = 0; i < watchedSelectors.size(); ++i)
m_watchedSelectorsRules->addStyleRule(watchedSelectors[... | 10,975 |
8,860 | 0 | static inline void vrend_fill_shader_key(struct vrend_context *ctx,
struct vrend_shader_key *key)
{
if (vrend_state.use_core_profile == true) {
int i;
bool add_alpha_test = true;
key->cbufs_are_a8_bitmask = 0;
for (i = 0; i < ctx->sub->nr_cbufs; i++) {... | 10,976 |
137,691 | 0 | void PrintPreviewMessageHandler::OnInvalidPrinterSettings(int document_cookie) {
StopWorker(document_cookie);
PrintPreviewUI* print_preview_ui = GetPrintPreviewUI();
if (!print_preview_ui)
return;
print_preview_ui->OnInvalidPrinterSettings();
}
| 10,977 |
80,164 | 0 | void hdlr_del(GF_Box *s)
{
GF_HandlerBox *ptr = (GF_HandlerBox *)s;
if (ptr == NULL) return;
if (ptr->nameUTF8) gf_free(ptr->nameUTF8);
gf_free(ptr);
}
| 10,978 |
95,949 | 0 | void CL_Clientinfo_f( void ) {
Com_Printf( "--------- Client Information ---------\n" );
Com_Printf( "state: %i\n", clc.state );
Com_Printf( "Server: %s\n", clc.servername );
Com_Printf ("User info settings:\n");
Info_Print( Cvar_InfoString( CVAR_USERINFO ) );
Com_Printf( "--------------------------------------\n... | 10,979 |
98,613 | 0 | void ThumbnailGenerator::EraseHostFromShownList(RenderWidgetHost* widget) {
std::vector<RenderWidgetHost*>::iterator found =
std::find(shown_hosts_.begin(), shown_hosts_.end(), widget);
if (found != shown_hosts_.end())
shown_hosts_.erase(found);
}
| 10,980 |
127,960 | 0 | void BrowserViewRenderer::SetDipScale(float dip_scale) {
dip_scale_ = dip_scale;
CHECK_GT(dip_scale_, 0.f);
}
| 10,981 |
148,622 | 0 | void SkiaOutputSurfaceImpl::AddContextLostObserver(
ContextLostObserver* observer) {
observers_.AddObserver(observer);
}
| 10,982 |
21,538 | 0 | SYSCALL_DEFINE4(prlimit64, pid_t, pid, unsigned int, resource,
const struct rlimit64 __user *, new_rlim,
struct rlimit64 __user *, old_rlim)
{
struct rlimit64 old64, new64;
struct rlimit old, new;
struct task_struct *tsk;
int ret;
if (new_rlim) {
if (copy_from_user(&new64, new_rlim, sizeof(new64)))
retur... | 10,983 |
134,129 | 0 | void InputMethodIMM32::OnDidChangeFocusedClient(TextInputClient* focused_before,
TextInputClient* focused) {
if (IsWindowFocused(focused)) {
OnTextInputTypeChanged(focused);
UpdateIMEState();
OnCaretBoundsChanged(focused);
}
}
| 10,984 |
157,337 | 0 | void WebMediaPlayerImpl::SuspendForRemote() {
video_decode_stats_reporter_.reset();
if (pipeline_controller_.IsPipelineSuspended() &&
!IsNewRemotePlaybackPipelineEnabled()) {
scoped_refptr<VideoFrame> frame = cast_impl_.GetCastingBanner();
if (frame)
compositor_->PaintSingleFrame(frame);
}
... | 10,985 |
75,828 | 0 | lvs_flush_handler(__attribute__((unused)) vector_t *strvec)
{
global_data->lvs_flush = true;
}
| 10,986 |
89,398 | 0 | int trace_list_calls(void *buff, size_t buff_size, size_t *needed)
{
struct trace_output_hdr *output_hdr = NULL;
void *end, *ptr = buff;
size_t rec, upto;
size_t count;
end = buff ? buff + buff_size : NULL;
/* Place some header information */
if (ptr + sizeof(struct trace_output_hdr) < end)
output_hdr = p... | 10,987 |
38,354 | 0 | static struct cm_timewait_info * cm_create_timewait_info(__be32 local_id)
{
struct cm_timewait_info *timewait_info;
timewait_info = kzalloc(sizeof *timewait_info, GFP_KERNEL);
if (!timewait_info)
return ERR_PTR(-ENOMEM);
timewait_info->work.local_id = local_id;
INIT_DELAYED_WORK(&timewait_info->work.work, cm_w... | 10,988 |
103,220 | 0 | void Browser::UpdateCommandsForTabState() {
TabContents* current_tab = GetSelectedTabContents();
TabContentsWrapper* current_tab_wrapper = GetSelectedTabContentsWrapper();
if (!current_tab || !current_tab_wrapper) // May be NULL during tab restore.
return;
NavigationController& nc = current_tab->controlle... | 10,989 |
123,612 | 0 | void InspectorPageAgent::domContentLoadedEventFired(Frame* frame)
{
if (!frame->isMainFrame())
return;
m_frontend->domContentEventFired(currentTime());
}
| 10,990 |
17,703 | 0 | DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc)
{
ScreenPtr pScreen = screenInfo.screens[index];
DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen);
FakedVisualList *fvlp;
VisualPtr pVisual;
DGAModePtr pMode;
ColormapPtr pmap;
if (!mode || (mode > pScreenPri... | 10,991 |
60,423 | 0 | static int packet_seq_show(struct seq_file *seq, void *v)
{
if (v == SEQ_START_TOKEN)
seq_puts(seq, "sk RefCnt Type Proto Iface R Rmem User Inode\n");
else {
struct sock *s = sk_entry(v);
const struct packet_sock *po = pkt_sk(s);
seq_printf(seq,
"%pK %-6d %-4d %04x %-5d %1d %-6u %-6u %-6lu... | 10,992 |
141,006 | 0 | V0CustomElementMicrotaskRunQueue* Document::CustomElementMicrotaskRunQueue() {
if (!custom_element_microtask_run_queue_)
custom_element_microtask_run_queue_ =
V0CustomElementMicrotaskRunQueue::Create();
return custom_element_microtask_run_queue_.Get();
}
| 10,993 |
69,043 | 0 | static const StringInfo *GetAdditionalInformation(const ImageInfo *image_info,
Image *image,ExceptionInfo *exception)
{
#define PSDKeySize 5
#define PSDAllowedLength 36
char
key[PSDKeySize];
/* Whitelist of keys from: https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/ */
const char
allowed[... | 10,994 |
115,251 | 0 | void OmniboxViewWin::OnMButtonDblClk(UINT /*keys*/, const CPoint& /*point*/) {
gaining_focus_.reset(); // See NOTE in OnMouseActivate().
}
| 10,995 |
95,220 | 0 | static void imapd_refer(const char *tag,
const char *server,
const char *mailbox)
{
struct imapurl imapurl;
char url[MAX_MAILBOX_PATH+1];
memset(&imapurl, 0, sizeof(struct imapurl));
imapurl.server = server;
imapurl.mailbox = mailbox;
imapurl.auth... | 10,996 |
74,725 | 0 | static int check_bug_trap(struct pt_regs *regs)
{
struct bug_entry *bug;
unsigned long addr;
if (regs->msr & MSR_PR)
return 0; /* not in kernel */
addr = regs->nip; /* address of trap instruction */
if (addr < PAGE_OFFSET)
return 0;
bug = find_bug(regs->nip);
if (bug == NULL)
return 0;
if (bug->line & BU... | 10,997 |
175,828 | 0 | static void ref_cnt_fb (int *buf, int *idx, int new_idx)
{
if (buf[*idx] > 0)
buf[*idx]--;
*idx = new_idx;
buf[new_idx]++;
}
| 10,998 |
70,872 | 0 | static int parse_icy(HTTPContext *s, const char *tag, const char *p)
{
int len = 4 + strlen(p) + strlen(tag);
int is_first = !s->icy_metadata_headers;
int ret;
av_dict_set(&s->metadata, tag, p, 0);
if (s->icy_metadata_headers)
len += strlen(s->icy_metadata_headers);
if ((ret = av_real... | 10,999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.