unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
89,893 | 0 | void write_events_details(int s) {
int n;
char buff[80];
struct upnp_event_notify * obj;
struct subscriber * sub;
write(s, "Events details :\n", 17);
for(obj = notifylist.lh_first; obj != NULL; obj = obj->entries.le_next) {
n = snprintf(buff, sizeof(buff), " %p sub=%p state=%d s=%d\n",
obj, obj->... | 200 |
118,299 | 0 | void AutofillDialogViews::SetIconsForSection(DialogSection section) {
FieldValueMap user_input;
GetUserInput(section, &user_input);
FieldIconMap field_icons = delegate_->IconsForFields(user_input);
TextfieldMap* textfields = &GroupForSection(section)->textfields;
for (TextfieldMap::const_iterator textfield_it... | 201 |
100,539 | 0 | void ChildProcessSecurityPolicy::RegisterWebSafeScheme(
const std::string& scheme) {
AutoLock lock(lock_);
DCHECK(web_safe_schemes_.count(scheme) == 0) << "Add schemes at most once.";
DCHECK(pseudo_schemes_.count(scheme) == 0) << "Web-safe implies not psuedo.";
web_safe_schemes_.insert(scheme);
}
| 202 |
178,003 | 1 | SchedulerObject::_continue(std::string key, std::string &/*reason*/, std::string &text)
{
PROC_ID id = getProcByString(key.c_str());
if (id.cluster < 0 || id.proc < 0) {
dprintf(D_FULLDEBUG, "Remove: Failed to parse id: %s\n", key.c_str());
text = "Invalid Id";
return false;
}
scheduler.enqueueActOnJobMyself(id... | 203 |
107,453 | 0 | void* JSArray::subclassData() const
{
return m_storage->subclassData;
}
| 204 |
99,613 | 0 | void InterstitialPage::InterstitialPageRVHViewDelegate::StartDragging(
const WebDropData& drop_data,
WebDragOperationsMask allowed_operations,
const SkBitmap& image,
const gfx::Point& image_offset) {
NOTREACHED() << "InterstitialPage does not support dragging yet.";
}
| 205 |
187,683 | 1 | make_error(png_store* volatile psIn, png_byte PNG_CONST colour_type,
png_byte bit_depth, int interlace_type, int test, png_const_charp name)
{
png_store * volatile ps = psIn;
context(ps, fault);
check_interlace_type(interlace_type);
Try
{
png_structp pp;
png_infop pi;
pp = set_store_for_write(ps, &pi, ... | 206 |
140,604 | 0 | void OutOfProcessInstance::DocumentHasUnsupportedFeature(
const std::string& feature) {
std::string metric("PDF_Unsupported_");
metric += feature;
if (!unsupported_features_reported_.count(metric)) {
unsupported_features_reported_.insert(metric);
UserMetricsRecordAction(metric);
}
if (!full_)
... | 207 |
114,652 | 0 | void WebPluginDelegateProxy::SetFocus(bool focused) {
Send(new PluginMsg_SetFocus(instance_id_, focused));
#if defined(OS_WIN)
if (render_view_)
render_view_->PluginFocusChanged(focused, instance_id_);
#endif
}
| 208 |
114,081 | 0 | TestTarget() : accelerator_pressed_count_(0) {}
| 209 |
32,960 | 0 | static int __sctp_connect(struct sock* sk,
struct sockaddr *kaddrs,
int addrs_size,
sctp_assoc_t *assoc_id)
{
struct net *net = sock_net(sk);
struct sctp_sock *sp;
struct sctp_endpoint *ep;
struct sctp_association *asoc = NULL;
struct sctp_association *asoc2;
struct sctp_transport *transport;
unio... | 210 |
7,432 | 0 | ZEND_API int zend_ts_hash_sort(TsHashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber)
{
int retval;
begin_write(ht);
retval = zend_hash_sort(TS_HASH(ht), sort_func, compare_func, renumber);
end_write(ht);
return retval;
}
| 211 |
8,992 | 0 | static uint64_t vmxnet3_get_mac_high(MACAddr *addr)
{
return VMXNET3_MAKE_BYTE(0, addr->a[4]) |
VMXNET3_MAKE_BYTE(1, addr->a[5]);
}
| 212 |
106,498 | 0 | void WebPageProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
{
#if PLATFORM(MAC) || PLATFORM(WIN)
if (messageID.is<CoreIPC::MessageClassDrawingAreaProxy>()) {
m_drawingArea->didReceiveDrawingAreaProxyMessage(connection, messageID, a... | 213 |
37,781 | 0 | static int nested_svm_exit_handled_msr(struct vcpu_svm *svm)
{
u32 offset, msr, value;
int write, mask;
if (!(svm->nested.intercept & (1ULL << INTERCEPT_MSR_PROT)))
return NESTED_EXIT_HOST;
msr = svm->vcpu.arch.regs[VCPU_REGS_RCX];
offset = svm_msrpm_offset(msr);
write = svm->vmcb->control.exit_info_1 & 1... | 214 |
35,972 | 0 | SMB2_flush(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,
u64 volatile_fid)
{
struct smb2_flush_req *req;
struct TCP_Server_Info *server;
struct cifs_ses *ses = tcon->ses;
struct kvec iov[1];
int resp_buftype;
int rc = 0;
cifs_dbg(FYI, "Flush\n");
if (ses && (ses->server))
server = ... | 215 |
180,175 | 1 | isoent_gen_joliet_identifier(struct archive_write *a, struct isoent *isoent,
struct idr *idr)
{
struct iso9660 *iso9660;
struct isoent *np;
unsigned char *p;
size_t l;
int r;
int ffmax, parent_len;
static const struct archive_rb_tree_ops rb_ops = {
isoent_cmp_node_joliet, isoent_cmp_key_joliet
};
if (isoent->children... | 216 |
43,416 | 0 | int ff_set_ref_count(H264Context *h)
{
int ref_count[2], list_count;
int num_ref_idx_active_override_flag;
ref_count[0] = h->pps.ref_count[0];
ref_count[1] = h->pps.ref_count[1];
if (h->slice_type_nos != AV_PICTURE_TYPE_I) {
unsigned max[2];
max[0] = max[1] = h->picture_structure =... | 217 |
45,971 | 0 | get_default_magic(void)
{
static const char hmagic[] = "/.magic/magic.mgc";
static char *default_magic;
char *home, *hmagicpath;
#ifndef WIN32
struct stat st;
if (default_magic) {
free(default_magic);
default_magic = NULL;
}
if ((home = getenv("HOME")) == NULL)
return MAGIC;
if (asprintf(&hmagicpath, "... | 218 |
88,988 | 0 | MagickExport MagickBooleanType AutoGammaImage(Image *image,
ExceptionInfo *exception)
{
double
gamma,
log_mean,
mean,
sans;
MagickStatusType
status;
register ssize_t
i;
log_mean=log(0.5);
if (image->channel_mask == DefaultChannels)
{
/*
Apply gamma correction equ... | 219 |
55,537 | 0 | void get_iowait_load(unsigned long *nr_waiters, unsigned long *load)
{
struct rq *rq = this_rq();
*nr_waiters = atomic_read(&rq->nr_iowait);
*load = rq->load.weight;
}
| 220 |
135,943 | 0 | PassRefPtrWillBeRawPtr<NameNodeList> ContainerNode::getElementsByName(const AtomicString& elementName)
{
return ensureCachedCollection<NameNodeList>(NameNodeListType, elementName);
}
| 221 |
65,532 | 0 | static void nfs4_put_deleg_lease(struct nfs4_file *fp)
{
struct file *filp = NULL;
spin_lock(&fp->fi_lock);
if (fp->fi_deleg_file && --fp->fi_delegees == 0)
swap(filp, fp->fi_deleg_file);
spin_unlock(&fp->fi_lock);
if (filp) {
vfs_setlease(filp, F_UNLCK, NULL, (void **)&fp);
fput(filp);
}
}
| 222 |
83,264 | 0 | struct sas_phy *sas_get_local_phy(struct domain_device *dev)
{
struct sas_ha_struct *ha = dev->port->ha;
struct sas_phy *phy;
unsigned long flags;
/* a published domain device always has a valid phy, it may be
* stale, but it is never NULL
*/
BUG_ON(!dev->phy);
spin_lock_irqsave(&ha->phy_port_lock, flags);
... | 223 |
165,978 | 0 | void GetRTCStatsOnSignalingThread(
const scoped_refptr<base::SingleThreadTaskRunner>& main_thread,
scoped_refptr<webrtc::PeerConnectionInterface> native_peer_connection,
std::unique_ptr<blink::WebRTCStatsReportCallback> callback,
blink::RTCStatsFilter filter) {
TRACE_EVENT0("webrtc", "GetRTCStatsOnSig... | 224 |
165,514 | 0 | bool ContentSecurityPolicy::ExperimentalFeaturesEnabled() const {
return RuntimeEnabledFeatures::
ExperimentalContentSecurityPolicyFeaturesEnabled();
}
| 225 |
74,349 | 0 | static BOOLEAN CheckRunningDpc(PARANDIS_ADAPTER *pContext)
{
BOOLEAN bStopped;
BOOLEAN bReportHang = FALSE;
bStopped = 0 != InterlockedExchange(&pContext->bDPCInactive, TRUE);
if (bStopped)
{
pContext->nDetectedInactivity++;
}
else
{
pContext->nDetectedInactivity = 0;
... | 226 |
78,065 | 0 | const char* CMSEXPORT cmsIT8GetDataRowCol(cmsHANDLE hIT8, int row, int col)
{
cmsIT8* it8 = (cmsIT8*) hIT8;
_cmsAssert(hIT8 != NULL);
return GetData(it8, row, col);
}
| 227 |
21,842 | 0 | static void set_seg_override(struct x86_emulate_ctxt *ctxt, int seg)
{
ctxt->has_seg_override = true;
ctxt->seg_override = seg;
}
| 228 |
99,412 | 0 | RenderSandboxHostLinux::~RenderSandboxHostLinux() {
if (init_) {
if (HANDLE_EINTR(close(renderer_socket_)) < 0)
PLOG(ERROR) << "close";
if (HANDLE_EINTR(close(childs_lifeline_fd_)) < 0)
PLOG(ERROR) << "close";
}
}
| 229 |
36,445 | 0 | int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol)
{
struct snd_ctl_elem_id id;
unsigned int idx;
unsigned int count;
int err = -EINVAL;
if (! kcontrol)
return err;
if (snd_BUG_ON(!card || !kcontrol->info))
goto error;
id = kcontrol->id;
down_write(&card->controls_rwsem);
if (snd_ctl_fi... | 230 |
18,722 | 0 | int ip6_frag_nqueues(struct net *net)
{
return net->ipv6.frags.nqueues;
}
| 231 |
101,718 | 0 | TabContents* Browser::OpenAppShortcutWindow(Profile* profile,
const GURL& url,
bool update_shortcut) {
Browser* app_browser;
TabContents* tab = OpenApplicationWindow(
profile,
NULL, // this is a URL app. No extensi... | 232 |
181,611 | 1 | key_ref_t key_create_or_update(key_ref_t keyring_ref,
const char *type,
const char *description,
const void *payload,
size_t plen,
key_perm_t perm,
unsigned long flags)
{
struct keyring_index_key index_key = {
.description = description,
};
struct key_preparsed_payload prep;
struct assoc_array_edit *edit;
const struct ... | 233 |
132,728 | 0 | void ChromotingInstance::HandlePauseVideo(const base::DictionaryValue& data) {
if (!data.HasKey("pause")) {
LOG(ERROR) << "Invalid pauseVideo.";
return;
}
HandleVideoControl(data);
}
| 234 |
166,462 | 0 | explicit TestSafeBrowsingService(const SafeBrowsingTestConfiguration* config)
: test_configuration_(config) {
services_delegate_ =
safe_browsing::ServicesDelegate::CreateForTest(this, this);
}
| 235 |
4,611 | 0 | PHP_FUNCTION(openssl_digest)
{
zend_bool raw_output = 0;
char *data, *method;
size_t data_len, method_len;
const EVP_MD *mdtype;
EVP_MD_CTX *md_ctx;
unsigned int siglen;
zend_string *sigbuf;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|b", &data, &data_len, &method, &method_len, &raw_output) == FAILURE) {
... | 236 |
143,479 | 0 | CompositorImpl::CompositorImpl(CompositorClient* client,
gfx::NativeWindow root_window)
: frame_sink_id_(AllocateFrameSinkId()),
resource_manager_(root_window),
window_(NULL),
surface_handle_(gpu::kNullSurfaceHandle),
client_(client),
needs_animate_(false... | 237 |
18,627 | 0 | SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size,
unsigned int, flags, struct sockaddr __user *, addr,
int __user *, addr_len)
{
struct socket *sock;
struct iovec iov;
struct msghdr msg;
struct sockaddr_storage address;
int err, err2;
int fput_needed;
if (size > INT_MAX)
size = INT_MAX... | 238 |
145,921 | 0 | void IsCalloutAboveLauncherIcon(aura::Window* panel) {
base::RunLoop().RunUntilIdle();
views::Widget* widget = GetCalloutWidgetForPanel(panel);
Shelf* shelf = GetShelfForWindow(panel);
gfx::Rect icon_bounds = shelf->GetScreenBoundsOfItemIconForWindow(panel);
ASSERT_FALSE(icon_bounds.IsEmpty());
... | 239 |
88,491 | 0 | static void clock_handler(const int fd, const short which, void *arg) {
struct timeval t = {.tv_sec = 1, .tv_usec = 0};
static bool initialized = false;
#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
static bool monotonic = false;
static time_t monotonic_start;
#endif
if (initialized) ... | 240 |
59,330 | 0 | static int build_migrate(struct sk_buff *skb, const struct xfrm_migrate *m,
int num_migrate, const struct xfrm_kmaddress *k,
const struct xfrm_selector *sel,
const struct xfrm_encap_tmpl *encap, u8 dir, u8 type)
{
const struct xfrm_migrate *mp;
struct xfrm_userpolicy_id *pol_id;
struct nlmsghdr *nlh;
in... | 241 |
10,657 | 0 | Ins_SANGW( void )
{
/* instruction not supported anymore */
}
| 242 |
84,460 | 0 | _nextA(int visited)
{
HmarkerList *hl = Currentbuf->hmarklist;
BufferPoint *po;
Anchor *an, *pan;
int i, x, y, n = searchKeyNum();
ParsedURL url;
if (Currentbuf->firstLine == NULL)
return;
if (!hl || hl->nmark == 0)
return;
an = retrieveCurrentAnchor(Currentbuf);
if (visited != T... | 243 |
164,039 | 0 | void DownloadManagerImpl::ImportInProgressDownloads(uint32_t id) {
for (auto& download : in_progress_downloads_) {
auto item = std::move(download);
if (item->GetId() == download::DownloadItem::kInvalidId) {
item->SetDownloadId(id++);
next_download_id_++;
if (!should_persist_new_download_)
... | 244 |
5,181 | 0 | PHP_FUNCTION(pg_result_error_field)
{
zval *result;
zend_long fieldcode;
PGresult *pgsql_result;
pgsql_result_handle *pg_result;
char *field = NULL;
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "rl",
&result, &fieldcode) == FAILURE) {
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE(p... | 245 |
531 | 0 | static void pdf_run_gs_op(fz_context *ctx, pdf_processor *proc, int b)
{
pdf_run_processor *pr = (pdf_run_processor *)proc;
pdf_gstate *gstate = pdf_flush_text(ctx, pr);
gstate->fill.color_params.op = b;
}
| 246 |
104,629 | 0 | bool IsBaseCrxKey(const std::string& key) {
for (size_t i = 0; i < arraysize(kBaseCrxKeys); ++i) {
if (key == kBaseCrxKeys[i])
return true;
}
return false;
}
| 247 |
175,840 | 0 | void vp8_decoder_create_threads(VP8D_COMP *pbi)
{
int core_count = 0;
unsigned int ithread;
pbi->b_multithreaded_rd = 0;
pbi->allocated_decoding_thread_count = 0;
/* limit decoding threads to the max number of token partitions */
core_count = (pbi->max_threads > 8) ? 8 : pbi->max_threads;
/* limit de... | 248 |
66,218 | 0 | static int mailimf_parse_unwanted_msg_id(const char * message, size_t length,
size_t * indx)
{
size_t cur_token;
int r;
char * word;
int token_parsed;
cur_token = * indx;
token_parsed = TRUE;
while (token_parsed) {
token_parsed = FALSE;
r = mailimf_word_parse(message, length, &cur_token, &... | 249 |
186,706 | 1 | IDNConversionResult IDNToUnicodeWithAdjustmentsImpl(
base::StringPiece host,
base::OffsetAdjuster::Adjustments* adjustments,
bool enable_spoof_checks) {
if (adjustments)
adjustments->clear();
// Convert the ASCII input to a base::string16 for ICU.
base::string16 input16;
input16.reserve(host.length());
input16.insert(i... | 250 |
52,955 | 0 | static int setup_ctxt(struct qib_pportdata *ppd, int ctxt,
struct file *fp, const struct qib_user_info *uinfo)
{
struct qib_filedata *fd = fp->private_data;
struct qib_devdata *dd = ppd->dd;
struct qib_ctxtdata *rcd;
void *ptmp = NULL;
int ret;
int numa_id;
assign_ctxt_affinity(fp, dd);
numa_id = qib_... | 251 |
101,040 | 0 | void QuotaManagerProxy::NotifyOriginInUse(
const GURL& origin) {
if (!io_thread_->BelongsToCurrentThread()) {
io_thread_->PostTask(FROM_HERE, NewRunnableMethod(
this, &QuotaManagerProxy::NotifyOriginInUse, origin));
return;
}
if (manager_)
manager_->NotifyOriginInUse(origin);
}
| 252 |
174,214 | 0 | status_t Camera3Device::disconnect() {
ATRACE_CALL();
Mutex::Autolock il(mInterfaceLock);
ALOGV("%s: E", __FUNCTION__);
status_t res = OK;
{
Mutex::Autolock l(mLock);
if (mStatus == STATUS_UNINITIALIZED) return res;
if (mStatus == STATUS_ACTIVE ||
(mStatus == STATUS_ERROR && mRequestThread != NULL)) ... | 253 |
68,409 | 0 | void perf_sample_event_took(u64 sample_len_ns)
{
u64 max_len = READ_ONCE(perf_sample_allowed_ns);
u64 running_len;
u64 avg_len;
u32 max;
if (max_len == 0)
return;
/* Decay the counter by 1 average sample. */
running_len = __this_cpu_read(running_sample_length);
running_len -= running_len/NR_ACCUMULATED_SAMP... | 254 |
16,711 | 0 | pdf_load_version(fz_context *ctx, pdf_document *doc)
{
char buf[20];
fz_seek(ctx, doc->file, 0, SEEK_SET);
fz_read_line(ctx, doc->file, buf, sizeof buf);
if (memcmp(buf, "%PDF-", 5) != 0)
fz_throw(ctx, FZ_ERROR_GENERIC, "cannot recognize version marker");
doc->version = 10 * (fz_atof(buf+5) + 0.05f);
if (doc-... | 255 |
154,079 | 0 | void GLES2DecoderImpl::DoUniform1i(GLint fake_location, GLint v0) {
GLenum type = 0;
GLsizei count = 1;
GLint real_location = -1;
if (!PrepForSetUniformByLocation(fake_location,
"glUniform1i",
Program::kUniform1i,
... | 256 |
57,950 | 0 | static int nf_tables_delset(struct sock *nlsk, struct sk_buff *skb,
const struct nlmsghdr *nlh,
const struct nlattr * const nla[])
{
const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
struct nft_set *set;
struct nft_ctx ctx;
int err;
if (nfmsg->nfgen_family == NFPROTO_UNSPEC)
return -EAFNOSUPPORT;
i... | 257 |
96,894 | 0 | static long vmsplice_to_pipe(struct file *file, struct iov_iter *iter,
unsigned int flags)
{
struct pipe_inode_info *pipe;
long ret = 0;
unsigned buf_flag = 0;
if (flags & SPLICE_F_GIFT)
buf_flag = PIPE_BUF_FLAG_GIFT;
pipe = get_pipe_info(file);
if (!pipe)
return -EBADF;
pipe_lock(pipe);
ret = wa... | 258 |
24,094 | 0 | static int writeWepKeyRid(struct airo_info *ai, WepKeyRid *wkr, int perm, int lock)
{
int rc;
rc = PC4500_writerid(ai, RID_WEP_TEMP, wkr, sizeof(*wkr), lock);
if (rc!=SUCCESS)
airo_print_err(ai->dev->name, "WEP_TEMP set %x", rc);
if (perm) {
rc = PC4500_writerid(ai, RID_WEP_PERM, wkr, sizeof(*wkr), lock);
if ... | 259 |
170,017 | 0 | xsltBuildVariable(xsltTransformContextPtr ctxt,
xsltStylePreCompPtr castedComp,
xmlNodePtr tree)
{
#ifdef XSLT_REFACTORED
xsltStyleBasicItemVariablePtr comp =
(xsltStyleBasicItemVariablePtr) castedComp;
#else
xsltStylePreCompPtr comp = castedComp;
#endif
xsltStackElemPtr elem;
#ifdef WITH_XSLT_DEB... | 260 |
82,131 | 0 | mrb_module_new(mrb_state *mrb)
{
struct RClass *m = (struct RClass*)mrb_obj_alloc(mrb, MRB_TT_MODULE, mrb->module_class);
boot_initmod(mrb, m);
return m;
}
| 261 |
62,383 | 0 | fn_printzp(netdissect_options *ndo,
register const u_char *s, register u_int n,
register const u_char *ep)
{
register int ret;
register u_char c;
ret = 1; /* assume truncated */
while (n > 0 && (ep == NULL || s < ep)) {
n--;
c = *s++;
if (c == '\0') {
ret = 0;
break;
}
if (!... | 262 |
39,278 | 0 | int security_get_reject_unknown(void)
{
return policydb.reject_unknown;
}
| 263 |
136,775 | 0 | const SecurityOrigin* TargetOrigin() const { return target_origin_.get(); }
| 264 |
176,139 | 0 | VOID ixheaacd_hbe_post_anal_xprod3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
WORD32 qmf_voc_columns, WORD32 qmf_band_idx,
FLOAT32 p, WORD32 pitch_in_bins_idx) {
WORD32 i, inp_band_idx, rem;
FLOAT32 *out_buf = &ptr_hbe_txposer->qmf_out_buf[2][... | 265 |
53,804 | 0 | static void __init reserve_initrd(void)
{
}
| 266 |
96,986 | 0 | static struct page *alloc_surplus_huge_page(struct hstate *h, gfp_t gfp_mask,
int nid, nodemask_t *nmask)
{
struct page *page = NULL;
if (hstate_is_gigantic(h))
return NULL;
spin_lock(&hugetlb_lock);
if (h->surplus_huge_pages >= h->nr_overcommit_huge_pages)
goto out_unlock;
spin_unlock(&hugetlb_lock);
pa... | 267 |
512 | 0 | static void pdf_run_c(fz_context *ctx, pdf_processor *proc, float x1, float y1, float x2, float y2, float x3, float y3)
{
pdf_run_processor *pr = (pdf_run_processor *)proc;
fz_curveto(ctx, pr->path, x1, y1, x2, y2, x3, y3);
}
| 268 |
131,430 | 0 | static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V... | 269 |
167,385 | 0 | int clear_count() const { return clear_count_; }
| 270 |
25,922 | 0 | __bad_area(struct pt_regs *regs, unsigned long error_code,
unsigned long address, int si_code)
{
struct mm_struct *mm = current->mm;
/*
* Something tried to access memory that isn't in our memory map..
* Fix it, but check if it's kernel or user first..
*/
up_read(&mm->mmap_sem);
__bad_area_nosemaphore(r... | 271 |
65,451 | 0 | find_lock_stateid(struct nfs4_lockowner *lo, struct nfs4_file *fp)
{
struct nfs4_ol_stateid *lst;
struct nfs4_client *clp = lo->lo_owner.so_client;
lockdep_assert_held(&clp->cl_lock);
list_for_each_entry(lst, &lo->lo_owner.so_stateids, st_perstateowner) {
if (lst->st_stid.sc_file == fp) {
atomic_inc(&lst->st... | 272 |
53,491 | 0 | rar_read_ahead(struct archive_read *a, size_t min, ssize_t *avail)
{
struct rar *rar = (struct rar *)(a->format->data);
const void *h = __archive_read_ahead(a, min, avail);
int ret;
if (avail)
{
if (a->archive.read_data_is_posix_read && *avail > (ssize_t)a->archive.read_data_requested)
*avail = a->a... | 273 |
89,251 | 0 | conv_swap4bytes(const UChar* s, const UChar* end, UChar* conv)
{
while (s < end) {
*conv++ = s[3];
*conv++ = s[2];
*conv++ = s[1];
*conv++ = s[0];
s += 4;
}
}
| 274 |
116,324 | 0 | QVector2D QQuickWebViewPrivate::FlickableAxisLocker::touchVelocity(const QTouchEvent* event)
{
static bool touchVelocityAvailable = event->device()->capabilities().testFlag(QTouchDevice::Velocity);
const QTouchEvent::TouchPoint& touchPoint = event->touchPoints().first();
if (touchVelocityAvailable)
... | 275 |
65,685 | 0 | static void put_ol_stateid_locked(struct nfs4_ol_stateid *stp,
struct list_head *reaplist)
{
struct nfs4_stid *s = &stp->st_stid;
struct nfs4_client *clp = s->sc_client;
lockdep_assert_held(&clp->cl_lock);
WARN_ON_ONCE(!list_empty(&stp->st_locks));
if (!atomic_dec_and_test(&s->sc_count)) {
wake_up_... | 276 |
91,240 | 0 | static void guid_handler(struct ipmi_smi *intf, struct ipmi_recv_msg *msg)
{
struct bmc_device *bmc = intf->bmc;
if ((msg->addr.addr_type != IPMI_SYSTEM_INTERFACE_ADDR_TYPE)
|| (msg->msg.netfn != IPMI_NETFN_APP_RESPONSE)
|| (msg->msg.cmd != IPMI_GET_DEVICE_GUID_CMD))
/* Not for me */
return;
if (msg-... | 277 |
182,573 | 1 | static int hns_xgmac_get_sset_count(int stringset)
{
if (stringset == ETH_SS_STATS)
return ARRAY_SIZE(g_xgmac_stats_string);
return 0;
}
| 278 |
46,973 | 0 | static int ghash_async_digest(struct ahash_request *req)
{
struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
struct ghash_async_ctx *ctx = crypto_ahash_ctx(tfm);
struct ahash_request *cryptd_req = ahash_request_ctx(req);
struct cryptd_ahash *cryptd_tfm = ctx->cryptd_tfm;
if (!irq_fpu_usable()) {
memcpy(crypt... | 279 |
48,717 | 0 | apr_status_t h2_stream_submit_pushes(h2_stream *stream, h2_headers *response)
{
apr_status_t status = APR_SUCCESS;
apr_array_header_t *pushes;
int i;
pushes = h2_push_collect_update(stream, stream->request, response);
if (pushes && !apr_is_empty_array(pushes)) {
ap_log_cerror(APLOG_MARK... | 280 |
44,605 | 0 | int lxc_setup(struct lxc_handler *handler)
{
const char *name = handler->name;
struct lxc_conf *lxc_conf = handler->conf;
const char *lxcpath = handler->lxcpath;
if (do_rootfs_setup(lxc_conf, name, lxcpath) < 0) {
ERROR("Error setting up rootfs mount after spawn");
return -1;
}
if (lxc_conf->inherit_ns_fd[L... | 281 |
100,024 | 0 | bool WebPluginImpl::handleInputEvent(
const WebInputEvent& event, WebCursorInfo& cursor_info) {
return delegate_->HandleInputEvent(event, &cursor_info);
}
| 282 |
158,346 | 0 | void RenderWidgetHostImpl::RendererExited(base::TerminationStatus status,
int exit_code) {
if (!renderer_initialized_)
return;
monitoring_composition_info_ = false;
renderer_initialized_ = false;
waiting_for_screen_rects_ack_ = false;
suppress_events_until_key... | 283 |
33,890 | 0 | cib_remote_inputfd(cib_t * cib)
{
cib_remote_opaque_t *private = cib->variant_opaque;
return private->callback.socket;
}
| 284 |
16,042 | 0 | XmpPtr xmp_new_empty()
{
RESET_ERROR;
SXMPMeta *txmp = new SXMPMeta;
return (XmpPtr)txmp;
}
| 285 |
133,572 | 0 | RenderFrameHostManager* WebContentsImpl::GetRenderManagerForTesting() {
return GetRenderManager();
}
| 286 |
183,180 | 1 | static ssize_t snd_timer_user_read(struct file *file, char __user *buffer,
size_t count, loff_t *offset)
{
struct snd_timer_user *tu;
long result = 0, unit;
int qhead;
int err = 0;
tu = file->private_data;
unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read);
spin_lock_irq(&tu->qlock);
whi... | 287 |
29,911 | 0 | static ssize_t map_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos,
int cap_setid,
struct uid_gid_map *map,
struct uid_gid_map *parent_map)
{
struct seq_file *seq = file->private_data;
struct user_namespace *ns = seq->private;
struct uid_gid_map new_map;
unsigned idx;
st... | 288 |
169,532 | 0 | void AutomationInternalCustomBindings::OnAtomicUpdateFinished(
ui::AXTree* tree,
bool root_changed,
const std::vector<ui::AXTreeDelegate::Change>& changes) {
auto iter = axtree_to_tree_cache_map_.find(tree);
if (iter == axtree_to_tree_cache_map_.end())
return;
for (const auto change : changes) {
... | 289 |
126,646 | 0 | void TabStripModel::NotifyIfActiveTabChanged(TabContents* old_contents,
NotifyTypes notify_types) {
TabContents* new_contents = GetTabContentsAtImpl(active_index());
if (old_contents != new_contents) {
FOR_EACH_OBSERVER(TabStripModelObserver, observers_,
... | 290 |
184,660 | 1 | void GoBackCrossSite() {
NavigationEntry* entry = contents()->controller().GetEntryAtOffset(-1);
ASSERT_TRUE(entry);
contents()->controller().GoBack();
// The navigation should commit in the pending RVH.
contents()->TestDidNavigate(
contents()->pending_rvh(), entry->page_id(), GURL(entry->url()),
... | 291 |
52,810 | 0 | static ssize_t ib_ucm_send_info(struct ib_ucm_file *file,
const char __user *inbuf, int in_len,
int (*func)(struct ib_cm_id *cm_id,
int status,
const void *info,
u8 info_len,
const void *data,
u8 data_len))
{
struct ib_ucm_context *ctx;
struct ib_ucm_info cmd;
con... | 292 |
13,702 | 0 | int ssl3_renegotiate_check(SSL *s)
{
int ret = 0;
if (s->s3->renegotiate) {
if ((s->s3->rbuf.left == 0) &&
(s->s3->wbuf.left == 0) && !SSL_in_init(s)) {
/*
* if we are the server, and we have sent a 'RENEGOTIATE'
* message, we need to go to SSL_ST_ACCEP... | 293 |
128,746 | 0 | ReadableStream::ReadableStream(UnderlyingSource* source)
: m_source(source)
, m_isStarted(false)
, m_isDraining(false)
, m_isPulling(false)
, m_isDisturbed(false)
, m_state(Readable)
{
}
| 294 |
165,764 | 0 | void SVGElement::AddedEventListener(
const AtomicString& event_type,
RegisteredEventListener& registered_listener) {
Node::AddedEventListener(event_type, registered_listener);
HeapHashSet<WeakMember<SVGElement>> instances;
CollectInstancesForSVGElement(this, instances);
AddEventListenerOptionsResolved*... | 295 |
129,137 | 0 | bool CaptureOnly(const Extension* extension, const GURL& url, int tab_id) {
return !extension->permissions_data()->CanAccessPage(
extension, url, url, tab_id, -1, NULL) &&
extension->permissions_data()->CanCaptureVisiblePage(tab_id, NULL);
}
| 296 |
114,177 | 0 | BrowserGpuChannelHostFactory::AllocateSharedMemory(uint32 size) {
scoped_ptr<base::SharedMemory> shm(new base::SharedMemory());
if (!shm->CreateAnonymous(size))
return scoped_ptr<base::SharedMemory>();
return shm.Pass();
}
| 297 |
149,059 | 0 | static int checkConstraintExprNode(Walker *pWalker, Expr *pExpr){
if( pExpr->op==TK_COLUMN ){
assert( pExpr->iColumn>=0 || pExpr->iColumn==-1 );
if( pExpr->iColumn>=0 ){
if( pWalker->u.aiCol[pExpr->iColumn]>=0 ){
pWalker->eCode |= CKCNSTRNT_COLUMN;
}
}else{
pWalker->eCode |= CKCN... | 298 |
141,087 | 0 | MediaQueryMatcher& Document::GetMediaQueryMatcher() {
if (!media_query_matcher_)
media_query_matcher_ = MediaQueryMatcher::Create(*this);
return *media_query_matcher_;
}
| 299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.