unique_id
int64
13
189k
target
int64
0
1
code
stringlengths
20
241k
__index_level_0__
int64
0
18.9k
172,308
0
static void onScanEvent(wifi_scan_event event, unsigned status) { JNIHelper helper(mVM); helper.reportEvent(mCls, "onScanStatus", "(I)V", event); }
18,000
97,187
0
void WebFrameLoaderClient::dispatchDidFinishLoad() { OwnPtr<WebPluginLoadObserver> plugin_load_observer = GetPluginLoadObserver(); if (webframe_->client()) webframe_->client()->didFinishLoad(webframe_); if (plugin_load_observer) plugin_load_observer->didFinishLoading(); }
18,001
139,580
0
RenderMediaClient* RenderMediaClient::GetInstance() { static RenderMediaClient* client = new RenderMediaClient(); return client; }
18,002
42,155
0
mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) { Buffer m; char *p, *msg; int success = 0, tmp1 = -1, tmp2 = -1; /* Kludge: ensure there are fds free to receive the pty/tty */ if ((tmp1 = dup(pmonitor->m_recvfd)) == -1 || (tmp2 = dup(pmonitor->m_recvfd)) == -1) { error("%s: canno...
18,003
88,143
0
int smb311_posix_mkdir(const unsigned int xid, struct inode *inode, umode_t mode, struct cifs_tcon *tcon, const char *full_path, struct cifs_sb_info *cifs_sb) { struct smb_rqst rqst; struct smb2_create_req *req; struct smb2_create_rsp *rsp = NULL; struct cifs_ses *ses = tcon->ses; str...
18,004
135,894
0
void TextTrack::setMode(const AtomicString& mode) { DCHECK(mode == DisabledKeyword() || mode == HiddenKeyword() || mode == ShowingKeyword()); if (mode_ == mode) return; if (cues_ && GetCueTimeline()) { if (mode == DisabledKeyword()) GetCueTimeline()->RemoveCues(this, cues_.Get()); els...
18,005
73,566
0
static Image *ExtractPostscript(Image *image,const ImageInfo *image_info, MagickOffsetType PS_Offset,ssize_t PS_Size,ExceptionInfo *exception) { char postscript_file[MagickPathExtent]; const MagicInfo *magic_info; FILE *ps_file; ImageInfo *clone_info; Image *image2; un...
18,006
146,298
0
WebGLRenderingContextBaseMap& ForciblyEvictedContexts() { DEFINE_THREAD_SAFE_STATIC_LOCAL(ThreadSpecific<WebGLRenderingContextBaseMap>, forcibly_evicted_contexts, ()); if (!forcibly_evicted_contexts.IsSet()) forcibly_evicted_contexts->RegisterAsStaticReference(); return *forc...
18,007
90,333
0
megasas_fire_cmd_gen2(struct megasas_instance *instance, dma_addr_t frame_phys_addr, u32 frame_count, struct megasas_register_set __iomem *regs) { unsigned long flags; spin_lock_irqsave(&instance->hba_lock, flags); writel((frame_phys_addr | (frame_count<<1))|1, &(regs)->inbound_queue_port); spin_unlock...
18,008
92,319
0
epilogProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { parser->m_processor = epilogProcessor; parser->m_eventPtr = s; for (;;) { const char *next = NULL; int tok = XmlPrologTok(parser->m_encoding, s, end, &next); parse...
18,009
27,598
0
static int alloc_voice(int dev, int chn, int note) { unsigned short key; int voice; key = (chn << 8) | (note + 1); voice = synth_devs[dev]->alloc_voice(dev, chn, note, &synth_devs[dev]->alloc); synth_devs[dev]->alloc.map[voice] = key; synth_devs[dev]->alloc.alloc_times[voice] = synth_devs[dev]->al...
18,010
81,775
0
static void mpeg4_encode_vol_header(MpegEncContext *s, int vo_number, int vol_number) { int vo_ver_id; if (!CONFIG_MPEG4_ENCODER) return; if (s->max_b_frames || s->quarter_sample) { vo_ver_id = 5; s->vo_type =...
18,011
31,677
0
static void intel_pmu_disable_fixed(struct hw_perf_event *hwc) { int idx = hwc->idx - INTEL_PMC_IDX_FIXED; u64 ctrl_val, mask; mask = 0xfULL << (idx * 4); rdmsrl(hwc->config_base, ctrl_val); ctrl_val &= ~mask; wrmsrl(hwc->config_base, ctrl_val); }
18,012
43,793
0
iakerb_init_creds_ctx(iakerb_ctx_id_t ctx, krb5_gss_cred_id_t cred, OM_uint32 time_req) { krb5_error_code code; if (cred->iakerb_mech == 0) { code = EINVAL; goto cleanup; } assert(cred->name != NULL); assert(cred->name->princ != NULL); ...
18,013
68,830
0
static struct array_cache *alloc_arraycache(int node, int entries, int batchcount, gfp_t gfp) { size_t memsize = sizeof(void *) * entries + sizeof(struct array_cache); struct array_cache *ac = NULL; ac = kmalloc_node(memsize, gfp, node); init_arraycache(ac, entries, batchcount); return ac; }
18,014
77,303
0
ofproto_delete(const char *name, const char *type) { const struct ofproto_class *class = ofproto_class_find__(type); return (!class ? EAFNOSUPPORT : !class->del ? EACCES : class->del(type, name)); }
18,015
135,570
0
bool IsInPasswordFieldWithUnrevealedPassword(const Position& position) { TextControlElement* text_control = EnclosingTextControl(position); if (!isHTMLInputElement(text_control)) return false; HTMLInputElement* input = toHTMLInputElement(text_control); return (input->type() == InputTypeNames::password) && ...
18,016
115,170
0
void BluetoothOptionsHandler::Initialize() { DCHECK(web_ui_); if (!CommandLine::ForCurrentProcess() ->HasSwitch(switches::kEnableBluetooth)) { return; } web_ui_->CallJavascriptFunction( "options.SystemOptions.showBluetoothSettings"); bool bluetooth_on = true; base::FundamentalValue checked...
18,017
1,562
0
aspath_add_seq (struct aspath *aspath, as_t asno) { return aspath_add_asns (aspath, asno, AS_SEQUENCE, 1); }
18,018
62,027
0
ikev2_gen_print(netdissect_options *ndo, u_char tpay, const struct isakmp_gen *ext) { struct isakmp_gen e; ND_TCHECK(*ext); UNALIGNED_MEMCPY(&e, ext, sizeof(e)); ikev2_pay_print(ndo, NPSTR(tpay), e.critical); ND_PRINT((ndo," len=%d", ntohs(e.len) - 4)); if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { ND_PRINT...
18,019
75,902
0
running_bfd(void) { return (__test_bit(DAEMON_BFD, &daemon_mode) && (global_data->have_bfd_config || __test_bit(RUN_ALL_CHILDREN, &daemon_mode))); }
18,020
81,193
0
void __local_bh_enable_ip(unsigned long ip, unsigned int cnt) { WARN_ON_ONCE(in_irq()); lockdep_assert_irqs_enabled(); #ifdef CONFIG_TRACE_IRQFLAGS local_irq_disable(); #endif /* * Are softirqs going to be turned on now: */ if (softirq_count() == SOFTIRQ_DISABLE_OFFSET) trace_softirqs_on(ip); /* * Keep pr...
18,021
184,012
1
void SplitString(const std::wstring& str, wchar_t c, std::vector<std::wstring>* r) { SplitStringT(str, c, true, r); }
18,022
57,731
0
int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) { switch (msr_info->index) { case MSR_IA32_PLATFORM_ID: case MSR_IA32_EBL_CR_POWERON: case MSR_IA32_DEBUGCTLMSR: case MSR_IA32_LASTBRANCHFROMIP: case MSR_IA32_LASTBRANCHTOIP: case MSR_IA32_LASTINTFROMIP: case MSR_IA32_LASTINTTOIP: case MS...
18,023
43,047
0
int luaD_pcall (lua_State *L, Pfunc func, void *u, ptrdiff_t old_top, ptrdiff_t ef) { int status; unsigned short oldnCcalls = L->nCcalls; ptrdiff_t old_ci = saveci(L, L->ci); lu_byte old_allowhooks = L->allowhook; ptrdiff_t old_errfunc = L->errfunc; L->errfunc = ef; status = luaD_rawrunpro...
18,024
181,067
1
l2tp_framing_type_print(netdissect_options *ndo, const u_char *dat) { const uint32_t *ptr = (const uint32_t *)dat; if (EXTRACT_32BITS(ptr) & L2TP_FRAMING_TYPE_ASYNC_MASK) { ND_PRINT((ndo, "A")); } if (EXTRACT_32BITS(ptr) & L2TP_FRAMING_TYPE_SYNC_MASK) { ND_PRINT((ndo, "S")); } }
18,025
91,348
0
static MagickBooleanType WriteSIXELImage(const ImageInfo *image_info, Image *image,ExceptionInfo *exception) { MagickBooleanType status; register const Quantum *q; register ssize_t i, x; ssize_t opacity, y; sixel_output_t *output; unsigned char sixel_palette[256*3], ...
18,026
104,517
0
MockTouchpadLibrary* CrosMock::mock_touchpad_library() { return mock_touchpad_library_; }
18,027
98,793
0
void WebPluginDelegateProxy::OnGetCookies(const GURL& url, const GURL& first_party_for_cookies, std::string* cookies) { DCHECK(cookies); if (plugin_) *cookies = plugin_->GetCookies(url, first_party_for_cookies); }
18,028
139,393
0
static bool EnabledUndo(LocalFrame& frame, Event*, EditorCommandSource) { return frame.GetEditor().CanUndo(); }
18,029
156,738
0
void WaitForSelectedText(const std::string& expected_text) { if (last_selected_text_ == expected_text) return; expected_text_ = expected_text; loop_runner_ = new MessageLoopRunner(); loop_runner_->Run(); }
18,030
87,553
0
unsigned lodepng_has_palette_alpha(const LodePNGColorMode* info) { size_t i; for(i = 0; i < info->palettesize; i++) { if(info->palette[i * 4 + 3] < 255) return 1; } return 0; }
18,031
145,231
0
void Dispatcher::OnDeliverMessage(int target_port_id, const Message& message) { scoped_ptr<RequestSender::ScopedTabID> scoped_tab_id; std::map<int, int>::const_iterator it = port_to_tab_id_map_.find(target_port_id); if (it != port_to_tab_id_map_.end()) { scoped_tab_id.reset( new RequestSender::S...
18,032
85,697
0
void hns_nic_net_reinit(struct net_device *netdev) { struct hns_nic_priv *priv = netdev_priv(netdev); netif_trans_update(priv->netdev); while (test_and_set_bit(NIC_STATE_REINITING, &priv->state)) usleep_range(1000, 2000); hns_nic_net_down(netdev); hns_nic_net_reset(netdev); (void)hns_nic_net_up(netdev); clea...
18,033
161,770
0
PlatformSensorFusion::~PlatformSensorFusion() { for (const auto& pair : source_sensors_) pair.second->RemoveClient(this); }
18,034
11,172
0
PHP_METHOD(PharFileInfo, getContent) { char *error; php_stream *fp; phar_entry_info *link; zend_string *str; PHAR_ENTRY_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } if (entry_obj->entry->is_dir) { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Phar error: Cannot retri...
18,035
155,172
0
bool OmniboxViewViews::SkipDefaultKeyEventProcessing( const ui::KeyEvent& event) { if (views::FocusManager::IsTabTraversalKeyEvent(event) && ((model()->is_keyword_hint() && !event.IsShiftDown()) || model()->popup_model()->IsOpen())) { return true; } if (event.key_code() == ui::VKEY_ESCAPE) ...
18,036
175,084
0
void SoundPool::resume(int channelID) { ALOGV("resume(%d)", channelID); Mutex::Autolock lock(&mLock); SoundChannel* channel = findChannel(channelID); if (channel) { channel->resume(); } }
18,037
6,422
0
gboolean menu_cache_app_get_is_visible( MenuCacheApp* app, guint32 de_flags ) { if(app->flags & FLAG_IS_NODISPLAY) return FALSE; return (!app->show_in_flags || (app->show_in_flags & de_flags)) && _can_be_exec(app); }
18,038
3,246
0
pdf_dsc_process(gx_device_pdf * pdev, const gs_param_string_array * pma) { /* * The Adobe "Distiller Parameters" documentation says that Distiller * looks at DSC comments, but it doesn't say which ones. We look at * the ones that we see how to map directly to obvious PDF constructs. */ int ...
18,039
136,723
0
void FrameSelection::SelectFrameElementInParentIfFullySelected() { Frame* parent = frame_->Tree().Parent(); if (!parent) return; Page* page = frame_->GetPage(); if (!page) return; if (GetSelectionInDOMTree().Type() != kRangeSelection) { return; } GetDocument().UpdateStyleAndLayoutIgnorePendi...
18,040
118,387
0
MockAffiliationFetcherDelegate() {}
18,041
102,783
0
virtual void drawLayersOnCCThread(CCLayerTreeHostImpl*) { if (m_numDraws == 1) postSetNeedsCommitThenRedrawToMainThread(); m_numDraws++; postSetNeedsRedrawToMainThread(); }
18,042
11,998
0
DEFINE_RUN_ONCE_STATIC(ossl_init_engine_openssl) { # ifdef OPENSSL_INIT_DEBUG fprintf(stderr, "OPENSSL_INIT: ossl_init_engine_openssl: " "engine_load_openssl_int()\n"); # endif engine_load_openssl_int(); return 1; }
18,043
138,014
0
AXNodeObject::AXNodeObject(Node* node, AXObjectCacheImpl& axObjectCache) : AXObject(axObjectCache), m_ariaRole(UnknownRole), m_childrenDirty(false), m_node(node) { }
18,044
18,889
0
static inline void syn_ack_recalc(struct request_sock *req, const int thresh, const int max_retries, const u8 rskq_defer_accept, int *expire, int *resend) { if (!rskq_defer_accept) { *expire = req->retrans >= thresh; *resend = 1; return; } *expire = req->retrans >= thresh && (!inet_rsk(re...
18,045
27,905
0
static void fuse_vma_close(struct vm_area_struct *vma) { filemap_write_and_wait(vma->vm_file->f_mapping); }
18,046
49,432
0
static int proc_pid_auxv(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) { struct mm_struct *mm = mm_access(task, PTRACE_MODE_READ_FSCREDS); if (mm && !IS_ERR(mm)) { unsigned int nwords = 0; do { nwords += 2; } while (mm->saved_auxv[nwords - 2] != 0); /* AT_NULL *...
18,047
61,262
0
EXPORTED int mboxlist_deleteremote(const char *name, struct txn **in_tid) { int r; struct txn **tid; struct txn *lcl_tid = NULL; mbentry_t *mbentry = NULL; if(in_tid) { tid = in_tid; } else { tid = &lcl_tid; } retry: r = mboxlist_mylookup(name, &mbentry, tid, 1); s...
18,048
145,248
0
void Dispatcher::OnUpdateTabSpecificPermissions(const GURL& visible_url, const std::string& extension_id, const URLPatternSet& new_hosts, bool update_origin_whitelist, ...
18,049
128,772
0
void ReadableStreamReader::releaseLock() { if (!isActive()) return; ASSERT(!m_stream->hasPendingReads()); if (m_stream->stateInternal() != ReadableStream::Readable) m_closed->reset(); m_closed->reject(DOMException::create(AbortError, "the reader is already released")); m_stream->se...
18,050
101,001
0
void DidGetGlobalQuota(QuotaStatusCode status, StorageType type, int64 quota) { DCHECK_EQ(type_, type); quota_status_ = status; quota_ = quota; CheckCompleted(); }
18,051
177,752
1
pdf_show_image(fz_context *ctx, pdf_run_processor *pr, fz_image *image) { pdf_gstate *gstate = pr->gstate + pr->gtop; fz_matrix image_ctm; fz_rect bbox; softmask_save softmask = { NULL }; if (pr->super.hidden) return; break; case PDF_MAT_SHADE: if (gstate->fill.shade) { fz_clip_image_mask(ctx, pr->dev, image, &...
18,052
173,756
0
static int handle_write(struct fuse* fuse, struct fuse_handler* handler, const struct fuse_in_header* hdr, const struct fuse_write_in* req, const void* buffer) { struct fuse_write_out out; struct handle *h = id_to_ptr(req->fh); int res; __u8 aligned_buffer[req->size] __attribute__((__aligned__(PAGESIZE))); i...
18,053
148,343
0
void WebContentsImpl::DidChangeVisibleSecurityState() { if (delegate_) { delegate_->VisibleSecurityStateChanged(this); for (auto& observer : observers_) observer.DidChangeVisibleSecurityState(); } }
18,054
162,685
0
bool BaseRenderingContext2D::ComputeDirtyRect(const FloatRect& local_rect, SkIRect* dirty_rect) { SkIRect clip_bounds; if (!DrawingCanvas()->getDeviceClipBounds(&clip_bounds)) return false; return ComputeDirtyRect(local_rect, clip_bounds, dirty_rect); }
18,055
1,425
0
void cache_tmp_xattr(struct file_struct *file, stat_x *sxp) { int ndx; if (!sxp->xattr) return; if (prior_xattr_count == (size_t)-1) prior_xattr_count = rsync_xal_l.count; ndx = find_matching_xattr(sxp->xattr); if (ndx < 0) rsync_xal_store(sxp->xattr); /* adds item to rsync_xal_l */ F_XATTR(file) = ndx; ...
18,056
28,204
0
static void clone_tables(H264Context *dst, H264Context *src, int i) { dst->intra4x4_pred_mode = src->intra4x4_pred_mode + i * 8 * 2 * src->mb_stride; dst->non_zero_count = src->non_zero_count; dst->slice_table = src->slice_table; dst->cbp_table = src->cbp_table; d...
18,057
152,269
0
void RenderFrameImpl::DidDisplayContentWithCertificateErrors() { Send(new FrameHostMsg_DidDisplayContentWithCertificateErrors(routing_id_)); }
18,058
124,282
0
AlarmManager* ExtensionSystemImpl::alarm_manager() { return alarm_manager_.get(); }
18,059
42,555
0
static void super_written(struct bio *bio, int error) { struct md_rdev *rdev = bio->bi_private; struct mddev *mddev = rdev->mddev; if (error || !test_bit(BIO_UPTODATE, &bio->bi_flags)) { printk("md: super_written gets error=%d, uptodate=%d\n", error, test_bit(BIO_UPTODATE, &bio->bi_flags)); WARN_ON(tes...
18,060
173,183
0
pixel_cmp(png_const_bytep pa, png_const_bytep pb, png_uint_32 bit_width) { #if PNG_LIBPNG_VER < 10506 if (memcmp(pa, pb, bit_width>>3) == 0) { png_uint_32 p; if ((bit_width & 7) == 0) return 0; /* Ok, any differences? */ p = pa[bit_width >> 3]; p ^= pb[bit_width >> 3]; if (p == 0) return 0; ...
18,061
77,852
0
bson_iter_overwrite_int32 (bson_iter_t *iter, /* IN */ int32_t value) /* IN */ { BSON_ASSERT (iter); if (ITER_TYPE (iter) == BSON_TYPE_INT32) { #if BSON_BYTE_ORDER != BSON_LITTLE_ENDIAN value = BSON_UINT32_TO_LE (value); #endif memcpy ((void *) (iter->raw + iter->d1), &...
18,062
171,426
0
static bool selinux_action_allowed(int s, debugger_request_t* request) { char *scon = NULL, *tcon = NULL; const char *tclass = "debuggerd"; const char *perm; bool allowed = false; if (request->action <= 0 || request->action >= (sizeof(debuggerd_perms)/sizeof(debuggerd_perms[0]))) { ALOGE("SELinux: No permiss...
18,063
174,228
0
ssize_t Camera3Device::getPointCloudBufferSize() const { const int FLOATS_PER_POINT=4; camera_metadata_ro_entry maxPointCount = mDeviceInfo.find(ANDROID_DEPTH_MAX_DEPTH_SAMPLES); if (maxPointCount.count == 0) { ALOGE("%s: Camera %d: Can't find maximum depth point cloud size in static metadata!", ...
18,064
113,327
0
media::VideoCapture::EventHandler* capture_client() { return static_cast<media::VideoCapture::EventHandler*>(decoder_); }
18,065
157,269
0
void WebMediaPlayerImpl::OnOverlayRoutingToken( const base::UnguessableToken& token) { DCHECK(overlay_mode_ == OverlayMode::kUseAndroidOverlay); overlay_routing_token_is_pending_ = false; overlay_routing_token_ = OverlayInfo::RoutingToken(token); MaybeSendOverlayInfoToDecoder(); }
18,066
127,077
0
void ChromeClientImpl::setTouchAction(TouchAction touchAction) { if (WebViewClient* client = m_webView->client()) { WebTouchAction webTouchAction = static_cast<WebTouchAction>(touchAction); client->setTouchAction(webTouchAction); } }
18,067
163,757
0
void DelegatedFrameHost::CopyFromCompositingSurface( const gfx::Rect& src_subrect, const gfx::Size& output_size, const ReadbackRequestCallback& callback, const SkColorType preferred_color_type) { bool format_support = ((preferred_color_type == kAlpha_8_SkColorType) || (preferr...
18,068
65,706
0
static bool svc_rqst_integrity_protected(struct svc_rqst *rqstp) { struct svc_cred *cr = &rqstp->rq_cred; u32 service; if (!cr->cr_gss_mech) return false; service = gss_pseudoflavor_to_service(cr->cr_gss_mech, cr->cr_flavor); return service == RPC_GSS_SVC_INTEGRITY || service == RPC_GSS_SVC_PRIVACY; }
18,069
59,980
0
static int mixer_ctl_feature_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct usb_mixer_elem_info *cval = kcontrol->private_data; int c, cnt, val, oval, err; int changed = 0; if (cval->cmask) { cnt = 0; for (c = 0; c < MAX_CHANNELS; c++) { if (!(cval->cmask & (1 << c))) ...
18,070
18,968
0
static int raw_send_hdrinc(struct sock *sk, void *from, size_t length, struct rtable **rtp, unsigned int flags) { struct inet_sock *inet = inet_sk(sk); struct net *net = sock_net(sk); struct iphdr *iph; struct sk_buff *skb; unsigned int iphlen; int err; struct rtable *rt = *rtp; if (length > rt->dst.dev-...
18,071
75,252
0
static void crc32_init(void) { int i,j; uint32 s; for(i=0; i < 256; i++) { for (s=(uint32) i << 24, j=0; j < 8; ++j) s = (s << 1) ^ (s >= (1U<<31) ? CRC32_POLY : 0); crc_table[i] = s; } }
18,072
70,497
0
void *re_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; (void)yyg; /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the l...
18,073
65,469
0
free_client(struct nfs4_client *clp) { while (!list_empty(&clp->cl_sessions)) { struct nfsd4_session *ses; ses = list_entry(clp->cl_sessions.next, struct nfsd4_session, se_perclnt); list_del(&ses->se_perclnt); WARN_ON_ONCE(atomic_read(&ses->se_ref)); free_session(ses); } rpc_destroy_wait_queue(&clp->cl...
18,074
61,886
0
static unsigned short get_tga_ushort(const unsigned char *data) { return (unsigned short)(data[0] | (data[1] << 8)); }
18,075
5,799
0
static void ehci_opreg_write(void *ptr, hwaddr addr, uint64_t val, unsigned size) { EHCIState *s = ptr; uint32_t *mmio = s->opreg + (addr >> 2); uint32_t old = *mmio; int i; trace_usb_ehci_opreg_write(addr + s->opregbase, addr2str(addr), val); switch (addr) { c...
18,076
105,688
0
int TypedUrlModelAssociator::MergeUrls( const sync_pb::TypedUrlSpecifics& node, const history::URLRow& url, history::VisitVector* visits, history::URLRow* new_url, std::vector<history::VisitInfo>* new_visits) { DCHECK(new_url); DCHECK(!node.url().compare(url.url().spec())); DCHECK(!node.url()....
18,077
32,992
0
static int sctp_getsockopt_associnfo(struct sock *sk, int len, char __user *optval, int __user *optlen) { struct sctp_assocparams assocparams; struct sctp_association *asoc; struct list_head *pos; int cnt = 0; if (len < sizeof (struct sctp_assocparams)) return -EINVAL; len = sizeof(struct s...
18,078
40,452
0
static int ipxitf_device_event(struct notifier_block *notifier, unsigned long event, void *ptr) { struct net_device *dev = netdev_notifier_info_to_dev(ptr); struct ipx_interface *i, *tmp; if (!net_eq(dev_net(dev), &init_net)) return NOTIFY_DONE; if (event != NETDEV_DOWN && event != NETDEV_UP) goto out; ...
18,079
145,385
0
RuntimeCustomBindings::RuntimeCustomBindings(ScriptContext* context) : ObjectBackedNativeHandler(context) { RouteFunction( "GetManifest", base::Bind(&RuntimeCustomBindings::GetManifest, base::Unretained(this))); RouteFunction("OpenChannelToExtension", "runtime.connect", base::Bind(&R...
18,080
176,511
0
xmlCleanURI(xmlURIPtr uri) { if (uri == NULL) return; if (uri->scheme != NULL) xmlFree(uri->scheme); uri->scheme = NULL; if (uri->server != NULL) xmlFree(uri->server); uri->server = NULL; if (uri->user != NULL) xmlFree(uri->user); uri->user = NULL; if (uri->path != NULL) xmlFree(uri->path); uri->p...
18,081
168,495
0
void FileReaderLoader::Failed(FileError::ErrorCode error_code) { if (error_code_ != FileError::kOK) return; error_code_ = error_code; Cleanup(); if (client_) client_->DidFail(error_code_); }
18,082
37,714
0
void kvm_pit_load_count(struct kvm *kvm, int channel, u32 val, int hpet_legacy_start) { u8 saved_mode; if (hpet_legacy_start) { /* save existing mode for later reenablement */ saved_mode = kvm->arch.vpit->pit_state.channels[0].mode; kvm->arch.vpit->pit_state.channels[0].mode = 0xff; /* disable timer */ pit_lo...
18,083
154,649
0
error::Error GLES2DecoderPassthroughImpl::DoEndSharedImageAccessDirectCHROMIUM( GLuint client_id) { auto found = resources_->texture_shared_image_map.find(client_id); if (found == resources_->texture_shared_image_map.end()) { InsertError(GL_INVALID_OPERATION, "texture is not a shared image"); return err...
18,084
146,863
0
void Document::UpdateStyleAndLayoutIgnorePendingStylesheets( Document::RunPostLayoutTasks run_post_layout_tasks) { UpdateStyleAndLayoutTreeIgnorePendingStylesheets(); UpdateStyleAndLayout(); if (run_post_layout_tasks == kRunPostLayoutTasksSynchronously && View()) View()->FlushAnyPendingPostLayoutTasks();...
18,085
155,558
0
AuthenticatorInsertAndActivateUsbSheetModel::GetOtherTransportsMenuModel() { return other_transports_menu_model_.get(); }
18,086
47,198
0
static int __chksum_finup(u32 *crcp, const u8 *data, unsigned int len, u8 *out) { *(__le32 *)out = ~cpu_to_le32(__crc32c_le(*crcp, data, len)); return 0; }
18,087
63,946
0
int check_intra_pred4x4_mode_emuedge(int mode, int mb_x, int mb_y, int *copy_buf, int vp7) { switch (mode) { case VERT_PRED: if (!mb_x && mb_y) { *copy_buf = 1; return mode; } /* fall-through */ case DIAG_DOWN_LEFT_PRED: ...
18,088
3,386
0
php_apache_sapi_read_post(char *buf, uint count_bytes TSRMLS_DC) { apr_size_t len, tlen=0; php_struct *ctx = SG(server_context); request_rec *r; apr_bucket_brigade *brigade; r = ctx->r; brigade = ctx->brigade; len = count_bytes; /* * This loop is needed because ap_get_brigade() can return us partial data ...
18,089
51,470
0
static void _gdImageGd2 (gdImagePtr im, gdIOCtx * out, int cs, int fmt) { int ncx, ncy, cx, cy; int x, y, ylo, yhi, xlo, xhi; int chunkLen; int chunkNum = 0; char *chunkData = NULL; /* So we can gdFree it with impunity. */ char *compData = NULL; /* So we can gdFree it with impunity. */ uLongf compLen; int idxPo...
18,090
112,147
0
int64 MakeNode(UserShare* share, ModelType model_type, const std::string& client_tag) { WriteTransaction trans(FROM_HERE, share); ReadNode root_node(&trans); root_node.InitByRootLookup(); WriteNode node(&trans); sync_api::WriteNode::InitUniqueByCreationResult result = node....
18,091
169,575
0
void CastStreamingNativeHandler::DestroyCastUdpTransport( const v8::FunctionCallbackInfo<v8::Value>& args) { CHECK_EQ(1, args.Length()); CHECK(args[0]->IsInt32()); const int transport_id = args[0]->ToInt32(args.GetIsolate())->Value(); if (!GetUdpTransportOrThrow(transport_id)) return; udp_transport_m...
18,092
76,358
0
static void bpf_map_ptr_store(struct bpf_insn_aux_data *aux, const struct bpf_map *map, bool unpriv) { BUILD_BUG_ON((unsigned long)BPF_MAP_PTR_POISON & BPF_MAP_PTR_UNPRIV); unpriv |= bpf_map_ptr_unpriv(aux); aux->map_state = (unsigned long)map | (unpriv ? BPF_MAP_PTR_UNPRIV : 0UL); }
18,093
156,508
0
void SQLiteDatabase::SetBusyTimeout(int ms) { if (db_) sqlite3_busy_timeout(db_, ms); else SQL_DVLOG(1) << "BusyTimeout set on non-open database"; }
18,094
58,933
0
static int l2cap_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type) { int exact = 0, lm1 = 0, lm2 = 0; register struct sock *sk; struct hlist_node *node; if (type != ACL_LINK) return 0; BT_DBG("hdev %s, bdaddr %s", hdev->name, batostr(bdaddr)); /* Find listening sockets and check their link_mode */...
18,095
92,206
0
static inline enum ib_mig_state to_ib_mig_state(int mlx5_mig_state) { switch (mlx5_mig_state) { case MLX5_QP_PM_ARMED: return IB_MIG_ARMED; case MLX5_QP_PM_REARM: return IB_MIG_REARM; case MLX5_QP_PM_MIGRATED: return IB_MIG_MIGRATED; default: return -1; } }
18,096
79,497
0
int nntp_check_children(struct Context *ctx, const char *msgid) { struct NntpData *nntp_data = ctx->data; struct ChildCtx cc; char buf[STRING]; int rc; bool quiet; void *hc = NULL; if (!nntp_data || !nntp_data->nserv) return -1; if (nntp_data->first_message > nntp_data->last_loaded) return 0; ...
18,097
182,369
1
static int _6502_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data, int len) { char addrbuf[64]; const int buffsize = sizeof (addrbuf) - 1; memset (op, '\0', sizeof (RAnalOp)); op->size = snes_op_get_size (1, 1, &snes_op[data[0]]); //snes-arch is similiar to nes/6502 op->addr = addr; op->type = R_ANAL_OP_TYPE_UN...
18,098
26,485
0
static u32 pmcraid_read_interrupts(struct pmcraid_instance *pinstance) { return (pinstance->interrupt_mode) ? ioread32(pinstance->int_regs.ioa_host_msix_interrupt_reg) : ioread32(pinstance->int_regs.ioa_host_interrupt_reg); }
18,099