unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
126,243 | 0 | void Browser::TabDeactivated(TabContents* contents) {
fullscreen_controller_->OnTabDeactivated(contents);
search_delegate_->OnTabDeactivated(contents->web_contents());
window_->GetLocationBar()->SaveStateToContents(contents->web_contents());
}
| 1,800 |
149,863 | 0 | void LayerTreeHost::SetVisible(bool visible) {
if (visible_ == visible)
return;
visible_ = visible;
proxy_->SetVisible(visible);
}
| 1,801 |
142,225 | 0 | TestEntryInfo& SetSharedOption(SharedOption option) {
shared_option = option;
return *this;
}
| 1,802 |
53,374 | 0 | iperf_free_stream(struct iperf_stream *sp)
{
struct iperf_interval_results *irp, *nirp;
/* XXX: need to free interval list too! */
munmap(sp->buffer, sp->test->settings->blksize);
close(sp->buffer_fd);
if (sp->diskfile_fd >= 0)
close(sp->diskfile_fd);
for (irp = TAILQ_FIRST(&sp->result->interv... | 1,803 |
21,794 | 0 | static int em_vmmcall(struct x86_emulate_ctxt *ctxt)
{
int rc;
rc = ctxt->ops->fix_hypercall(ctxt);
/* Disable writeback. */
ctxt->dst.type = OP_NONE;
return rc;
}
| 1,804 |
88,923 | 0 | MagickExport MagickBooleanType FunctionImage(Image *image,
const MagickFunction function,const size_t number_parameters,
const double *parameters,ExceptionInfo *exception)
{
MagickBooleanType
status;
status=FunctionImageChannel(image,CompositeChannels,function,
number_parameters,parameters,exception);
... | 1,805 |
57,163 | 0 | static int nfs4_lookup_root_sec(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info, rpc_authflavor_t flavor)
{
struct rpc_auth_create_args auth_args = {
.pseudoflavor = flavor,
};
struct rpc_auth *auth;
int ret;
auth = rpcauth_create(&auth_args, server->client);
if (IS_ERR(auth)) {
... | 1,806 |
138,367 | 0 | void ServiceManagerConnection::DestroyForProcess() {
g_connection_for_process.Get().reset();
}
| 1,807 |
16,248 | 0 | Condor_Auth_SSL::decrypt(unsigned char* input, int input_len,
unsigned char* & output, int& output_len)
{
return encrypt_or_decrypt(false,input,input_len,output,output_len);
}
| 1,808 |
187,034 | 1 | void DOMStorageContextWrapper::Shutdown() {
DCHECK(context_.get());
mojo_task_runner_->PostTask(
FROM_HERE, base::BindOnce(&LocalStorageContextMojo::ShutdownAndDelete,
base::Unretained(mojo_state_)));
mojo_state_ = nullptr;
if (mojo_session_state_) {
mojo_task_runner_->PostTa... | 1,809 |
183,603 | 1 | void WebPluginImpl::didFinishLoadingFrameRequest(
const WebURL& url, void* notify_data) {
if (delegate_) {
delegate_->DidFinishLoadWithReason(
url, NPRES_DONE, reinterpret_cast<intptr_t>(notify_data));
}
}
| 1,810 |
148,559 | 0 | void WebContentsImpl::SetHistoryOffsetAndLength(int history_offset,
int history_length) {
SendPageMessage(new PageMsg_SetHistoryOffsetAndLength(
MSG_ROUTING_NONE, history_offset, history_length));
}
| 1,811 |
4,584 | 0 | PHP_FUNCTION(openssl_pkcs12_export_to_file)
{
X509 * cert = NULL;
BIO * bio_out = NULL;
PKCS12 * p12 = NULL;
char * filename;
char * friendly_name = NULL;
size_t filename_len;
char * pass;
size_t pass_len;
zval *zcert = NULL, *zpkey = NULL, *args = NULL;
EVP_PKEY *priv_key = NULL;
zend_resource *certresource... | 1,812 |
178,828 | 1 | xfs_acl_from_disk(struct xfs_acl *aclp)
{
struct posix_acl_entry *acl_e;
struct posix_acl *acl;
struct xfs_acl_entry *ace;
int count, i;
count = be32_to_cpu(aclp->acl_cnt);
acl = posix_acl_alloc(count, GFP_KERNEL);
if (!acl)
return ERR_PTR(-ENOMEM);
for (i = 0; i < count; i++) {
acl_e = &acl->a_ent... | 1,813 |
174,220 | 0 | int Camera3Device::getId() const {
return mId;
}
| 1,814 |
95,512 | 0 | ALuint S_AL_BufferGet(sfxHandle_t sfx)
{
return knownSfx[sfx].buffer;
}
| 1,815 |
96,382 | 0 | static bool dir_is_in_dump_location(const char *dump_dir_name)
{
unsigned len = strlen(g_settings_dump_location);
if (strncmp(dump_dir_name, g_settings_dump_location, len) == 0
&& dump_dir_name[len] == '/'
/* must not contain "/." anywhere (IOW: disallow ".." component) */
&& !strstr(dump_dir_nam... | 1,816 |
49,412 | 0 | static int proc_cwd_link(struct dentry *dentry, struct path *path)
{
struct task_struct *task = get_proc_task(d_inode(dentry));
int result = -ENOENT;
if (task) {
task_lock(task);
if (task->fs) {
get_fs_pwd(task->fs, path);
result = 0;
}
task_unlock(task);
put_task_struct(task);
}
return result;
}
| 1,817 |
46,931 | 0 | static int crc32_pclmul_update(struct shash_desc *desc, const u8 *data,
unsigned int len)
{
u32 *crcp = shash_desc_ctx(desc);
*crcp = crc32_pclmul_le(*crcp, data, len);
return 0;
}
| 1,818 |
10,585 | 0 | Ins_DEBUG( TT_ExecContext exc )
{
exc->error = FT_THROW( Debug_OpCode );
}
| 1,819 |
156,372 | 0 | void DebuggerSendCommandFunction::SendDetachedError() {
error_ = debugger_api_constants::kDetachedWhileHandlingError;
SendResponse(false);
}
| 1,820 |
56,071 | 0 | perf_event_ctx_lock_nested(struct perf_event *event, int nesting)
{
struct perf_event_context *ctx;
again:
rcu_read_lock();
ctx = ACCESS_ONCE(event->ctx);
if (!atomic_inc_not_zero(&ctx->refcount)) {
rcu_read_unlock();
goto again;
}
rcu_read_unlock();
mutex_lock_nested(&ctx->mutex, nesting);
if (event->ctx... | 1,821 |
67,533 | 0 | static void ext4_map_blocks_es_recheck(handle_t *handle,
struct inode *inode,
struct ext4_map_blocks *es_map,
struct ext4_map_blocks *map,
int flags)
{
int retval;
map->m_flags = 0;
/*
* There is a race window that the result is not the same.
* e.g. xfstests #223 when... | 1,822 |
97,983 | 0 | void RenderView::OnSelectAll() {
if (!webview())
return;
webview()->focusedFrame()->executeCommand(
WebString::fromUTF8("SelectAll"));
UserMetricsRecordAction("SelectAll");
}
| 1,823 |
165,834 | 0 | void SVGElement::SynchronizeAnimatedSVGAttribute(
const QualifiedName& name) const {
if (!GetElementData() ||
!GetElementData()->animated_svg_attributes_are_dirty_)
return;
const_cast<SVGElement*>(this)->EnsureAttributeAnimValUpdated();
if (name == AnyQName()) {
AttributeToPropertyMap::const_i... | 1,824 |
38,468 | 0 | static int cma_connect_ib(struct rdma_id_private *id_priv,
struct rdma_conn_param *conn_param)
{
struct ib_cm_req_param req;
struct rdma_route *route;
void *private_data;
struct ib_cm_id *id;
int offset, ret;
memset(&req, 0, sizeof req);
offset = cma_user_data_offset(id_priv);
req.private_data_len = offse... | 1,825 |
150,368 | 0 | ash::wm::WindowState* ClientControlledShellSurface::GetWindowState() {
return ash::wm::GetWindowState(widget_->GetNativeWindow());
}
| 1,826 |
140,594 | 0 | void OutOfProcessInstance::Alert(const std::string& message) {
ModalDialog(this, "alert", message, std::string());
}
| 1,827 |
11,144 | 0 | PHP_METHOD(Phar, setAlias)
{
char *alias, *error, *oldalias;
phar_archive_data *fd_ptr;
size_t alias_len, oldalias_len;
int old_temp, readd = 0;
PHAR_ARCHIVE_OBJECT();
if (PHAR_G(readonly) && !phar_obj->archive->is_data) {
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0,
"Cannot write out phar a... | 1,828 |
185,934 | 1 | void V8LazyEventListener::prepareListenerObject(ExecutionContext* executionContext)
{
if (!executionContext)
return;
// A ScriptState used by the event listener needs to be calculated based on
// the ExecutionContext that fired the the event listener and the world
// that installed the event listener.
v8::HandleScope ... | 1,829 |
181,163 | 1 | static ssize_t driver_override_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct platform_device *pdev = to_platform_device(dev);
return sprintf(buf, "%s\n", pdev->driver_override);
}
| 1,830 |
174,566 | 0 | void BTM_SendKeypressNotif(BD_ADDR bd_addr, tBTM_SP_KEY_TYPE type)
{
/* This API only make sense between PASSKEY_REQ and SP complete */
if (btm_cb.pairing_state == BTM_PAIR_STATE_KEY_ENTRY)
btsnd_hcic_send_keypress_notif (bd_addr, type);
}
| 1,831 |
13,869 | 0 | static int keyvalcmp(const void *ap, const void *bp)
{
const struct keyval *a = ap;
const struct keyval *b = bp;
const char *an;
const char *bn;
/* We should never get a->k == NULL or b->k == NULL. If we
* do, then they match. */
if (a->k < PDF_OBJ_NAME__LIMIT)
an = PDF_NAMES[(intptr_t)a->k];
else if (a->k ... | 1,832 |
170,623 | 0 | int Reverb_init(ReverbContext *pContext){
int status;
ALOGV("\tReverb_init start");
CHECK_ARG(pContext != NULL);
if (pContext->hInstance != NULL){
Reverb_free(pContext);
}
pContext->config.inputCfg.accessMode = EFFECT_BUFFER_ACCESS_READ;
if (pContext->auxiliary) {
pContex... | 1,833 |
93,333 | 0 | static ssize_t tun_show_owner(struct device *dev, struct device_attribute *attr,
char *buf)
{
struct tun_struct *tun = netdev_priv(to_net_dev(dev));
return uid_valid(tun->owner)?
sprintf(buf, "%u\n",
from_kuid_munged(current_user_ns(), tun->owner)):
sprintf(buf, "-1\n");
}
| 1,834 |
96,923 | 0 | int tracing_snapshot_cond_disable(struct trace_array *tr)
{
return false;
}
| 1,835 |
53,832 | 0 | static int __init acpi_no_static_ssdt_setup(char *s)
{
acpi_gbl_disable_ssdt_table_install = TRUE;
pr_info("ACPI: static SSDT installation disabled\n");
return 0;
}
| 1,836 |
36,049 | 0 | struct buffer_head *udf_expand_dir_adinicb(struct inode *inode, int *block,
int *err)
{
int newblock;
struct buffer_head *dbh = NULL;
struct kernel_lb_addr eloc;
uint8_t alloctype;
struct extent_position epos;
struct udf_fileident_bh sfibh, dfibh;
loff_t f_pos = udf_ext0_offset(inode);
int size = udf_e... | 1,837 |
133,567 | 0 | WebContentsImpl::GetJavaWebContents() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
WebContentsAndroid* web_contents_android =
static_cast<WebContentsAndroid*>(GetUserData(kWebContentsAndroidKey));
if (!web_contents_android) {
web_contents_android = new WebContentsAndroid(this);
SetUserD... | 1,838 |
112,225 | 0 | void QuotaTask::Start() {
DCHECK(observer_);
observer()->RegisterTask(this);
Run();
}
| 1,839 |
43,608 | 0 | AP_DECLARE(int) ap_some_auth_required(request_rec *r)
{
/* Is there a require line configured for the type of *this* req? */
if (ap__authz_ap_some_auth_required) {
return ap__authz_ap_some_auth_required(r);
}
else
return 0;
}
| 1,840 |
57,928 | 0 | static int sock_sendmsg_nosec(struct socket *sock, struct msghdr *msg, size_t size)
{
return do_sock_sendmsg(sock, msg, size, true);
}
| 1,841 |
31,175 | 0 | unregister_framebuffer(struct fb_info *fb_info)
{
int ret;
mutex_lock(®istration_lock);
ret = do_unregister_framebuffer(fb_info);
mutex_unlock(®istration_lock);
return ret;
}
| 1,842 |
127,978 | 0 | jlong AwContents::CapturePicture(JNIEnv* env,
jobject obj,
int width,
int height) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
return reinterpret_cast<intptr_t>(
new AwPicture(browser_view_renderer_.CapturePicture(... | 1,843 |
152,550 | 0 | void RenderFrameImpl::UpdateAllLifecyclePhasesAndCompositeForTesting() {
NOTREACHED();
}
| 1,844 |
181,474 | 1 | DefragReverseSimpleTest(void)
{
Packet *p1 = NULL, *p2 = NULL, *p3 = NULL;
Packet *reassembled = NULL;
int id = 12;
int i;
int ret = 0;
DefragInit();
p1 = BuildTestPacket(id, 0, 1, 'A', 8);
if (p1 == NULL)
goto end;
p2 = BuildTestPacket(id, 1, 1, 'B', 8);
if (p2 == NULL)
goto end;
p3 = BuildTestPacket(id,... | 1,845 |
26,691 | 0 | static int nl80211_get_reg(struct sk_buff *skb, struct genl_info *info)
{
struct sk_buff *msg;
void *hdr = NULL;
struct nlattr *nl_reg_rules;
unsigned int i;
int err = -EINVAL;
mutex_lock(&cfg80211_mutex);
if (!cfg80211_regdomain)
goto out;
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
if (!msg) {
er... | 1,846 |
88,575 | 0 | MagickExport ssize_t WriteBlobMSBSignedLong(Image *image,const signed int value)
{
union
{
unsigned int
unsigned_value;
signed int
signed_value;
} quantum;
unsigned char
buffer[4];
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
quantum.signed_v... | 1,847 |
70,171 | 0 | static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortSlong8(int64 value)
{
if ((value<-0x8000)||(value>0x7FFF))
return(TIFFReadDirEntryErrRange);
else
return(TIFFReadDirEntryErrOk);
}
| 1,848 |
52,912 | 0 | static void assign_ctxt_affinity(struct file *fp, struct qib_devdata *dd)
{
struct qib_filedata *fd = fp->private_data;
const unsigned int weight = cpumask_weight(¤t->cpus_allowed);
const struct cpumask *local_mask = cpumask_of_pcibus(dd->pcidev->bus);
int local_cpu;
/*
* If process has NOT already set it... | 1,849 |
188,540 | 1 | virtual void ResetModel() {
last_pts_ = 0;
bits_in_buffer_model_ = cfg_.rc_target_bitrate * cfg_.rc_buf_initial_sz;
frame_number_ = 0;
tot_frame_number_ = 0;
first_drop_ = 0;
num_drops_ = 0;
for (int i = 0; i < 3; ++i) {
bits_total_[i] = 0;
}
}
| 1,850 |
55,985 | 0 | static void put_ldops(struct tty_ldisc_ops *ldops)
{
unsigned long flags;
raw_spin_lock_irqsave(&tty_ldiscs_lock, flags);
ldops->refcount--;
module_put(ldops->owner);
raw_spin_unlock_irqrestore(&tty_ldiscs_lock, flags);
}
| 1,851 |
131,071 | 0 | static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringArrayFunction", "TestObject", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
exceptionState.throwTypeError(ExceptionMessa... | 1,852 |
140,256 | 0 | void DialogHandler::dialogCreated(LocalDOMWindow* dialogFrame)
{
if (m_dialogArguments.IsEmpty())
return;
v8::Handle<v8::Context> context = toV8Context(dialogFrame->frame(), m_scriptState->world());
if (context.IsEmpty())
return;
m_scriptStateForDialogFrame = ScriptState::from(context);
... | 1,853 |
159,007 | 0 | void Release(FPDF_SYSFONTINFO* sysfontinfo) {
auto* fontinfo_with_metrics =
static_cast<FPDF_SYSFONTINFO_WITHMETRICS*>(sysfontinfo);
if (!fontinfo_with_metrics->default_sysfontinfo->Release)
return;
fontinfo_with_metrics->default_sysfontinfo->Release(
fontinfo_with_metrics->default_sysfontinfo);
}... | 1,854 |
182,792 | 1 | static MagickOffsetType TIFFSeekCustomStream(const MagickOffsetType offset,
const int whence,void *user_data)
{
PhotoshopProfile
*profile;
profile=(PhotoshopProfile *) user_data;
switch (whence)
{
case SEEK_SET:
default:
{
if (offset < 0)
return(-1);
profile->offset=offset... | 1,855 |
7,918 | 0 | static void ctrycatchfinally(JF, js_Ast *trystm, js_Ast *catchvar, js_Ast *catchstm, js_Ast *finallystm)
{
int L1, L2, L3;
L1 = emitjump(J, F, OP_TRY);
{
/* if we get here, we have caught an exception in the try block */
L2 = emitjump(J, F, OP_TRY);
{
/* if we get here, we have caught an exception in the ca... | 1,856 |
24,554 | 0 | dma_addr_t map_descbuffer(struct b43_dmaring *ring,
unsigned char *buf, size_t len, int tx)
{
dma_addr_t dmaaddr;
if (tx) {
dmaaddr = dma_map_single(ring->dev->dev->dma_dev,
buf, len, DMA_TO_DEVICE);
} else {
dmaaddr = dma_map_single(ring->dev->dev->dma_dev,
buf, len, DMA_FROM_DEVICE);
... | 1,857 |
104,376 | 0 | void CSSComputedStyleDeclaration::setCssText(const String&, ExceptionCode& ec)
{
ec = NO_MODIFICATION_ALLOWED_ERR;
}
| 1,858 |
93,445 | 0 | static void netif_reset_xps_queues(struct net_device *dev, u16 offset,
u16 count)
{
struct xps_dev_maps *dev_maps;
int cpu, i;
bool active = false;
mutex_lock(&xps_map_mutex);
dev_maps = xmap_dereference(dev->xps_maps);
if (!dev_maps)
goto out_no_maps;
for_each_possible_cpu(cpu)
active |= remove_xp... | 1,859 |
166,493 | 0 | URLPatternSet PermissionsData::GetEffectiveHostPermissions() const {
base::AutoLock auto_lock(runtime_lock_);
URLPatternSet effective_hosts =
active_permissions_unsafe_->effective_hosts().Clone();
for (const auto& val : tab_specific_permissions_)
effective_hosts.AddPatterns(val.second->effective_hosts()... | 1,860 |
14,391 | 0 | do_motd(void)
{
FILE *f;
char buf[256];
if (options.print_motd) {
#ifdef HAVE_LOGIN_CAP
f = fopen(login_getcapstr(lc, "welcome", "/etc/motd",
"/etc/motd"), "r");
#else
f = fopen("/etc/motd", "r");
#endif
if (f) {
while (fgets(buf, sizeof(buf), f))
fputs(buf, stdout);
fclose(f);
}
}
}
| 1,861 |
64,145 | 0 | static int _server_handle_qTStatus(libgdbr_t *g) {
int ret;
const char *message = "";
if ((ret = send_ack (g)) < 0) {
return -1;
}
return send_msg (g, message);
}
| 1,862 |
108,456 | 0 | virtual webkit_glue::ResourceLoaderBridge::Peer* OnRequestComplete(
webkit_glue::ResourceLoaderBridge::Peer* current_peer,
ResourceType::Type resource_type,
int error_code) {
if (!weak_factory_.HasWeakPtrs()) {
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bin... | 1,863 |
86,454 | 0 | int dup_userfaultfd(struct vm_area_struct *vma, struct list_head *fcs)
{
struct userfaultfd_ctx *ctx = NULL, *octx;
struct userfaultfd_fork_ctx *fctx;
octx = vma->vm_userfaultfd_ctx.ctx;
if (!octx || !(octx->features & UFFD_FEATURE_EVENT_FORK)) {
vma->vm_userfaultfd_ctx = NULL_VM_UFFD_CTX;
vma->vm_flags &= ~(V... | 1,864 |
58,786 | 0 | struct page *__page_cache_alloc(gfp_t gfp)
{
if (cpuset_do_page_mem_spread()) {
int n = cpuset_mem_spread_node();
return alloc_pages_node(n, gfp, 0);
}
return alloc_pages(gfp, 0);
}
| 1,865 |
181,224 | 1 | accept_ice_connection (GIOChannel *source,
GIOCondition condition,
GsmIceConnectionData *data)
{
IceListenObj listener;
IceConn ice_conn;
IceAcceptStatus status;
GsmClient *client;
GsmXsmpServer *server;
listener = data->listener;
server = data... | 1,866 |
62,746 | 0 | ModuleExport size_t RegisterDCMImage(void)
{
MagickInfo
*entry;
static const char
*DCMNote=
{
"DICOM is used by the medical community for images like X-rays. The\n"
"specification, \"Digital Imaging and Communications in Medicine\n"
"(DICOM)\", is available at http://medical.nema.org... | 1,867 |
82,900 | 0 | static void free_StringTable(StringTable* stringTable) {
if (stringTable) {
free (stringTable->szKey);
if (stringTable->Children) {
ut32 childrenST = 0;
for (; childrenST < stringTable->numOfChildren; childrenST++) {
free_String (stringTable->Children[childrenST]);
}
free (stringTable->Children);
... | 1,868 |
130,438 | 0 | ThreadWatcherList::ThreadWatcherList() {
DCHECK(WatchDogThread::CurrentlyOnWatchDogThread());
CHECK(!g_thread_watcher_list_);
g_thread_watcher_list_ = this;
}
| 1,869 |
170,486 | 0 | sp<IBinder> Parcel::readStrongBinder() const
{
sp<IBinder> val;
unflatten_binder(ProcessState::self(), *this, &val);
return val;
}
| 1,870 |
29,800 | 0 | event_requires_mode_exclusion(struct perf_event_attr *attr)
{
return attr->exclude_idle || attr->exclude_user ||
attr->exclude_kernel || attr->exclude_hv;
}
| 1,871 |
119,717 | 0 | void ResetScreenHandler::ShowWithParams() {
int dialog_type;
if (reboot_was_requested_) {
dialog_type = rollback_available_ ?
reset::DIALOG_SHORTCUT_CONFIRMING_POWERWASH_AND_ROLLBACK :
reset::DIALOG_SHORTCUT_CONFIRMING_POWERWASH_ONLY;
} else {
dialog_type = rollback_available_ ?
rese... | 1,872 |
134,953 | 0 | const base::FilePath& DriveFsHost::GetMountPath() const {
DCHECK(IsMounted());
return mount_state_->mount_path();
}
| 1,873 |
107,608 | 0 | Eina_Bool ewk_view_setting_application_cache_get(const Evas_Object* ewkView)
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
return priv->settings.offlineAppCache;
}
| 1,874 |
89,077 | 0 | static void ptrace_unfreeze_traced(struct task_struct *task)
{
if (task->state != __TASK_TRACED)
return;
WARN_ON(!task->ptrace || task->parent != current);
/*
* PTRACE_LISTEN can allow ptrace_trap_notify to wake us up remotely.
* Recheck state under the lock to close this race.
*/
spin_lock_irq(&task->sig... | 1,875 |
28,191 | 0 | static int vsse16_c(/*MpegEncContext*/ void *c, uint8_t *s1, uint8_t *s2, int stride, int h){
int score=0;
int x,y;
for(y=1; y<h; y++){
for(x=0; x<16; x++){
score+= SQ(s1[x ] - s2[x ] - s1[x +stride] + s2[x +stride]);
}
s1+= stride;
s2+= stride;
}
retu... | 1,876 |
147,104 | 0 | SingleThreadTaskRunner* WebLocalFrameImpl::UnthrottledTaskRunner() {
return GetFrame()
->FrameScheduler()
->UnthrottledTaskRunner()
->ToSingleThreadTaskRunner();
}
| 1,877 |
57,959 | 0 | static int nf_tables_dump_tables(struct sk_buff *skb,
struct netlink_callback *cb)
{
const struct nfgenmsg *nfmsg = nlmsg_data(cb->nlh);
const struct nft_af_info *afi;
const struct nft_table *table;
unsigned int idx = 0, s_idx = cb->args[0];
struct net *net = sock_net(skb->sk);
int family = nfmsg->nfgen_fami... | 1,878 |
60,058 | 0 | RBinElfSymbol *Elf_(r_bin_elf_get_imports)(ELFOBJ *bin) {
if (!bin->g_imports) {
bin->g_imports = Elf_(_r_bin_elf_get_symbols_imports) (bin, R_BIN_ELF_IMPORTS);
}
return bin->g_imports;
}
| 1,879 |
112,968 | 0 | bool ChromeDownloadManagerDelegate::ShouldCompleteDownload(
DownloadItem* item,
const base::Closure& user_complete_callback) {
return IsDownloadReadyForCompletion(item, base::Bind(
&ChromeDownloadManagerDelegate::ShouldCompleteDownloadInternal, this,
item->GetId(), user_complete_callback));
}
| 1,880 |
88,062 | 0 | void *genlmsg_put(struct sk_buff *skb, u32 portid, u32 seq,
const struct genl_family *family, int flags, u8 cmd)
{
struct nlmsghdr *nlh;
struct genlmsghdr *hdr;
nlh = nlmsg_put(skb, portid, seq, family->id, GENL_HDRLEN +
family->hdrsize, flags);
if (nlh == NULL)
return NULL;
hdr = nlmsg_data(nlh);
hdr-... | 1,881 |
23,576 | 0 | static struct multipath *alloc_multipath(struct dm_target *ti)
{
struct multipath *m;
m = kzalloc(sizeof(*m), GFP_KERNEL);
if (m) {
INIT_LIST_HEAD(&m->priority_groups);
INIT_LIST_HEAD(&m->queued_ios);
spin_lock_init(&m->lock);
m->queue_io = 1;
m->pg_init_delay_msecs = DM_PG_INIT_DELAY_DEFAULT;
INIT_WORK... | 1,882 |
183,371 | 1 | MagickExport Image *ComplexImages(const Image *images,const ComplexOperator op,
ExceptionInfo *exception)
{
#define ComplexImageTag "Complex/Image"
CacheView
*Ai_view,
*Ar_view,
*Bi_view,
*Br_view,
*Ci_view,
*Cr_view;
const char
*artifact;
const Image
*Ai_image,
*Ar_image,
*Bi_image,
*Br_image;
double
snr;
Image
... | 1,883 |
19,129 | 0 | static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
{
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp;
struct sk_buff *opt_skb = NULL;
/* Imagine: socket is IPv6. IPv4 packet arrives,
goes to IPv4 receive handler and backlogged.
From backlog it always goes here. Kerboom...
Fortunat... | 1,884 |
39,119 | 0 | static int dccp_print_tuple(struct seq_file *s,
const struct nf_conntrack_tuple *tuple)
{
return seq_printf(s, "sport=%hu dport=%hu ",
ntohs(tuple->src.u.dccp.port),
ntohs(tuple->dst.u.dccp.port));
}
| 1,885 |
92,343 | 0 | keyeq(KEY s1, KEY s2)
{
for (; *s1 == *s2; s1++, s2++)
if (*s1 == 0)
return XML_TRUE;
return XML_FALSE;
}
| 1,886 |
98,715 | 0 | void WebPluginDelegatePepper::DidReceiveManualResponse(
const GURL& url, const std::string& mime_type,
const std::string& headers, uint32 expected_length, uint32 last_modified) {
instance()->DidReceiveManualResponse(url, mime_type, headers,
expected_length, last_modified... | 1,887 |
1,855 | 0 | static void reds_disconnect(void)
{
RingItem *link, *next;
spice_info(NULL);
RING_FOREACH_SAFE(link, next, &reds->clients) {
reds_client_disconnect(SPICE_CONTAINEROF(link, RedClient, link));
}
reds_mig_cleanup();
}
| 1,888 |
110,430 | 0 | bool GLES2DecoderImpl::BoundFramebufferHasDepthAttachment() {
FramebufferManager::FramebufferInfo* framebuffer =
GetFramebufferInfoForTarget(GL_DRAW_FRAMEBUFFER_EXT);
if (framebuffer) {
return framebuffer->HasDepthAttachment();
}
if (offscreen_target_frame_buffer_.get()) {
return offscreen_target_... | 1,889 |
84,319 | 0 | UNCURL_EXPORT int32_t uncurl_accept(struct uncurl_tls_ctx *uc_tls, struct uncurl_conn *ucc,
struct uncurl_conn **ucc_new_in, int32_t scheme)
{
int32_t r = UNCURL_ERR_DEFAULT;
int32_t e;
struct uncurl_conn *ucc_new = *ucc_new_in = uncurl_new_conn(ucc);
struct net_context *new_net = NULL;
e = net_accept(ucc->net... | 1,890 |
181,545 | 1 | static int store_xauthority(void) {
fs_build_mnt_dir();
char *src;
char *dest = RUN_XAUTHORITY_FILE;
FILE *fp = fopen(dest, "w");
if (fp) {
fprintf(fp, "\n");
SET_PERMS_STREAM(fp, getuid(), getgid(), 0600);
fclose(fp);
}
if (asprintf(&src, "%s/.Xauthority", cfg.homedir) == -1)
errExit("asprintf"... | 1,891 |
129,592 | 0 | SVGMarkerOrientType LayoutSVGResourceMarker::orientType() const
{
return toSVGMarkerElement(element())->orientType()->currentValue()->enumValue();
}
| 1,892 |
81,413 | 0 | static void trace_module_add_evals(struct module *mod)
{
if (!mod->num_trace_evals)
return;
/*
* Modules with bad taint do not have events created, do
* not bother with enums either.
*/
if (trace_module_has_bad_taint(mod))
return;
trace_insert_eval_map(mod, mod->trace_evals, mod->num_trace_evals);
}
| 1,893 |
183,362 | 1 | MagickExport void *DetachBlob(BlobInfo *blob_info)
{
void
*data;
assert(blob_info != (BlobInfo *) NULL);
if (blob_info->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
if (blob_info->mapped != MagickFalse)
{
(void) UnmapBlob(blob_info->data,blob_info->lengt... | 1,894 |
45,121 | 0 | static int req_assbackwards_field(request_rec *r)
{
return r->assbackwards;
}
| 1,895 |
44,194 | 0 | int ssl3_check_cert_and_algorithm(SSL *s)
{
int i, idx;
long alg_k, alg_a;
EVP_PKEY *pkey = NULL;
int pkey_bits;
SESS_CERT *sc;
#ifndef OPENSSL_NO_RSA
RSA *rsa;
#endif
#ifndef OPENSSL_NO_DH
DH *dh;
#endif
alg_k = s->s3->tmp.new_cipher->algorithm_mkey;
alg_a = s->s3->tmp.new_cipher->... | 1,896 |
85,487 | 0 | static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block)
{
sector_t status;
u64 p_blkno = 0;
int err = 0;
struct inode *inode = mapping->host;
trace_ocfs2_bmap((unsigned long long)OCFS2_I(inode)->ip_blkno,
(unsigned long long)block);
/*
* The swap code (ab-)uses ->bmap to get a block mapp... | 1,897 |
172,403 | 0 | bool omx_venc::dev_set_buf_req(OMX_U32 *min_buff_count,
OMX_U32 *actual_buff_count,
OMX_U32 *buff_size,
OMX_U32 port)
{
return handle->venc_set_buf_req(min_buff_count,
actual_buff_count,
buff_size,
port);
}
| 1,898 |
153,852 | 0 | void GLES2Implementation::VertexAttribIPointer(GLuint index,
GLint size,
GLenum type,
GLsizei stride,
const void* ptr) {
GPU_CLIEN... | 1,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.