unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
183,131 | 1 | static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode,
ExceptionInfo *exception)
{
CacheInfo
*magick_restrict cache_info,
source_info;
char
format[MagickPathExtent],
message[MagickPathExtent];
const char
*type;
MagickBooleanType
status;
MagickSizeType
length... | 15,900 |
76,371 | 0 | static int check_func_call(struct bpf_verifier_env *env, struct bpf_insn *insn,
int *insn_idx)
{
struct bpf_verifier_state *state = env->cur_state;
struct bpf_func_state *caller, *callee;
int i, subprog, target_insn;
if (state->curframe + 1 >= MAX_CALL_FRAMES) {
verbose(env, "the call stack of %d frames is... | 15,901 |
162,630 | 0 | bool HeadlessDevToolsManagerDelegate::HandleAsyncCommand(
content::DevToolsAgentHost* agent_host,
int session_id,
base::DictionaryValue* command,
const CommandCallback& callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (!browser_)
return false;
const base::Value* id_value = com... | 15,902 |
12,715 | 0 | int dtls_get_message(SSL *s, int *mt, unsigned long *len)
{
struct hm_header_st *msg_hdr;
unsigned char *p;
unsigned long msg_len;
int ok;
long tmplen;
msg_hdr = &s->d1->r_msg_hdr;
memset(msg_hdr, 0, sizeof(*msg_hdr));
again:
ok = dtls_get_reassembled_message(s, &tmplen);
if (tmpl... | 15,903 |
135,538 | 0 | static void CountEditingEvent(ExecutionContext* execution_context,
const Event* event,
WebFeature feature_on_input,
WebFeature feature_on_text_area,
WebFeature feature_on_content_editable,
... | 15,904 |
85,571 | 0 | int hns_ppe_init(struct dsaf_device *dsaf_dev)
{
int ret;
int i;
for (i = 0; i < HNS_PPE_COM_NUM; i++) {
ret = hns_ppe_common_get_cfg(dsaf_dev, i);
if (ret)
goto get_cfg_fail;
ret = hns_rcb_common_get_cfg(dsaf_dev, i);
if (ret)
goto get_cfg_fail;
hns_ppe_get_cfg(dsaf_dev->ppe_common[i]);
ret = ... | 15,905 |
119,510 | 0 | TestWillInsertBodyWebFrameClient() : m_numBodies(0), m_didLoad(false)
{
}
| 15,906 |
19,238 | 0 | static inline int netlink_is_kernel(struct sock *sk)
{
return nlk_sk(sk)->flags & NETLINK_KERNEL_SOCKET;
}
| 15,907 |
171,652 | 0 | static int in_set_format(struct audio_stream *stream, audio_format_t format)
{
UNUSED(stream);
UNUSED(format);
FNLOG();
if (format == AUDIO_FORMAT_PCM_16_BIT)
return 0;
else
return -1;
}
| 15,908 |
59,589 | 0 | htmlcdataDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
{
unsigned char output[40];
int inlen = len, outlen = 30;
htmlEncodeEntities(output, &outlen, ch, &inlen, 0);
output[outlen] = 0;
fprintf(SAXdebug, "SAX.cdata(%s, %d)\n", output, len);
}
| 15,909 |
67,582 | 0 | static void auth_sess_reinit_ev(const void *event_data, void *user_data) {
int res;
/* A HOST command changed the main_server pointer, reinitialize ourselves. */
pr_event_unregister(&auth_module, "core.exit", auth_exit_ev);
pr_event_unregister(&auth_module, "core.session-reinit", auth_sess_reinit_ev);
pr_t... | 15,910 |
34,741 | 0 | int ext4_ext_calc_metadata_amount(struct inode *inode, ext4_lblk_t lblock)
{
struct ext4_inode_info *ei = EXT4_I(inode);
int idxs, num = 0;
idxs = ((inode->i_sb->s_blocksize - sizeof(struct ext4_extent_header))
/ sizeof(struct ext4_extent_idx));
/*
* If the new delayed allocation block is contiguous with the
... | 15,911 |
6,891 | 0 | smp_fetch_body(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_msg *msg;
unsigned long len;
unsigned long block1;
char *body;
struct chunk *temp;
CHECK_HTTP_MESSAGE_FIRST();
if ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ)
msg = &smp->strm->txn->req;
else
msg = &sm... | 15,912 |
9,092 | 0 | static int vrend_decode_clear(struct vrend_decode_ctx *ctx, int length)
{
union pipe_color_union color;
double depth;
unsigned stencil, buffers;
int i;
if (length != VIRGL_OBJ_CLEAR_SIZE)
return EINVAL;
buffers = get_buf_entry(ctx, VIRGL_OBJ_CLEAR_BUFFERS);
for (i = 0; i < 4; i++)
colo... | 15,913 |
112,893 | 0 | void GDataCache::PinOnUIThread(const std::string& resource_id,
const std::string& md5,
const CacheOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
base::PlatformFileError* error =
new base::PlatformFileError(ba... | 15,914 |
131,758 | 0 | static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjectPythonV8Internal::stringAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
| 15,915 |
72,709 | 0 | static int jas_icclut8_input(jas_iccattrval_t *attrval, jas_stream_t *in,
int cnt)
{
int i;
int j;
int clutsize;
jas_icclut8_t *lut8 = &attrval->data.lut8;
lut8->clut = 0;
lut8->intabs = 0;
lut8->intabsbuf = 0;
lut8->outtabs = 0;
lut8->outtabsbuf = 0;
if (jas_iccgetuint8(in, &lut8->numinchans) ||
jas_icc... | 15,916 |
172,489 | 0 | unsigned venc_dev::venc_stop( void)
{
struct venc_msg venc_msg;
struct v4l2_requestbuffers bufreq;
int rc = 0, ret = 0;
if (!stopped) {
enum v4l2_buf_type cap_type;
if (streaming[OUTPUT_PORT]) {
cap_type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
rc = ioctl(m_nDriver_fd, VIDIOC_STREAMOFF, &cap... | 15,917 |
155,824 | 0 | std::string SupervisedUserService::GetCustodianEmailAddress() const {
std::string email = profile_->GetPrefs()->GetString(
prefs::kSupervisedUserCustodianEmail);
#if defined(OS_CHROMEOS)
if (email.empty() && !!user_manager::UserManager::Get()->GetActiveUser()) {
email = chromeos::ChromeUserManager::Get()
... | 15,918 |
48,161 | 0 | int fix_log_file_owner(uid_t uid, gid_t gid)
{
int r1 = 0, r2 = 0;
if (!(log_fp = open_log_file()))
return -1;
r1 = fchown(fileno(log_fp), uid, gid);
if (open_debug_log() != OK)
return -1;
if (debug_file_fp)
r2 = fchown(fileno(debug_file_fp), uid, gid);
/* return 0 if both are 0 and otherwise < 0 */
ret... | 15,919 |
124,283 | 0 | Blacklist* ExtensionSystemImpl::Shared::blacklist() {
return blacklist_.get();
}
| 15,920 |
121,895 | 0 | void SetFakeTimeDeltaInHours(int hours) {
now_delta_ = base::TimeDelta::FromHours(hours);
}
| 15,921 |
26,537 | 0 | static void __packet_set_status(struct packet_sock *po, void *frame, int status)
{
union {
struct tpacket_hdr *h1;
struct tpacket2_hdr *h2;
void *raw;
} h;
h.raw = frame;
switch (po->tp_version) {
case TPACKET_V1:
h.h1->tp_status = status;
flush_dcache_page(pgv_to_page(&h.h1->tp_status));
break;
case... | 15,922 |
102,567 | 0 | void set_error_code(base::PlatformFileError error_code) {
error_code_ = error_code;
}
| 15,923 |
128,989 | 0 | void SerializedScriptValue::registerMemoryAllocatedWithCurrentScriptContext()
{
if (m_externallyAllocatedMemory)
return;
m_externallyAllocatedMemory = static_cast<intptr_t>(m_data.length());
v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(m_externallyAllocatedMemory);
}
| 15,924 |
145,047 | 0 | CSPSourceTest()
: csp(ContentSecurityPolicy::create())
{
}
| 15,925 |
174,618 | 0 | BOOLEAN btm_sec_is_a_bonded_dev (BD_ADDR bda)
{
tBTM_SEC_DEV_REC *p_dev_rec= btm_find_dev (bda);
BOOLEAN is_bonded= FALSE;
if (p_dev_rec &&
#if (SMP_INCLUDED== TRUE)
((p_dev_rec->ble.key_type && (p_dev_rec->sec_flags & BTM_SEC_LE_LINK_KEY_KNOWN))||
#endif
(p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN)))
... | 15,926 |
78,030 | 0 | TABLE* GetTable(cmsIT8* it8)
{
if ((it8 -> nTable >= it8 ->TablesCount)) {
SynError(it8, "Table %d out of sequence", it8 -> nTable);
return it8 -> Tab;
}
return it8 ->Tab + it8 ->nTable;
}
| 15,927 |
59,997 | 0 | int snd_usb_get_cur_mix_value(struct usb_mixer_elem_info *cval,
int channel, int index, int *value)
{
int err;
if (cval->cached & (1 << channel)) {
*value = cval->cache_val[index];
return 0;
}
err = get_cur_mix_raw(cval, channel, value);
if (err < 0) {
if (!cval->head.mixer->ignore_ctl_error)
usb... | 15,928 |
108,849 | 0 | void RenderViewImpl::CreatedPluginWindow(gfx::PluginWindowHandle window) {
#if defined(USE_X11)
Send(new ViewHostMsg_CreatePluginContainer(routing_id(), window));
#endif
}
| 15,929 |
180,772 | 1 | static int peer_recv_callback(rdpTransport* transport, wStream* s, void* extra)
{
freerdp_peer* client = (freerdp_peer*) extra;
rdpRdp* rdp = client->context->rdp;
switch (rdp->state)
{
case CONNECTION_STATE_INITIAL:
if (!rdp_server_accept_nego(rdp, s))
return -1;
if (rdp->nego->selected_protocol & PR... | 15,930 |
92,043 | 0 | bool blk_update_request(struct request *req, blk_status_t error,
unsigned int nr_bytes)
{
int total_bytes;
trace_block_rq_complete(req, blk_status_to_errno(error), nr_bytes);
if (!req->bio)
return false;
if (unlikely(error && !blk_rq_is_passthrough(req) &&
!(req->rq_flags & RQF_QUIET)))
print_req_er... | 15,931 |
119,265 | 0 | void HTMLFormElement::requestAutocomplete()
{
Frame* frame = document().frame();
if (!frame)
return;
if (!shouldAutocomplete() || !UserGestureIndicator::processingUserGesture()) {
finishRequestAutocomplete(AutocompleteResultErrorDisabled);
return;
}
StringPairVector control... | 15,932 |
6,863 | 0 | static int http_upgrade_v09_to_v10(struct http_txn *txn)
{
int delta;
char *cur_end;
struct http_msg *msg = &txn->req;
if (msg->sl.rq.v_l != 0)
return 1;
/* RFC 1945 allows only GET for HTTP/0.9 requests */
if (txn->meth != HTTP_METH_GET)
return 0;
cur_end = msg->chn->buf->p + msg->sl.rq.l;
if (msg->sl.... | 15,933 |
150,446 | 0 | void NavigationControllerImpl::DiscardNonCommittedEntriesInternal() {
DiscardPendingEntry(false);
DiscardTransientEntry();
}
| 15,934 |
47,875 | 0 | bool sk_mc_loop(struct sock *sk)
{
if (dev_recursion_level())
return false;
if (!sk)
return true;
switch (sk->sk_family) {
case AF_INET:
return inet_sk(sk)->mc_loop;
#if IS_ENABLED(CONFIG_IPV6)
case AF_INET6:
return inet6_sk(sk)->mc_loop;
#endif
}
WARN_ON(1);
return true;
}
| 15,935 |
130,334 | 0 | bool supportsInvalidation(CSSSelector::Match match)
{
switch (match) {
case CSSSelector::Tag:
case CSSSelector::Id:
case CSSSelector::Class:
case CSSSelector::AttributeExact:
case CSSSelector::AttributeSet:
case CSSSelector::AttributeHyphen:
case CSSSelector::AttributeList:
case CSSS... | 15,936 |
102,690 | 0 | void CCLayerTreeHost::setViewport(const IntSize& viewportSize)
{
m_viewportSize = viewportSize;
setNeedsCommitThenRedraw();
}
| 15,937 |
68,195 | 0 | void llc_conn_resend_i_pdu_as_rsp(struct sock *sk, u8 nr, u8 first_f_bit)
{
struct sk_buff *skb;
u16 nbr_unack_pdus;
struct llc_sock *llc = llc_sk(sk);
u8 howmany_resend = 0;
llc_conn_remove_acked_pdus(sk, nr, &nbr_unack_pdus);
if (!nbr_unack_pdus)
goto out;
/*
* Process unack PDUs only if unack queue is no... | 15,938 |
181,942 | 1 | static int attach_child_main(void* data)
{
struct attach_clone_payload* payload = (struct attach_clone_payload*)data;
int ipc_socket = payload->ipc_socket;
int procfd = payload->procfd;
lxc_attach_options_t* options = payload->options;
struct lxc_proc_context_info* init_ctx = payload->init_ctx;
#if HAVE_SYS_PERSONALIT... | 15,939 |
63,532 | 0 | static void mqueue_evict_inode(struct inode *inode)
{
struct mqueue_inode_info *info;
struct user_struct *user;
unsigned long mq_bytes, mq_treesize;
struct ipc_namespace *ipc_ns;
struct msg_msg *msg;
clear_inode(inode);
if (S_ISDIR(inode->i_mode))
return;
ipc_ns = get_ns_from_inode(inode);
info = MQUEUE_I... | 15,940 |
57,356 | 0 | void sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb)
{
struct sco_conn *conn = hcon->sco_data;
if (!conn)
goto drop;
BT_DBG("conn %p len %d", conn, skb->len);
if (skb->len) {
sco_recv_frame(conn, skb);
return;
}
drop:
kfree_skb(skb);
}
| 15,941 |
26,005 | 0 | static int get_callchain_buffers(void)
{
int err = 0;
int count;
mutex_lock(&callchain_mutex);
count = atomic_inc_return(&nr_callchain_events);
if (WARN_ON_ONCE(count < 1)) {
err = -EINVAL;
goto exit;
}
if (count > 1) {
/* If the allocation failed, give up */
if (!callchain_cpus_entries)
err = -ENO... | 15,942 |
76,691 | 0 | static void t1_close_font_file(int close_name_suffix)
{
report_stop_file(close_name_suffix);
cur_file_name = NULL;
}
| 15,943 |
71,134 | 0 | int get_files_in_directory(const char *path, char ***list) {
_cleanup_closedir_ DIR *d = NULL;
size_t bufsize = 0, n = 0;
_cleanup_strv_free_ char **l = NULL;
assert(path);
/* Returns all files in a directory in *list, and the number
* of files as return value. If list... | 15,944 |
186,166 | 1 | LockContentsView::UserState::UserState(AccountId account_id)
: account_id(account_id) {}
| 15,945 |
142,370 | 0 | base::string16 passwords_empty_str(const std::string& domain) {
return l10n_util::GetStringFUTF16(
IDS_PASSWORD_MANAGER_ACCESSORY_PASSWORD_LIST_EMPTY_MESSAGE,
ASCIIToUTF16(domain));
}
| 15,946 |
155,517 | 0 | void DataReductionProxySettings::SetCallbackToRegisterSyntheticFieldTrial(
const SyntheticFieldTrialRegistrationCallback&
on_data_reduction_proxy_enabled) {
register_synthetic_field_trial_ = on_data_reduction_proxy_enabled;
RegisterDataReductionProxyFieldTrial();
}
| 15,947 |
182,912 | 1 | vips_tracked_malloc( size_t size )
{
void *buf;
vips_tracked_init();
/* Need an extra sizeof(size_t) bytes to track
* size of this block. Ask for an extra 16 to make sure we don't break
* alignment rules.
*/
size += 16;
if( !(buf = g_try_malloc( size )) ) {
#ifdef DEBUG
g_assert_not_reached();
#endif /*DEBUG... | 15,948 |
95,843 | 0 | long FS_fplength(FILE *h)
{
long pos;
long end;
pos = ftell(h);
fseek(h, 0, SEEK_END);
end = ftell(h);
fseek(h, pos, SEEK_SET);
return end;
}
| 15,949 |
122,648 | 0 | std::vector<string16> Extension::GetPermissionMessageStrings() const {
base::AutoLock auto_lock(runtime_data_lock_);
if (IsTrustedId(id()))
return std::vector<string16>();
else
return runtime_data_.GetActivePermissions()->GetWarningMessages(GetType());
}
| 15,950 |
32,055 | 0 | int __dev_addr_sync(struct dev_addr_list **to, int *to_count,
struct dev_addr_list **from, int *from_count)
{
struct dev_addr_list *da, *next;
int err = 0;
da = *from;
while (da != NULL) {
next = da->next;
if (!da->da_synced) {
err = __dev_addr_add(to, to_count,
da->da_addr, da->da_addrlen, ... | 15,951 |
121,534 | 0 | DriveFileStreamReader::DriveFileStreamReader(
const DriveFileSystemGetter& drive_file_system_getter)
: drive_file_system_getter_(drive_file_system_getter),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
}
| 15,952 |
162,279 | 0 | void CommandBufferProxyImpl::OnSwapBuffersCompleted(
const SwapBuffersCompleteParams& params) {
if (!swap_buffers_completion_callback_.is_null())
swap_buffers_completion_callback_.Run(params);
}
| 15,953 |
63,941 | 0 | static int get_freq0(RangeCoder *rc, unsigned total_freq, unsigned *freq)
{
if (rc->range == 0)
return AVERROR_INVALIDDATA;
*freq = total_freq * (uint64_t)(rc->code - rc->code1) / rc->range;
return 0;
}
| 15,954 |
106,620 | 0 | void WebPageProxy::setCustomTextEncodingName(const String& encodingName)
{
if (m_customTextEncodingName == encodingName)
return;
m_customTextEncodingName = encodingName;
if (!isValid())
return;
process()->send(Messages::WebPage::SetCustomTextEncodingName(encodingName), m_pageID);
}
| 15,955 |
84,353 | 0 | UNCURL_EXPORT int32_t uncurl_ws_write(struct uncurl_conn *ucc, char *buf, uint32_t buf_len, uint8_t opcode)
{
struct ws_header h;
memset(&h, 0, sizeof(struct ws_header));
h.fin = 1;
h.mask = ucc->ws_mask;
h.opcode = opcode;
h.payload_len = buf_len;
if (h.payload_len + WS_HEADER_SIZE > ucc->netbuf_size) {
fre... | 15,956 |
98,934 | 0 | void HTMLConstructionSite::insertHTMLHtmlStartTagInBody(AtomicHTMLToken& token)
{
mergeAttributesFromTokenIntoElement(token, m_openElements.htmlElement());
}
| 15,957 |
178,880 | 1 | static int update_open_stateid(struct nfs4_state *state, nfs4_stateid *open_stateid, nfs4_stateid *delegation, int open_flags)
{
struct nfs_inode *nfsi = NFS_I(state->inode);
struct nfs_delegation *deleg_cur;
int ret = 0;
open_flags &= (FMODE_READ|FMODE_WRITE);
rcu_read_lock();
deleg_cur = rcu_dereference(nfsi->dele... | 15,958 |
131,917 | 0 | static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalTestInterfaceEmptyArg", "TestObjectPython", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() ... | 15,959 |
113,303 | 0 | bool NativePanelTestingWin::IsAnimatingBounds() const {
return panel_browser_view_->IsAnimatingBounds();
}
| 15,960 |
68,870 | 0 | static void drain_array_locked(struct kmem_cache *cachep, struct array_cache *ac,
int node, bool free_all, struct list_head *list)
{
int tofree;
if (!ac || !ac->avail)
return;
tofree = free_all ? ac->avail : (ac->limit + 4) / 5;
if (tofree > ac->avail)
tofree = (ac->avail + 1) / 2;
free_block(cachep, ac... | 15,961 |
69,411 | 0 | static void __exit pkcs7_key_cleanup(void)
{
unregister_key_type(&key_type_pkcs7);
}
| 15,962 |
35,824 | 0 | gpa_t translate_nested_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access,
struct x86_exception *exception)
{
gpa_t t_gpa;
BUG_ON(!mmu_is_nested(vcpu));
/* NPT walks are always user-walks */
access |= PFERR_USER_MASK;
t_gpa = vcpu->arch.mmu.gva_to_gpa(vcpu, gpa, access, exception);
return t_gpa;
}
| 15,963 |
167,735 | 0 | void WebRuntimeFeatures::EnableNoHoverDuringScroll(bool enable) {
RuntimeEnabledFeatures::SetNoHoverDuringScrollEnabled(enable);
}
| 15,964 |
87,584 | 0 | static unsigned readChunk_bKGD(LodePNGInfo* info, const unsigned char* data, size_t chunkLength)
{
if(info->color.colortype == LCT_PALETTE)
{
/*error: this chunk must be 1 byte for indexed color image*/
if(chunkLength != 1) return 43;
info->background_defined = 1;
info->background_r = info->backgro... | 15,965 |
55,981 | 0 | __tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
{
return ldsem_down_write(&tty->ldisc_sem, timeout);
}
| 15,966 |
140,936 | 0 | static bool AcceptsEditingFocus(const Element& element) {
DCHECK(HasEditableStyle(element));
return element.GetDocument().GetFrame() && RootEditableElement(element);
}
| 15,967 |
162,028 | 0 | void BrowserChildProcessHostImpl::OnChannelConnected(int32_t peer_pid) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
is_channel_connected_ = true;
notify_child_disconnected_ = true;
#if defined(OS_WIN)
early_exit_watcher_.StopWatching();
#endif
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
... | 15,968 |
122,240 | 0 | void HTMLButtonElement::defaultEventHandler(Event* event)
{
if (event->type() == EventTypeNames::DOMActivate && !isDisabledFormControl()) {
if (form() && m_type == SUBMIT) {
m_isActivatedSubmit = true;
form()->prepareForSubmission(event);
event->setDefaultHandled();
... | 15,969 |
54,236 | 0 | static void cypress_close(struct usb_serial_port *port)
{
struct cypress_private *priv = usb_get_serial_port_data(port);
unsigned long flags;
spin_lock_irqsave(&priv->lock, flags);
kfifo_reset_out(&priv->write_fifo);
spin_unlock_irqrestore(&priv->lock, flags);
dev_dbg(&port->dev, "%s - stopping urbs\n", __func_... | 15,970 |
129,973 | 0 | void SoftwareFrameManager::SetVisibility(bool visible) {
if (HasCurrentFrame()) {
if (visible) {
RendererFrameManager::GetInstance()->LockFrame(this);
} else {
RendererFrameManager::GetInstance()->UnlockFrame(this);
}
}
}
| 15,971 |
157,531 | 0 | void TestDataReductionProxyConfig::SetCurrentNetworkID(
const std::string& network_id) {
current_network_id_ = network_id;
}
| 15,972 |
65,076 | 0 | static void reg_set_min_max(struct bpf_reg_state *true_reg,
struct bpf_reg_state *false_reg, u64 val,
u8 opcode)
{
switch (opcode) {
case BPF_JEQ:
/* If this is false then we know nothing Jon Snow, but if it is
* true then we know for sure.
*/
true_reg->max_value = true_reg->min_value = val;
... | 15,973 |
116,100 | 0 | void SyncManager::RefreshNigori(const base::Closure& done_callback) {
DCHECK(thread_checker_.CalledOnValidThread());
data_->UpdateCryptographerAndNigori(base::Bind(
&SyncManager::DoneRefreshNigori,
base::Unretained(this),
done_callback));
}
| 15,974 |
141,949 | 0 | void AutofillPopupViewViews::AddExtraInitParams(
views::Widget::InitParams* params) {}
| 15,975 |
46,415 | 0 | static int ubifs_bulk_read(struct page *page)
{
struct inode *inode = page->mapping->host;
struct ubifs_info *c = inode->i_sb->s_fs_info;
struct ubifs_inode *ui = ubifs_inode(inode);
pgoff_t index = page->index, last_page_read = ui->last_page_read;
struct bu_info *bu;
int err = 0, allocated = 0;
ui->last_page_r... | 15,976 |
86,055 | 0 | static int f2fs_remount(struct super_block *sb, int *flags, char *data)
{
struct f2fs_sb_info *sbi = F2FS_SB(sb);
struct f2fs_mount_info org_mount_opt;
unsigned long old_sb_flags;
int err, active_logs;
bool need_restart_gc = false;
bool need_stop_gc = false;
bool no_extent_cache = !test_opt(sbi, EXTENT_CACHE);
#... | 15,977 |
151,548 | 0 | void ResourceFetcher::ClearPreloads(ClearPreloadsPolicy policy) {
LogPreloadStats(policy);
Vector<PreloadKey> keys_to_be_removed;
for (const auto& pair : preloads_) {
Resource* resource = pair.value;
if (policy == kClearAllPreloads || !resource->IsLinkPreload()) {
GetMemoryCache()->Remove(resource)... | 15,978 |
56,596 | 0 | static int ext4_meta_trans_blocks(struct inode *inode, int lblocks,
int pextents)
{
ext4_group_t groups, ngroups = ext4_get_groups_count(inode->i_sb);
int gdpblocks;
int idxblocks;
int ret = 0;
/*
* How many index blocks need to touch to map @lblocks logical blocks
* to @pextents physical extents?
*/
... | 15,979 |
27,988 | 0 | static int shmctl_nolock(struct ipc_namespace *ns, int shmid,
int cmd, int version, void __user *buf)
{
int err;
struct shmid_kernel *shp;
/* preliminary security checks for *_INFO */
if (cmd == IPC_INFO || cmd == SHM_INFO) {
err = security_shm_shmctl(NULL, cmd);
if (err)
return err;
}
switch (cmd) {... | 15,980 |
118,033 | 0 | v8::Handle<v8::Value> V8WebGLRenderingContext::getVertexAttribCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.getVertexAttrib()");
return getObjectParameter(args, kVertexAttrib);
}
| 15,981 |
7,685 | 0 | static ssize_t handle_preadv(FsContext *ctx, V9fsFidOpenState *fs,
const struct iovec *iov,
int iovcnt, off_t offset)
{
#ifdef CONFIG_PREADV
return preadv(fs->fd, iov, iovcnt, offset);
#else
int err = lseek(fs->fd, offset, SEEK_SET);
if (err == -1) {... | 15,982 |
162,998 | 0 | bool QuicStreamSequencerBuffer::RetireBlock(size_t idx) {
if (blocks_[idx] == nullptr) {
QUIC_BUG << "Try to retire block twice";
return false;
}
delete blocks_[idx];
blocks_[idx] = nullptr;
QUIC_DVLOG(1) << "Retired block with index: " << idx;
return true;
}
| 15,983 |
24,074 | 0 | int reset_airo_card( struct net_device *dev )
{
int i;
struct airo_info *ai = dev->ml_priv;
if (reset_card (dev, 1))
return -1;
if ( setup_card(ai, dev->dev_addr, 1 ) != SUCCESS ) {
airo_print_err(dev->name, "MAC could not be enabled");
return -1;
}
airo_print_info(dev->name, "MAC enabled %pM", dev->dev_a... | 15,984 |
100,051 | 0 | bool DecodeParamValue(const std::string& input,
const std::string& referrer_charset,
std::string* output) {
std::string tmp;
StringTokenizer t(input, " \t\n\r");
t.set_options(StringTokenizer::RETURN_DELIMS);
bool is_previous_token_rfc2047 = true;
while (t.GetNext()... | 15,985 |
26,215 | 0 | task_function_call(struct task_struct *p, int (*func) (void *info), void *info)
{
struct remote_function_call data = {
.p = p,
.func = func,
.info = info,
.ret = -ESRCH, /* No such (running) process */
};
if (task_curr(p))
smp_call_function_single(task_cpu(p), remote_function, &data, 1);
return data.ret... | 15,986 |
165,637 | 0 | std::wstring DetermineChannel(const InstallConstants& mode,
bool system_level,
bool from_binaries,
std::wstring* update_ap,
std::wstring* update_cohort_name) {
if (!kUseGoogleUpdateIntegration)
... | 15,987 |
99,235 | 0 | void ResourceMessageFilter::SendDelayedReply(IPC::Message* reply_msg) {
Send(reply_msg);
}
| 15,988 |
48,095 | 0 | static __always_inline void vmcs_check16(unsigned long field)
{
BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2000,
"16-bit accessor invalid for 64-bit field");
BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2001,
"16-bit accessor invalid for 64... | 15,989 |
169,036 | 0 | void OfflinePageModelImpl::ClearStorageIfNeeded(
const ClearStorageCallback& callback) {
if (!storage_manager_) {
storage_manager_.reset(new OfflinePageStorageManager(
this, GetPolicyController(), archive_manager_.get()));
}
storage_manager_->ClearPagesIfNeeded(callback);
}
| 15,990 |
149,534 | 0 | void LoadingPredictor::PrepareForPageLoad(const GURL& url,
HintOrigin origin,
bool preconnectable) {
if (shutdown_)
return;
if (origin == HintOrigin::OMNIBOX) {
HandleOmniboxHint(url, preconnectable);
return;
}
if ... | 15,991 |
133,896 | 0 | bool FormAssociatedElement::rangeUnderflow() const
{
return false;
}
| 15,992 |
103,163 | 0 | void Browser::OpenThemeGalleryTabAndActivate() {
AddSelectedTabWithURL(GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)),
PageTransition::LINK);
}
| 15,993 |
68,049 | 0 | static void write_uid(bytearray_t * bplist, uint64_t val)
{
val = (uint32_t)val;
int size = get_needed_bytes(val);
uint8_t sz;
if (size == 3)
size++;
sz = BPLIST_UID | (size-1); // yes, this is what Apple does...
val = be64toh(val);
byte_array_append(bplist, &sz, 1);
byte_array_... | 15,994 |
31,659 | 0 | static struct perf_guest_switch_msr *core_guest_get_msrs(int *nr)
{
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
struct perf_guest_switch_msr *arr = cpuc->guest_switch_msrs;
int idx;
for (idx = 0; idx < x86_pmu.num_counters; idx++) {
struct perf_event *event = cpuc->events[idx];
arr[idx].msr =... | 15,995 |
179,656 | 1 | static int hash_recvmsg(struct kiocb *unused, struct socket *sock,
struct msghdr *msg, size_t len, int flags)
{
struct sock *sk = sock->sk;
struct alg_sock *ask = alg_sk(sk);
struct hash_ctx *ctx = ask->private;
unsigned ds = crypto_ahash_digestsize(crypto_ahash_reqtfm(&ctx->req));
int err;
if (len > ds)
len = ds;
els... | 15,996 |
157,678 | 0 | ExtensionFunction::ResponseAction InputImeCommitTextFunction::Run() {
InputImeEventRouter* event_router =
GetInputImeEventRouter(Profile::FromBrowserContext(browser_context()));
InputMethodEngineBase* engine =
event_router ? event_router->GetActiveEngine(extension_id()) : nullptr;
if (engine) {
st... | 15,997 |
39,482 | 0 | static void yam_tx_byte(struct net_device *dev, struct yam_port *yp)
{
struct sk_buff *skb;
unsigned char b, temp;
switch (yp->tx_state) {
case TX_OFF:
break;
case TX_HEAD:
if (--yp->tx_count <= 0) {
if (!(skb = skb_dequeue(&yp->send_queue))) {
ptt_off(dev);
yp->tx_state = TX_OFF;
break;
}
... | 15,998 |
70,815 | 0 | int main(int argc, char **argv)
{
struct sigaction sigact = { { 0 } };
int cfg_parsed;
int ret = EXIT_FAILURE;
init_dynload();
config.filename = av_strdup("/etc/ffserver.conf");
parse_loglevel(argc, argv, options);
av_register_all();
avformat_network_init();
show_banner(argc, arg... | 15,999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.