unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
130,635 | 0 | static void addEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjectV8Internal::addEventListenerMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
| 5,900 |
120,366 | 0 | bool pinch_begin() const { return pinch_begin_; }
| 5,901 |
137,585 | 0 | void PrepareFrameAndViewForPrint::frameDetached(blink::WebFrame* frame,
DetachType type) {
DCHECK(type == DetachType::Remove);
if (frame->parent())
frame->parent()->removeChild(frame);
frame->close();
}
| 5,902 |
50,517 | 0 | void perf_sample_event_took(u64 sample_len_ns)
{
u64 allowed_ns = ACCESS_ONCE(perf_sample_allowed_ns);
u64 avg_local_sample_len;
u64 local_samples_len;
if (allowed_ns == 0)
return;
/* decay the counter by 1 average sample */
local_samples_len = __this_cpu_read(running_sample_length);
local_samples_len -= loc... | 5,903 |
162,596 | 0 | scoped_refptr<VASurface> VaapiJpegDecoder::Decode(
base::span<const uint8_t> encoded_image,
VaapiImageDecodeStatus* status) {
if (!vaapi_wrapper_) {
VLOGF(1) << "VaapiJpegDecoder has not been initialized";
*status = VaapiImageDecodeStatus::kInvalidState;
return nullptr;
}
JpegParseResult p... | 5,904 |
172,058 | 0 | static bool is_requesting_sdp(void) {
for (size_t i = 0; i < ARRAY_SIZE(rfc_slots); ++i)
if (rfc_slots[i].id && rfc_slots[i].f.doing_sdp_request)
return true;
return false;
}
| 5,905 |
48,606 | 0 | static int vfio_pci_walk_wrapper(struct pci_dev *pdev, void *data)
{
struct vfio_pci_walk_info *walk = data;
if (!walk->slot || vfio_pci_dev_below_slot(pdev, walk->pdev->slot))
walk->ret = walk->fn(pdev, walk->data);
return walk->ret;
}
| 5,906 |
63,534 | 0 | static int mqueue_flush_file(struct file *filp, fl_owner_t id)
{
struct mqueue_inode_info *info = MQUEUE_I(file_inode(filp));
spin_lock(&info->lock);
if (task_tgid(current) == info->notify_owner)
remove_notification(info);
spin_unlock(&info->lock);
return 0;
}
| 5,907 |
58,204 | 0 | void __init sched_init_smp(void)
{
cpumask_var_t non_isolated_cpus;
alloc_cpumask_var(&non_isolated_cpus, GFP_KERNEL);
alloc_cpumask_var(&fallback_doms, GFP_KERNEL);
sched_init_numa();
/*
* There's no userspace yet to cause hotplug operations; hence all the
* cpu masks are stable and all blatant races in th... | 5,908 |
32,103 | 0 | int dev_close(struct net_device *dev)
{
if (!(dev->flags & IFF_UP))
return 0;
__dev_close(dev);
/*
* Tell people we are down
*/
rtmsg_ifinfo(RTM_NEWLINK, dev, IFF_UP|IFF_RUNNING);
call_netdevice_notifiers(NETDEV_DOWN, dev);
return 0;
}
| 5,909 |
2,029 | 0 | static X509 * php_openssl_x509_from_zval(zval ** val, int makeresource, long * resourceval TSRMLS_DC)
{
X509 *cert = NULL;
if (resourceval) {
*resourceval = -1;
}
if (Z_TYPE_PP(val) == IS_RESOURCE) {
/* is it an x509 resource ? */
void * what;
int type;
what = zend_fetch_resource(val TSRMLS_CC, -1, "Ope... | 5,910 |
163,549 | 0 | void ScriptProcessorHandler::SetChannelCount(unsigned long channel_count,
ExceptionState& exception_state) {
DCHECK(IsMainThread());
BaseAudioContext::GraphAutoLocker locker(Context());
if (channel_count != channel_count_) {
exception_state.ThrowDOMException(
... | 5,911 |
146,050 | 0 | void WebGL2RenderingContextBase::bindVertexArray(
WebGLVertexArrayObject* vertex_array) {
if (isContextLost())
return;
if (vertex_array &&
(vertex_array->IsDeleted() || !vertex_array->Validate(0, this))) {
SynthesizeGLError(GL_INVALID_OPERATION, "bindVertexArray",
"invalid v... | 5,912 |
102,169 | 0 | void SyncManager::SyncInternal::RaiseAuthNeededEvent() {
ObserverList<SyncManager::Observer> temp_obs_list;
CopyObservers(&temp_obs_list);
FOR_EACH_OBSERVER(SyncManager::Observer, temp_obs_list,
OnAuthError(AuthError(AuthError::INVALID_GAIA_CREDENTIALS)));
}
| 5,913 |
38,736 | 0 | hstore_to_json(PG_FUNCTION_ARGS)
{
HStore *in = PG_GETARG_HS(0);
int buflen,
i;
int count = HS_COUNT(in);
char *out,
*ptr;
char *base = STRPTR(in);
HEntry *entries = ARRPTR(in);
StringInfo src,
dst;
if (count == 0)
PG_RETURN_TEXT_P(cstring_to_text_with_len("{}",2));
buflen = 3... | 5,914 |
72,841 | 0 | static int jpc_com_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in)
{
jpc_com_t *com = &ms->parms.com;
/* Eliminate compiler warning about unused variables. */
cstate = 0;
if (jpc_getuint16(in, &com->regid)) {
return -1;
}
com->len = ms->len - 2;
if (com->len > 0) {
if (!(com->data = jas_mall... | 5,915 |
132,100 | 0 | void LayoutBlockFlow::moveChildrenTo(LayoutBoxModelObject* toBoxModelObject, LayoutObject* startChild, LayoutObject* endChild, LayoutObject* beforeChild, bool fullRemoveInsert)
{
if (childrenInline())
deleteLineBoxTree();
LayoutBoxModelObject::moveChildrenTo(toBoxModelObject, startChild, endChild, befor... | 5,916 |
91,839 | 0 | int select_files(const struct dirent *dirbuf)
{
if (dirbuf->d_name[0] == '.')
return 0;
else
return 1;
}
| 5,917 |
78,592 | 0 | pgp_get_pubkey(sc_card_t *card, unsigned int tag, u8 *buf, size_t buf_len)
{
sc_apdu_t apdu;
u8 apdu_case = (card->type == SC_CARD_TYPE_OPENPGP_GNUK)
? SC_APDU_CASE_4_SHORT : SC_APDU_CASE_4;
u8 idbuf[2];
int r;
sc_log(card->ctx, "called, tag=%04x\n", tag);
sc_format_apdu(card, &apdu, apdu_case, 0x47, 0x81,... | 5,918 |
52,871 | 0 | static ssize_t ucma_resolve_ip(struct ucma_file *file,
const char __user *inbuf,
int in_len, int out_len)
{
struct rdma_ucm_resolve_ip cmd;
struct ucma_context *ctx;
int ret;
if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
return -EFAULT;
ctx = ucma_get_ctx(file, cmd.id);
if (IS_ERR(ctx))
... | 5,919 |
135,939 | 0 | NodeListsNodeData& ContainerNode::ensureNodeLists()
{
return ensureRareData().ensureNodeLists();
}
| 5,920 |
13,810 | 0 | ZEND_API zend_bool zend_make_callable(zval *callable, char **callable_name TSRMLS_DC) /* {{{ */
{
zend_fcall_info_cache fcc;
if (zend_is_callable_ex(callable, NULL, IS_CALLABLE_STRICT, callable_name, NULL, &fcc, NULL TSRMLS_CC)) {
if (Z_TYPE_P(callable) == IS_STRING && fcc.calling_scope) {
zval_dtor(callable);
... | 5,921 |
106,450 | 0 | void WebPageProxy::close()
{
if (!isValid())
return;
m_isClosed = true;
m_backForwardList->pageClosed();
m_pageClient->pageClosed();
process()->disconnectFramesFromPage(this);
m_mainFrame = 0;
#if ENABLE(INSPECTOR)
if (m_inspector) {
m_inspector->invalidate();
m_i... | 5,922 |
129,067 | 0 | DebuggerGetTargetsFunction::DebuggerGetTargetsFunction() {
}
| 5,923 |
43,614 | 0 | static void core_opts_merge(const ap_conf_vector_t *sec, core_opts_t *opts)
{
core_dir_config *this_dir = ap_get_core_module_config(sec);
if (!this_dir) {
return;
}
if (this_dir->opts & OPT_UNSET) {
opts->add = (opts->add & ~this_dir->opts_remove)
| this_dir->opts_ad... | 5,924 |
129,731 | 0 | void ResourceFetcher::reloadImagesIfNotDeferred()
{
DocumentResourceMap::iterator end = m_documentResources.end();
for (DocumentResourceMap::iterator it = m_documentResources.begin(); it != end; ++it) {
Resource* resource = it->value.get();
if (resource->type() == Resource::Image && resource->st... | 5,925 |
53,698 | 0 | int ipv6_getsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen)
{
int err;
if (level == SOL_IP && sk->sk_type != SOCK_RAW)
return udp_prot.getsockopt(sk, level, optname, optval, optlen);
if (level != SOL_IPV6)
return -ENOPROTOOPT;
err = do_ipv6_getsockopt(sk, level... | 5,926 |
6,496 | 0 | int dtls1_is_timer_expired(SSL *s)
{
struct timeval timeleft;
/* Get time left until timeout, return false if no timer running */
if (dtls1_get_timeout(s, &timeleft) == NULL) {
return 0;
}
/* Return false if timer is not expired yet */
if (timeleft.tv_sec > 0 || timeleft.tv_usec > 0) {... | 5,927 |
28,886 | 0 | void kvm_track_tsc_matching(struct kvm_vcpu *vcpu)
{
#ifdef CONFIG_X86_64
bool vcpus_matched;
bool do_request = false;
struct kvm_arch *ka = &vcpu->kvm->arch;
struct pvclock_gtod_data *gtod = &pvclock_gtod_data;
vcpus_matched = (ka->nr_vcpus_matched_tsc + 1 ==
atomic_read(&vcpu->kvm->online_vcpus));
if (vcp... | 5,928 |
148,669 | 0 | void SkiaOutputSurfaceImpl::SetDrawRectangle(const gfx::Rect& draw_rectangle) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
DCHECK(capabilities().supports_dc_layers);
DCHECK(!draw_rectangle_);
draw_rectangle_.emplace(draw_rectangle);
}
| 5,929 |
95,271 | 0 | static int xfer_addusermbox(const mbentry_t *mbentry, void *rock)
{
struct xfer_header *xfer = (struct xfer_header *)rock;
/* Skip remote mailbox */
if (mbentry->mbtype & MBTYPE_REMOTE)
return 0;
struct xfer_item *item = xzmalloc(sizeof(struct xfer_item));
int r = mboxlist_lookup(mbentry-... | 5,930 |
60,394 | 0 | static void __exit bnep_exit(void)
{
bnep_sock_cleanup();
}
| 5,931 |
105,589 | 0 | void Automation::MouseButtonUp(int tab_id,
const gfx::Point& p,
Error** error) {
*error = CheckAdvancedInteractionsSupported();
if (*error)
return;
int windex = 0, tab_index = 0;
*error = GetIndicesForTab(tab_id, &windex, &tab_index);
if (*err... | 5,932 |
67,743 | 0 | void r_pkcs7_free_attributes (RPKCS7Attributes* attributes) {
ut32 i;
if (attributes) {
for (i = 0; i < attributes->length; ++i) {
r_pkcs7_free_attribute (attributes->elements[i]);
}
R_FREE (attributes->elements);
}
}
| 5,933 |
29,612 | 0 | int ip6_forward(struct sk_buff *skb)
{
struct dst_entry *dst = skb_dst(skb);
struct ipv6hdr *hdr = ipv6_hdr(skb);
struct inet6_skb_parm *opt = IP6CB(skb);
struct net *net = dev_net(dst->dev);
u32 mtu;
if (net->ipv6.devconf_all->forwarding == 0)
goto error;
if (skb_warn_if_lro(skb))
goto drop;
if (!xfrm6_... | 5,934 |
4,302 | 0 | PHP_MINIT_FUNCTION(basic) /* {{{ */
{
#ifdef ZTS
ts_allocate_id(&basic_globals_id, sizeof(php_basic_globals), (ts_allocate_ctor) basic_globals_ctor, (ts_allocate_dtor) basic_globals_dtor);
#ifdef PHP_WIN32
ts_allocate_id(&php_win32_core_globals_id, sizeof(php_win32_core_globals), (ts_allocate_ctor)php_win32_core_glob... | 5,935 |
2,207 | 0 | void FoFiType1C::eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName,
int offset, int nBytes,
Type1CIndex *subrIdx,
Type1CPrivateDict *pDict) {
GooString *buf;
GooString *charBuf;
charBuf = new GooString();
cvtGlyph(offset, nBytes, charBuf, subrIdx, pDict, gTrue);
buf = Goo... | 5,936 |
6,227 | 0 | static pixman_format_code_t get_pixman_format(uint32_t virtio_gpu_format)
{
switch (virtio_gpu_format) {
#ifdef HOST_WORDS_BIGENDIAN
case VIRTIO_GPU_FORMAT_B8G8R8X8_UNORM:
return PIXMAN_b8g8r8x8;
case VIRTIO_GPU_FORMAT_B8G8R8A8_UNORM:
return PIXMAN_b8g8r8a8;
case VIRTIO_GPU_FORMAT_X8R8G8... | 5,937 |
99,158 | 0 | void InlineFlowBox::paintMask(PaintInfo& paintInfo, int tx, int ty)
{
if (!paintInfo.shouldPaintWithinRoot(renderer()) || renderer()->style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask)
return;
IntRect frameRect = roundedFrameRect();
int x = frameRect.x();
int y = frameRect.y... | 5,938 |
34,161 | 0 | static void ccid3_hc_tx_packet_sent(struct sock *sk, unsigned int len)
{
struct ccid3_hc_tx_sock *hc = ccid3_hc_tx_sk(sk);
ccid3_hc_tx_update_s(hc, len);
if (tfrc_tx_hist_add(&hc->tx_hist, dccp_sk(sk)->dccps_gss))
DCCP_CRIT("packet history - out of memory!");
}
| 5,939 |
14,011 | 0 | int errwrite_nomem(const char *str, int len)
{
return errwrite(mem_err_print, str, len);
}
| 5,940 |
168,701 | 0 | AtomicString PerformanceNavigationTiming::AlpnNegotiatedProtocol() const {
return resource_timing_info_->FinalResponse().AlpnNegotiatedProtocol();
}
| 5,941 |
15,229 | 0 | PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval *values, zval *result, ulong opt TSRMLS_DC)
{
HashPosition pos;
char *field = NULL;
uint field_len = -1;
ulong num_idx = -1;
zval *meta, **def, **type, **not_null, **has_default, **is_enum, **val, *new_val;
int key_type, err ... | 5,942 |
84,327 | 0 | UNCURL_EXPORT void uncurl_free_info(struct uncurl_info *uci)
{
free(uci->host);
free(uci->path);
}
| 5,943 |
89,566 | 0 | SWFInput_read(SWFInput input, unsigned char* buffer, int count)
{
return input->read(input, buffer, count);
}
| 5,944 |
162,462 | 0 | void ImageResource::Finish(double load_finish_time,
base::SingleThreadTaskRunner* task_runner) {
if (multipart_parser_) {
multipart_parser_->Finish();
if (Data())
UpdateImageAndClearBuffer();
} else {
UpdateImage(Data(), ImageResourceContent::kUpdateImage, true);
Cle... | 5,945 |
61,923 | 0 | static int x509_check_wildcard( const char *cn, mbedtls_x509_buf *name )
{
size_t i;
size_t cn_idx = 0, cn_len = strlen( cn );
if( name->len < 3 || name->p[0] != '*' || name->p[1] != '.' )
return( 0 );
for( i = 0; i < cn_len; ++i )
{
if( cn[i] == '.' )
{
cn_idx ... | 5,946 |
38,346 | 0 | static int cm_alloc_response_msg(struct cm_port *port,
struct ib_mad_recv_wc *mad_recv_wc,
struct ib_mad_send_buf **msg)
{
struct ib_mad_send_buf *m;
struct ib_ah *ah;
ah = ib_create_ah_from_wc(port->mad_agent->qp->pd, mad_recv_wc->wc,
mad_recv_wc->recv_buf.grh, port->port_num);
if (IS_ERR(ah))
r... | 5,947 |
157,578 | 0 | void OnSecondResult(std::unique_ptr<runtime::EvaluateResult> result) {
EXPECT_TRUE(result->GetResult()->HasValue());
EXPECT_EQ(27 * 4, result->GetResult()->GetValue()->GetInt());
FinishAsynchronousTest();
}
| 5,948 |
80,914 | 0 | static int check_vmentry_postreqs(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12,
u32 *exit_qual)
{
bool ia32e;
*exit_qual = ENTRY_FAIL_DEFAULT;
if (!nested_guest_cr0_valid(vcpu, vmcs12->guest_cr0) ||
!nested_guest_cr4_valid(vcpu, vmcs12->guest_cr4))
return 1;
if (!nested_cpu_has2(vmcs12, SECONDARY_EX... | 5,949 |
110,984 | 0 | void RootWindowHostWin::SetCapture() {
if (!has_capture_) {
has_capture_ = true;
::SetCapture(hwnd());
}
}
| 5,950 |
123,103 | 0 | void RenderWidgetHostViewAndroid::HasTouchEventHandlers(
bool need_touch_events) {
if (content_view_core_)
content_view_core_->HasTouchEventHandlers(need_touch_events);
}
| 5,951 |
108,565 | 0 | int ScrollbarThemeWin::scrollbarThickness(ScrollbarControlSize controlSize)
{
static int thickness;
if (!thickness) {
if (isRunningLayoutTest())
return kMacScrollbarSize[controlSize];
thickness = IntSize(WebKit::Platform::current()->themeEngine()->getSize(SBP_ARROWBTN)).width();
... | 5,952 |
157,533 | 0 | void TestDataReductionProxyConfig::SetIsCaptivePortal(bool is_captive_portal) {
is_captive_portal_ = is_captive_portal;
}
| 5,953 |
171,988 | 0 | void handle_rc_metamsg_cmd (tBTA_AV_META_MSG *pmeta_msg)
{
/* Parse the metamsg command and pass it on to BTL-IFS */
UINT8 scratch_buf[512] = {0};
tAVRC_COMMAND avrc_command = {0};
tAVRC_STS status;
BTIF_TRACE_EVENT("+ %s", __FUNCTION__);
if (pmeta_msg->p_msg->hdr.opcode != AVRC_OP_VE... | 5,954 |
151,991 | 0 | bool RenderFrameHostImpl::IsFrameDisplayNone() {
return frame_tree_node()->frame_owner_properties().is_display_none;
}
| 5,955 |
126,596 | 0 | void TabStripGtk::UpdateDropIndex(GdkDragContext* context, gint x, gint y) {
x = gtk_util::MirroredXCoordinate(tabstrip_.get(), x);
for (int i = GetMiniTabCount(); i < GetTabCount(); ++i) {
TabGtk* tab = GetTabAt(i);
gfx::Rect bounds = tab->GetNonMirroredBounds(tabstrip_.get());
const int tab_max_x = bo... | 5,956 |
53,937 | 0 | struct in6_addr *ndp_msg_opt_route_prefix(struct ndp_msg *msg, int offset)
{
static struct in6_addr prefix;
struct __nd_opt_route_info *ri =
ndp_msg_payload_opts_offset(msg, offset);
memset(&prefix, 0, sizeof(prefix));
memcpy(&prefix, &ri->nd_opt_ri_prefix, (ri->nd_opt_ri_len - 1) << 3);
return &prefix;
}
| 5,957 |
83,345 | 0 | void CSoundFile::VolumeSlide(ModChannel *pChn, ModCommand::PARAM param)
{
if (param)
pChn->nOldVolumeSlide = param;
else
param = pChn->nOldVolumeSlide;
if((GetType() & (MOD_TYPE_MOD | MOD_TYPE_XM | MOD_TYPE_MT2 | MOD_TYPE_MED | MOD_TYPE_DIGI | MOD_TYPE_STP | MOD_TYPE_DTM)))
{
if((param & 0xF0) != 0)
{
p... | 5,958 |
131,186 | 0 | static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterForAllWorldsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
... | 5,959 |
165,723 | 0 | void FileReaderLoader::UnadjustReportedMemoryUsageToV8() {
if (!memory_usage_reported_to_v8_)
return;
v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(
-memory_usage_reported_to_v8_);
memory_usage_reported_to_v8_ = 0;
}
| 5,960 |
90,850 | 0 | static Bool leap_year(u32 year) {
year += 1900;
return (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0) ? GF_TRUE : GF_FALSE;
}
| 5,961 |
151,570 | 0 | Resource* ResourceFetcher::MatchPreload(const FetchParameters& params,
Resource::Type type) {
auto it = preloads_.find(PreloadKey(params.Url(), type));
if (it == preloads_.end())
return nullptr;
Resource* resource = it->value;
if (resource->MustRefetchDueToIntegrity... | 5,962 |
131,757 | 0 | static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
v8SetReturnValueString(info, imp->stringAttribute(), info.GetIsolate());
}
| 5,963 |
116,567 | 0 | int command_received_count() const {
return command_received_count_;
}
| 5,964 |
143,395 | 0 | void Job::SetCallback(const CompletionCallback& callback) {
CheckIsOnOriginThread();
DCHECK(callback_.is_null());
(*params_->num_outstanding_callbacks)++;
callback_ = callback;
}
| 5,965 |
183,165 | 1 | ext4_xattr_create_cache(char *name)
{
return mb_cache_create(name, HASH_BUCKET_BITS);
}
| 5,966 |
37,936 | 0 | static int kvm_guest_time_update(struct kvm_vcpu *v)
{
unsigned long flags, this_tsc_khz;
struct kvm_vcpu_arch *vcpu = &v->arch;
struct kvm_arch *ka = &v->kvm->arch;
s64 kernel_ns;
u64 tsc_timestamp, host_tsc;
struct pvclock_vcpu_time_info guest_hv_clock;
u8 pvclock_flags;
bool use_master_clock;
kernel_ns = 0... | 5,967 |
163,915 | 0 | ScriptPromise ImageCapture::getPhotoCapabilities(ScriptState* script_state) {
ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state);
ScriptPromise promise = resolver->Promise();
if (!service_) {
resolver->Reject(DOMException::Create(kNotFoundError, kNoServiceError));
return promis... | 5,968 |
20,334 | 0 | static int kvm_create_dirty_bitmap(struct kvm_memory_slot *memslot)
{
unsigned long dirty_bytes = 2 * kvm_dirty_bitmap_bytes(memslot);
if (dirty_bytes > PAGE_SIZE)
memslot->dirty_bitmap = vzalloc(dirty_bytes);
else
memslot->dirty_bitmap = kzalloc(dirty_bytes, GFP_KERNEL);
if (!memslot->dirty_bitmap)
return ... | 5,969 |
188,155 | 1 | status_t OMXNodeInstance::emptyBuffer(
OMX::buffer_id buffer,
OMX_U32 rangeOffset, OMX_U32 rangeLength,
OMX_U32 flags, OMX_TICKS timestamp, int fenceFd) {
Mutex::Autolock autoLock(mLock);
OMX_BUFFERHEADERTYPE *header = findBufferHeader(buffer, kPortIndexInput);
if (header == N... | 5,970 |
9,183 | 0 | uint32_t virtio_config_modern_readw(VirtIODevice *vdev, uint32_t addr)
{
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
uint16_t val;
if (addr + sizeof(val) > vdev->config_len) {
return (uint32_t)-1;
}
k->get_config(vdev, vdev->config);
val = lduw_le_p(vdev->config + addr);
... | 5,971 |
177,598 | 0 | void CheckXImageFrameBuffer(const vpx_image_t *img) {
if (img->fb_priv != NULL) {
const struct ExternalFrameBuffer *const ext_fb =
reinterpret_cast<ExternalFrameBuffer*>(img->fb_priv);
ASSERT_TRUE(img->planes[0] >= ext_fb->data &&
img->planes[0] < (ext_fb->data + ext_fb->size));
}
}
| 5,972 |
75,663 | 0 | close_attr_file(ATTR_FILE_T * attr_file)
{
if (attr_file == NULL) {
tsk_error_set_errno(TSK_ERR_FS_READ);
tsk_error_set_errstr("close_attr_file: NULL attr_file arg");
return 1;
}
if (attr_file->file != NULL) {
tsk_fs_file_close(attr_file->file);
attr_file->file = NUL... | 5,973 |
42,397 | 0 | static int hot_remove_disk(struct mddev *mddev, dev_t dev)
{
char b[BDEVNAME_SIZE];
struct md_rdev *rdev;
rdev = find_rdev(mddev, dev);
if (!rdev)
return -ENXIO;
if (mddev_is_clustered(mddev))
md_cluster_ops->metadata_update_start(mddev);
clear_bit(Blocked, &rdev->flags);
remove_and_add_spares(mddev, rdev... | 5,974 |
40,091 | 0 | static int aio_migratepage(struct address_space *mapping, struct page *new,
struct page *old, enum migrate_mode mode)
{
struct kioctx *ctx;
unsigned long flags;
int rc;
/* Writeback must be complete */
BUG_ON(PageWriteback(old));
put_page(old);
rc = migrate_page_move_mapping(mapping, new, old, NULL, mode);
... | 5,975 |
144,741 | 0 | void LocalSiteCharacteristicsDataImpl::OnInitCallback(
base::Optional<SiteCharacteristicsProto> db_site_characteristics) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (db_site_characteristics) {
auto this_features = GetAllFeaturesFromProto(&site_characteristics_);
auto db_features =
G... | 5,976 |
19,416 | 0 | int efx_reconfigure_port(struct efx_nic *efx)
{
int rc;
EFX_ASSERT_RESET_SERIALISED(efx);
mutex_lock(&efx->mac_lock);
rc = __efx_reconfigure_port(efx);
mutex_unlock(&efx->mac_lock);
return rc;
}
| 5,977 |
42,085 | 0 | int mm_answer_auth2_read_banner(int sock, Buffer *m)
{
char *banner;
buffer_clear(m);
banner = auth2_read_banner();
buffer_put_cstring(m, banner != NULL ? banner : "");
mm_request_send(sock, MONITOR_ANS_AUTH2_READ_BANNER, m);
free(banner);
return (0);
}
| 5,978 |
41,176 | 0 | static void tcp_mtup_probe_failed(struct sock *sk)
{
struct inet_connection_sock *icsk = inet_csk(sk);
icsk->icsk_mtup.search_high = icsk->icsk_mtup.probe_size - 1;
icsk->icsk_mtup.probe_size = 0;
}
| 5,979 |
59,909 | 0 | static int uas_resume(struct usb_interface *intf)
{
return 0;
}
| 5,980 |
142,847 | 0 | void HTMLMediaElement::OnViewportIntersectionChanged(
const HeapVector<Member<IntersectionObserverEntry>>& entries) {
const bool is_mostly_filling_viewport =
(entries.back()->intersectionRatio() >= kMostlyFillViewportThreshold);
if (mostly_filling_viewport_ == is_mostly_filling_viewport)
return;
mo... | 5,981 |
94,012 | 0 | static inline void shift_rfc5988(php_http_buffer_t *buf, char *key_str, size_t key_len, const char *ass, size_t asl, unsigned flags TSRMLS_DC)
{
char *str;
size_t len;
if (buf->used) {
php_http_buffer_append(buf, ass, asl);
}
prepare_key(flags, key_str, key_len, &str, &len TSRMLS_CC);
php_http_buffer_appends(... | 5,982 |
76,947 | 0 | format_SET_IPV4_SRC(const struct ofpact_ipv4 *a, struct ds *s)
{
ds_put_format(s, "%smod_nw_src:%s"IP_FMT,
colors.param, colors.end, IP_ARGS(a->ipv4));
}
| 5,983 |
1,581 | 0 | aspath_finish (void)
{
hash_clean (ashash, (void (*)(void *))aspath_free);
hash_free (ashash);
ashash = NULL;
if (snmp_stream)
stream_free (snmp_stream);
}
| 5,984 |
94,596 | 0 | void d_rehash(struct dentry * entry)
{
spin_lock(&entry->d_lock);
_d_rehash(entry);
spin_unlock(&entry->d_lock);
}
| 5,985 |
107,494 | 0 | static void _ewk_view_smart_resize(Evas_Object* ewkView, Evas_Coord w, Evas_Coord h)
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
evas_object_resize(smartData->backing_store, w, h);
smartData->changed.size = true;
_ewk_view_smart_changed(smartData);
}
| 5,986 |
175,522 | 0 | void ihevcd_parse_sei_payload(codec_t *ps_codec,
UWORD32 u4_payload_type,
UWORD32 u4_payload_size,
WORD8 i1_nal_type)
{
parse_ctxt_t *ps_parse = &ps_codec->s_parse;
bitstrm_t *ps_bitstrm = &ps_parse->s_bitstrm;
WORD32 payloa... | 5,987 |
21,327 | 0 | int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context)
{
struct mempolicy *new = NULL;
unsigned short mode;
unsigned short uninitialized_var(mode_flags);
nodemask_t nodes;
char *nodelist = strchr(str, ':');
char *flags = strchr(str, '=');
int err = 1;
if (nodelist) {
/* NUL-terminate mode or ... | 5,988 |
178,866 | 1 | static void nfs4_open_confirm_release(void *calldata)
{
struct nfs4_opendata *data = calldata;
struct nfs4_state *state = NULL;
/* If this request hasn't been cancelled, do nothing */
if (data->cancelled == 0)
goto out_free;
/* In case of error, no cleanup! */
if (!data->rpc_done)
goto out_free;
state = nfs4_opendata_... | 5,989 |
25,542 | 0 | const struct user_regset_view *task_user_regset_view(struct task_struct *task)
{
return &user_sh_native_view;
}
| 5,990 |
164,798 | 0 | static bool CheckVC1(const uint8_t* buffer, int buffer_size) {
RCHECK(buffer_size >= 24);
if (buffer[0] == 0xc5 &&
Read32(buffer + 4) == 0x04 &&
Read32(buffer + 20) == 0x0c) {
BitReader reader(buffer + 8, 12);
int profile = ReadBits(&reader, 4);
if (profile == 0 || profile == 4) { // sim... | 5,991 |
13,393 | 0 | static void i6300esb_realize(PCIDevice *dev, Error **errp)
{
I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev);
i6300esb_debug("I6300State = %p\n", d);
d->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, i6300esb_timer_expired, d);
d->previous_reboot_flag = 0;
memory_region_init_io(&d->io_mem, OBJECT(d), &i6... | 5,992 |
158,444 | 0 | void SendNotConsumedAcks(MockWidgetInputHandler::MessageVector& events) {
events.clear();
}
| 5,993 |
113,968 | 0 | virtual void Register(const std::vector<invalidation::ObjectId>& oids) {
}
| 5,994 |
163,927 | 0 | InlineBoxPosition ComputeInlineBoxPosition(const Position& position,
TextAffinity affinity,
TextDirection primary_direction) {
return ComputeInlineBoxPositionTemplate<EditingStrategy>(position, affinity,
... | 5,995 |
15,817 | 0 | static int peer_has_ufo(VirtIONet *n)
{
if (!peer_has_vnet_hdr(n))
return 0;
n->has_ufo = qemu_has_ufo(qemu_get_queue(n->nic)->peer);
return n->has_ufo;
}
| 5,996 |
28,725 | 0 | static inline int apic_lvtt_tscdeadline(struct kvm_lapic *apic)
{
return ((kvm_apic_get_reg(apic, APIC_LVTT) &
apic->lapic_timer.timer_mode_mask) ==
APIC_LVT_TIMER_TSCDEADLINE);
}
| 5,997 |
64,666 | 0 | onig_get_case_fold_flag(regex_t* reg)
{
return reg->case_fold_flag;
}
| 5,998 |
5,483 | 0 | static Bool Normalize( EXEC_OPS TT_F26Dot6 Vx,
TT_F26Dot6 Vy,
TT_UnitVector* R )
{
TT_F26Dot6 W;
Bool S1, S2;
if ( ABS( Vx ) < 0x10000L && ABS( Vy ) < 0x10000L )
{
Vx *= 0x100;
Vy *= 0x100;
... | 5,999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.