unique_id
int64
13
189k
target
int64
0
1
code
stringlengths
20
241k
__index_level_0__
int64
0
18.9k
78,844
0
const sc_path_t *sc_get_mf_path(void) { static const sc_path_t mf_path = { {0x3f, 0x00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 2, 0, 0, SC_PATH_TYPE_PATH, {{0},0} }; return &mf_path; }
1,200
186,923
1
htmlInitParserCtxt(htmlParserCtxtPtr ctxt) { htmlSAXHandler *sax; if (ctxt == NULL) return(-1); memset(ctxt, 0, sizeof(htmlParserCtxt)); ctxt->dict = xmlDictCreate(); if (ctxt->dict == NULL) { htmlErrMemory(NULL, "htmlInitParserCtxt: out of memory\n"); return(-1); } sax = (htmlSAX...
1,201
129,760
0
ChildThread::ChildThread() : router_(this), channel_connected_factory_(this), in_browser_process_(false) { channel_name_ = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( switches::kProcessChannelID); Init(); }
1,202
105,025
0
void FakeURLFetcherFactory::ClearFakeReponses() { fake_responses_.clear(); }
1,203
21,691
0
static void kiocb_batch_init(struct kiocb_batch *batch, long total) { INIT_LIST_HEAD(&batch->head); batch->count = total; }
1,204
77,794
0
static CURLcode fix_hostname(struct connectdata *conn, struct hostname *host) { size_t len; struct Curl_easy *data = conn->data; #ifndef USE_LIBIDN2 (void)data; (void)conn; #elif defined(CURL_DISABLE_VERBOSE_STRINGS) (void)conn; #endif /* set the name we use to display the host name */ host->dispname = ...
1,205
6,766
0
static void ide_trim_bh_cb(void *opaque) { TrimAIOCB *iocb = opaque; iocb->common.cb(iocb->common.opaque, iocb->ret); qemu_bh_delete(iocb->bh); iocb->bh = NULL; qemu_aio_unref(iocb); }
1,206
34,921
0
void rpc_show_tasks(void) { struct rpc_clnt *clnt; struct rpc_task *task; int header = 0; spin_lock(&rpc_client_lock); list_for_each_entry(clnt, &all_clients, cl_clients) { spin_lock(&clnt->cl_lock); list_for_each_entry(task, &clnt->cl_tasks, tk_task) { if (!header) { rpc_show_header(); header++; ...
1,207
111,764
0
bool FlagsState::IsRestartNeededToCommitChanges() { return needs_restart_; }
1,208
149,116
0
static void computeYMD_HMS(DateTime *p){ computeYMD(p); computeHMS(p); }
1,209
169,172
0
RenderFrameHostImpl::RenderFrameHostImpl(SiteInstance* site_instance, RenderViewHostImpl* render_view_host, RenderFrameHostDelegate* delegate, RenderWidgetHostDelegate* rwh_delegate, ...
1,210
142,535
0
bool changed_auto_hide_state() const { return changed_auto_hide_state_; }
1,211
1,501
0
static void coroutine_fn v9fs_read(void *opaque) { int32_t fid; uint64_t off; ssize_t err = 0; int32_t count = 0; size_t offset = 7; uint32_t max_count; V9fsFidState *fidp; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; err = pdu_unmarshal(pdu, offset, "dqd", &fid, &off, &max_cou...
1,212
75,908
0
start_keepalived(void) { bool have_child = false; #ifdef _WITH_BFD_ /* must be opened before vrrp and bfd start */ open_bfd_pipes(); #endif #ifdef _WITH_LVS_ /* start healthchecker child */ if (running_checker()) { start_check_child(); have_child = true; } #endif #ifdef _WITH_VRRP_ /* start vrrp child */ ...
1,213
145,894
0
gfx::Rect GetTransformedTargetBounds(aura::Window* window) { gfx::Rect bounds_in_screen = window->layer()->GetTargetBounds(); ::wm::ConvertRectToScreen(window->parent(), &bounds_in_screen); gfx::RectF bounds(bounds_in_screen); gfx::Transform transform( gfx::TransformAboutPivot(gfx::ToFlooredPo...
1,214
141,357
0
void Document::setBgColor(const AtomicString& value) { if (!IsFrameSet()) SetBodyAttribute(kBgcolorAttr, value); }
1,215
99,237
0
void PrintJobWorker::DismissDialog() { printing_context_.DismissDialog(); }
1,216
82,831
0
char* MACH0_(get_cpusubtype)(struct MACH0_(obj_t)* bin) { if (bin) { return MACH0_(get_cpusubtype_from_hdr) (&bin->hdr); } return strdup ("Unknown"); }
1,217
13,988
0
gsicc_profile_reference(cmm_profile_t *icc_profile, int delta) { if (icc_profile != NULL) rc_adjust(icc_profile, delta, "gsicc_profile_reference"); }
1,218
172,075
0
static inline int connect_server_socket(const char* name) { int s = socket(AF_LOCAL, SOCK_STREAM, 0); if(s < 0) return -1; set_socket_blocking(s, TRUE); if(socket_local_client_connect(s, name, ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_STREAM) >= 0) { APPL_TRACE_DEBUG("connected to local socket:%s, fd:%d"...
1,219
117,118
0
static void toplevelWindowResizeGripVisibilityChanged(GObject* object, GParamSpec*, WebKitWebViewBase* webViewBase) { webkitWebViewBaseNotifyResizerSizeForWindow(webViewBase, GTK_WINDOW(object)); }
1,220
90,047
0
ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem) { /* CStream and CCtx are now same object */ return ZSTD_createCCtx_advanced(customMem); }
1,221
97,285
0
static void endElementNsHandler(void* closure, const xmlChar*, const xmlChar*, const xmlChar*) { if (hackAroundLibXMLEntityBug(closure)) return; getTokenizer(closure)->endElementNs(); }
1,222
94,558
0
cdf_u16tos8(char *buf, size_t len, const uint16_t *p) { size_t i; for (i = 0; i < len && p[i]; i++) buf[i] = (char)p[i]; buf[i] = '\0'; return buf; }
1,223
112,405
0
static Editor::Command command(Document* document, const String& commandName, bool userInterface = false) { Frame* frame = document->frame(); if (!frame || frame->document() != document) return Editor::Command(); document->updateStyleIfNeeded(); return frame->editor()->command(commandName, ...
1,224
151,338
0
void InspectorTraceEvents::Did(const probe::ParseHTML& probe) { TRACE_EVENT_END1( "devtools.timeline", "ParseHTML", "endData", InspectorParseHtmlEndData(probe.parser->LineNumber().ZeroBasedInt() - 1)); TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "UpdateCou...
1,225
48,305
0
PixarLogPreDecode(TIFF* tif, uint16 s) { static const char module[] = "PixarLogPreDecode"; PixarLogState* sp = DecoderState(tif); (void) s; assert(sp != NULL); sp->stream.next_in = tif->tif_rawdata; assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised, we need to simplify this code to refl...
1,226
53,750
0
static int fixed_mtrr_addr_seg_to_range_index(u64 addr, int seg) { struct fixed_mtrr_segment *mtrr_seg; int index; mtrr_seg = &fixed_seg_table[seg]; index = mtrr_seg->range_start; index += (addr - mtrr_seg->start) >> mtrr_seg->range_shift; return index; }
1,227
145,336
0
bool HTMLAnchorElement::isLiveLink() const { return isLink() && !hasEditableStyle(); }
1,228
107,986
0
void encode(ArgumentEncoder* encoder, CFArrayRef array) { CFIndex size = CFArrayGetCount(array); Vector<CFTypeRef, 32> values(size); CFArrayGetValues(array, CFRangeMake(0, size), values.data()); encoder->encodeUInt64(size); for (CFIndex i = 0; i < size; ++i) { ASSERT(values[i]); e...
1,229
131,259
0
static void callWithScriptStateExecutionContextVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); ScriptState* currentState = ScriptState::current(); if (!currentState) return; ScriptState& state = *currentStat...
1,230
128,375
0
bool FrameView::wasScrolledByUser() const { return m_wasScrolledByUser; }
1,231
97,026
0
static int anon_pipe_buf_steal(struct pipe_inode_info *pipe, struct pipe_buffer *buf) { struct page *page = buf->page; if (page_count(page) == 1) { if (memcg_kmem_enabled()) memcg_kmem_uncharge(page, 0); __SetPageLocked(page); return 0; } return 1; }
1,232
34,832
0
static inline int iskeychar(int c) { return isalnum(c) || c == '-'; }
1,233
150,872
0
void BluetoothAdapter::NotifyGattServicesDiscovered(BluetoothDevice* device) { DCHECK(device->GetAdapter() == this); for (auto& observer : observers_) observer.GattServicesDiscovered(this, device); }
1,234
28,787
0
int kvm_x2apic_msr_write(struct kvm_vcpu *vcpu, u32 msr, u64 data) { struct kvm_lapic *apic = vcpu->arch.apic; u32 reg = (msr - APIC_BASE_MSR) << 4; if (!irqchip_in_kernel(vcpu->kvm) || !apic_x2apic_mode(apic)) return 1; /* if this is ICR write vector before command */ if (msr == 0x830) apic_reg_write(apic, ...
1,235
86,952
0
static void show_elfs(struct user_ta_ctx *utc) { struct user_ta_elf *elf; size_t __maybe_unused idx = 0; TAILQ_FOREACH(elf, &utc->elfs, link) EMSG_RAW(" [%zu] %pUl @ %#" PRIxVA, idx++, (void *)&elf->uuid, elf->load_addr); }
1,236
175,159
0
sp<ABuffer> NuPlayer::GenericSource::mediaBufferToABuffer( MediaBuffer* mb, media_track_type trackType, int64_t *actualTimeUs) { bool audio = trackType == MEDIA_TRACK_TYPE_AUDIO; size_t outLength = mb->range_length(); if (audio && mAudioIsVorbis) { outLength += sizeof(int32_t); } sp<ABuffer>...
1,237
103,901
0
void RenderView::didStopLoading() { if (!is_loading_) { DLOG(WARNING) << "DidStopLoading called while not loading"; return; } is_loading_ = false; Send(new ViewHostMsg_DidStopLoading(routing_id_)); if (load_progress_tracker_ != NULL) load_progress_tracker_->DidStopLoading(); FOR_EACH_OBSERVE...
1,238
185,107
1
bool CopyDirectory(const FilePath& from_path, const FilePath& to_path, bool recursive) { base::ThreadRestrictions::AssertIOAllowed(); // Some old callers of CopyDirectory want it to support wildcards. // After some discussion, we decided to fix those callers. // Break loudly here if anyone tries to do this. // TODO(eva...
1,239
37,043
0
static inline void ept_sync_global(void) { if (cpu_has_vmx_invept_global()) __invept(VMX_EPT_EXTENT_GLOBAL, 0, 0); }
1,240
117,689
0
void InProcessBrowserTest::SetUp() { ASSERT_TRUE(CreateUserDataDirectory()) << "Could not create user data directory."; DCHECK(g_browser_process); delete g_browser_process; g_browser_process = NULL; ASSERT_TRUE(SetUpUserDataDirectory()) << "Could not set up user data directory."; CommandLine*...
1,241
24,932
0
static int sysfs_slab_alias(struct kmem_cache *s, const char *name) { struct saved_alias *al; if (slab_state == SYSFS) { /* * If we have a leftover link then remove it. */ sysfs_remove_link(&slab_kset->kobj, name); return sysfs_create_link(&slab_kset->kobj, &s->kobj, name); } al = kmalloc(sizeof(struc...
1,242
38,721
0
static struct ath_frame_info *get_frame_info(struct sk_buff *skb) { struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); BUILD_BUG_ON(sizeof(struct ath_frame_info) > sizeof(tx_info->rate_driver_data)); return (struct ath_frame_info *) &tx_info->rate_driver_data[0]; }
1,243
91,047
0
void CWebServer::RType_CustomLightIcons(WebEmSession & session, const request& req, Json::Value &root) { int ii = 0; std::vector<_tCustomIcon> temp_custom_light_icons = m_custom_light_icons; std::sort(temp_custom_light_icons.begin(), temp_custom_light_icons.end(), compareIconsByName); for (const auto ...
1,244
93,230
0
network_prefix(int ae, int plen, unsigned int omitted, const unsigned char *p, const unsigned char *dp, unsigned int len, unsigned char *p_r) { unsigned pb; unsigned char prefix[16]; int consumed = 0; if(plen >= 0) pb = (plen + 7) / 8; else if(ae == 1) ...
1,245
108,806
0
void RevokeAllPermissionsForFile(const FilePath& file) { FilePath stripped = file.StripTrailingSeparators(); file_permissions_.erase(stripped); request_file_set_.erase(stripped); }
1,246
148,407
0
WebContentsImpl* WebContentsImpl::GetOuterWebContents() { if (GuestMode::IsCrossProcessFrameGuest(this)) return node_.outer_web_contents(); if (browser_plugin_guest_) return browser_plugin_guest_->embedder_web_contents(); return nullptr; }
1,247
88,705
0
static void dwc3_stop_active_transfer(struct dwc3 *dwc, u32 epnum, bool force) { struct dwc3_ep *dep; struct dwc3_gadget_ep_cmd_params params; u32 cmd; int ret; dep = dwc->eps[epnum]; if ((dep->flags & DWC3_EP_END_TRANSFER_PENDING) || !dep->resource_index) return; /* * NOTICE: We are violating what t...
1,248
125,496
0
EntryInfoResult::EntryInfoResult() : error(GDATA_FILE_ERROR_FAILED) { }
1,249
26,527
0
static ssize_t pmcraid_store_log_level( struct device *dev, struct device_attribute *attr, const char *buf, size_t count ) { struct Scsi_Host *shost; struct pmcraid_instance *pinstance; unsigned long val; if (strict_strtoul(buf, 10, &val)) return -EINVAL; /* log-level should be from 0 to 2 */ if (val > 2) ...
1,250
167,555
0
base::Process ShowSingletonTab(const GURL& page) { ::ShowSingletonTab(browser(), page); WebContents* wc = browser()->tab_strip_model()->GetActiveWebContents(); CHECK(wc->GetURL() == page); WaitForLauncherThread(); WaitForMessageProcessing(wc); return ProcessFromHandle( wc->GetMainFram...
1,251
116,358
0
static void ETagGet_ConditionalRequest_NoStore_Handler( const net::HttpRequestInfo* request, std::string* response_status, std::string* response_headers, std::string* response_data) { EXPECT_TRUE( request->extra_headers.HasHeader(net::HttpRequestHeaders::kIfNoneMatch)); response_status->assign...
1,252
112,933
0
void GetHostedDocumentURLBlockingThread(const FilePath& gdata_cache_path, GURL* url) { std::string json; if (!file_util::ReadFileToString(gdata_cache_path, &json)) { NOTREACHED() << "Unable to read file " << gdata_cache_path.value(); return; } DVLOG(1) << "Hosted ...
1,253
55,154
0
static void write_branch_report(FILE *rpt, struct branch *b) { fprintf(rpt, "%s:\n", b->name); fprintf(rpt, " status :"); if (b->active) fputs(" active", rpt); if (b->branch_tree.tree) fputs(" loaded", rpt); if (is_null_sha1(b->branch_tree.versions[1].sha1)) fputs(" dirty", rpt); fputc('\n', rpt); ...
1,254
174,422
0
int aacDecoder_drcEpilog ( HANDLE_AAC_DRC self, HANDLE_FDK_BITSTREAM hBs, CAacDecoderStaticChannelInfo *pAacDecoderStaticChannelInfo[], UCHAR pceInstanceTag, UCHAR channelMapping[], /* Channel mapping translating drcChannel index to canonical channel index */ int validChannels ) ...
1,255
102,210
0
DirectoryManager* dir_manager() { return share_.dir_manager.get(); }
1,256
125,129
0
bool PluginServiceImpl::GetPluginInfoByPath(const FilePath& plugin_path, webkit::WebPluginInfo* info) { std::vector<webkit::WebPluginInfo> plugins; plugin_list_->GetPluginsNoRefresh(&plugins); for (std::vector<webkit::WebPluginInfo>::iterator it = plugins.begin(); ...
1,257
43,800
0
iakerb_release_context(iakerb_ctx_id_t ctx) { OM_uint32 tmp; if (ctx == NULL) return; krb5_gss_release_cred(&tmp, &ctx->defcred); krb5_init_creds_free(ctx->k5c, ctx->icc); krb5_tkt_creds_free(ctx->k5c, ctx->tcc); krb5_gss_delete_sec_context(&tmp, &ctx->gssc, NULL); krb5_free_data_c...
1,258
137,537
0
bool PrintWebViewHelper::InitPrintSettings(bool fit_to_paper_size) { PrintMsg_PrintPages_Params settings; Send(new PrintHostMsg_GetDefaultPrintSettings(routing_id(), &settings.params)); bool result = true; if (!PrintMsg_Print_Params_IsValid(settings.params)) r...
1,259
149,631
0
void ResourcePrefetchPredictor::RecordPageRequestSummary( std::unique_ptr<PageRequestSummary> summary) { DCHECK_CURRENTLY_ON(BrowserThread::UI); if (initialization_state_ == NOT_INITIALIZED) { StartInitialization(); return; } else if (initialization_state_ == INITIALIZING) { return; } else if (i...
1,260
68,210
0
void llc_sap_remove_socket(struct llc_sap *sap, struct sock *sk) { struct llc_sock *llc = llc_sk(sk); spin_lock_bh(&sap->sk_lock); sk_nulls_del_node_init_rcu(sk); hlist_del(&llc->dev_hash_node); sap->sk_count--; spin_unlock_bh(&sap->sk_lock); llc_sap_put(sap); }
1,261
187,929
1
WORD32 ih264d_read_mmco_commands(struct _DecStruct * ps_dec) { dec_bit_stream_t *ps_bitstrm = ps_dec->ps_bitstrm; dpb_commands_t *ps_dpb_cmds = ps_dec->ps_dpb_cmds; dec_slice_params_t * ps_slice = ps_dec->ps_cur_slice; WORD32 j; UWORD8 u1_buf_mode; struct MMCParams *ps_mmc_params; UWORD32 *pu4_bitstrm_b...
1,262
184,234
1
void InspectorOverlay::update() { if (isEmpty()) { m_client->hideHighlight(); return; } FrameView* view = m_page->mainFrame()->view(); if (!view) return; IntRect viewRect = view->visibleContentRect(); FrameView* overlayView = overlayPage()->mainFrame()->view(); // Include scrollbars to avoid masking them by the gutte...
1,263
131,275
0
static void classAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) { TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); CustomElementCallbackDispatcher::CallbackDeliveryScop...
1,264
24,651
0
mmtimer_interrupt(int irq, void *dev_id) { unsigned long expires = 0; int result = IRQ_NONE; unsigned indx = cpu_to_node(smp_processor_id()); struct mmtimer *base; spin_lock(&timers[indx].lock); base = rb_entry(timers[indx].next, struct mmtimer, list); if (base == NULL) { spin_unlock(&timers[indx].lock); re...
1,265
65,353
0
static inline u32 nfsd4_open_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) { return (op_encode_hdr_size + op_encode_stateid_maxsz + op_encode_change_info_maxsz + 1 + nfs4_fattr_bitmap_maxsz + op_encode_delegation_maxsz) * sizeof(__be32); }
1,266
77,735
0
parse_value(const char *s, const char *delimiters) { size_t n = 0; /* Iterate until we reach a delimiter. * * strchr(s, '\0') returns s+strlen(s), so this test handles the null * terminator at the end of 's'. */ while (!strchr(delimiters, s[n])) { if (s[n] == '(') { int ...
1,267
52,530
0
static u32 tsk_peer_port(struct tipc_sock *tsk) { return msg_destport(&tsk->phdr); }
1,268
123,029
0
void RenderWidgetHostImpl::ProcessGestureAck(bool processed, int type) { if (overscroll_controller_.get()) { overscroll_controller_->ReceivedEventACK( gesture_event_filter_->GetGestureEventAwaitingAck(), processed); } gesture_event_filter_->ProcessGestureAck(processed, type); }
1,269
67,761
0
bool r_pkcs7_parse_signerinfo (RPKCS7SignerInfo* si, RASN1Object *object) { RASN1Object **elems; ut32 shift = 3; if (!si || !object || object->list.length < 5) { return false; } elems = object->list.objects; si->version = (ut32) elems[0]->sector[0]; r_pkcs7_parse_issuerandserialnumber (&si->issuerAndSerialNumb...
1,270
15,526
0
compare_forward(struct Forward *a, struct Forward *b) { if (!compare_host(a->listen_host, b->listen_host)) return 0; if (!compare_host(a->listen_path, b->listen_path)) return 0; if (a->listen_port != b->listen_port) return 0; if (!compare_host(a->connect_host, b->connect_host)) return 0; if (!compare_host(...
1,271
7,383
0
eatsize(const char **p) { const char *l = *p; if (LOWCASE(*l) == 'u') l++; switch (LOWCASE(*l)) { case 'l': /* long */ case 's': /* short */ case 'h': /* short */ case 'b': /* char/byte */ case 'c': /* char/byte */ l++; /*FALLTHROUGH*/ default: break; } *p = l; }
1,272
168,451
0
PlatformFontSkia::PlatformFontSkia(sk_sp<SkTypeface> typeface, const std::string& family, int size_pixels, int style, Font::Weight weight, const ...
1,273
142,741
0
WebMediaPlayer::TrackId HTMLMediaElement::AddVideoTrack( const WebString& id, WebMediaPlayerClient::VideoTrackKind kind, const WebString& label, const WebString& language, bool selected) { AtomicString kind_string = VideoKindToString(kind); BLINK_MEDIA_LOG << "addVideoTrack(" << (void*)this << "...
1,274
161,647
0
void AudioHandler::UpdateChannelsForInputs() { for (auto& input : inputs_) input->ChangedOutputs(); }
1,275
18,392
0
run_js (WebKitWebView * web_view, GArray *argv, GString *result) { if (argv_idx(argv, 0)) eval_js(web_view, argv_idx(argv, 0), result); }
1,276
42,049
0
static int ipcget_new(struct ipc_namespace *ns, struct ipc_ids *ids, const struct ipc_ops *ops, struct ipc_params *params) { int err; down_write(&ids->rwsem); err = ops->getnew(ns, params); up_write(&ids->rwsem); return err; }
1,277
21,359
0
static void mincore_hugetlb_page_range(struct vm_area_struct *vma, unsigned long addr, unsigned long end, unsigned char *vec) { #ifdef CONFIG_HUGETLB_PAGE struct hstate *h; h = hstate_vma(vma); while (1) { unsigned char present; pte_t *ptep; /* * Huge pages are always in RAM for now, but * theor...
1,278
15,767
0
static int ahci_dma_rw_buf(IDEDMA *dma, int is_write) { AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma); IDEState *s = &ad->port.ifs[0]; uint8_t *p = s->io_buffer + s->io_buffer_index; int l = s->io_buffer_size - s->io_buffer_index; if (ahci_populate_sglist(ad, &s->sg, s->io_buffer_offset)) { ...
1,279
83,143
0
mrb_io_fileno(mrb_state *mrb, mrb_value io) { struct mrb_io *fptr; fptr = (struct mrb_io *)mrb_get_datatype(mrb, io, &mrb_io_type); return mrb_fixnum_value(fptr->fd); }
1,280
159,343
0
AppViewGuestDelegate* ChromeExtensionsAPIClient::CreateAppViewGuestDelegate() const { return new ChromeAppViewGuestDelegate(); }
1,281
174,630
0
void btm_sec_role_changed (void *p_ref_data) { tBTM_SEC_DEV_REC *p_dev_rec = (tBTM_SEC_DEV_REC *)p_ref_data; UINT8 res; BTM_TRACE_EVENT ("Security Manager: role changed"); /* If this role switch was started by peer do not need to do anything */ if (p_dev_rec->sec_state != BTM_SEC_STATE_SWITCHING_ROLE) ...
1,282
185,031
1
void StoreAccumulatedContentLength(int received_content_length, int original_content_length, bool data_reduction_proxy_was_used) { BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind(&UpdateContentLengthPrefs, received_content_length, or...
1,283
165,022
0
void HTMLCanvasElement::OnWebLayerUpdated() { SetNeedsCompositingUpdate(); }
1,284
11,090
0
static bool valid_smb_header(const uint8_t *inbuf) { if (is_encrypted_packet(inbuf)) { return true; } /* * This used to be (strncmp(smb_base(inbuf),"\377SMB",4) == 0) * but it just looks weird to call strncmp for this one. */ return (IVAL(smb_base(inbuf), 0) == 0x424D53FF); }
1,285
83,289
0
void CSoundFile::ExtendedMODCommands(CHANNELINDEX nChn, ModCommand::PARAM param) { ModChannel *pChn = &m_PlayState.Chn[nChn]; uint8 command = param & 0xF0; param &= 0x0F; switch(command) { case 0x00: for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { m_PlayState.Chn[chn].dwFlags.set(CHN_AMIGAFILTER...
1,286
164,044
0
bool DownloadManagerImpl::IsMostRecentDownloadItemAtFilePath( download::DownloadItemImpl* download) { return delegate_ ? delegate_->IsMostRecentDownloadItemAtFilePath(download) : false; }
1,287
183,750
1
void CCLayerTreeHostTest::endTest() { // If we are called from the CCThread, re-call endTest on the main thread. if (!isMainThread()) CCMainThread::postTask(createMainThreadTask(this, &CCLayerTreeHostTest::endTest)); else { // For the case where we endTest during beginTest(), set a flag to indicate that // the ...
1,288
107,964
0
LinkInfoBar::~LinkInfoBar() { }
1,289
156,557
0
void ChildProcessSecurityPolicyImpl::RegisterWebSafeScheme( const std::string& scheme) { base::AutoLock lock(lock_); DCHECK_EQ(0U, schemes_okay_to_request_in_any_process_.count(scheme)) << "Add schemes at most once."; DCHECK_EQ(0U, pseudo_schemes_.count(scheme)) << "Web-safe implies not pseudo."; ...
1,290
188,422
1
long Chapters::Parse() { IMkvReader* const pReader = m_pSegment->m_pReader; long long pos = m_start; // payload start const long long stop = pos + m_size; // payload stop while (pos < stop) { long long id, size; long status = ParseElementHeader( pReader, ...
1,291
60,600
0
static int snd_seq_ioctl_remove_events(struct snd_seq_client *client, void *arg) { struct snd_seq_remove_events *info = arg; /* * Input mostly not implemented XXX. */ if (info->remove_mode & SNDRV_SEQ_REMOVE_INPUT) { /* * No restrictions so for a user client we can clear * the whole fifo *...
1,292
60,945
0
mime_list_one (MimeListState *state, GFileInfo *info) { const char *mime_type; if (should_skip_file (NULL, info)) { g_object_unref (info); return; } mime_type = g_file_info_get_content_type (info); if (mime_type != NULL) { istr_set_insert (state->...
1,293
82,409
0
JsVar *jsvGetCommonCharacters(JsVar *va, JsVar *vb) { JsVar *v = jsvNewFromEmptyString(); if (!v) return 0; JsvStringIterator ita, itb; jsvStringIteratorNew(&ita, va, 0); jsvStringIteratorNew(&itb, vb, 0); int ca = jsvStringIteratorGetCharOrMinusOne(&ita); int cb = jsvStringIteratorGetCharOrMinusOne(&itb)...
1,294
43,484
0
static int lrw_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct aesni_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); be128 buf[8]; struct lrw_crypt_req req = { .tbuf = buf, .tbuflen = sizeof(buf), .table_ctx = &ctx->lrw_table, .cr...
1,295
6,693
0
static bool cmd_ibm_sense_condition(IDEState *s, uint8_t cmd) { switch (s->feature) { case 0x01: /* sense temperature in device */ s->nsector = 0x50; /* +20 C */ break; default: ide_abort_command(s); return true; } return true; }
1,296
81,028
0
static void vmx_decache_cr3(struct kvm_vcpu *vcpu) { if (enable_unrestricted_guest || (enable_ept && is_paging(vcpu))) vcpu->arch.cr3 = vmcs_readl(GUEST_CR3); __set_bit(VCPU_EXREG_CR3, (ulong *)&vcpu->arch.regs_avail); }
1,297
17,461
0
ProcXvGetVideo(ClientPtr client) { DrawablePtr pDraw; XvPortPtr pPort; GCPtr pGC; int status; REQUEST(xvGetVideoReq); REQUEST_SIZE_MATCH(xvGetVideoReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if (!(pPor...
1,298
98,645
0
void RenderWidget::OnMsgRepaint(const gfx::Size& size_to_paint) { if (!webwidget_) return; set_next_paint_is_repaint_ack(); gfx::Rect repaint_rect(size_to_paint.width(), size_to_paint.height()); didInvalidateRect(repaint_rect); }
1,299