unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
148,410 | 0 | WebContentsImpl::GetRenderWidgetHostViewsInTree() {
std::set<RenderWidgetHostView*> set;
if (ShowingInterstitialPage()) {
if (RenderWidgetHostView* rwhv = GetRenderWidgetHostView())
set.insert(rwhv);
} else {
for (RenderFrameHost* rfh : GetAllFrames()) {
if (RenderWidgetHostView* rwhv = static... | 3,900 |
89,402 | 0 | static void __attribute__((no_instrument_function)) trace_save_gd(void)
{
}
| 3,901 |
18,374 | 0 | menu_add_separator_image(WebKitWebView *page, GArray *argv, GString *result) {
(void) page;
(void) result;
add_separator_to_menu(argv, WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE);
}
| 3,902 |
39,528 | 0 | fst_openport(struct fst_port_info *port)
{
int signals;
int txq_length;
/* Only init things if card is actually running. This allows open to
* succeed for downloads etc.
*/
if (port->card->state == FST_RUNNING) {
if (port->run) {
dbg(DBG_OPEN, "open: found port already running\n");
fst_issue_cmd(port,... | 3,903 |
124,891 | 0 | LayoutUnit RenderBox::lineHeight(bool /*firstLine*/, LineDirectionMode direction, LinePositionMode /*linePositionMode*/) const
{
if (isReplaced())
return direction == HorizontalLine ? m_marginBox.top() + height() + m_marginBox.bottom() : m_marginBox.right() + width() + m_marginBox.left();
return 0;
}
| 3,904 |
94,149 | 0 | static int tcm_loop_queue_status(struct se_cmd *se_cmd)
{
struct tcm_loop_cmd *tl_cmd = container_of(se_cmd,
struct tcm_loop_cmd, tl_se_cmd);
struct scsi_cmnd *sc = tl_cmd->sc;
TL_CDB_DEBUG("tcm_loop_queue_status() called for scsi_cmnd: %p"
" cdb: 0x%02x\n", sc, sc->cmnd[0]);
if (se_cmd->sense_buffer &&
... | 3,905 |
170,261 | 0 | void SendInterstitialCommand(
content::WebContents* tab,
security_interstitials::SecurityInterstitialCommand command) {
if (AreCommittedInterstitialsEnabled()) {
security_interstitials::SecurityInterstitialTabHelper* helper =
security_interstitials::SecurityInterstitialTabHelper::
... | 3,906 |
140,238 | 0 | DEFINE_TRACE(BluetoothRemoteGATTServer) {
visitor->trace(m_activeAlgorithms);
visitor->trace(m_device);
}
| 3,907 |
24,039 | 0 | struct net_device *init_airo_card( unsigned short irq, int port, int is_pcmcia,
struct device *dmdev)
{
return _init_airo_card ( irq, port, is_pcmcia, NULL, dmdev);
}
| 3,908 |
112,714 | 0 | const KURL& DocumentLoader::unreachableURL() const
{
return m_substituteData.failingURL();
}
| 3,909 |
65,576 | 0 | void nfsd4_cstate_clear_replay(struct nfsd4_compound_state *cstate)
{
struct nfs4_stateowner *so = cstate->replay_owner;
if (so != NULL) {
cstate->replay_owner = NULL;
mutex_unlock(&so->so_replay.rp_mutex);
nfs4_put_stateowner(so);
}
}
| 3,910 |
42,937 | 0 | static void sctp_v4_from_sk(union sctp_addr *addr, struct sock *sk)
{
addr->v4.sin_family = AF_INET;
addr->v4.sin_port = 0;
addr->v4.sin_addr.s_addr = inet_sk(sk)->inet_rcv_saddr;
}
| 3,911 |
98,202 | 0 | WebSocketExperimentRunner::WebSocketExperimentRunner()
: next_state_(STATE_NONE),
task_state_(STATE_NONE),
ALLOW_THIS_IN_INITIALIZER_LIST(
task_callback_(this, &WebSocketExperimentRunner::OnTaskCompleted)) {
WebSocketExperimentTask::InitHistogram();
InitConfig();
}
| 3,912 |
49,912 | 0 | MYSQLND_METHOD(mysqlnd_protocol, get_auth_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC)
{
struct st_mysqlnd_packet_auth * packet = mnd_pecalloc(1, packet_methods[PROT_AUTH_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_auth_packet");
if (packet) {
packet->header.m =... | 3,913 |
30,369 | 0 | static int vmci_transport_connect(struct vsock_sock *vsk)
{
int err;
bool old_pkt_proto = false;
struct sock *sk = &vsk->sk;
if (vmci_transport_old_proto_override(&old_pkt_proto) &&
old_pkt_proto) {
err = vmci_transport_send_conn_request(
sk, vmci_trans(vsk)->queue_pair_size);
if (err < 0) {
sk->sk_sta... | 3,914 |
135,181 | 0 | PassRefPtrWillBeRawPtr<Element> Document::createElement(const AtomicString& name, ExceptionState& exceptionState)
{
if (!isValidName(name)) {
exceptionState.throwDOMException(InvalidCharacterError, "The tag name provided ('" + name + "') is not a valid name.");
return nullptr;
}
if (isXHTML... | 3,915 |
186,650 | 1 | bool IsSensitiveURL(const GURL& url,
bool is_request_from_browser_or_webui_renderer) {
bool sensitive_chrome_url = false;
const char kGoogleCom[] = "google.com";
const char kClient[] = "clients";
url::Origin origin = url::Origin::Create(url);
if (origin.DomainIs(kGoogleCom)) {
base::St... | 3,916 |
1,762 | 0 | void IRCView::findPreviousText()
{
emit doSearchPrevious();
}
| 3,917 |
165,808 | 0 | bool SVGElement::LayoutObjectIsNeeded(const ComputedStyle& style) const {
return IsValid() && HasSVGParent() && Element::LayoutObjectIsNeeded(style);
}
| 3,918 |
78,964 | 0 | FindKeyByName(KeyNamesInfo *info, xkb_atom_t name)
{
xkb_keycode_t i;
for (i = info->min_key_code; i <= info->max_key_code; i++)
if (darray_item(info->key_names, i) == name)
return i;
return XKB_KEYCODE_INVALID;
}
| 3,919 |
11,966 | 0 | static int cms_copy_content(BIO *out, BIO *in, unsigned int flags)
{
unsigned char buf[4096];
int r = 0, i;
BIO *tmpout = NULL;
if (out == NULL)
tmpout = BIO_new(BIO_s_null());
else if (flags & CMS_TEXT) {
tmpout = BIO_new(BIO_s_mem());
BIO_set_mem_eof_return(tmpout, 0);
... | 3,920 |
16,126 | 0 | GahpClient::blah_job_cancel(const char *job_id)
{
static const char* command = "BLAH_JOB_CANCEL";
if (server->m_commands_supported->contains_anycase(command)==FALSE) {
return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
}
if (!job_id) job_id=NULLSTRING;
std::string reqline;
int x = sprintf( reqline, "%s", escapeGahpStr... | 3,921 |
105,370 | 0 | static IntPoint documentPointForWindowPoint(Frame* frame, const IntPoint& windowPoint)
{
FrameView* view = frame->view();
return view ? view->windowToContents(windowPoint) : windowPoint;
}
| 3,922 |
29,951 | 0 | int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
size_t len, int noblock, int flags, int *addr_len)
{
struct inet_sock *inet = inet_sk(sk);
struct sockaddr_in *sin = (struct sockaddr_in *)msg->msg_name;
struct sk_buff *skb;
unsigned int ulen, copied;
int peeked, off = 0;
int err;
int is... | 3,923 |
80,647 | 0 | GF_Err url_Read(GF_Box *s, GF_BitStream *bs)
{
GF_DataEntryURLBox *ptr = (GF_DataEntryURLBox *)s;
if (ptr->size) {
ptr->location = (char*)gf_malloc((u32) ptr->size);
if (! ptr->location) return GF_OUT_OF_MEM;
gf_bs_read_data(bs, ptr->location, (u32)ptr->size);
}
return GF_OK;
}
| 3,924 |
118,815 | 0 | void WebContentsImpl::AddDestructionObserver(WebContentsImpl* web_contents) {
if (!ContainsKey(destruction_observers_, web_contents)) {
destruction_observers_[web_contents] =
new DestructionObserver(this, web_contents);
}
}
| 3,925 |
157,723 | 0 | void WebContentsImpl::CancelKeyboardLock(
RenderWidgetHostImpl* render_widget_host) {
if (!keyboard_lock_widget_ || render_widget_host != keyboard_lock_widget_)
return;
RenderWidgetHostImpl* old_keyboard_lock_widget = keyboard_lock_widget_;
keyboard_lock_widget_ = nullptr;
if (delegate_)
delegate_... | 3,926 |
25,916 | 0 | static int set_segment_reg(struct task_struct *task,
unsigned long offset, u16 value)
{
/*
* The value argument was already truncated to 16 bits.
*/
if (invalid_selector(value))
return -EIO;
switch (offset) {
case offsetof(struct user_regs_struct,fs):
/*
* If this is setting fs as for normal 64-bi... | 3,927 |
170,569 | 0 | const char * EqualizerGetPresetName(int32_t preset){
if (preset == PRESET_CUSTOM) {
return "Custom";
} else {
return gEqualizerPresets[preset].name;
}
return 0;
}
| 3,928 |
105,834 | 0 | STDMETHODIMP UrlmonUrlRequest::OnResponse(DWORD dwResponseCode,
const wchar_t* response_headers, const wchar_t* request_headers,
wchar_t** additional_headers) {
DCHECK_EQ(thread_, base::PlatformThread::CurrentId());
DVLOG(1) << __FUNCTION__ << me() << "headers: \n" << response_headers;
if (!delegate_) {
... | 3,929 |
107,281 | 0 | TabContents* Browser::AddRestoredTab(
const std::vector<TabNavigation>& navigations,
int tab_index,
int selected_navigation,
const std::string& extension_app_id,
bool select,
bool pin,
bool from_last_session,
SessionStorageNamespace* session_storage_namespace) {
TabContentsWrapper* wra... | 3,930 |
113,820 | 0 | bool AddGenericPolicy(sandbox::TargetPolicy* policy) {
sandbox::ResultCode result;
result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
sandbox::TargetPolicy::FILES_ALLOW_ANY,
L"\\??\\pipe\\chrome.*");
if (result != sandbox::SBOX_ALL_OK)
return f... | 3,931 |
171,430 | 0 | static INLINE void check_resync(vpx_codec_alg_priv_t *const ctx,
const VP9Decoder *const pbi) {
if (ctx->need_resync == 1 && pbi->need_resync == 0 &&
(pbi->common.intra_only || pbi->common.frame_type == KEY_FRAME))
ctx->need_resync = 0;
}
| 3,932 |
93,604 | 0 | nvmet_fc_fod_op_done(struct nvmet_fc_fcp_iod *fod)
{
struct nvmefc_tgt_fcp_req *fcpreq = fod->fcpreq;
struct nvmet_fc_tgtport *tgtport = fod->tgtport;
unsigned long flags;
bool abort;
spin_lock_irqsave(&fod->flock, flags);
abort = fod->abort;
fod->writedataactive = false;
spin_unlock_irqrestore(&fod->flock, fl... | 3,933 |
151,442 | 0 | bool FrameFetchContext::PageDismissalEventBeingDispatched() const {
return document_ && document_->PageDismissalEventBeingDispatched() !=
Document::kNoDismissal;
}
| 3,934 |
60,745 | 0 | pkinit_fini_req_crypto(pkinit_req_crypto_context req_cryptoctx)
{
if (req_cryptoctx == NULL)
return;
pkiDebug("%s: freeing ctx at %p\n", __FUNCTION__, req_cryptoctx);
if (req_cryptoctx->dh != NULL)
DH_free(req_cryptoctx->dh);
if (req_cryptoctx->received_cert != NULL)
X509_free(r... | 3,935 |
163,447 | 0 | void OmniboxViewViews::OnFocus() {
views::Textfield::OnFocus();
model()->OnSetFocus(false);
if (saved_selection_for_focus_change_.IsValid()) {
SelectRange(saved_selection_for_focus_change_);
saved_selection_for_focus_change_ = gfx::Range::InvalidRange();
}
GetRenderText()->SetElideBehavior(gfx::NO_E... | 3,936 |
20,671 | 0 | static void emulator_get_idt(struct x86_emulate_ctxt *ctxt, struct desc_ptr *dt)
{
kvm_x86_ops->get_idt(emul_to_vcpu(ctxt), dt);
}
| 3,937 |
30,249 | 0 | g_next(struct seq_file *m, void *v, loff_t *pos)
{
(*pos)++;
return __g_next(m, pos);
}
| 3,938 |
63,898 | 0 | static int segment_info_seq_show(struct seq_file *seq, void *offset)
{
struct super_block *sb = seq->private;
struct f2fs_sb_info *sbi = F2FS_SB(sb);
unsigned int total_segs =
le32_to_cpu(sbi->raw_super->segment_count_main);
int i;
seq_puts(seq, "format: segment_type|valid_blocks\n"
"segment_type(0:HD, 1:WD,... | 3,939 |
120,495 | 0 | PassRefPtr<ShadowRoot> Element::createShadowRoot(ExceptionCode& ec)
{
if (alwaysCreateUserAgentShadowRoot())
ensureUserAgentShadowRoot();
if (RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled())
return ensureShadow()->addShadowRoot(this, ShadowRoot::AuthorShadowRoot);
if (!areAut... | 3,940 |
96,685 | 0 | static void hidg_free_inst(struct usb_function_instance *f)
{
struct f_hid_opts *opts;
opts = container_of(f, struct f_hid_opts, func_inst);
mutex_lock(&hidg_ida_lock);
hidg_put_minor(opts->minor);
if (ida_is_empty(&hidg_ida))
ghid_cleanup();
mutex_unlock(&hidg_ida_lock);
if (opts->report_desc_alloc)
kf... | 3,941 |
16,914 | 0 | static void tracked_request_begin(BdrvTrackedRequest *req,
BlockDriverState *bs,
int64_t offset,
unsigned int bytes, bool is_write)
{
*req = (BdrvTrackedRequest){
.bs = bs,
.offset = offset,... | 3,942 |
33,926 | 0 | mainloop_set_trigger(crm_trigger_t * source)
{
source->trigger = TRUE;
}
| 3,943 |
23,447 | 0 | static int nfs4_xdr_dec_setclientid(struct rpc_rqst *req,
struct xdr_stream *xdr,
struct nfs4_setclientid_res *res)
{
struct compound_hdr hdr;
int status;
status = decode_compound_hdr(xdr, &hdr);
if (!status)
status = decode_setclientid(xdr, res);
return status;
}
| 3,944 |
145,272 | 0 | void DisplaySourceCustomBindings::OnSessionError(int sink_id,
DisplaySourceErrorType type,
const std::string& message) {
CHECK(GetDisplaySession(sink_id));
DispatchSessionError(sink_id, type, message);
}
| 3,945 |
60,683 | 0 | static int sctp_msghdr_parse(const struct msghdr *msg, struct sctp_cmsgs *cmsgs)
{
struct msghdr *my_msg = (struct msghdr *)msg;
struct cmsghdr *cmsg;
for_each_cmsghdr(cmsg, my_msg) {
if (!CMSG_OK(my_msg, cmsg))
return -EINVAL;
/* Should we parse this header or ignore? */
if (cmsg->cmsg_level != IPPROTO_... | 3,946 |
106,255 | 0 | JSObject* JSTestSerializedScriptValueInterface::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
{
return JSTestSerializedScriptValueInterfacePrototype::create(exec->globalData(), globalObject, JSTestSerializedScriptValueInterfacePrototype::createStructure(globalObject->globalData(), globalObject, glo... | 3,947 |
156,311 | 0 | VideoTrackRecorder::CodecId VideoStringToCodecId(
const blink::WebString& codecs) {
const std::string& codecs_str = ToLowerASCII(codecs.Utf8());
if (codecs_str.find("vp8") != std::string::npos)
return VideoTrackRecorder::CodecId::VP8;
if (codecs_str.find("vp9") != std::string::npos)
return VideoTrack... | 3,948 |
98,043 | 0 | bool RenderView::allowPlugins(WebFrame* frame, bool enabled_per_settings) {
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableClickToPlay)) {
return WebFrameClient::allowPlugins(frame, enabled_per_settings);
}
return (enabled_per_settings &&
AllowContentType(CONTENT_SETTINGS_TYPE_P... | 3,949 |
60,405 | 0 | static int bnep_tx_frame(struct bnep_session *s, struct sk_buff *skb)
{
struct ethhdr *eh = (void *) skb->data;
struct socket *sock = s->sock;
struct kvec iv[3];
int len = 0, il = 0;
u8 type = 0;
BT_DBG("skb %p dev %p type %d", skb, skb->dev, skb->pkt_type);
if (!skb->dev) {
/* Control frame sent by us */
... | 3,950 |
98,622 | 0 | void ThumbnailGenerator::WidgetDestroyed(RenderWidgetHost* widget) {
EraseHostFromShownList(widget);
}
| 3,951 |
143,894 | 0 | std::unique_ptr<WebRunnerNetLog> CreateNetLog() {
std::unique_ptr<WebRunnerNetLog> result;
const base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(network::switches::kLogNetLog)) {
base::FilePath log_path =
command_line->GetSwitchValuePath(net... | 3,952 |
97,578 | 0 | xmlXPathCanRewriteDosExpression(xmlChar *expr)
{
if (expr == NULL)
return(0);
do {
if ((*expr == '/') && (*(++expr) == '/'))
return(1);
} while (*expr++);
return(0);
}
| 3,953 |
166,200 | 0 | void MediaStreamManager::FinalizeGenerateStream(const std::string& label,
DeviceRequest* request) {
DVLOG(1) << "FinalizeGenerateStream label " << label;
DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(request->generate_stream_cb);
MediaStreamDevices audio_devices... | 3,954 |
84,996 | 0 | do_replace(struct net *net, const void __user *user, unsigned int len)
{
int ret;
struct ipt_replace tmp;
struct xt_table_info *newinfo;
void *loc_cpu_entry;
struct ipt_entry *iter;
if (copy_from_user(&tmp, user, sizeof(tmp)) != 0)
return -EFAULT;
/* overflow check */
if (tmp.num_counters >= INT_MAX / sizeo... | 3,955 |
59,226 | 0 | _kdc_log_timestamp(krb5_context context,
krb5_kdc_configuration *config,
const char *type,
KerberosTime authtime, KerberosTime *starttime,
KerberosTime endtime, KerberosTime *renew_till)
{
char authtime_str[100], starttime_str[100],
endtime_str[100], renewtime_str[100];
krb5_format_time(co... | 3,956 |
32,733 | 0 | static void tg3_rx_prodring_fini(struct tg3 *tp,
struct tg3_rx_prodring_set *tpr)
{
kfree(tpr->rx_std_buffers);
tpr->rx_std_buffers = NULL;
kfree(tpr->rx_jmb_buffers);
tpr->rx_jmb_buffers = NULL;
if (tpr->rx_std) {
dma_free_coherent(&tp->pdev->dev, TG3_RX_STD_RING_BYTES(tp),
tpr->rx_std, tpr->rx_std_m... | 3,957 |
1,182 | 0 | GooString *JBIG2Stream::getPSFilter(int psLevel, char *indent) {
return NULL;
}
| 3,958 |
127,359 | 0 | void StyleResolver::addTreeBoundaryCrossingRules(const Vector<MinimalRuleData>& rules, ContainerNode* scope)
{
for (unsigned i = 0; i < rules.size(); ++i) {
const MinimalRuleData& info = rules[i];
m_treeBoundaryCrossingRules.addRule(info.m_rule, info.m_selectorIndex, scope, info.m_flags);
}
}
| 3,959 |
70,389 | 0 | void jas_matrix_asr(jas_matrix_t *matrix, int n)
{
int i;
int j;
jas_seqent_t *rowstart;
int rowstep;
jas_seqent_t *data;
assert(n >= 0);
if (jas_matrix_numrows(matrix) > 0 && jas_matrix_numcols(matrix) > 0) {
assert(matrix->rows_);
rowstep = jas_matrix_rowstep(matrix);
for (i = matrix->numrows_, rowstart... | 3,960 |
3,203 | 0 | zexecuteonly(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
check_op(1);
if (r_has_type(op, t_dictionary))
return_error(gs_error_typecheck);
return access_check(i_ctx_p, a_execute, true);
}
| 3,961 |
107,029 | 0 | void QQuickWebView::mouseDoubleClickEvent(QMouseEvent* event)
{
Q_D(QQuickWebView);
d->pageView->eventHandler()->handleMousePressEvent(event);
}
| 3,962 |
42,210 | 0 | static void vhost_dev_free_iovecs(struct vhost_dev *dev)
{
int i;
for (i = 0; i < dev->nvqs; ++i)
vhost_vq_free_iovecs(dev->vqs[i]);
}
| 3,963 |
74,888 | 0 | static int asf_read_unknown(AVFormatContext *s, const GUIDParseTable *g)
{
ASFContext *asf = s->priv_data;
AVIOContext *pb = s->pb;
uint64_t size = avio_rl64(pb);
int ret;
if (size > INT64_MAX)
return AVERROR_INVALIDDATA;
if (asf->is_header)
asf->unknown_size = size;
asf-... | 3,964 |
49,165 | 0 | static unsigned int fanout_demux_rollover(struct packet_fanout *f,
struct sk_buff *skb,
unsigned int idx, bool try_self,
unsigned int num)
{
struct packet_sock *po, *po_next, *po_skip = NULL;
unsigned int i, j, room = ROOM_NONE;
po = pkt_sk(f->arr[idx]);
if (try_self) {
room = packet_rcv_ha... | 3,965 |
115,811 | 0 | void set_got_dom(bool got_dom) {
got_dom_ = got_dom;
}
| 3,966 |
142,232 | 0 | TestEntryInfo() : type(FILE), shared_option(NONE) {}
| 3,967 |
125,954 | 0 | void AutomationProviderImportSettingsObserver::ImportStarted() {
}
| 3,968 |
25,228 | 0 | static void alpha_pmu_start(struct perf_event *event, int flags)
{
struct hw_perf_event *hwc = &event->hw;
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
if (WARN_ON_ONCE(!(hwc->state & PERF_HES_STOPPED)))
return;
if (flags & PERF_EF_RELOAD) {
WARN_ON_ONCE(!(hwc->state & PERF_HES_UPTODATE));
al... | 3,969 |
91,792 | 0 | void comps_objrtree_create_u(COMPS_Object * obj, COMPS_Object **args) {
(void)args;
comps_objrtree_create((COMPS_ObjRTree*)obj, NULL);
}
| 3,970 |
42,584 | 0 | static inline struct sock *__udp4_lib_lookup_skb(struct sk_buff *skb,
__be16 sport, __be16 dport,
struct udp_table *udptable)
{
const struct iphdr *iph = ip_hdr(skb);
return __udp4_lib_lookup(dev_net(skb_dst(skb)->dev), iph->saddr, sport,
iph->daddr, dport, inet_iif(skb),
udptable);
}
| 3,971 |
48,419 | 0 | Strclear(Str s)
{
s->length = 0;
s->ptr[0] = '\0';
}
| 3,972 |
82,384 | 0 | void jsvCreateEmptyVarList() {
assert(!isMemoryBusy);
isMemoryBusy = MEMBUSY_SYSTEM;
jsVarFirstEmpty = 0;
JsVar firstVar; // temporary var to simplify code in the loop below
jsvSetNextSibling(&firstVar, 0);
JsVar *lastEmpty = &firstVar;
JsVarRef i;
for (i=1;i<=jsVarsSize;i++) {
JsVar *var = jsvGetA... | 3,973 |
60,199 | 0 | static int __init init_dns_resolver(void)
{
struct cred *cred;
struct key *keyring;
int ret;
/* create an override credential set with a special thread keyring in
* which DNS requests are cached
*
* this is used to prevent malicious redirections from being installed
* with add_key().
*/
cred = prepare_k... | 3,974 |
137,220 | 0 | bool Textfield::GetTextRange(gfx::Range* range) const {
if (!ImeEditingAllowed())
return false;
model_->GetTextRange(range);
return true;
}
| 3,975 |
116,797 | 0 | void WebRTCAudioDeviceTest::OnGetHardwareInputSampleRate(double* sample_rate) {
EXPECT_TRUE(audio_util_callback_);
*sample_rate = audio_util_callback_ ?
audio_util_callback_->GetAudioInputHardwareSampleRate(
AudioManagerBase::kDefaultDeviceId) : 0.0;
}
| 3,976 |
142,804 | 0 | WebMediaPlayer::TrackId HTMLMediaElement::GetSelectedVideoTrackId() {
DCHECK(HasSelectedVideoTrack());
int selected_track_index = video_tracks_->selectedIndex();
VideoTrack* track =
video_tracks_->AnonymousIndexedGetter(selected_track_index);
return track->id();
}
| 3,977 |
101,241 | 0 | void AddRootItemWithPosition(int64 position) {
string id = string("ServerId") + base::Int64ToString(next_update_id_++);
string name = "my name is my id -- " + id;
int revision = next_revision_++;
mock_server_->AddUpdateDirectory(id, kRootId, name, revision, revision);
mock_server_->SetLastUpdatePo... | 3,978 |
88,031 | 0 | static int ctrl_dumpfamily(struct sk_buff *skb, struct netlink_callback *cb)
{
int n = 0;
struct genl_family *rt;
struct net *net = sock_net(skb->sk);
int fams_to_skip = cb->args[0];
unsigned int id;
idr_for_each_entry(&genl_fam_idr, rt, id) {
if (!rt->netnsok && !net_eq(net, &init_net))
continue;
if (n+... | 3,979 |
127,409 | 0 | void setAnimationUpdateIfNeeded(StyleResolverState& state, Element& element)
{
if (RuntimeEnabledFeatures::webAnimationsCSSEnabled() && state.animationUpdate())
element.ensureActiveAnimations()->cssAnimations().setPendingUpdate(state.takeAnimationUpdate());
}
| 3,980 |
50,377 | 0 | posix_acl_chmod(struct inode *inode, umode_t mode)
{
struct posix_acl *acl;
int ret = 0;
if (!IS_POSIXACL(inode))
return 0;
if (!inode->i_op->set_acl)
return -EOPNOTSUPP;
acl = get_acl(inode, ACL_TYPE_ACCESS);
if (IS_ERR_OR_NULL(acl)) {
if (acl == ERR_PTR(-EOPNOTSUPP))
return 0;
return PTR_ERR(acl);
... | 3,981 |
182,923 | 1 | void comps_objmrtree_unite(COMPS_ObjMRTree *rt1, COMPS_ObjMRTree *rt2) {
COMPS_HSList *tmplist, *tmp_subnodes;
COMPS_HSListItem *it;
COMPS_ObjListIt *it2;
struct Pair {
COMPS_HSList * subnodes;
char * key;
char added;
} *pair, *parent_pair;
pair = malloc(sizeof(struct Pair));
pair->subnodes = rt2->subnodes;
pa... | 3,982 |
87,097 | 0 | CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw)
{
cJSON *raw_item = cJSON_CreateRaw(raw);
if (add_item_to_object(object, name, raw_item, &global_hooks, false))
{
return raw_item;
}
cJSON_Delete(raw_item);
return NULL;
}
| 3,983 |
117,213 | 0 | void GLES2DecoderImpl::DoBindTexture(GLenum target, GLuint client_id) {
TextureManager::TextureInfo* info = NULL;
GLuint service_id = 0;
if (client_id != 0) {
info = GetTextureInfo(client_id);
if (!info) {
if (!group_->bind_generates_resource()) {
LOG(ERROR) << "glBindTexture: id not genera... | 3,984 |
103,749 | 0 | void RenderThread::EnsureWebKitInitialized() {
if (webkit_client_.get())
return;
v8::V8::SetCounterFunction(base::StatsTable::FindLocation);
v8::V8::SetCreateHistogramFunction(CreateHistogram);
v8::V8::SetAddHistogramSampleFunction(AddHistogramSample);
webkit_client_.reset(new RendererWebKitClientImpl);... | 3,985 |
52,605 | 0 | static inline int ethertype_to_npindex(int ethertype)
{
switch (ethertype) {
case ETH_P_IP:
return NP_IP;
case ETH_P_IPV6:
return NP_IPV6;
case ETH_P_IPX:
return NP_IPX;
case ETH_P_PPPTALK:
case ETH_P_ATALK:
return NP_AT;
case ETH_P_MPLS_UC:
return NP_MPLS_UC;
case ETH_P_MPLS_MC:
return NP_MPLS_MC;
... | 3,986 |
46,179 | 0 | static int compare_single(struct super_block *s, void *p)
{
return 1;
}
| 3,987 |
89,464 | 0 | static int nfc_genl_start_poll(struct sk_buff *skb, struct genl_info *info)
{
struct nfc_dev *dev;
int rc;
u32 idx;
u32 im_protocols = 0, tm_protocols = 0;
pr_debug("Poll start\n");
if (!info->attrs[NFC_ATTR_DEVICE_INDEX] ||
((!info->attrs[NFC_ATTR_IM_PROTOCOLS] &&
!info->attrs[NFC_ATTR_PROTOCOLS]) ... | 3,988 |
2,953 | 0 | pdf14_forward_device_procs(gx_device * dev)
{
gx_device_forward * pdev = (gx_device_forward *)dev;
/*
* We are using gx_device_forward_fill_in_procs to set the various procs.
* This will ensure that any new device procs are also set. However that
* routine only changes procs which are NULL. Th... | 3,989 |
63,317 | 0 | static MagickBooleanType WritePNGImage(const ImageInfo *image_info,
Image *image)
{
(void) image;
printf("Your PNG library is too old: You have libpng-%s\n",
PNG_LIBPNG_VER_STRING);
ThrowBinaryException(CoderError,"PNG library is too old",
image_info->filename);
}
| 3,990 |
20,823 | 0 | static void kvm_shared_msr_cpu_online(void)
{
unsigned i;
for (i = 0; i < shared_msrs_global.nr; ++i)
shared_msr_update(i, shared_msrs_global.msrs[i]);
}
| 3,991 |
24,489 | 0 | cifs_prune_tlinks(struct work_struct *work)
{
struct cifs_sb_info *cifs_sb = container_of(work, struct cifs_sb_info,
prune_tlinks.work);
struct rb_root *root = &cifs_sb->tlink_tree;
struct rb_node *node = rb_first(root);
struct rb_node *tmp;
struct tcon_link *tlink;
/*
* Because we drop the spinlock ... | 3,992 |
188,553 | 1 | virtual void SetUp() {
fwd_txfm_ = GET_PARAM(0);
inv_txfm_ = GET_PARAM(1);
version_ = GET_PARAM(2); // 0: high precision forward transform
}
| 3,993 |
1,586 | 0 | aspath_hash_alloc (void *arg)
{
const struct aspath *aspath = arg;
struct aspath *new;
/* Malformed AS path value. */
assert (aspath->str);
if (! aspath->str)
return NULL;
/* New aspath structure is needed. */
new = XMALLOC (MTYPE_AS_PATH, sizeof (struct aspath));
/* Reuse segments and string rep... | 3,994 |
76,257 | 0 | static int cdrom_mrw_exit(struct cdrom_device_info *cdi)
{
disc_information di;
int ret;
ret = cdrom_get_disc_info(cdi, &di);
if (ret < 0 || ret < (int)offsetof(typeof(di),disc_type))
return 1;
ret = 0;
if (di.mrw_status == CDM_MRW_BGFORMAT_ACTIVE) {
pr_info("issuing MRW background format suspend\n");
ret... | 3,995 |
158,052 | 0 | void LocalFrameClientImpl::DidDisplayContentWithCertificateErrors() {
if (web_frame_->Client())
web_frame_->Client()->DidDisplayContentWithCertificateErrors();
}
| 3,996 |
98,846 | 0 | int WebSocketExperimentTask::DoURLFetchComplete(int result) {
url_fetcher_.reset();
if (result < 0)
return result;
next_state_ = STATE_WEBSOCKET_CONNECT;
return net::OK;
}
| 3,997 |
94,276 | 0 | static enum test_return test_binary_replaceq(void) {
return test_binary_replace_impl("test_binary_replaceq",
PROTOCOL_BINARY_CMD_REPLACEQ);
}
| 3,998 |
12,973 | 0 | ssh_packet_read_poll1(struct ssh *ssh, u_char *typep)
{
struct session_state *state = ssh->state;
u_int len, padded_len;
const char *emsg;
const u_char *cp;
u_char *p;
u_int checksum, stored_checksum;
int r;
*typep = SSH_MSG_NONE;
/* Check if input size is less than minimum packet size. */
if (sshbuf_len(st... | 3,999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.