unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
164,760 | 0 | void ChildProcessLauncherHelper::ForceNormalProcessTerminationSync(
ChildProcessLauncherHelper::Process process) {
DCHECK(CurrentlyOnProcessLauncherTaskRunner());
VLOG(1) << "ChromeProcess: Stopping process with handle "
<< process.process.Handle();
StopChildProcess(process.process.Handle());
}
| 3,000 |
158,404 | 0 | explicit FakeDelegatedFrameHostClientAura(
RenderWidgetHostViewAura* render_widget_host_view)
: DelegatedFrameHostClientAura(render_widget_host_view) {}
| 3,001 |
82,013 | 0 | static RList * get_java_bin_obj_list(RAnal *anal) {
RBinJavaObj *bin_obj = (RBinJavaObj * )get_java_bin_obj(anal);
return r_bin_java_get_bin_obj_list_thru_obj (bin_obj);
}
| 3,002 |
22,638 | 0 | bool try_wait_for_completion(struct completion *x)
{
unsigned long flags;
int ret = 1;
spin_lock_irqsave(&x->wait.lock, flags);
if (!x->done)
ret = 0;
else
x->done--;
spin_unlock_irqrestore(&x->wait.lock, flags);
return ret;
}
| 3,003 |
90,245 | 0 | static int set_global_enables(struct smi_info *smi_info, u8 enables)
{
unsigned char msg[3];
unsigned char *resp;
unsigned long resp_len;
int rv;
resp = kmalloc(IPMI_MAX_MSG_LENGTH, GFP_KERNEL);
if (!resp)
return -ENOMEM;
msg[0] = IPMI_NETFN_APP_REQUEST << 2;
msg[1]... | 3,004 |
74,964 | 0 | static UINT drdynvc_virtual_channel_event_disconnected(drdynvcPlugin* drdynvc)
{
UINT status;
if (drdynvc->OpenHandle == 0)
return CHANNEL_RC_OK;
if (!drdynvc)
return CHANNEL_RC_BAD_CHANNEL_HANDLE;
if (!MessageQueue_PostQuit(drdynvc->queue, 0))
{
status = GetLastError();
WLog_Print(drdynvc->log, WLOG_ER... | 3,005 |
2,277 | 0 | _PUBLIC_ bool islower_m(codepoint_t val)
{
return (toupper_m(val) != val);
}
| 3,006 |
138,316 | 0 | void addObjectVectorAttribute(AXObjectVectorAttribute attribute,
HeapVector<Member<AXObject>>& objects) {
switch (attribute) {
case AXObjectVectorAttribute::AriaControls:
m_properties.addItem(createRelatedNodeListProperty(
AXRelationshipAttributesEnum::Con... | 3,007 |
1,634 | 0 | void auth_client(int fd, const char *user, const char *challenge)
{
const char *pass;
char pass2[MAX_DIGEST_LEN*2];
if (!user || !*user)
user = "nobody";
if (!(pass = getpassf(password_file))
&& !(pass = getenv("RSYNC_PASSWORD"))) {
/* XXX: cyeoh says that getpass is deprecated, because
* it may return a... | 3,008 |
62,480 | 0 | xid_map_enter(netdissect_options *ndo,
const struct sunrpc_msg *rp, const u_char *bp)
{
const struct ip *ip = NULL;
const struct ip6_hdr *ip6 = NULL;
struct xid_map_entry *xmep;
if (!ND_TTEST(rp->rm_call.cb_vers))
return (0);
switch (IP_V((const struct ip *)bp)) {
case 4:
ip = (const struct ip ... | 3,009 |
22,661 | 0 | int __sched wait_for_completion_killable(struct completion *x)
{
long t = wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_KILLABLE);
if (t == -ERESTARTSYS)
return t;
return 0;
}
| 3,010 |
73,813 | 0 | int web_server_init()
{
int ret = 0;
if (bWebServerState == WEB_SERVER_DISABLED) {
/* decode media list */
media_list_init();
membuffer_init(&gDocumentRootDir);
glob_alias_init();
pVirtualDirList = NULL;
/* Initialize callbacks */
virtualDirCallback.get_info = NULL;
virtualDirCallback.open = NULL;
... | 3,011 |
103,917 | 0 | bool RenderView::runModalConfirmDialog(
WebFrame* frame, const WebString& message) {
return RunJavaScriptMessage(ui::MessageBoxFlags::kIsJavascriptConfirm,
message,
string16(),
frame->document().url(),
... | 3,012 |
12,371 | 0 | static int spl_array_next_ex(spl_array_object *intern, HashTable *aht TSRMLS_DC) /* {{{ */
{
if ((intern->ar_flags & SPL_ARRAY_IS_REF) && spl_hash_verify_pos_ex(intern, aht TSRMLS_CC) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Array was modified outside object and internal position is no longer valid"... | 3,013 |
180,149 | 1 | int orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
{
struct orangefs_inode_s *orangefs_inode = ORANGEFS_I(inode);
int error = 0;
void *value = NULL;
size_t size = 0;
const char *name = NULL;
switch (type) {
case ACL_TYPE_ACCESS:
name = XATTR_NAME_POSIX_ACL_ACCESS;
if (acl) {
umode_t mode = i... | 3,014 |
171,911 | 0 | static void btif_hl_proc_send_data_cfm(tBTA_HL_MDL_HANDLE mdl_handle,
tBTA_HL_STATUS status){
UINT8 app_idx,mcl_idx, mdl_idx;
btif_hl_mdl_cb_t *p_dcb;
UNUSED(status);
BTIF_TRACE_DEBUG("%s", __FUNCTION__);
if (btif_hl_find_mdl_idx_using_handle(mdl_h... | 3,015 |
65,464 | 0 | find_unconfirmed_client(clientid_t *clid, bool sessions, struct nfsd_net *nn)
{
struct list_head *tbl = nn->unconf_id_hashtbl;
lockdep_assert_held(&nn->client_lock);
return find_client_in_id_table(tbl, clid, sessions);
}
| 3,016 |
186,152 | 1 | png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time)
{
png_debug1(1, "in %s storage function", "tIME");
if (png_ptr == NULL || info_ptr == NULL ||
(png_ptr->mode & PNG_WROTE_tIME))
return;
png_memcpy(&(info_ptr->mod_time), mod_time, png_sizeof(png_time));
info_ptr->v... | 3,017 |
73,137 | 0 | CHUNK_WRITE_PTR(chunk_t *chunk)
{
return chunk->data + chunk->datalen;
}
| 3,018 |
127,224 | 0 | void WorkerProcessLauncher::Core::OnChannelError() {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
ipc_error_timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(5),
this, &Core::StopWorker);
}
| 3,019 |
174,966 | 0 | void CameraClient::setPreviewCallbackFlag(int callback_flag) {
LOG1("setPreviewCallbackFlag(%d) (pid %d)", callback_flag, getCallingPid());
Mutex::Autolock lock(mLock);
if (checkPidAndHardware() != NO_ERROR) return;
mPreviewCallbackFlag = callback_flag;
if (mPreviewCallbackFlag & CAMERA_FRAME_CALLBACK_FLAG_... | 3,020 |
25,798 | 0 | static void x86_pmu_start_txn(struct pmu *pmu)
{
perf_pmu_disable(pmu);
__this_cpu_or(cpu_hw_events.group_flag, PERF_EVENT_TXN);
__this_cpu_write(cpu_hw_events.n_txn, 0);
}
| 3,021 |
12,378 | 0 | static zend_object_value spl_array_object_new_ex(zend_class_entry *class_type, spl_array_object **obj, zval *orig, int clone_orig TSRMLS_DC)
{
zend_object_value retval = {0};
spl_array_object *intern;
zval *tmp;
zend_class_entry * parent = class_type;
int inherited = 0;
intern = emalloc(sizeof(spl_array_object))... | 3,022 |
154,848 | 0 | error::Error GLES2DecoderPassthroughImpl::DoUniform4fv(
GLint location,
GLsizei count,
const volatile GLfloat* v) {
api()->glUniform4fvFn(location, count, const_cast<const GLfloat*>(v));
return error::kNoError;
}
| 3,023 |
147,777 | 0 | static void ReflectUnsignedShortAttributeAttributeSetter(
v8::Local<v8::Value> v8_value, const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
ALLOW_UNUSED_LOCAL(isolate);
v8::Local<v8::Object> holder = info.Holder();
ALLOW_UNUSED_LOCAL(holder);
TestObject* impl = ... | 3,024 |
107,220 | 0 | double AutoFillUploadXmlParser::GetDoubleValue(buzz::XmlParseContext* context,
const char* attribute) {
char* attr_end = NULL;
double value = strtod(attribute, &attr_end);
if (attr_end != NULL && attr_end == attribute) {
context->RaiseError(XML_ERROR_SYNTAX);
... | 3,025 |
185,655 | 1 | WebsiteSettingsPopupAndroid::WebsiteSettingsPopupAndroid(
JNIEnv* env,
jobject java_website_settings_pop,
content::WebContents* web_contents) {
// Important to use GetVisibleEntry to match what's showing in the omnibox.
content::NavigationEntry* nav_entry =
web_contents->GetController().GetVisibleEntry();
if (nav_entry... | 3,026 |
143,048 | 0 | ScriptProcessorNode* BaseAudioContext::createScriptProcessor(
ExceptionState& exception_state) {
DCHECK(IsMainThread());
return ScriptProcessorNode::Create(*this, exception_state);
}
| 3,027 |
155,224 | 0 | bool HTMLFormElement::hasLegalLinkAttribute(const QualifiedName& name) const {
return name == actionAttr || HTMLElement::hasLegalLinkAttribute(name);
}
| 3,028 |
181,947 | 1 | static void calc_coeff(double mu[4], const int index[4], int prefilter, double r2, double mul)
{
double mul2 = mul * mul, mul3 = mul2 * mul;
double kernel[] = {
(5204 + 2520 * mul + 1092 * mul2 + 3280 * mul3) / 12096,
(2943 - 210 * mul - 273 * mul2 - 2460 * mul3) / 12096,
( 486 - 924 * mul - 546 * mul2 + 984 * mul... | 3,029 |
89,689 | 0 | static u8 nfc_llcp_dsap(struct sk_buff *pdu)
{
return (pdu->data[0] & 0xfc) >> 2;
}
| 3,030 |
157,184 | 0 | double WebMediaPlayerImpl::CurrentTime() const {
DCHECK(main_task_runner_->BelongsToCurrentThread());
DCHECK_NE(ready_state_, WebMediaPlayer::kReadyStateHaveNothing);
return (ended_ && !std::isinf(Duration()))
? Duration()
: GetCurrentTimeInternal().InSecondsF();
}
| 3,031 |
41,373 | 0 | static int kvm_dev_ioctl_get_supported_cpuid(struct kvm_cpuid2 *cpuid,
struct kvm_cpuid_entry2 __user *entries)
{
struct kvm_cpuid_entry2 *cpuid_entries;
int limit, nent = 0, r = -E2BIG;
u32 func;
if (cpuid->nent < 1)
goto out;
if (cpuid->nent > KVM_MAX_CPUID_ENTRIES)
cpuid->nent = KVM_MAX_CPUID_ENTR... | 3,032 |
20,287 | 0 | static void warn_setuid_and_fcaps_mixed(const char *fname)
{
static int warned;
if (!warned) {
printk(KERN_INFO "warning: `%s' has both setuid-root and"
" effective capabilities. Therefore not raising all"
" capabilities.\n", fname);
warned = 1;
}
}
| 3,033 |
50,444 | 0 | static bool is_orphaned_event(struct perf_event *event)
{
return event && !is_kernel_event(event) && !event->owner;
}
| 3,034 |
55,567 | 0 | pick_next_task(struct rq *rq, struct task_struct *prev, struct pin_cookie cookie)
{
const struct sched_class *class = &fair_sched_class;
struct task_struct *p;
/*
* Optimization: we know that if all tasks are in
* the fair class we can call that function directly:
*/
if (likely(prev->sched_class == class &&
... | 3,035 |
118,294 | 0 | SectionRowView() { SetBorder(views::Border::CreateEmptyBorder(10, 0, 0, 0)); }
| 3,036 |
84,266 | 0 | get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
{
unsigned long address = (unsigned long)uaddr;
struct mm_struct *mm = current->mm;
struct page *page, *tail;
struct address_space *mapping;
int err, ro = 0;
/*
* The futex address must be "naturally" aligned.
*/
key->both.offset = ... | 3,037 |
13,544 | 0 | static void Free_PairSet( HB_PairSet* ps,
HB_UShort format1,
HB_UShort format2 )
{
HB_UShort n, count;
HB_PairValueRecord* pvr;
if ( ps->PairValueRecord )
{
count = ps->PairValueCount;
pvr = ps->PairValueRecord;
for ( n = 0; n < count; n++ )
{
if ( ... | 3,038 |
149,932 | 0 | void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) {
for (size_t i = 0; i < frame.will_draw_layers.size(); ++i)
frame.will_draw_layers[i]->DidDraw(resource_provider_.get());
for (auto* it : video_frame_controllers_)
it->DidDrawFrame();
}
| 3,039 |
138,001 | 0 | AXLayoutObject::~AXLayoutObject() {
ASSERT(isDetached());
}
| 3,040 |
96,476 | 0 | static void AppLayerProtoDetectPEGetIpprotos(AppProto alproto,
uint8_t *ipprotos)
{
if (expectation_proto[alproto] == IPPROTO_TCP) {
ipprotos[IPPROTO_TCP / 8] |= 1 << (IPPROTO_TCP % 8);
}
if (expectation_proto[alproto] == IPPROTO_UDP) {
ipprotos[I... | 3,041 |
161,553 | 0 | base::string16 GoogleChromeDistribution::GetDistributionData(HKEY root_key) {
base::string16 sub_key(google_update::kRegPathClientState);
sub_key.append(L"\\");
sub_key.append(install_static::GetAppGuid());
base::win::RegKey client_state_key(
root_key, sub_key.c_str(), KEY_READ | KEY_WOW64_32KEY);
base... | 3,042 |
5,285 | 0 | hb_buffer_destroy (hb_buffer_t *buffer)
{
HB_OBJECT_DO_DESTROY (buffer);
hb_unicode_funcs_destroy (buffer->unicode);
free (buffer->info);
free (buffer->pos);
free (buffer);
}
| 3,043 |
5,517 | 0 | static void *gx_ttfMemory__alloc_struct(ttfMemory *self, const ttfMemoryDescriptor *d, const char *cname)
{
gs_memory_t *mem = ((gx_ttfMemory *)self)->memory;
return mem->procs.alloc_struct(mem, (const gs_memory_struct_type_t *)d, cname);
}
| 3,044 |
78,629 | 0 | static int piv_find_aid(sc_card_t * card, sc_file_t *aid_file)
{
sc_apdu_t apdu;
u8 rbuf[SC_MAX_APDU_BUFFER_SIZE];
int r,i;
const u8 *tag;
size_t taglen;
const u8 *pix;
size_t pixlen;
size_t resplen = sizeof(rbuf);
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
/* first see if the default application wil... | 3,045 |
120,980 | 0 | virtual void DoCloseFlushPendingWriteTest(SocketStreamEvent* event) {
for (size_t i = 0; i < messages_.size(); i++) {
std::vector<char> frame;
frame.push_back('\0');
frame.insert(frame.end(), messages_[i].begin(), messages_[i].end());
frame.push_back('\xff');
EXPECT_TRUE(event->socke... | 3,046 |
40,893 | 0 | json_t *json_deep_copy(const json_t *json)
{
if(!json)
return NULL;
if(json_is_object(json))
return json_object_deep_copy(json);
if(json_is_array(json))
return json_array_deep_copy(json);
/* for the rest of the types, deep copying doesn't differ from
shallow copying */
... | 3,047 |
19,629 | 0 | int nf_ct_frag6_init(void)
{
nf_frags.hashfn = nf_hashfn;
nf_frags.constructor = ip6_frag_init;
nf_frags.destructor = NULL;
nf_frags.skb_free = nf_skb_free;
nf_frags.qsize = sizeof(struct nf_ct_frag6_queue);
nf_frags.match = ip6_frag_match;
nf_frags.frag_expire = nf_ct_frag6_expire;
nf_frags.secret_interval = 1... | 3,048 |
40,201 | 0 | static int rawv6_init_sk(struct sock *sk)
{
struct raw6_sock *rp = raw6_sk(sk);
switch (inet_sk(sk)->inet_num) {
case IPPROTO_ICMPV6:
rp->checksum = 1;
rp->offset = 2;
break;
case IPPROTO_MH:
rp->checksum = 1;
rp->offset = 4;
break;
default:
break;
}
return 0;
}
| 3,049 |
101,014 | 0 | DumpQuotaTableTask(
QuotaManager* manager,
Callback* callback)
: DatabaseTaskBase(manager),
callback_(callback) {
}
| 3,050 |
68,463 | 0 | static int open_and_lock(char *path)
{
int fd;
struct flock lk;
fd = open(path, O_RDWR|O_CREAT, S_IWUSR | S_IRUSR);
if (fd < 0) {
fprintf(stderr, "Failed to open %s: %s\n",
path, strerror(errno));
return(fd);
}
lk.l_type = F_WRLCK;
lk.l_whence = SEEK_SET;
lk.l_start = 0;
lk.l_len = 0;
if (fcntl(fd, F... | 3,051 |
96,745 | 0 | MagickExport Image *StatisticImage(const Image *image,const StatisticType type,
const size_t width,const size_t height,ExceptionInfo *exception)
{
#define StatisticImageTag "Statistic/Image"
CacheView
*image_view,
*statistic_view;
Image
*statistic_image;
MagickBooleanType
status;
MagickOf... | 3,052 |
74,756 | 0 | ia64_patch_vtop (unsigned long start, unsigned long end)
{
s32 *offp = (s32 *) start;
u64 ip;
while (offp < (s32 *) end) {
ip = (u64) offp + *offp;
/* replace virtual address with corresponding physical address: */
ia64_patch_imm64(ip, ia64_tpa(get_imm64(ip)));
ia64_fc((void *) ip);
++offp;
}
ia64_sync... | 3,053 |
105,861 | 0 | WebPluginAcceleratedSurfaceProxy::WebPluginAcceleratedSurfaceProxy(
WebPluginProxy* plugin_proxy)
: plugin_proxy_(plugin_proxy),
window_handle_(NULL) {
surface_ = new AcceleratedSurface;
if (!surface_->Initialize(NULL, true)) {
delete surface_;
surface_ = NULL;
return;
}
surfa... | 3,054 |
156,066 | 0 | int GetTimesStandardThrottlesAddedForURL(const GURL& url) {
int count;
base::RunLoop run_loop;
base::PostTaskWithTraitsAndReply(
FROM_HERE, {content::BrowserThread::IO},
base::BindOnce(
&TestDispatcherHostDelegate::GetTimesStandardThrottlesAddedForURL,
base::Unretai... | 3,055 |
161,199 | 0 | void OnRedirectQueryComplete(std::vector<GURL>* rv,
const history::RedirectList* redirects) {
rv->insert(rv->end(), redirects->begin(), redirects->end());
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
}
| 3,056 |
87,104 | 0 | CJSON_PUBLIC(cJSON *) cJSON_CreateFalse(void)
{
cJSON *item = cJSON_New_Item(&global_hooks);
if(item)
{
item->type = cJSON_False;
}
return item;
}
| 3,057 |
172,971 | 0 | static void rpng2_win_init()
{
ulg i;
ulg rowbytes = rpng2_info.rowbytes;
Trace((stderr, "beginning rpng2_win_init()\n"))
Trace((stderr, " rowbytes = %d\n", rpng2_info.rowbytes))
Trace((stderr, " width = %ld\n", rpng2_info.width))
Trace((stderr, " height = %ld\n", rpng2_info.height))
rpng2_info.im... | 3,058 |
168,707 | 0 | DocumentLoadTiming* PerformanceNavigationTiming::GetDocumentLoadTiming() const {
DocumentLoader* loader = GetDocumentLoader();
if (!loader)
return nullptr;
return &loader->GetTiming();
}
| 3,059 |
86,679 | 0 | int blk_mq_alloc_tag_set(struct blk_mq_tag_set *set)
{
BUILD_BUG_ON(BLK_MQ_MAX_DEPTH > 1 << BLK_MQ_UNIQUE_TAG_BITS);
if (!set->nr_hw_queues)
return -EINVAL;
if (!set->queue_depth)
return -EINVAL;
if (set->queue_depth < set->reserved_tags + BLK_MQ_TAG_MIN)
return -EINVAL;
if (!set->ops->queue_rq || !set->op... | 3,060 |
147,891 | 0 | static void TestDictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
TestObject* impl = V8TestObject::ToImpl(info.Holder());
TestDictionary* result = impl->testDictionaryMethod();
V8SetReturnValue(info, result);
}
| 3,061 |
11,244 | 0 | static int php_snmp_write_max_oids(php_snmp_object *snmp_object, zval *newval)
{
zval ztmp;
int ret = SUCCESS;
if (Z_TYPE_P(newval) == IS_NULL) {
snmp_object->max_oids = 0;
return ret;
}
if (Z_TYPE_P(newval) != IS_LONG) {
ztmp = *newval;
zval_copy_ctor(&ztmp);
convert_to_long(&ztmp);
newval = &ztmp;
... | 3,062 |
3,343 | 0 | static void fdctrl_stop_transfer(FDCtrl *fdctrl, uint8_t status0,
uint8_t status1, uint8_t status2)
{
FDrive *cur_drv;
cur_drv = get_cur_drv(fdctrl);
fdctrl->status0 &= ~(FD_SR0_DS0 | FD_SR0_DS1 | FD_SR0_HEAD);
fdctrl->status0 |= GET_CUR_DRV(fdctrl);
if (cur_drv->he... | 3,063 |
77,146 | 0 | OVS_REQUIRES(ofproto_mutex)
{
uint32_t hash = hash_learned_cookie(learn->cookie, learn->table_id);
struct learned_cookie *c;
HMAP_FOR_EACH_WITH_HASH (c, u.hmap_node, hash, &ofproto->learned_cookies) {
if (c->cookie == learn->cookie && c->table_id == learn->table_id) {
c->n += delta;... | 3,064 |
23,288 | 0 | static int decode_attr_time_metadata(struct xdr_stream *xdr, uint32_t *bitmap, struct timespec *time)
{
int status = 0;
time->tv_sec = 0;
time->tv_nsec = 0;
if (unlikely(bitmap[1] & (FATTR4_WORD1_TIME_METADATA - 1U)))
return -EIO;
if (likely(bitmap[1] & FATTR4_WORD1_TIME_METADATA)) {
status = decode_attr_time... | 3,065 |
44,661 | 0 | static int unpriv_assign_nic(struct lxc_netdev *netdev, pid_t pid)
{
pid_t child;
int bytes, pipefd[2];
char *token, *saveptr = NULL;
char buffer[MAX_BUFFER_SIZE];
char netdev_link[IFNAMSIZ+1];
if (netdev->type != LXC_NET_VETH) {
ERROR("nic type %d not support for unprivileged use",
netdev->type);
return ... | 3,066 |
42,186 | 0 | static int sane_rt_signal_32_frame(unsigned int sp)
{
struct rt_signal_frame_32 __user *sf;
unsigned int regs;
sf = (struct rt_signal_frame_32 __user *) (unsigned long) sp;
if (read_user_stack_32((unsigned int __user *) &sf->uc.uc_regs, ®s))
return 0;
return regs == (unsigned long) &sf->uc.uc_mcontext;
}
| 3,067 |
46,057 | 0 | xdr_gprinc_arg(XDR *xdrs, gprinc_arg *objp)
{
if (!xdr_ui_4(xdrs, &objp->api_version)) {
return (FALSE);
}
if (!xdr_krb5_principal(xdrs, &objp->princ)) {
return (FALSE);
}
if (!xdr_long(xdrs, &objp->mask)) {
return FALSE;
}
return (TRUE);
}
| 3,068 |
46,207 | 0 | static int set_bdev_super(struct super_block *s, void *data)
{
s->s_bdev = data;
s->s_dev = s->s_bdev->bd_dev;
/*
* We set the bdi here to the queue backing, file systems can
* overwrite this in ->fill_super()
*/
s->s_bdi = &bdev_get_queue(s->s_bdev)->backing_dev_info;
return 0;
}
| 3,069 |
69,697 | 0 | entry_guards_update_confirmed(guard_selection_t *gs)
{
smartlist_clear(gs->confirmed_entry_guards);
SMARTLIST_FOREACH_BEGIN(gs->sampled_entry_guards, entry_guard_t *, guard) {
if (guard->confirmed_idx >= 0)
smartlist_add(gs->confirmed_entry_guards, guard);
} SMARTLIST_FOREACH_END(guard);
smartlist_so... | 3,070 |
128,593 | 0 | bool Instance::IsPrintScalingDisabled() {
return !engine_->GetPrintScaling();
}
| 3,071 |
23,554 | 0 | static void flakey_map_bio(struct dm_target *ti, struct bio *bio)
{
struct flakey_c *fc = ti->private;
bio->bi_bdev = fc->dev->bdev;
if (bio_sectors(bio))
bio->bi_sector = flakey_map_sector(ti, bio->bi_sector);
}
| 3,072 |
52,180 | 0 | PHP_NAMED_FUNCTION(php_if_fopen)
{
char *filename, *mode;
int filename_len, mode_len;
zend_bool use_include_path = 0;
zval *zcontext = NULL;
php_stream *stream;
php_stream_context *context = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ps|br", &filename, &filename_len, &mode, &mode_len, &use_incl... | 3,073 |
175,857 | 0 | StatusOr<uint16_t> convertStringAddress(std::string addr, uint8_t* buffer) {
if (inet_pton(AF_INET, addr.c_str(), buffer) == 1) {
return AF_INET;
} else if (inet_pton(AF_INET6, addr.c_str(), buffer) == 1) {
return AF_INET6;
} else {
return Status(EAFNOSUPPORT);
}
}
| 3,074 |
56,938 | 0 | static int fuse_fsync(struct file *file, loff_t start, loff_t end,
int datasync)
{
return fuse_fsync_common(file, start, end, datasync, 0);
}
| 3,075 |
177,104 | 0 | SoftAMRWBEncoder::~SoftAMRWBEncoder() {
if (mEncoderHandle != NULL) {
CHECK_EQ(VO_ERR_NONE, mApiHandle->Uninit(mEncoderHandle));
mEncoderHandle = NULL;
}
delete mApiHandle;
mApiHandle = NULL;
delete mMemOperator;
mMemOperator = NULL;
}
| 3,076 |
151,660 | 0 | void Browser::CloseModalSigninWindow() {
signin_view_controller_.CloseModalSignin();
}
| 3,077 |
89,222 | 0 | set_mml(MinMax* l, OnigLen min, OnigLen max)
{
l->min = min;
l->max = max;
}
| 3,078 |
52,429 | 0 | void xt_proto_fini(struct net *net, u_int8_t af)
{
#ifdef CONFIG_PROC_FS
char buf[XT_FUNCTION_MAXNAMELEN];
strlcpy(buf, xt_prefix[af], sizeof(buf));
strlcat(buf, FORMAT_TABLES, sizeof(buf));
remove_proc_entry(buf, net->proc_net);
strlcpy(buf, xt_prefix[af], sizeof(buf));
strlcat(buf, FORMAT_TARGETS, sizeof(buf)... | 3,079 |
43,770 | 0 | no_ci_flags(OM_uint32 *minor_status,
gss_cred_id_t *cred_handle,
const gss_OID desired_oid,
const gss_buffer_t value)
{
krb5_gss_cred_id_t cred;
cred = (krb5_gss_cred_id_t) *cred_handle;
cred->suppress_ci_flags = 1;
*minor_status = 0;
return GSS_S_COMPLETE;
}
| 3,080 |
134,665 | 0 | static STGMEDIUM* GetStorageForFileName(const base::FilePath& path) {
const size_t kDropSize = sizeof(DROPFILES);
const size_t kTotalBytes =
kDropSize + (path.value().length() + 2) * sizeof(wchar_t);
HANDLE hdata = GlobalAlloc(GMEM_MOVEABLE, kTotalBytes);
base::win::ScopedHGlobal<DROPFILES> locked_mem(hd... | 3,081 |
92,259 | 0 | XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
{
if ((parser == NULL) || (len < 0) || ((s == NULL) && (len != 0))) {
if (parser != NULL)
parser->m_errorCode = XML_ERROR_INVALID_ARGUMENT;
return XML_STATUS_ERROR;
}
switch (parser->m_parsingStatus.parsing) {
case XML_SUSPENDED:
... | 3,082 |
98,191 | 0 | void TranslateManager::ReportLanguageDetectionError(TabContents* tab_contents) {
UMA_HISTOGRAM_COUNTS("Translate.ReportLanguageDetectionError", 1);
GURL page_url = tab_contents->controller().GetActiveEntry()->url();
std::string report_error_url(kReportLanguageDetectionErrorURL);
report_error_url += "?client=cr&... | 3,083 |
122,841 | 0 | ~CompositorSwapClient() {
}
| 3,084 |
148,602 | 0 | WebContentsImpl::~WebContentsImpl() {
CHECK(!is_being_destroyed_);
is_being_destroyed_ = true;
CHECK(!is_notifying_observers_);
rwh_input_event_router_.reset();
for (auto& entry : binding_sets_)
entry.second->CloseAllBindings();
WebContentsImpl* outermost = GetOutermostWebContents();
if (this != ... | 3,085 |
41,356 | 0 | static void kvm_arch_set_tsc_khz(struct kvm *kvm, u32 this_tsc_khz)
{
/* Compute a scale to convert nanoseconds in TSC cycles */
kvm_get_time_scale(this_tsc_khz, NSEC_PER_SEC / 1000,
&kvm->arch.virtual_tsc_shift,
&kvm->arch.virtual_tsc_mult);
kvm->arch.virtual_tsc_khz = this_tsc_khz;
}
| 3,086 |
41,039 | 0 | cmsBool _Remove1Op(cmsPipeline* Lut, cmsStageSignature UnaryOp)
{
cmsStage** pt = &Lut ->Elements;
cmsBool AnyOpt = FALSE;
while (*pt != NULL) {
if ((*pt) ->Implements == UnaryOp) {
_RemoveElement(pt);
AnyOpt = TRUE;
}
else
pt = &((*pt) -> Next);... | 3,087 |
82,183 | 0 | mrb_method_missing(mrb_state *mrb, mrb_sym name, mrb_value self, mrb_value args)
{
mrb_no_method_error(mrb, name, args, "undefined method '%S'", mrb_sym2str(mrb, name));
}
| 3,088 |
24,803 | 0 | static inline struct kmem_cache_cpu *get_cpu_slab(struct kmem_cache *s, int cpu)
{
#ifdef CONFIG_SMP
return s->cpu_slab[cpu];
#else
return &s->cpu_slab;
#endif
}
| 3,089 |
84,496 | 0 | followForm(void)
{
_followForm(FALSE);
}
| 3,090 |
139,648 | 0 | StereoPannerNode* AudioContext::createStereoPanner()
{
ASSERT(isMainThread());
return StereoPannerNode::create(this, m_destinationNode->sampleRate());
}
| 3,091 |
141,381 | 0 | Document::~Document() {
DCHECK(!GetLayoutView());
DCHECK(!ParentTreeScope());
DCHECK(!ax_object_cache_);
InstanceCounters::DecrementCounter(InstanceCounters::kDocumentCounter);
}
| 3,092 |
116,640 | 0 | bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
WebFrame* main_frame = webview() ? webview()->mainFrame() : NULL;
if (main_frame)
content::GetContentClient()->SetActiveURL(main_frame->document().url());
ObserverListBase<RenderViewObserver>::Iterator it(observers_);
RenderViewObserver*... | 3,093 |
167,914 | 0 | void LocalFrame::Detach(FrameDetachType type) {
DCHECK_NE(lifecycle_.GetState(), FrameLifecycle::kDetached);
lifecycle_.AdvanceTo(FrameLifecycle::kDetaching);
if (IsLocalRoot()) {
performance_monitor_->Shutdown();
ad_tracker_->Shutdown();
}
idleness_detector_->Shutdown();
if (inspector_trace_event... | 3,094 |
180,830 | 1 | static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn)
{
struct bpf_reg_state *regs = cur_regs(env);
u8 opcode = BPF_OP(insn->code);
int err;
if (opcode == BPF_END || opcode == BPF_NEG) {
if (opcode == BPF_NEG) {
if (BPF_SRC(insn->code) != 0 ||
insn->src_reg != BPF_REG_0 ||
insn->off != 0 || insn... | 3,095 |
17,865 | 0 | static int local_open2(FsContext *fs_ctx, V9fsPath *dir_path, const char *name,
int flags, FsCred *credp, V9fsFidOpenState *fs)
{
int fd = -1;
int err = -1;
int dirfd;
/*
* Mark all the open to not follow symlinks
*/
flags |= O_NOFOLLOW;
dirfd = local_opendir_n... | 3,096 |
91,658 | 0 | size_t bgp_packet_mpattr_prefix_size(afi_t afi, safi_t safi, struct prefix *p)
{
int size = PSIZE(p->prefixlen);
if (safi == SAFI_MPLS_VPN)
size += 88;
else if (afi == AFI_L2VPN && safi == SAFI_EVPN)
size += 232; // TODO: Maximum possible for type-2, type-3 and
return size;
}
| 3,097 |
27,166 | 0 | static void plugin_instance_deallocate(PluginInstance *plugin)
{
NPW_MemFree(plugin);
}
| 3,098 |
84,490 | 0 | dump_extra(Buffer *buf)
{
printf("W3m-current-url: %s\n", parsedURL2Str(&buf->currentURL)->ptr);
if (buf->baseURL)
printf("W3m-base-url: %s\n", parsedURL2Str(buf->baseURL)->ptr);
#ifdef USE_M17N
printf("W3m-document-charset: %s\n",
wc_ces_to_charset(buf->document_charset));
#endif
#ifdef USE_SSL
if... | 3,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.