unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
187,788 | 1 | status_t SampleIterator::seekTo(uint32_t sampleIndex) {
ALOGV("seekTo(%d)", sampleIndex);
if (sampleIndex >= mTable->mNumSampleSizes) {
return ERROR_END_OF_STREAM;
}
if (mTable->mSampleToChunkOffset < 0
|| mTable->mChunkOffsetOffset < 0
|| mTable->mSampleSizeOffset < 0
|| mTable->mTimeToSampleCount == 0) {... | 6,800 |
143,753 | 0 | void RunTests(const std::string& extension_dirname) {
ExtensionTestMessageListener listener("PASS", true);
LaunchTestingApp(extension_dirname);
EXPECT_TRUE(listener.WaitUntilSatisfied());
}
| 6,801 |
74,790 | 0 | static int decode_studio_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
{
MpegEncContext *s = &ctx->m;
int width, height;
int bits_per_raw_sample;
skip_bits(gb, 4); /* video_object_layer_verid */
ctx->shape = get_bits(gb, 2); /* video_object_layer_shape */
skip_bits... | 6,802 |
115,781 | 0 | virtual bool CheckBrowseUrl(const GURL& gurl, Client* client) {
if (badurls[gurl.spec()] == SAFE)
return true;
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&FakeSafeBrowsingService::OnCheckBrowseURLDone,
this, gurl, client));
return false;
}... | 6,803 |
57,656 | 0 | store_tabletStylusLower(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
{
struct aiptek *aiptek = dev_get_drvdata(dev);
int new_button = map_str_to_val(stylus_button_map, buf, count);
if (new_button == AIPTEK_INVALID_VALUE)
return -EINVAL;
aiptek->newSetting.stylusButtonLower =... | 6,804 |
120,341 | 0 | explicit ScopedGestureRecognizerSetter(ui::GestureRecognizer* new_gr)
: new_gr_(new_gr) {
original_gr_ = ui::GestureRecognizer::Get();
ui::SetGestureRecognizerForTesting(new_gr_.get());
}
| 6,805 |
120,340 | 0 | void Reset() {
touch_released_count_ = 0;
touch_pressed_count_ = 0;
touch_moved_count_ = 0;
touch_cancelled_count_ = 0;
}
| 6,806 |
42,499 | 0 | min_sync_store(struct mddev *mddev, const char *buf, size_t len)
{
unsigned long long min;
int err;
if (kstrtoull(buf, 10, &min))
return -EINVAL;
spin_lock(&mddev->lock);
err = -EINVAL;
if (min > mddev->resync_max)
goto out_unlock;
err = -EBUSY;
if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery))
goto... | 6,807 |
172,351 | 0 | OMX_ERRORTYPE omx_video::get_extension_index(OMX_IN OMX_HANDLETYPE hComp,
OMX_IN OMX_STRING paramName,
OMX_OUT OMX_INDEXTYPE* indexType)
{
(void)hComp;
if (m_state == OMX_StateInvalid) {
DEBUG_PRINT_ERROR("ERROR: Get Extension Index in Invalid State");
return OMX_ErrorInvalidState;... | 6,808 |
179,612 | 1 | BOOL license_read_scope_list(wStream* s, SCOPE_LIST* scopeList)
{
UINT32 i;
UINT32 scopeCount;
if (Stream_GetRemainingLength(s) < 4)
return FALSE;
Stream_Read_UINT32(s, scopeCount); /* ScopeCount (4 bytes) */
scopeList->count = scopeCount;
scopeList->array = (LICENSE_BLOB*) malloc(sizeof(LICENSE_BLOB) *... | 6,809 |
162,414 | 0 | MojoResult MojoPlatformHandleToScopedPlatformHandle(
const MojoPlatformHandle* platform_handle,
ScopedPlatformHandle* out_handle) {
if (platform_handle->struct_size != sizeof(MojoPlatformHandle))
return MOJO_RESULT_INVALID_ARGUMENT;
if (platform_handle->type == MOJO_PLATFORM_HANDLE_TYPE_INVALID) {
... | 6,810 |
92,430 | 0 | static int sas_expander_discover(struct domain_device *dev)
{
struct expander_device *ex = &dev->ex_dev;
int res = -ENOMEM;
ex->ex_phy = kcalloc(ex->num_phys, sizeof(*ex->ex_phy), GFP_KERNEL);
if (!ex->ex_phy)
return -ENOMEM;
res = sas_ex_phy_discover(dev, -1);
if (res)
goto out_err;
return 0;
out_err:
... | 6,811 |
28,537 | 0 | static inline int qeth_create_skb_frag(struct qeth_qdio_buffer *qethbuffer,
struct qdio_buffer_element *element,
struct sk_buff **pskb, int offset, int *pfrag, int data_len)
{
struct page *page = virt_to_page(element->addr);
if (*pskb == NULL) {
if (qethbuffer->rx_skb) {
/* only if qeth_card.options.cq == QE... | 6,812 |
161,579 | 0 | void AddInternetStrings(content::WebUIDataSource* html_source) {
LocalizedString localized_strings[] = {
{"internetAddConnection", IDS_SETTINGS_INTERNET_ADD_CONNECTION},
{"internetAddConnectionExpandA11yLabel",
IDS_SETTINGS_INTERNET_ADD_CONNECTION_EXPAND_ACCESSIBILITY_LABEL},
{"internetAddCon... | 6,813 |
42,232 | 0 | void vhost_poll_stop(struct vhost_poll *poll)
{
if (poll->wqh) {
remove_wait_queue(poll->wqh, &poll->wait);
poll->wqh = NULL;
}
}
| 6,814 |
81,281 | 0 | static inline void ftrace_exports_enable(void)
{
static_branch_enable(&ftrace_exports_enabled);
}
| 6,815 |
121,609 | 0 | inline bool SearchBuffer::isBadMatch(const UChar* match, size_t matchLength) const
{
if (!m_targetRequiresKanaWorkaround)
return false;
normalizeCharacters(match, matchLength, m_normalizedMatch);
const UChar* a = m_normalizedTarget.begin();
const UChar* aEnd = m_normalizedTarget.end();
co... | 6,816 |
85,443 | 0 | static void sas_ata_flush_pm_eh(struct asd_sas_port *port, const char *func)
{
struct domain_device *dev, *n;
list_for_each_entry_safe(dev, n, &port->dev_list, dev_list_node) {
if (!dev_is_sata(dev))
continue;
sas_ata_wait_eh(dev);
/* if libata failed to power manage the device, tear it down */
if (ata_... | 6,817 |
66,063 | 0 | static void omninet_write_bulk_callback(struct urb *urb)
{
/* struct omninet_header *header = (struct omninet_header *)
urb->transfer_buffer; */
struct usb_serial_port *port = urb->context;
int status = urb->status;
set_bit(0, &port->write_urbs_free);
if (status) {
dev_dbg(&port->dev, "%s - nonzero wr... | 6,818 |
18,497 | 0 | static void generic_online_page(struct page *page)
{
__online_page_set_limits(page);
__online_page_increment_counters(page);
__online_page_free(page);
}
| 6,819 |
99,192 | 0 | v8::Handle<v8::Context> V8DOMWrapper::getWrapperContext(Frame* frame)
{
v8::Handle<v8::Context> context = V8Proxy::context(frame);
if (context.IsEmpty())
return v8::Handle<v8::Context>();
if (V8IsolatedWorld* world = V8IsolatedWorld::getEntered()) {
context = world->context();
if (fra... | 6,820 |
119,286 | 0 | void ConvolverNode::setBuffer(AudioBuffer* buffer)
{
ASSERT(isMainThread());
if (!buffer)
return;
unsigned numberOfChannels = buffer->numberOfChannels();
size_t bufferLength = buffer->length();
bool isBufferGood = numberOfChannels > 0 && numberOfChannels <= 4 && bufferLength;
ASSERT(i... | 6,821 |
62,033 | 0 | static uint32_t deserialize_gw_speed(uint8_t value) {
uint32_t speed;
uint32_t exp;
if (!value) {
return 0;
}
if (value == UINT8_MAX) {
/* maximum value: also return maximum value */
return MAX_SMARTGW_SPEED;
}
speed = (value >> 3) + 1;
exp = value & 7;
while (exp-- > 0) {
speed *=... | 6,822 |
25,995 | 0 | event_filter_match(struct perf_event *event)
{
return (event->cpu == -1 || event->cpu == smp_processor_id())
&& perf_cgroup_match(event);
}
| 6,823 |
149,387 | 0 | bool CheckClientDownloadRequest::ShouldUploadBinary(
DownloadCheckResultReason reason) {
bool upload_for_dlp = ShouldUploadForDlpScan();
bool upload_for_malware = ShouldUploadForMalwareScan(reason);
if (!upload_for_dlp && !upload_for_malware)
return false;
return !!Profile::FromBrowserContext(GetBrowse... | 6,824 |
154,062 | 0 | void GLES2DecoderImpl::DoScheduleCALayerInUseQueryCHROMIUM(
GLsizei count,
const volatile GLuint* textures) {
std::vector<gl::GLSurface::CALayerInUseQuery> queries;
queries.reserve(count);
for (GLsizei i = 0; i < count; ++i) {
gl::GLImage* image = nullptr;
GLuint texture_id = textures[i];
if (... | 6,825 |
135,909 | 0 | void TextTrackCueList::Clear() {
list_.clear();
}
| 6,826 |
65,111 | 0 | static MagickBooleanType SkipRGBMipmaps(Image *image,DDSInfo *dds_info,
int pixel_size,ExceptionInfo *exception)
{
MagickOffsetType
offset;
register ssize_t
i;
size_t
h,
w;
/*
Only skip mipmaps for textures and cube maps
*/
if (EOFBlob(image) != MagickFalse)
{
ThrowFileExc... | 6,827 |
159,290 | 0 | WebGLRenderingContextBase::CreateContextProviderInternal(
CanvasRenderingContextHost* host,
const CanvasContextCreationAttributes& attributes,
unsigned web_gl_version,
bool* using_gpu_compositing) {
DCHECK(host);
ExecutionContext* execution_context = host->GetTopExecutionContext();
DCHECK(executio... | 6,828 |
57,566 | 0 | static int ext4_fill_flex_info(struct super_block *sb)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_group_desc *gdp = NULL;
ext4_group_t flex_group_count;
ext4_group_t flex_group;
int groups_per_flex = 0;
size_t size;
int i;
sbi->s_log_groups_per_flex = sbi->s_es->s_log_groups_per_flex;
groups_per_fl... | 6,829 |
29,939 | 0 | void udp_destroy_sock(struct sock *sk)
{
struct udp_sock *up = udp_sk(sk);
bool slow = lock_sock_fast(sk);
udp_flush_pending_frames(sk);
unlock_sock_fast(sk, slow);
if (static_key_false(&udp_encap_needed) && up->encap_type) {
void (*encap_destroy)(struct sock *sk);
encap_destroy = ACCESS_ONCE(up->encap_destroy... | 6,830 |
85,363 | 0 | static int build_curseg(struct f2fs_sb_info *sbi)
{
struct curseg_info *array;
int i;
array = kcalloc(NR_CURSEG_TYPE, sizeof(*array), GFP_KERNEL);
if (!array)
return -ENOMEM;
SM_I(sbi)->curseg_array = array;
for (i = 0; i < NR_CURSEG_TYPE; i++) {
mutex_init(&array[i].curseg_mutex);
array[i].sum_blk = kza... | 6,831 |
45,563 | 0 | static void crypto_cbc_exit_tfm(struct crypto_tfm *tfm)
{
struct crypto_cbc_ctx *ctx = crypto_tfm_ctx(tfm);
crypto_free_cipher(ctx->child);
}
| 6,832 |
92,521 | 0 | dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
{
/*
* Update run-time statistics of the 'current'.
*/
update_curr(cfs_rq);
/*
* When dequeuing a sched_entity, we must:
* - Update loads to have both entity and cfs_rq synced with now.
* - Subtract its load from the cfs_rq->run... | 6,833 |
39,261 | 0 | int security_bounded_transition(u32 old_sid, u32 new_sid)
{
struct context *old_context, *new_context;
struct type_datum *type;
int index;
int rc;
read_lock(&policy_rwlock);
rc = -EINVAL;
old_context = sidtab_search(&sidtab, old_sid);
if (!old_context) {
printk(KERN_ERR "SELinux: %s: unrecognized SID %u\n",... | 6,834 |
135,798 | 0 | void SelectionController::SelectClosestMisspellingFromMouseEvent(
const MouseEventWithHitTestResults& result) {
if (!mouse_down_may_start_select_)
return;
SelectClosestMisspellingFromHitTestResult(
result.GetHitTestResult(),
(result.Event().click_count == 2 &&
frame_->GetEditor().IsSelec... | 6,835 |
14,845 | 0 | static int calc_dimension_12(const char* str)
{
int i = 0, flag = 0;
while (*str != '\0' && (*str < '0' || *str > '9') && (*str != '*')) {
str++;
}
if (*str == '*') {
i++;
str++;
}
while (*str != '\0') {
if (*str >= '0' && *str <= '9') {
if (flag == 0) {
i++;
flag = 1;
}
} else if (... | 6,836 |
25,131 | 0 | struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_orig)
{
struct rtable *rt = dst_alloc(&ipv4_dst_blackhole_ops, NULL, 1, 0, 0);
struct rtable *ort = (struct rtable *) dst_orig;
if (rt) {
struct dst_entry *new = &rt->dst;
new->__use = 1;
new->input = dst_discard;
new->output = d... | 6,837 |
115,631 | 0 | void GraphicsContext::setPlatformFillColor(const Color& color, ColorSpace colorSpace)
{
if (paintingDisabled())
return;
platformContext()->setFillColor(color.rgb());
}
| 6,838 |
139,236 | 0 | ~ConnectionFilterController() {}
| 6,839 |
148,053 | 0 | void V8TestObject::VoidMethodDefaultDoubleOrStringArgsMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_voidMethodDefaultDoubleOrStringArgs");
test_object_v8_internal::VoidMethodDefaultDoubleOrStringArgsMethod(info);
... | 6,840 |
112,701 | 0 | void DocumentLoader::setRequest(const ResourceRequest& req)
{
bool handlingUnreachableURL = false;
handlingUnreachableURL = m_substituteData.isValid() && !m_substituteData.failingURL().isEmpty();
if (handlingUnreachableURL)
m_committed = false;
ASSERT(!m_committed);
m_request = req;
}
| 6,841 |
68,688 | 0 | vc4_gem_destroy(struct drm_device *dev)
{
struct vc4_dev *vc4 = to_vc4_dev(dev);
/* Waiting for exec to finish would need to be done before
* unregistering V3D.
*/
WARN_ON(vc4->emit_seqno != vc4->finished_seqno);
/* V3D should already have disabled its interrupt and cleared
* the overflow allocation registe... | 6,842 |
89,038 | 0 | WandPrivate void CLISettingOptionInfo(MagickCLI *cli_wand,
const char *option,const char *arg1n, const char *arg2n)
{
ssize_t
parse; /* option argument parsing (string to value table lookup) */
const char /* percent escaped versions of the args */
*arg1,
*arg2;
#define _image_info (c... | 6,843 |
93,539 | 0 | static struct mr6_table *ip6mr_new_table(struct net *net, u32 id)
{
struct mr6_table *mrt;
unsigned int i;
mrt = ip6mr_get_table(net, id);
if (mrt)
return mrt;
mrt = kzalloc(sizeof(*mrt), GFP_KERNEL);
if (!mrt)
return NULL;
mrt->id = id;
write_pnet(&mrt->net, net);
/* Forwarding cache */
for (i = 0; i ... | 6,844 |
47,976 | 0 | static void string_registers_quirk(struct x86_emulate_ctxt *ctxt)
{
/*
* Intel CPUs mask the counter and pointers in quite strange
* manner when ECX is zero due to REP-string optimizations.
*/
#ifdef CONFIG_X86_64
if (ctxt->ad_bytes != 4 || !vendor_intel(ctxt))
return;
*reg_write(ctxt, VCPU_REGS_RCX) = 0;
... | 6,845 |
144,532 | 0 | int32_t WebContentsImpl::GetMaxPageID() {
return GetMaxPageIDForSiteInstance(GetSiteInstance());
}
| 6,846 |
63,344 | 0 | gss_sign (minor_status,
context_handle,
qop_req,
message_buffer,
msg_token)
OM_uint32 * minor_status;
gss_ctx_id_t context_handle;
int qop_req;
gss_buffer_t message_buffer;
gss_buffer_t msg_token;
{
return (gss_get_mic(minor_status, context_handle, (gss_qop_t) qop_req,
... | 6,847 |
135,027 | 0 | void AppCacheUpdateJob::OnResponseInfoLoaded(
AppCacheResponseInfo* response_info, int64 response_id) {
const net::HttpResponseInfo* http_info = response_info ?
response_info->http_response_info() : NULL;
if (internal_state_ == FETCH_MANIFEST) {
if (http_info)
manifest_fetcher_->set_existing_re... | 6,848 |
119,785 | 0 | void NavigationControllerImpl::GoForward() {
if (!CanGoForward()) {
NOTREACHED();
return;
}
bool transient = (transient_entry_index_ != -1);
int current_index = GetCurrentEntryIndex();
DiscardNonCommittedEntries();
pending_entry_index_ = current_index;
if (!transient)
pending_entry_index_+... | 6,849 |
67,522 | 0 | static int ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
ssize_t size, void *private)
{
ext4_io_end_t *io_end = private;
/* if not async direct IO just return */
if (!io_end)
return 0;
ext_debug("ext4_end_io_dio(): io_end 0x%p "
"for inode %lu, iocb 0x%p, offset %llu, size %zd\n",
io_... | 6,850 |
68,750 | 0 | static size_t pipe_zero(size_t bytes, struct iov_iter *i)
{
struct pipe_inode_info *pipe = i->pipe;
size_t n, off;
int idx;
if (!sanity(i))
return 0;
bytes = n = push_pipe(i, bytes, &idx, &off);
if (unlikely(!n))
return 0;
for ( ; n; idx = next_idx(idx, pipe), off = 0) {
size_t chunk = min_t(size_t, n, ... | 6,851 |
19,419 | 0 | static void efx_remove_eventq(struct efx_channel *channel)
{
netif_dbg(channel->efx, drv, channel->efx->net_dev,
"chan %d remove event queue\n", channel->channel);
efx_nic_remove_eventq(channel);
}
| 6,852 |
168,031 | 0 | void AutofillManager::DisambiguateAddressUploadTypes(FormStructure* form,
size_t current_index) {
ServerFieldTypeSet matching_types;
size_t next_index = current_index + 1;
if (next_index < form->field_count() &&
form->field(next_index)->Type().GetStorabl... | 6,853 |
169,613 | 0 | int32_t TestURLLoader::OpenWithPrefetchBufferThreshold(int32_t lower,
int32_t upper) {
pp::URLRequestInfo request(instance_);
request.SetURL("test_url_loader_data/hello.txt");
request.SetPrefetchBufferLowerThreshold(lower);
request.SetPrefetchBufferUpperThr... | 6,854 |
160,014 | 0 | int BackendImpl::CreateEntry(const std::string& key, Entry** entry,
const CompletionCallback& callback) {
DCHECK(!callback.is_null());
background_queue_.CreateEntry(key, entry, callback);
return net::ERR_IO_PENDING;
}
| 6,855 |
73,741 | 0 | static tsize_t tiff_writeproc(thandle_t clientdata, tdata_t data, tsize_t size)
{
tiff_handle *th = (tiff_handle *)clientdata;
gdIOCtx *ctx = th->ctx;
size = (ctx->putBuf)(ctx, data, size);
if(size + th->pos>th->size) {
th->size = size + th->pos;
th->pos += size;
}
return size;
}
| 6,856 |
128,855 | 0 | void SVGDocumentExtensions::removeAllElementReferencesForTarget(SVGElement* referencedElement)
{
ASSERT(referencedElement);
HashMap<SVGElement*, OwnPtr<HashSet<SVGElement*> > >::iterator it = m_elementDependencies.find(referencedElement);
if (it == m_elementDependencies.end())
return;
ASSERT(it-... | 6,857 |
130,066 | 0 | void VariationsService::StartGoogleUpdateRegistrySync() {
DCHECK(thread_checker_.CalledOnValidThread());
registry_syncer_.RequestRegistrySync();
}
| 6,858 |
118,429 | 0 | void RenderFrameImpl::OnChildFrameProcessGone() {
if (compositing_helper_)
compositing_helper_->ChildFrameGone();
}
| 6,859 |
138,297 | 0 | void AXTableCell::columnIndexRange(std::pair<unsigned, unsigned>& columnRange) {
if (!m_layoutObject || !m_layoutObject->isTableCell())
return;
LayoutTableCell* cell = toLayoutTableCell(m_layoutObject);
columnRange.first = cell->table()->absoluteColumnToEffectiveColumn(
cell->absoluteColumnIndex());
... | 6,860 |
181,443 | 1 | static int ext4_write_end(struct file *file,
struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
struct page *page, void *fsdata)
{
handle_t *handle = ext4_journal_current_handle();
struct inode *inode = mapping->host;
loff_t old_size = inode->i_size;
int ret = 0, ret2;
int i_size_changed = 0;
tr... | 6,861 |
123,452 | 0 | void ImageBitmapFactories::addLoader(PassRefPtr<ImageBitmapLoader> loader)
{
m_pendingLoaders.add(loader);
}
| 6,862 |
36,030 | 0 | static int ceph_x_should_authenticate(struct ceph_auth_client *ac)
{
struct ceph_x_info *xi = ac->private;
int need;
ceph_x_validate_tickets(ac, &need);
dout("ceph_x_should_authenticate want=%d need=%d have=%d\n",
ac->want_keys, need, xi->have_keys);
return need != 0;
}
| 6,863 |
180,688 | 1 | get_princs_2_svc(gprincs_arg *arg, struct svc_req *rqstp)
{
static gprincs_ret ret;
char *prime_arg;
gss_buffer_desc client_name,
service_name;
OM_uint32 minor_stat;
kadm5_server_handle_t handle;
const char ... | 6,864 |
132,310 | 0 | void RenderFrameImpl::didFinishLoad(blink::WebLocalFrame* frame) {
TRACE_EVENT1("navigation", "RenderFrameImpl::didFinishLoad",
"id", routing_id_);
DCHECK(!frame_ || frame_ == frame);
WebDataSource* ds = frame->dataSource();
DocumentState* document_state = DocumentState::FromDataSource(ds);
if ... | 6,865 |
83,985 | 0 | GF_HEVCConfig *HEVC_DuplicateConfig(GF_HEVCConfig *cfg)
{
char *data;
u32 data_size;
GF_HEVCConfig *new_cfg;
GF_BitStream *bs;
if (!cfg) return NULL;
bs = gf_bs_new(NULL, 0, GF_BITSTREAM_WRITE);
gf_odf_hevc_cfg_write_bs(cfg, bs);
gf_bs_get_content(bs, &data, &data_size);
gf_bs_del(bs);
bs = gf_bs_new(data, ... | 6,866 |
119,159 | 0 | void XMLHttpRequest::clearRequest()
{
m_requestHeaders.clear();
m_requestEntityBody = 0;
}
| 6,867 |
126,804 | 0 | bool BrowserView::IsBookmarkBarVisible() const {
return browser_->SupportsWindowFeature(Browser::FEATURE_BOOKMARKBAR) &&
active_bookmark_bar_ &&
(active_bookmark_bar_->GetPreferredSize().height() != 0);
}
| 6,868 |
174,990 | 0 | status_t CameraDeviceClient::getRotationTransformLocked(int32_t* transform) {
ALOGV("%s: begin", __FUNCTION__);
if (transform == NULL) {
ALOGW("%s: null transform", __FUNCTION__);
return BAD_VALUE;
}
*transform = 0;
const CameraMetadata& staticInfo = mDevice->info();
camera_metadata_ro_entry_t entr... | 6,869 |
75,164 | 0 | conn *conn_new(const int sfd, enum conn_states init_state,
const int event_flags,
const int read_buffer_size, enum network_transport transport,
struct event_base *base) {
conn *c;
assert(sfd >= 0 && sfd < max_fds);
c = conns[sfd];
if (NULL == c) {
... | 6,870 |
112,433 | 0 | void Document::decrementActiveParserCount()
{
--m_activeParserCount;
if (!frame())
return;
#if ENABLE(THREADED_HTML_PARSER)
loader()->checkLoadComplete();
#endif
frame()->loader()->checkLoadComplete();
}
| 6,871 |
185,383 | 1 | bool IsTraceEventArgsWhitelisted(const char* category_group_name,
const char* event_name) {
if (base::MatchPattern(category_group_name, "toplevel") &&
base::MatchPattern(event_name, "*")) {
return true;
}
return false;
}
| 6,872 |
38,150 | 0 | static int magicmouse_probe(struct hid_device *hdev,
const struct hid_device_id *id)
{
__u8 feature[] = { 0xd7, 0x01 };
struct magicmouse_sc *msc;
struct hid_report *report;
int ret;
msc = devm_kzalloc(&hdev->dev, sizeof(*msc), GFP_KERNEL);
if (msc == NULL) {
hid_err(hdev, "can't alloc magicmouse descriptor\n... | 6,873 |
126,366 | 0 | void BrowserWindowGtk::HideUnsupportedWindowFeatures() {
if (!IsTabStripSupported())
tabstrip_->Hide();
if (!IsToolbarSupported())
toolbar_->Hide();
}
| 6,874 |
87,879 | 0 | bitset_set_range(ScanEnv *env, BitSetRef bs, int from, int to)
{
int i;
for (i = from; i <= to && i < SINGLE_BYTE_SIZE; i++) {
BITSET_SET_BIT_CHKDUP(bs, i);
}
}
| 6,875 |
270 | 0 | bgp_mp_unreach_parse (struct bgp_attr_parser_args *args,
struct bgp_nlri *mp_withdraw)
{
struct stream *s;
afi_t afi;
safi_t safi;
u_int16_t withdraw_len;
int ret;
struct peer *const peer = args->peer;
const bgp_size_t length = args->length;
s = peer->ibuf;
#define BGP_MP_UNREACH_MIN_SIZE ... | 6,876 |
20,431 | 0 | static int bdev_try_to_free_page(struct super_block *sb, struct page *page,
gfp_t wait)
{
journal_t *journal = EXT4_SB(sb)->s_journal;
WARN_ON(PageChecked(page));
if (!page_has_buffers(page))
return 0;
if (journal)
return jbd2_journal_try_to_free_buffers(journal, page,
wait & ~__GFP_WAIT);
return ... | 6,877 |
96,490 | 0 | int AppLayerProtoDetectPPParseConfPorts(const char *ipproto_name,
uint8_t ipproto,
const char *alproto_name,
AppProto alproto,
uint16_t min_depth, uint16_t ... | 6,878 |
84,025 | 0 | u32 gf_isom_oinf_size_entry(void *entry)
{
GF_OperatingPointsInformation* ptr = (GF_OperatingPointsInformation *)entry;
u32 size = 0, i ,j, count;
if (!ptr) return 0;
size += 3; //scalability_mask + reserved + num_profile_tier_level
count=gf_list_count(ptr->profile_tier_levels);
size += count * 12; //general_pro... | 6,879 |
110,599 | 0 | error::Error GLES2DecoderImpl::HandleRequestExtensionCHROMIUM(
uint32 immediate_data_size, const gles2::RequestExtensionCHROMIUM& c) {
Bucket* bucket = GetBucket(c.bucket_id);
if (!bucket || bucket->size() == 0) {
return error::kInvalidArguments;
}
std::string feature_str;
if (!bucket->GetAsString(&fe... | 6,880 |
146,280 | 0 | void WebGLRenderingContextBase::DrawingBufferClientRestoreMaskAndClearValues() {
if (!ContextGL())
return;
bool color_mask_alpha =
color_mask_[3] && active_scoped_rgb_emulation_color_masks_ == 0;
ContextGL()->ColorMask(color_mask_[0], color_mask_[1], color_mask_[2],
color_mask_a... | 6,881 |
108,821 | 0 | bool CompareTrees(base::DictionaryValue* first, base::DictionaryValue* second) {
string16 name1;
string16 name2;
if (!first->GetString(content::kFrameTreeNodeNameKey, &name1) ||
!second->GetString(content::kFrameTreeNodeNameKey, &name2))
return false;
if (name1 != name2)
return false;
int id1 =... | 6,882 |
172,255 | 0 | static jobject android_net_wifi_get_ring_buffer_status (JNIEnv *env, jclass cls, jint iface) {
JNIHelper helper(env);
wifi_interface_handle handle = getIfaceHandle(helper, cls, iface);
ALOGD("android_net_wifi_get_ring_buffer_status = %p", handle);
if (handle == 0) {
return NULL;
}
u32 num_rings = 10... | 6,883 |
29,648 | 0 | void sctp_v6_pf_init(void)
{
/* Register the SCTP specific PF_INET6 functions. */
sctp_register_pf(&sctp_pf_inet6, PF_INET6);
/* Register the SCTP specific AF_INET6 functions. */
sctp_register_af(&sctp_af_inet6);
}
| 6,884 |
174,186 | 0 | OMX_ERRORTYPE SoftVPXEncoder::internalSetVp8Params(
const OMX_VIDEO_PARAM_VP8TYPE* vp8Params) {
if (vp8Params->nPortIndex != kOutputPortIndex) {
return OMX_ErrorUnsupportedIndex;
}
if (vp8Params->eProfile != OMX_VIDEO_VP8ProfileMain) {
return OMX_ErrorBadParameter;
}
if (vp8Params->eLevel == OMX_VIDEO_VP8Leve... | 6,885 |
30,926 | 0 | int setup_arg_pages(struct linux_binprm *bprm,
unsigned long stack_top,
int executable_stack)
{
unsigned long ret;
unsigned long stack_shift;
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma = bprm->vma;
struct vm_area_struct *prev = NULL;
unsigned long vm_flags;
unsigned long stack_bas... | 6,886 |
78,236 | 0 | static int cac_get_challenge(sc_card_t *card, u8 *rnd, size_t len)
{
/* CAC requires 8 byte response */
u8 rbuf[8];
u8 *rbufp = &rbuf[0];
size_t out_len = sizeof rbuf;
int r;
LOG_FUNC_CALLED(card->ctx);
r = cac_apdu_io(card, 0x84, 0x00, 0x00, NULL, 0, &rbufp, &out_len);
LOG_TEST_RET(card->ctx, r, "Could not g... | 6,887 |
146,819 | 0 | int Document::RequestIdleCallback(IdleRequestCallback* callback,
const IdleRequestOptions& options) {
return EnsureScriptedIdleTaskController().RegisterCallback(callback, options);
}
| 6,888 |
130,668 | 0 | static void callbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjectV8Internal::callbackFunctionAttributeAttributeSetter(jsValue, info);
TRACE_EVENT_SET... | 6,889 |
5,007 | 0 | void X509_STORE_CTX_set_cert(X509_STORE_CTX *ctx, X509 *x)
{
ctx->cert = x;
}
| 6,890 |
94,533 | 0 | static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen)
{
struct sock *sk = sock->sk;
struct l2cap_chan *chan = l2cap_pi(sk)->chan;
struct bt_security sec;
struct bt_power pwr;
struct l2cap_conn *conn;
int len, err = 0;
u32 opt;
BT_DBG("sk %p", sk... | 6,891 |
84,024 | 0 | GF_OperatingPointsInformation *gf_isom_oinf_new_entry()
{
GF_OperatingPointsInformation* ptr;
GF_SAFEALLOC(ptr, GF_OperatingPointsInformation);
if (ptr) {
ptr->profile_tier_levels = gf_list_new();
ptr->operating_points = gf_list_new();
ptr->dependency_layers = gf_list_new();
}
return ptr;
}
| 6,892 |
124,675 | 0 | LayoutUnit RenderBlockFlow::adjustLogicalRightOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const
{
LayoutUnit right = offsetFromFloats;
if (applyTextIndent && !style()->isLeftToRightDirection())
right -= textIndentOffset();
return right;
}
| 6,893 |
177,556 | 0 | virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
file_size_ += pkt->data.frame.sz;
}
| 6,894 |
54,068 | 0 | static void in_dev_rcu_put(struct rcu_head *head)
{
struct in_device *idev = container_of(head, struct in_device, rcu_head);
in_dev_put(idev);
}
| 6,895 |
59,320 | 0 | static int walk_pgd_range(unsigned long addr, unsigned long end,
struct mm_walk *walk)
{
pgd_t *pgd;
unsigned long next;
int err = 0;
pgd = pgd_offset(walk->mm, addr);
do {
next = pgd_addr_end(addr, end);
if (pgd_none_or_clear_bad(pgd)) {
if (walk->pte_hole)
err = walk->pte_hole(addr, next, walk);... | 6,896 |
185,610 | 1 | void AppCacheUpdateJob::StartUpdate(AppCacheHost* host,
const GURL& new_master_resource) {
DCHECK(group_->update_job() == this);
DCHECK(!group_->is_obsolete());
bool is_new_pending_master_entry = false;
if (!new_master_resource.is_empty()) {
DCHECK(new_master_resource ==... | 6,897 |
114,217 | 0 | bool CommandBufferProxyImpl::EnsureBackbuffer() {
if (last_state_.error != gpu::error::kNoError)
return false;
return Send(new GpuCommandBufferMsg_EnsureBackbuffer(route_id_));
}
| 6,898 |
214 | 0 | ftp_do_pasv (int csock, ip_address *addr, int *port)
{
if (!opt.server_response)
logputs (LOG_VERBOSE, "==> PASV ... ");
return ftp_pasv (csock, addr, port);
}
| 6,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.