unique_id
int64
13
189k
target
int64
0
1
code
stringlengths
20
241k
__index_level_0__
int64
0
18.9k
45,998
0
write_marker (unsigned char * data, int offset, int value) { if (CPU_IS_BIG_ENDIAN) { data [offset] = value >> 24 ; data [offset + 1] = value >> 16 ; data [offset + 2] = value >> 8 ; data [offset + 3] = value ; } else { data [offset] = value ; data [offset + 1] = value >> 8 ; data [offset + 2] = value >...
300
38,197
0
static inline int fetch_robust_entry(struct robust_list __user **entry, struct robust_list __user * __user *head, unsigned int *pi) { unsigned long uentry; if (get_user(uentry, (unsigned long __user *)head)) return -EFAULT; *entry = (void __user *)(uentry & ~1UL); *pi = uentry & 1; return 0;...
301
28,214
0
static void decode_postinit(H264Context *h, int setup_finished) { Picture *out = h->cur_pic_ptr; Picture *cur = h->cur_pic_ptr; int i, pics, out_of_order, out_idx; h->cur_pic_ptr->f.pict_type = h->pict_type; if (h->next_output_pic) return; if (cur->field_poc[0] == INT_MAX || cur->fiel...
302
67,391
0
struct dentry *debugfs_create_file_size(const char *name, umode_t mode, struct dentry *parent, void *data, const struct file_operations *fops, loff_t file_size) { struct dentry *de = debugfs_create_file(name, mode, parent, data, fops); if (de) d_inode(de)->i_size = file_size; return de; }
303
84,944
0
smb2_async_writev(struct cifs_writedata *wdata, void (*release)(struct kref *kref)) { int rc = -EACCES, flags = 0; struct smb2_write_req *req = NULL; struct smb2_sync_hdr *shdr; struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink); struct TCP_Server_Info *server = tcon->ses->server; struct kvec iov[2]; s...
304
125,789
0
void ParamTraits<ListValue>::Log(const param_type& p, std::string* l) { std::string json; base::JSONWriter::Write(&p, &json); l->append(json); }
305
160,548
0
void RenderFrameImpl::BindToFrame(WebLocalFrame* web_frame) { DCHECK(!frame_); std::pair<FrameMap::iterator, bool> result = g_frame_map.Get().emplace(web_frame, this); CHECK(result.second) << "Inserting a duplicate item."; frame_ = web_frame; }
306
183,146
1
static void ext2_put_super (struct super_block * sb) { int db_count; int i; struct ext2_sb_info *sbi = EXT2_SB(sb); dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED); ext2_xattr_put_super(sb); if (!(sb->s_flags & MS_RDONLY)) { struct ext2_super_block *es = sbi->s_es; spin_lock(&sbi->s_lock); es->s_s...
307
74,785
0
sort_regions (struct rsvd_region *rsvd_region, int max) { int j; /* simple bubble sorting */ while (max--) { for (j = 0; j < max; ++j) { if (rsvd_region[j].start > rsvd_region[j+1].start) { struct rsvd_region tmp; tmp = rsvd_region[j]; rsvd_region[j] = rsvd_region[j + 1]; rsvd_region[j + 1] = t...
308
117,712
0
template <typename T> void V8_USE(T) { }
309
127,500
0
inline J_COLOR_SPACE rgbOutputColorSpace() { return JCS_EXT_BGRA; }
310
188,373
1
long long BlockGroup::GetPrevTimeCode() const { return m_prev; }
311
48,478
0
int __init proc_sys_init(void) { struct proc_dir_entry *proc_sys_root; proc_sys_root = proc_mkdir("sys", NULL); proc_sys_root->proc_iops = &proc_sys_dir_operations; proc_sys_root->proc_fops = &proc_sys_dir_file_operations; proc_sys_root->nlink = 0; return sysctl_init(); }
312
140,499
0
void HttpProxyClientSocket::DoCallback(int result) { DCHECK_NE(ERR_IO_PENDING, result); DCHECK(!user_callback_.is_null()); CompletionCallback c = user_callback_; user_callback_.Reset(); c.Run(result); }
313
65,631
0
static __be32 nfsd4_sequence_check_conn(struct nfsd4_conn *new, struct nfsd4_session *ses) { struct nfs4_client *clp = ses->se_client; struct nfsd4_conn *c; __be32 status = nfs_ok; int ret; spin_lock(&clp->cl_lock); c = __nfsd4_find_conn(new->cn_xprt, ses); if (c) goto out_free; status = nfserr_conn_not_boun...
314
103,792
0
WebUIBindings* RenderView::GetWebUIBindings() { if (!web_ui_bindings_.get()) { web_ui_bindings_.reset(new WebUIBindings()); } return web_ui_bindings_.get(); }
315
113,537
0
PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::ariaFlowToElementAtIndex(unsigned index) { return 0; }
316
30,628
0
static int iucv_sock_shutdown(struct socket *sock, int how) { struct sock *sk = sock->sk; struct iucv_sock *iucv = iucv_sk(sk); struct iucv_message txmsg; int err = 0; how++; if ((how & ~SHUTDOWN_MASK) || !how) return -EINVAL; lock_sock(sk); switch (sk->sk_state) { case IUCV_LISTEN: case IUCV_DISCONN: c...
317
5,878
0
static void ahci_restart(IDEDMA *dma) { AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma); int i; for (i = 0; i < AHCI_MAX_CMDS; i++) { NCQTransferState *ncq_tfs = &ad->ncq_tfs[i]; if (ncq_tfs->halt) { execute_ncq_command(ncq_tfs); } } }
318
35,999
0
static inline void init_copy_chunk_defaults(struct cifs_tcon *tcon) { tcon->max_chunks = 256; tcon->max_bytes_chunk = 1048576; tcon->max_bytes_copy = 16777216; }
319
55,502
0
static s64 cpu_cfs_quota_read_s64(struct cgroup_subsys_state *css, struct cftype *cft) { return tg_get_cfs_quota(css_tg(css)); }
320
106,931
0
void RenderBox::setMarginEnd(LayoutUnit margin) { if (isHorizontalWritingMode()) { if (style()->isLeftToRightDirection()) m_marginRight = margin; else m_marginLeft = margin; } else { if (style()->isLeftToRightDirection()) m_marginBottom = margin; ...
321
57,282
0
static int cmp_gss_krb5_name(kadm5_server_handle_t handle, gss_name_t gss_name, krb5_principal princ) { krb5_principal princ2; int status; if (! gss_to_krb5_name(handle, gss_name, &princ2)) return 0; status = krb5_principal_compare(handle->context, princ, princ2); ...
322
14,427
0
session_subsystem_req(Session *s) { struct stat st; u_int len; int success = 0; char *prog, *cmd; u_int i; s->subsys = packet_get_string(&len); packet_check_eom(); debug2("subsystem request for %.100s by user %s", s->subsys, s->pw->pw_name); for (i = 0; i < options.num_subsystems; i++) { if (strcmp(s-...
323
62,094
0
static void RelinquishZIPMemory(voidpf context,voidpf memory) { (void) context; memory=RelinquishMagickMemory(memory); }
324
104,952
0
void GraphicsContext::clip(const FloatRect& r) { m_data->context->SetClippingRegion(r.x(), r.y(), r.width(), r.height()); }
325
129,659
0
FloatSize AffineTransform::mapSize(const FloatSize& size) const { double width2 = size.width() * xScale(); double height2 = size.height() * yScale(); return FloatSize(narrowPrecisionToFloat(width2), narrowPrecisionToFloat(height2)); }
326
116,576
0
media::AudioRenderer::AudioTimeCB NewAudioTimeClosure() { return base::Bind(&AudioRendererImplTest::OnAudioTimeCallback, base::Unretained(this)); }
327
170,481
0
status_t Parcel::readPointer(uintptr_t *pArg) const { status_t ret; binder_uintptr_t ptr; ret = readAligned(&ptr); if (!ret) *pArg = ptr; return ret; }
328
23,037
0
static int decode_readdir(struct xdr_stream *xdr, struct rpc_rqst *req, struct nfs4_readdir_res *readdir) { struct xdr_buf *rcvbuf = &req->rq_rcv_buf; struct page *page = *rcvbuf->pages; struct kvec *iov = rcvbuf->head; size_t hdrlen; u32 recvd, pglen = rcvbuf->page_len; __be32 *end, *entry, *p, *kaddr; unsig...
329
4,972
0
qtdemux_sink_activate (GstPad * sinkpad) { if (gst_pad_check_pull_range (sinkpad)) return gst_pad_activate_pull (sinkpad, TRUE); else return gst_pad_activate_push (sinkpad, TRUE); }
330
41,810
0
static void dev_disable_change(struct inet6_dev *idev) { struct netdev_notifier_info info; if (!idev || !idev->dev) return; netdev_notifier_info_init(&info, idev->dev); if (idev->cnf.disable_ipv6) addrconf_notify(NULL, NETDEV_DOWN, &info); else addrconf_notify(NULL, NETDEV_UP, &info); }
331
66,545
0
static int pegasus_ioctl(struct net_device *net, struct ifreq *rq, int cmd) { __u16 *data = (__u16 *) &rq->ifr_ifru; pegasus_t *pegasus = netdev_priv(net); int res; switch (cmd) { case SIOCDEVPRIVATE: data[0] = pegasus->phy; case SIOCDEVPRIVATE + 1: read_mii_word(pegasus, data[0], data[1] & 0x1f, &data[3]); ...
332
94,753
0
MagickExport MagickBooleanType SetImageProperty(Image *image, const char *property,const char *value,ExceptionInfo *exception) { MagickBooleanType status; MagickStatusType flags; assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) ...
333
162,012
0
BrowserChildProcessHost* BrowserChildProcessHost::FromID(int child_process_id) { DCHECK_CURRENTLY_ON(BrowserThread::IO); BrowserChildProcessHostImpl::BrowserChildProcessList* process_list = g_child_process_list.Pointer(); for (BrowserChildProcessHostImpl* host : *process_list) { if (host->GetData().id =...
334
11,923
0
int cms_env_asn1_ctrl(CMS_RecipientInfo *ri, int cmd) { EVP_PKEY *pkey; int i; if (ri->type == CMS_RECIPINFO_TRANS) pkey = ri->d.ktri->pkey; else if (ri->type == CMS_RECIPINFO_AGREE) { EVP_PKEY_CTX *pctx = ri->d.kari->pctx; if (!pctx) return 0; pkey = EVP_PKEY...
335
47,405
0
static int wp512_init(struct shash_desc *desc) { struct wp512_ctx *wctx = shash_desc_ctx(desc); int i; memset(wctx->bitLength, 0, 32); wctx->bufferBits = wctx->bufferPos = 0; wctx->buffer[0] = 0; for (i = 0; i < 8; i++) { wctx->hash[i] = 0L; } return 0; }
336
13,489
0
void js_throw(js_State *J) { if (J->trytop > 0) { js_Value v = *stackidx(J, -1); --J->trytop; J->E = J->trybuf[J->trytop].E; J->envtop = J->trybuf[J->trytop].envtop; J->tracetop = J->trybuf[J->trytop].tracetop; J->top = J->trybuf[J->trytop].top; J->bot = J->trybuf[J->trytop].bot; js_pushvalue(J, v); ...
337
109,715
0
bool Document::isContextThread() const { return isMainThread(); }
338
3,043
0
static int ciearange(i_ctx_t * i_ctx_p, ref *space, float *ptr) { int code; ref CIEdict, *tempref; code = array_get(imemory, space, 1, &CIEdict); if (code < 0) return code; /* If we have a RangeA entry in the dictionary, get the * values from that */ code = dict_find_string(&...
339
80,870
0
GF_Err tkhd_dump(GF_Box *a, FILE * trace) { GF_TrackHeaderBox *p; p = (GF_TrackHeaderBox *)a; gf_isom_box_dump_start(a, "TrackHeaderBox", trace); fprintf(trace, "CreationTime=\""LLD"\" ModificationTime=\""LLD"\" TrackID=\"%u\" Duration=\""LLD"\"", LLD_CAST p->creationTime, LLD_CAST p->modificationTime, p-...
340
83,465
0
int_x509_param_set1(char **pdest, size_t *pdestlen, const char *src, size_t srclen) { char *tmp; if (src) { if (srclen == 0) { if ((tmp = strdup(src)) == NULL) return 0; srclen = strlen(src); } else { if ((tmp = malloc(srclen)) == NULL) return 0; memcpy(tmp, src, srclen); } } else { ...
341
116,616
0
int RenderViewImpl::GetEnabledBindings() { return enabled_bindings_; }
342
107,423
0
void JSArray::copyToRegisters(ExecState* exec, Register* buffer, uint32_t maxSize) { ASSERT(m_storage->m_length >= maxSize); UNUSED_PARAM(maxSize); WriteBarrier<Unknown>* vector = m_storage->m_vector; unsigned vectorEnd = min(maxSize, m_vectorLength); unsigned i = 0; for (; i < vectorEnd; ++i) {...
343
18,712
0
void vlan_ioctl_set(int (*hook) (struct net *, void __user *)) { mutex_lock(&vlan_ioctl_mutex); vlan_ioctl_hook = hook; mutex_unlock(&vlan_ioctl_mutex); }
344
57,627
0
static int map_str_to_val(const struct aiptek_map *map, const char *str, size_t count) { const struct aiptek_map *p; if (str[count - 1] == '\n') count--; for (p = map; p->string; p++) if (!strncmp(str, p->string, count)) return p->value; return AIPTEK_INVALID_VALUE; }
345
18,216
0
void servers_init(void) { settings_add_bool("server", "resolve_prefer_ipv6", FALSE); settings_add_bool("server", "resolve_reverse_lookup", FALSE); lookup_servers = servers = NULL; signal_add("chat protocol deinit", (SIGNAL_FUNC) sig_chat_protocol_deinit); servers_reconnect_init(); servers_setup_init(); }
346
72,089
0
static void _launch_complete_add(uint32_t job_id) { int j, empty; slurm_mutex_lock(&job_state_mutex); empty = -1; for (j = 0; j < JOB_STATE_CNT; j++) { if (job_id == active_job_id[j]) break; if ((active_job_id[j] == 0) && (empty == -1)) empty = j; } if (j >= JOB_STATE_CNT || job_id != active_job_id[j])...
347
105,007
0
void HttpBridge::OnURLFetchComplete(const URLFetcher *source, const GURL &url, const net::URLRequestStatus &status, int response_code, const net::ResponseCookies &cookies, ...
348
103,718
0
void DevToolsAgentFilter::OnDispatchOnInspectorBackend( const std::string& message) { if (!WebDevToolsAgent::shouldInterruptForMessage( WebString::fromUTF8(message))) { message_handled_ = false; return; } WebDevToolsAgent::interruptAndDispatch( new MessageImpl(message, current_rout...
349
184,962
1
xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) { xmlChar limit = 0; xmlChar *buf = NULL; xmlChar *rep = NULL; int len = 0; int buf_size = 0; int c, l, in_space = 0; xmlChar *current = NULL; xmlEntityPtr ent; if (NXT(0) == '"') { ctxt->instate = XML_PARSER_ATTRIBUTE_VALUE; limit = '"'; NEXT;...
350
108,048
0
void GLES2DecoderImpl::DeleteFramebuffersHelper( GLsizei n, const GLuint* client_ids) { for (GLsizei ii = 0; ii < n; ++ii) { FramebufferManager::FramebufferInfo* info = GetFramebufferInfo(client_ids[ii]); if (info) { GLuint service_id = info->service_id(); glDeleteFramebuffersEXT(1, &s...
351
186,311
1
views::ImageButton* close_button() const { return media_controls_view_->close_button_; }
352
113,615
0
void AccessibilityUIElement::removeSelection() { }
353
38,673
0
static void ath_set_rates(struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct ath_buf *bf) { ieee80211_get_tx_rates(vif, sta, bf->bf_mpdu, bf->rates, ARRAY_SIZE(bf->rates)); }
354
164,882
0
DownloadManagerImpl::DownloadManagerImpl(BrowserContext* browser_context) : item_factory_(new DownloadItemFactoryImpl()), shutdown_needed_(true), initialized_(false), history_db_initialized_(false), in_progress_cache_initialized_(false), browser_context_(browser_context), delegat...
355
63,341
0
gss_seal(OM_uint32 *minor_status, gss_ctx_id_t context_handle, int conf_req_flag, int qop_req, gss_buffer_t input_message_buffer, int *conf_state, gss_buffer_t output_message_buffer) { return gss_wrap(minor_status, context_handle, conf_req_f...
356
128,774
0
DEFINE_INLINE_VIRTUAL_TRACE() { UnderlyingSource::trace(visitor); }
357
79,205
0
static int StreamTcpPacketStateFinWait1(ThreadVars *tv, Packet *p, StreamTcpThread *stt, TcpSession *ssn, PacketQueue *pq) { if (ssn == NULL) return -1; if (p->tcph->th_flags & TH_RST) { if (!StreamTcpValidateRst(ssn, p)) return -1; StreamTcpPacketSe...
358
32,325
0
static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns) { struct mnt_namespace *new_ns; int ret; new_ns = kmalloc(sizeof(struct mnt_namespace), GFP_KERNEL); if (!new_ns) return ERR_PTR(-ENOMEM); ret = proc_alloc_inum(&new_ns->proc_inum); if (ret) { kfree(new_ns); return ERR_PTR(ret); } ...
359
11,115
0
void phar_destroy_phar_data(phar_archive_data *phar) /* {{{ */ { if (phar->alias && phar->alias != phar->fname) { pefree(phar->alias, phar->is_persistent); phar->alias = NULL; } if (phar->fname) { pefree(phar->fname, phar->is_persistent); phar->fname = NULL; } if (phar->signature) { pefree(phar->signat...
360
143,793
0
void GlobalHistogramAllocator::DeletePersistentLocation() { memory_allocator()->SetMemoryState(PersistentMemoryAllocator::MEMORY_DELETED); #if defined(OS_NACL) NOTREACHED(); #else if (persistent_location_.empty()) return; File file(persistent_location_, File::FLAG_OPEN | File::FLAG_READ | File...
361
62,801
0
static struct bio *__bio_chain_endio(struct bio *bio) { struct bio *parent = bio->bi_private; if (!parent->bi_status) parent->bi_status = bio->bi_status; bio_put(bio); return parent; }
362
165,175
0
FloatRect DragController::ClippedSelection(const LocalFrame& frame) { DCHECK(frame.View()); return DataTransfer::ClipByVisualViewport( FloatRect(frame.Selection().UnclippedBoundsInDocument()), frame); }
363
32,226
0
void skb_set_dev(struct sk_buff *skb, struct net_device *dev) { skb_dst_drop(skb); if (skb->dev && !net_eq(dev_net(skb->dev), dev_net(dev))) { secpath_reset(skb); nf_reset(skb); skb_init_secmark(skb); skb->mark = 0; skb->priority = 0; skb->nf_trace = 0; skb->ipvs_property = 0; #ifdef CONFIG_NET_SCHED ...
364
171,423
0
static void monitor_worker_process(int child_pid, const debugger_request_t& request) { struct timespec timeout = {.tv_sec = 10, .tv_nsec = 0 }; if (should_attach_gdb(request)) { timeout.tv_sec = INT_MAX; } sigset_t signal_set; sigemptyset(&signal_set); sigaddset(&signal_set, SIGCHLD); bool kill_worker = ...
365
58,574
0
SECURITY_STATUS SEC_ENTRY CompleteAuthToken(PCtxtHandle phContext, PSecBufferDesc pToken) { return SEC_E_OK; }
366
182,086
1
rs_filter_graph(RSFilter *filter) { g_return_if_fail(RS_IS_FILTER(filter)); GString *str = g_string_new("digraph G {\n"); rs_filter_graph_helper(str, filter); g_string_append_printf(str, "}\n"); g_file_set_contents("/tmp/rs-filter-graph", str->str, str->len, NULL); if (0 != system("dot -Tpng >/tmp/rs-filter-graph....
367
106,855
0
LayoutUnit RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit logicalHeight) const { LayoutUnit minLogicalHeight = computeReplacedLogicalHeightUsing(style()->logicalMinHeight()); LayoutUnit maxLogicalHeight = style()->logicalMaxHeight().isUndefined() ? logicalHeight : computeReplacedLogica...
368
141,165
0
bool Document::NeedsLayoutTreeUpdateForNode(const Node& node, bool ignore_adjacent_style) const { if (!node.CanParticipateInFlatTree()) return false; if (!NeedsLayoutTreeUpdate()) return false; if (!node.isConnected()) return false; if (NeedsFullLayoutTre...
369
98,870
0
void WebSocket::AddToReadBuffer(const char* data, int len) { DCHECK(current_read_buf_); if (len >= current_read_buf_->RemainingCapacity()) { current_read_buf_->SetCapacity( current_read_buf_->offset() + len); } DCHECK(current_read_buf_->RemainingCapacity() >= len); memcpy(current_read_buf_->data(...
370
14,326
0
vmxnet3_on_tx_done_update_stats(VMXNET3State *s, int qidx, Vmxnet3PktStatus status) { size_t tot_len = vmxnet_tx_pkt_get_total_len(s->tx_pkt); struct UPT1_TxStats *stats = &s->txq_descr[qidx].txq_stats; switch (status) { case VMXNET3_PKT_STATUS_OK: switch (vmxnet_tx_pkt_get_packet_type(s->t...
371
157,766
0
bool FrameCompareDepth(RenderFrameHostImpl* a, RenderFrameHostImpl* b) { return a->frame_tree_node()->depth() < b->frame_tree_node()->depth(); }
372
37,372
0
static int em_ret_near_imm(struct x86_emulate_ctxt *ctxt) { int rc; unsigned long eip; rc = emulate_pop(ctxt, &eip, ctxt->op_bytes); if (rc != X86EMUL_CONTINUE) return rc; rc = assign_eip_near(ctxt, eip); if (rc != X86EMUL_CONTINUE) return rc; rsp_increment(ctxt, ctxt->src.val); return X86EMUL_CONTINUE; }...
373
65,010
0
IW_IMPL(void) iw_set_resize_alg(struct iw_context *ctx, int dimension, int family, double blur, double param1, double param2) { struct iw_resize_settings *rs; if(dimension<0 || dimension>1) dimension=0; rs=&ctx->resize_settings[dimension]; rs->family = family; rs->blur_factor = blur; rs->param1 = param1; r...
374
65,082
0
ModuleExport size_t RegisterRLEImage(void) { MagickInfo *entry; entry=SetMagickInfo("RLE"); entry->decoder=(DecodeImageHandler *) ReadRLEImage; entry->magick=(IsImageFormatHandler *) IsRLE; entry->adjoin=MagickFalse; entry->description=ConstantString("Utah Run length encoded image"); entry->module=Co...
375
113,855
0
SelectFileDialog* SelectFileDialog::Create(Listener* listener) { return new SelectFileDialogImpl(listener); }
376
172,522
0
void CameraSourceListener::postDataTimestamp( nsecs_t timestamp, int32_t msgType, const sp<IMemory>& dataPtr) { sp<CameraSource> source = mSource.promote(); if (source.get() != NULL) { source->dataCallbackTimestamp(timestamp/1000, msgType, dataPtr); } }
377
183,893
1
static inline void removeElementPreservingChildren(PassRefPtr<DocumentFragment> fragment, HTMLElement* element) { ExceptionCode ignoredExceptionCode; RefPtr<Node> nextChild; for (RefPtr<Node> child = element->firstChild(); child; child = nextChild) { nextChild = child->nextSibling(); element...
378
65,379
0
static inline u32 nfsd4_setattr_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) { return (op_encode_hdr_size + nfs4_fattr_bitmap_maxsz) * sizeof(__be32); }
379
77,713
0
ofputil_uninit_tlv_table(struct ovs_list *mappings) { struct ofputil_tlv_map *map; LIST_FOR_EACH_POP (map, list_node, mappings) { free(map); } }
380
7,006
0
ft_gray_for_premultiplied_srgb_bgra( const FT_Byte* bgra ) { FT_UInt a = bgra[3]; FT_UInt l; /* Short-circuit transparent color to avoid division by zero. */ if ( !a ) return 0; /* * Luminosity for sRGB is defined using ~0.2126,0.7152,0.0722 * coefficients for RGB channels ...
381
90,717
0
static void cfundecs(JF, js_Ast *list) { while (list) { js_Ast *stm = list->a; if (stm->type == AST_FUNDEC) { emitline(J, F, stm); emitfunction(J, F, newfun(J, stm->line, stm->a, stm->b, stm->c, 0, F->strict)); emitline(J, F, stm); emit(J, F, OP_SETLOCAL); emitarg(J, F, addlocal(J, F, stm->a, 0)); ...
382
72,633
0
unsigned long ring_buffer_size(struct ring_buffer *buffer, int cpu) { /* * Earlier, this method returned * BUF_PAGE_SIZE * buffer->nr_pages * Since the nr_pages field is now removed, we have converted this to * return the per cpu buffer value. */ if (!cpumask_test_cpu(cpu, buffer->cpumask)) return 0; re...
383
170,551
0
int BassBoost_getParameter(EffectContext *pContext, void *pParam, uint32_t *pValueSize, void *pValue){ int status = 0; int32_t *pParamTemp = (int32_t *)pParam; int32_t param = *pParamTemp++; int32_t param2; char *name; switch (param){ case BASSBOOST_PARAM_STRENGTH_SUPPORTED: if (*pValueSize != sizeof(uint3...
384
168,608
0
void IndexedDBDatabase::CreateObjectStore(IndexedDBTransaction* transaction, int64_t object_store_id, const base::string16& name, const IndexedDBKeyPath& key_path, ...
385
17,723
0
DGAShutdown(void) { ScrnInfoPtr pScrn; int i; if (!DGAScreenKeyRegistered) return; for (i = 0; i < screenInfo.numScreens; i++) { pScrn = xf86Screens[i]; (void) (*pScrn->SetDGAMode) (pScrn, 0, NULL); } }
386
86,085
0
unsigned int f2fs_destroy_extent_node(struct inode *inode) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct extent_tree *et = F2FS_I(inode)->extent_tree; unsigned int node_cnt = 0; if (!et || !atomic_read(&et->node_cnt)) return 0; write_lock(&et->lock); node_cnt = __free_extent_tree(sbi, et); write_unlo...
387
81,356
0
t_next(struct seq_file *m, void *v, loff_t *pos) { struct trace_array *tr = m->private; struct tracer *t = v; (*pos)++; if (t) t = get_tracer_for_array(tr, t->next); return t; }
388
31,265
0
static int hash_walk_new_entry(struct crypto_hash_walk *walk) { struct scatterlist *sg; sg = walk->sg; walk->pg = sg_page(sg); walk->offset = sg->offset; walk->entrylen = sg->length; if (walk->entrylen > walk->total) walk->entrylen = walk->total; walk->total -= walk->entrylen; return hash_walk_next(walk); ...
389
180,246
1
static int spl_filesystem_file_is_empty_line(spl_filesystem_object *intern TSRMLS_DC) /* {{{ */ { if (intern->u.file.current_line) { return intern->u.file.current_line_len == 0; } else if (intern->u.file.current_zval) { switch(Z_TYPE_P(intern->u.file.current_zval)) { case IS_STRING: return Z_STRLEN_P(intern-...
390
80,974
0
static inline bool nested_cpu_has_vmwrite_any_field(struct kvm_vcpu *vcpu) { return to_vmx(vcpu)->nested.msrs.misc_low & MSR_IA32_VMX_MISC_VMWRITE_SHADOW_RO_FIELDS; }
391
158,217
0
void AppCacheGroup::AddNewlyDeletableResponseIds( std::vector<int64_t>* response_ids) { if (is_being_deleted() || (!is_obsolete() && old_caches_.empty())) { storage_->DeleteResponses(manifest_url_, *response_ids); response_ids->clear(); return; } if (newly_deletable_response_ids_.empty()) { n...
392
4,153
0
void Splash::vertFlipImage(SplashBitmap *img, int width, int height, int nComps) { Guchar *lineBuf; Guchar *p0, *p1; int w; w = width * nComps; lineBuf = (Guchar *)gmalloc(w); for (p0 = img->data, p1 = img->data + (height - 1) * w; p0 < p1; p0 += w, p1 -= w) { memcpy(lineBuf, p0, w)...
393
111,664
0
void GDataDirectory::ToProto(GDataDirectoryProto* proto) const { GDataEntry::ToProto(proto->mutable_gdata_entry()); DCHECK(proto->gdata_entry().file_info().is_directory()); proto->set_refresh_time(refresh_time_.ToInternalValue()); proto->set_start_feed_url(start_feed_url_.spec()); proto->set_next_feed_url(nex...
394
1,709
0
gx_dc_pattern2_can_overlap(const gx_device_color *pdevc) { gs_pattern2_instance_t * pinst; if (pdevc->type != &gx_dc_pattern2) return false; pinst = (gs_pattern2_instance_t *)pdevc->ccolor.pattern; switch (pinst->templat.Shading->head.type) { case 3: case 6: case 7: return t...
395
123,940
0
void RenderViewImpl::SetWebkitPreferences(const WebPreferences& preferences) { OnUpdateWebPreferences(preferences); }
396
15,743
0
static void pl022_write(void *opaque, hwaddr offset, uint64_t value, unsigned size) { PL022State *s = (PL022State *)opaque; switch (offset) { case 0x00: /* CR0 */ s->cr0 = value; /* Clock rate and format are ignored. */ s->bitmask = (1 << ((value & 15) + 1))...
397
179,721
1
int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, const struct tcphdr *th, unsigned int len) { struct tcp_sock *tp = tcp_sk(sk); struct inet_connection_sock *icsk = inet_csk(sk); int queued = 0; int res; tp->rx_opt.saw_tstamp = 0; switch (sk->sk_state) { case TCP_CLOSE: goto discard; cas...
398
17,692
0
XFixesExtensionInit(void) { ExtensionEntry *extEntry; if (!dixRegisterPrivateKey (&XFixesClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(XFixesClientRec))) return; if (XFixesSelectionInit() && XFixesCursorInit() && XFixesRegionInit() && (extEntry = AddExtension(XFIXES_NAME, XFixesNumbe...
399