unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
73,782 | 0 | uint8_t *messageTypeInttoString(uint32_t messageType) {
switch(messageType) {
case MSGTYPE_HELLO :
return (uint8_t *)"Hello ";
break;
case MSGTYPE_HELLOACK :
return (uint8_t *)"HelloACK";
break;
case MSGTYPE_COMMIT :
return (uint8_t *)"Commit ";
break;
case MSGTYPE_DHPART1 :
return... | 14,400 |
71,533 | 0 | ModuleExport size_t RegisterEXRImage(void)
{
MagickInfo
*entry;
entry=SetMagickInfo("EXR");
#if defined(MAGICKCORE_OPENEXR_DELEGATE)
entry->decoder=(DecodeImageHandler *) ReadEXRImage;
entry->encoder=(EncodeImageHandler *) WriteEXRImage;
#endif
entry->magick=(IsImageFormatHandler *) IsEXR;
entry->adjoi... | 14,401 |
126,199 | 0 | void Browser::JSOutOfMemoryHelper(WebContents* web_contents) {
InfoBarTabHelper* infobar_helper =
InfoBarTabHelper::FromWebContents(web_contents);
if (!infobar_helper)
return;
infobar_helper->AddInfoBar(new SimpleAlertInfoBarDelegate(
infobar_helper,
NULL,
l10n_util::GetStringUTF16(ID... | 14,402 |
144,788 | 0 | base::string16 TabLifecycleUnitSource::TabLifecycleUnit::GetTitle() const {
return GetWebContents()->GetTitle();
}
| 14,403 |
84,342 | 0 | UNCURL_EXPORT int32_t uncurl_set_cacert(struct uncurl_tls_ctx *uc_tls, char *cacert, size_t size)
{
return tlss_load_cacert(uc_tls->tlss, cacert, size);
}
| 14,404 |
21,853 | 0 | static void write_sse_reg(struct x86_emulate_ctxt *ctxt, sse128_t *data,
int reg)
{
ctxt->ops->get_fpu(ctxt);
switch (reg) {
case 0: asm("movdqu %0, %%xmm0" : : "m"(*data)); break;
case 1: asm("movdqu %0, %%xmm1" : : "m"(*data)); break;
case 2: asm("movdqu %0, %%xmm2" : : "m"(*data)); break;
case 3: asm("mov... | 14,405 |
20,055 | 0 | static void hfsplus_cat_build_key_uni(hfsplus_btree_key *key, u32 parent,
struct hfsplus_unistr *name)
{
int ustrlen;
ustrlen = be16_to_cpu(name->length);
key->cat.parent = cpu_to_be32(parent);
key->cat.name.length = cpu_to_be16(ustrlen);
ustrlen *= 2;
memcpy(key->cat.name.unicode, name->unicode, ustrl... | 14,406 |
59,164 | 0 | static bool reg_is_pkt_pointer_any(const struct bpf_reg_state *reg)
{
return reg_is_pkt_pointer(reg) ||
reg->type == PTR_TO_PACKET_END;
}
| 14,407 |
82,886 | 0 | static int bin_pe_init_tls(struct PE_(r_bin_pe_obj_t)* bin) {
PE_(image_tls_directory) * image_tls_directory;
PE_(image_data_directory) * data_dir_tls = &bin->data_directory[PE_IMAGE_DIRECTORY_ENTRY_TLS];
PE_DWord tls_paddr = bin_pe_rva_to_paddr (bin, data_dir_tls->VirtualAddress);
image_tls_directory = R_NEW0 (PE... | 14,408 |
112,070 | 0 | bool SyncManager::EncryptEverythingEnabledForTest() const {
ReadTransaction trans(FROM_HERE, GetUserShare());
return trans.GetCryptographer()->encrypt_everything();
}
| 14,409 |
77,229 | 0 | group_add_rule(struct ofgroup *group, struct rule *rule)
{
rule_collection_add(&group->rules, rule);
}
| 14,410 |
61,763 | 0 | int tcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
{
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *skb;
struct sockcm_cookie sockc;
int flags, err, copied = 0;
int mss_now = 0, size_goal, copied_syn = 0;
bool process_backlog = false;
bool sg;
long timeo;
lock_sock(sk);
flags = msg->msg_fl... | 14,411 |
122,035 | 0 | void RestartHost() {
DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
if (restarting_ || shutting_down_)
return;
restarting_ = true;
host_->Shutdown(base::Bind(
&HostProcess::RestartOnHostShutdown, base::Unretained(this)));
}
| 14,412 |
182,940 | 1 | static opj_bool pi_next_lrcp(opj_pi_iterator_t * pi)
{
opj_pi_comp_t *comp = NULL;
opj_pi_resolution_t *res = NULL;
long index = 0;
if (!pi->first) {
comp = &pi->comps[pi->compno];
res = &comp->resolutions[pi->resno];
goto LABEL_SKIP;
} else {
pi->first = 0;
}... | 14,413 |
42,301 | 0 | sg_remove_scat(Sg_fd * sfp, Sg_scatter_hold * schp)
{
SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp,
"sg_remove_scat: k_use_sg=%d\n", schp->k_use_sg));
if (schp->pages && schp->sglist_len > 0) {
if (!schp->dio_in_use) {
int k;
for (k = 0; k < schp->k_use_sg && schp->pages[k]; k++) {
SCSI_LOG... | 14,414 |
13,783 | 0 | ZEND_API int zend_declare_property_ex(zend_class_entry *ce, const char *name, int name_length, zval *property, int access_type, const char *doc_comment, int doc_comment_len TSRMLS_DC) /* {{{ */
{
zend_property_info property_info, *property_info_ptr;
const char *interned_name;
ulong h = zend_get_hash_value(name, name... | 14,415 |
58,441 | 0 | server_away_free_messages (server *serv)
{
GSList *list, *next;
struct away_msg *away;
list = away_list;
while (list)
{
away = list->data;
next = list->next;
if (away->server == serv)
{
away_list = g_slist_remove (away_list, away);
if (away->message)
free (away->message);
free (away);
next... | 14,416 |
185,533 | 1 | bool HpackDecoder::DecodeNextIndexedHeader(HpackInputStream* input_stream) {
uint32 index = 0;
if (!input_stream->DecodeNextUint32(&index))
return false;
HpackEntry* entry = header_table_.GetByIndex(index);
if (entry == NULL)
return false;
HandleHeaderRepresentation(entry->name(), entry->value());
return true;
}
| 14,417 |
44,383 | 0 | static int cg_release(const char *path, struct fuse_file_info *fi)
{
struct file_info *f = (struct file_info *)fi->fh;
do_release_file_info(f);
return 0;
}
| 14,418 |
170,549 | 0 | int LE_setConfig(LoudnessEnhancerContext *pContext, effect_config_t *pConfig)
{
ALOGV("LE_setConfig(%p)", pContext);
if (pConfig->inputCfg.samplingRate != pConfig->outputCfg.samplingRate) return -EINVAL;
if (pConfig->inputCfg.channels != pConfig->outputCfg.channels) return -EINVAL;
if (pConfig->inputCfg.format ... | 14,419 |
49,207 | 0 | static bool packet_use_direct_xmit(const struct packet_sock *po)
{
return po->xmit == packet_direct_xmit;
}
| 14,420 |
152,553 | 0 | void RenderFrameImpl::UpdateStateForCommit(
const blink::WebHistoryItem& item,
blink::WebHistoryCommitType commit_type,
ui::PageTransition transition) {
InternalDocumentStateData* internal_data =
InternalDocumentStateData::FromDocumentLoader(
frame_->GetDocumentLoader());
NavigationState... | 14,421 |
11,947 | 0 | static int check_content(CMS_ContentInfo *cms)
{
ASN1_OCTET_STRING **pos = CMS_get0_content(cms);
if (!pos || !*pos) {
CMSerr(CMS_F_CHECK_CONTENT, CMS_R_NO_CONTENT);
return 0;
}
return 1;
}
| 14,422 |
62,584 | 0 | snap_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen,
const struct lladdr_info *src, const struct lladdr_info *dst,
u_int bridge_pad)
{
uint32_t orgcode;
register u_short et;
register int ret;
ND_TCHECK2(*p, 5);
if (caplen < 5 || length < 5)
goto trunc;
orgcode = EXTRACT_24BITS(p);... | 14,423 |
184,415 | 1 | PrintPreviewUI::PrintPreviewUI(content::WebUI* web_ui)
: ConstrainedWebDialogUI(web_ui),
initial_preview_start_time_(base::TimeTicks::Now()),
handler_(NULL),
source_is_modifiable_(true),
tab_closed_(false) {
// Set up the chrome://print/ data source.
Profile* profile = Profile::FromWebUI(web_ui);
ChromeURLDataManager::... | 14,424 |
105,643 | 0 | HWND TreeView::CreateNativeControl(HWND parent_container) {
int style = WS_CHILD | TVS_HASBUTTONS | TVS_HASLINES | TVS_SHOWSELALWAYS;
if (!drag_enabled_)
style |= TVS_DISABLEDRAGDROP;
if (editable_)
style |= TVS_EDITLABELS;
if (lines_at_root_)
style |= TVS_LINESATROOT;
tree_view_ = ::CreateWindowE... | 14,425 |
28,780 | 0 | void kvm_lapic_set_eoi(struct kvm_vcpu *vcpu)
{
if (kvm_vcpu_has_lapic(vcpu))
apic_reg_write(vcpu->arch.apic, APIC_EOI, 0);
}
| 14,426 |
612 | 0 | int pdf_xobject_transparency(fz_context *ctx, pdf_xobject *xobj)
{
pdf_obj *group = pdf_dict_get(ctx, xobj->obj, PDF_NAME_Group);
if (group)
if (pdf_name_eq(ctx, pdf_dict_get(ctx, group, PDF_NAME_S), PDF_NAME_Transparency))
return 1;
return 0;
}
| 14,427 |
127,598 | 0 | bool GetWindowDesktop(XID window, int* desktop) {
return GetIntProperty(window, "_NET_WM_DESKTOP", desktop);
}
| 14,428 |
8,617 | 0 | static void vmsvga_io_write(void *opaque, hwaddr addr,
uint64_t data, unsigned size)
{
struct vmsvga_state_s *s = opaque;
switch (addr) {
case SVGA_IO_MUL * SVGA_INDEX_PORT:
vmsvga_index_write(s, addr, data);
break;
case SVGA_IO_MUL * SVGA_VALUE_PORT:
... | 14,429 |
132,089 | 0 | LayoutUnit LayoutBlockFlow::logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const
{
if (m_floatingObjects && m_floatingObjects->hasRightObjects())
return m_floatingObjects->logicalRightOffset(fixedOffset, logicalTop, logicalHeight);
return fixedOf... | 14,430 |
70,561 | 0 | static int l2tp_ip6_backlog_recv(struct sock *sk, struct sk_buff *skb)
{
int rc;
/* Charge it to the socket, dropping if the queue is full. */
rc = sock_queue_rcv_skb(sk, skb);
if (rc < 0)
goto drop;
return 0;
drop:
IP_INC_STATS(sock_net(sk), IPSTATS_MIB_INDISCARDS);
kfree_skb(skb);
return -1;
}
| 14,431 |
8,569 | 0 | static void ssh_pkt_addbyte(struct Packet *pkt, unsigned char byte)
{
ssh_pkt_adddata(pkt, &byte, 1);
}
| 14,432 |
180,029 | 1 | static void vmx_complete_atomic_exit(struct vcpu_vmx *vmx)
{
u32 exit_intr_info;
if (!(vmx->exit_reason == EXIT_REASON_MCE_DURING_VMENTRY
|| vmx->exit_reason == EXIT_REASON_EXCEPTION_NMI))
return;
vmx->exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
exit_intr_info = vmx->exit_intr_info;
/* Handle machine checks bef... | 14,433 |
147,403 | 0 | static void ForEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
ExceptionState exception_state(info.GetIsolate(), ExceptionState::kExecutionContext, "TestObject", "forEach");
TestObject* impl = V8TestObject::ToImpl(info.Holder());
ScriptState* script_state = ScriptState::ForRelevantRealm(info);
... | 14,434 |
166,242 | 0 | void MediaStreamManager::WillDestroyCurrentMessageLoop() {
DVLOG(3) << "MediaStreamManager::WillDestroyCurrentMessageLoop()";
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO) ||
!BrowserThread::IsThreadInitialized(BrowserThread::IO));
if (media_devices_manager_)
media_devices_manager_->StopMonito... | 14,435 |
86,857 | 0 | static int pkcs1_get_salt_len(const TEE_Attribute *params, uint32_t num_params,
size_t default_len)
{
size_t n;
assert(default_len < INT_MAX);
for (n = 0; n < num_params; n++) {
if (params[n].attributeID == TEE_ATTR_RSA_PSS_SALT_LENGTH) {
if (params[n].content.value.a < INT_MAX)
return params[n].... | 14,436 |
104,121 | 0 | error::Error GLES2DecoderImpl::HandleDeleteShader(
uint32 immediate_data_size, const gles2::DeleteShader& c) {
GLuint client_id = c.shader;
if (client_id) {
ShaderManager::ShaderInfo* info = GetShaderInfo(client_id);
if (info) {
if (!info->IsDeleted()) {
glDeleteShader(info->service_id());... | 14,437 |
59,677 | 0 | static int csnmp_oid_compare(oid_t const *left, oid_t const *right) {
return (
snmp_oid_compare(left->oid, left->oid_len, right->oid, right->oid_len));
}
| 14,438 |
65,258 | 0 | encode_fh(__be32 *p, struct svc_fh *fhp)
{
unsigned int size = fhp->fh_handle.fh_size;
*p++ = htonl(size);
if (size) p[XDR_QUADLEN(size)-1]=0;
memcpy(p, &fhp->fh_handle.fh_base, size);
return p + XDR_QUADLEN(size);
}
| 14,439 |
46,264 | 0 | static int blkdev_releasepage(struct page *page, gfp_t wait)
{
struct super_block *super = BDEV_I(page->mapping->host)->bdev.bd_super;
if (super && super->s_op->bdev_try_to_free_page)
return super->s_op->bdev_try_to_free_page(super, page, wait);
return try_to_free_buffers(page);
}
| 14,440 |
100,287 | 0 | virtual void RemoveNetworkManagerObserver(NetworkManagerObserver* observer) {
network_manager_observers_.RemoveObserver(observer);
}
| 14,441 |
88,425 | 0 | daemon_msg_open_req(uint8 ver, struct daemon_slpars *pars, uint32 plen,
char *source, size_t sourcelen)
{
char errbuf[PCAP_ERRBUF_SIZE]; // buffer for network errors
char errmsgbuf[PCAP_ERRBUF_SIZE]; // buffer for errors to send to the client
pcap_t *fp; // pcap_t main variable
int nread;
char sendbuf[RPCA... | 14,442 |
91,415 | 0 | static int check_ptr_alignment(struct bpf_verifier_env *env,
const struct bpf_reg_state *reg, int off,
int size, bool strict_alignment_once)
{
bool strict = env->strict_alignment || strict_alignment_once;
const char *pointer_desc = "";
switch (reg->type) {
case PTR_TO_PACKET:
case PTR_TO_PACKE... | 14,443 |
2,160 | 0 | void red_channel_init_outgoing_messages_window(RedChannel *channel)
{
RingItem *link;
RingItem *next;
RING_FOREACH_SAFE(link, next, &channel->clients) {
red_channel_client_init_outgoing_messages_window(
SPICE_CONTAINEROF(link, RedChannelClient, channel_link));
}
}
| 14,444 |
7,407 | 0 | static void begin_read(TsHashTable *ht)
{
#ifdef ZTS
tsrm_mutex_lock(ht->mx_reader);
if ((++(ht->reader)) == 1) {
tsrm_mutex_lock(ht->mx_writer);
}
tsrm_mutex_unlock(ht->mx_reader);
#endif
}
| 14,445 |
42,525 | 0 | resync_start_store(struct mddev *mddev, const char *buf, size_t len)
{
unsigned long long n;
int err;
if (cmd_match(buf, "none"))
n = MaxSector;
else {
err = kstrtoull(buf, 10, &n);
if (err < 0)
return err;
if (n != (sector_t)n)
return -EINVAL;
}
err = mddev_lock(mddev);
if (err)
return err;
i... | 14,446 |
35,255 | 0 | struct netdev_queue *dev_ingress_queue_create(struct net_device *dev)
{
struct netdev_queue *queue = dev_ingress_queue(dev);
#ifdef CONFIG_NET_CLS_ACT
if (queue)
return queue;
queue = kzalloc(sizeof(*queue), GFP_KERNEL);
if (!queue)
return NULL;
netdev_init_one_queue(dev, queue, NULL);
queue->qdisc = &noop_q... | 14,447 |
50,057 | 0 | static void opj_pi_update_encode_not_poc ( opj_cp_t *p_cp,
OPJ_UINT32 p_num_comps,
OPJ_UINT32 p_tileno,
OPJ_INT32 p_tx0,
OPJ_INT32 p_tx1,
OP... | 14,448 |
127,493 | 0 | bool JPEGImageDecoder::outputScanlines(ImageFrame& buffer)
{
return m_scaled ? outputScanlines<colorSpace, true>(buffer) : outputScanlines<colorSpace, false>(buffer);
}
| 14,449 |
58,925 | 0 | static inline int l2cap_command_rej(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u8 *data)
{
struct l2cap_cmd_rej *rej = (struct l2cap_cmd_rej *) data;
if (rej->reason != 0x0000)
return 0;
if ((conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_SENT) &&
cmd->ident == conn->info_ident) {
del_timer(&conn->i... | 14,450 |
61,624 | 0 | static void *mxf_resolve_strong_ref(MXFContext *mxf, UID *strong_ref, enum MXFMetadataSetType type)
{
int i;
if (!strong_ref)
return NULL;
for (i = 0; i < mxf->metadata_sets_count; i++) {
if (!memcmp(*strong_ref, mxf->metadata_sets[i]->uid, 16) &&
(type == AnyType || mxf->metada... | 14,451 |
181,587 | 1 | tiffcp(TIFF* in, TIFF* out)
{
uint16 bitspersample, samplesperpixel = 1;
uint16 input_compression, input_photometric = PHOTOMETRIC_MINISBLACK;
copyFunc cf;
uint32 width, length;
struct cpTag* p;
CopyField(TIFFTAG_IMAGEWIDTH, width);
CopyField(TIFFTAG_IMAGELENGTH, length);
CopyField(TIFFTAG_BITSPERSAMPLE, bitspersampl... | 14,452 |
172,380 | 0 | omx_video::omx_cmd_queue::~omx_cmd_queue()
{
}
| 14,453 |
156,480 | 0 | bool RenderFrameDevToolsAgentHost::ShouldAllowSession(
DevToolsSession* session) {
DevToolsManager* manager = DevToolsManager::GetInstance();
if (manager->delegate() && frame_host_) {
if (!manager->delegate()->AllowInspectingRenderFrameHost(frame_host_))
return false;
}
const bool is_webui =
... | 14,454 |
93,504 | 0 | static int userauth_list (lua_State *L, int status, lua_KContext ctx) {
char *auth_list = NULL;
struct ssh_userdata *state = NULL;
const char *username = luaL_checkstring(L, 2);
state = (struct ssh_userdata *) nseU_checkudata(L, 1, SSH2_UDATA, "ssh2");
assert(state->session != NULL);
while ((a... | 14,455 |
83,740 | 0 | GIT_INLINE(int) index_find_in_entries(
size_t *out, git_vector *entries, git_vector_cmp entry_srch,
const char *path, size_t path_len, int stage)
{
struct entry_srch_key srch_key;
srch_key.path = path;
srch_key.pathlen = !path_len ? strlen(path) : path_len;
srch_key.stage = stage;
return git_vector_bsearch2(out,... | 14,456 |
112,986 | 0 | void DownloadFileManager::EraseDownload(DownloadId global_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
if (!ContainsKey(downloads_, global_id))
return;
DownloadFile* download_file = downloads_[global_id];
VLOG(20) << " " << __FUNCTION__ << "()"
<< " id = " << global_id
... | 14,457 |
172,170 | 0 | static entry_t *entry_new(const char *key, const char *value) {
entry_t *entry = osi_calloc(sizeof(entry_t));
if (!entry)
return NULL;
entry->key = osi_strdup(key);
entry->value = osi_strdup(value);
return entry;
}
| 14,458 |
138,308 | 0 | DEFINE_INLINE_TRACE() { visitor->trace(m_axObject); }
| 14,459 |
49,125 | 0 | static void brcmf_update_bw40_channel_flag(struct ieee80211_channel *channel,
struct brcmu_chan *ch)
{
u32 ht40_flag;
ht40_flag = channel->flags & IEEE80211_CHAN_NO_HT40;
if (ch->sb == BRCMU_CHAN_SB_U) {
if (ht40_flag == IEEE80211_CHAN_NO_HT40)
channel->flags &= ~IEEE80211_CHAN_NO_HT40;
channel->flag... | 14,460 |
136,534 | 0 | void PaintController::InvalidateAllInternal() {
DCHECK(new_display_item_list_.IsEmpty());
current_paint_artifact_.Reset();
current_cache_generation_.Invalidate();
}
| 14,461 |
99,457 | 0 | bool NPJSObject::NP_HasProperty(NPObject* npObject, NPIdentifier propertyName)
{
return toNPJSObject(npObject)->hasProperty(propertyName);
}
| 14,462 |
3,764 | 0 | _dbus_atomic_get (DBusAtomic *atomic)
{
/* this is what GLib does, hopefully it's right... */
MemoryBarrier ();
return atomic->value;
}
| 14,463 |
48,059 | 0 | static inline bool is_no_device(u32 intr_info)
{
return is_exception_n(intr_info, NM_VECTOR);
}
| 14,464 |
133,213 | 0 | TaskQueueManager::AsValueWithSelectorResult(bool should_run,
size_t selected_queue) const {
DCHECK(main_thread_checker_.CalledOnValidThread());
scoped_refptr<base::trace_event::TracedValue> state =
new base::trace_event::TracedValue();
state->BeginArray("queues");... | 14,465 |
55,087 | 0 | static void mktree(struct tree_content *t, int v, struct strbuf *b)
{
size_t maxlen = 0;
unsigned int i;
if (!v)
qsort(t->entries,t->entry_count,sizeof(t->entries[0]),tecmp0);
else
qsort(t->entries,t->entry_count,sizeof(t->entries[0]),tecmp1);
for (i = 0; i < t->entry_count; i++) {
if (t->entries[i]->versi... | 14,466 |
23,962 | 0 | static int airo_get_rts(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *vwrq,
char *extra)
{
struct airo_info *local = dev->ml_priv;
readConfigRid(local, 1);
vwrq->value = le16_to_cpu(local->config.rtsThres);
vwrq->disabled = (vwrq->value >= AIRO_DEF_MTU);
vwrq->fixed = 1;
return... | 14,467 |
61,571 | 0 | static int mxf_edit_unit_absolute_offset(MXFContext *mxf, MXFIndexTable *index_table, int64_t edit_unit, int64_t *edit_unit_out, int64_t *offset_out, int nag)
{
int i;
int64_t offset_temp = 0;
for (i = 0; i < index_table->nb_segments; i++) {
MXFIndexTableSegment *s = index_table->segments[i];
... | 14,468 |
147,874 | 0 | void V8TestObject::StringFrozenArrayAttributeAttributeSetterCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_stringFrozenArrayAttribute_Setter");
v8::Local<v8::Value> v8_value = info[0];
test_object_v8_internal::St... | 14,469 |
54,545 | 0 | static int mov_read_tfhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
MOVFragment *frag = &c->fragment;
MOVTrackExt *trex = NULL;
int flags, track_id, i;
avio_r8(pb); /* version */
flags = avio_rb24(pb);
track_id = avio_rb32(pb);
if (!track_id)
return AVERROR_INVALIDDATA;
fr... | 14,470 |
61,895 | 0 | static opj_image_t* rawtoimage_common(const char *filename,
opj_cparameters_t *parameters, raw_cparameters_t *raw_cp, OPJ_BOOL big_endian)
{
int subsampling_dx = parameters->subsampling_dx;
int subsampling_dy = parameters->subsampling_dy;
FILE *f = NULL;
int i, com... | 14,471 |
138,813 | 0 | void RenderFrameHostImpl::UpdateAccessibilityMode() {
int accessibility_mode_raw = delegate_->GetAccessibilityMode().mode();
Send(new FrameMsg_SetAccessibilityMode(routing_id_, accessibility_mode_raw));
}
| 14,472 |
107,508 | 0 | Eina_Bool ewk_view_back(Evas_Object* ewkView)
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
return ewk_frame_back(smartData->main_frame);
}
| 14,473 |
55,730 | 0 | trad_enc_decypt_byte(struct trad_enc_ctx *ctx)
{
unsigned temp = ctx->keys[2] | 2;
return (uint8_t)((temp * (temp ^ 1)) >> 8) & 0xff;
}
| 14,474 |
4,926 | 0 | get_size (guint8 * ptr, guint8 ** end)
{
int count = 4;
int len = 0;
while (count--) {
int c = *ptr;
ptr++;
len = (len << 7) | (c & 0x7f);
if (!(c & 0x80))
break;
}
if (end)
*end = ptr;
return len;
}
| 14,475 |
68,155 | 0 | void* hashbin_find_next( hashbin_t* hashbin, long hashv, const char* name,
void ** pnext)
{
unsigned long flags = 0;
irda_queue_t* entry;
/* Synchronize */
spin_lock_irqsave(&hashbin->hb_spinlock, flags);
/*
* Search for current entry
* This allow to check if the current item is still in the
* hashbin ... | 14,476 |
40,522 | 0 | netlink_current_frame(const struct netlink_ring *ring,
enum nl_mmap_status status)
{
return netlink_lookup_frame(ring, ring->head, status);
}
| 14,477 |
64,843 | 0 | static int bmpr_has_transparency(struct iw_image *img)
{
int i,j;
if(img->imgtype!=IW_IMGTYPE_RGBA) return 0;
for(j=0;j<img->height;j++) {
for(i=0;i<img->width;i++) {
if(img->pixels[j*img->bpr + i*4 + 3] != 255)
return 1;
}
}
return 0;
}
| 14,478 |
626 | 0 | static bool push_int_bigendian(struct asn1_data *data, unsigned int i, bool negative)
{
uint8_t lowest = i & 0xFF;
i = i >> 8;
if (i != 0)
if (!push_int_bigendian(data, i, negative))
return false;
if (data->nesting->start+1 == data->ofs) {
/* We did not write anything yet, looking at the highest
* valu... | 14,479 |
123,314 | 0 | void RenderWidgetHostViewGtk::ModifyEventMovementAndCoords(
WebKit::WebMouseEvent* event) {
event->movementX = event->globalX - global_mouse_position_.x();
event->movementY = event->globalY - global_mouse_position_.y();
if (mouse_is_being_warped_to_unlocked_position_) {
event->movementX = 0;
event->m... | 14,480 |
85,216 | 0 | int perf_event_account_interrupt(struct perf_event *event)
{
return __perf_event_account_interrupt(event, 1);
}
| 14,481 |
52,234 | 0 | int arpt_register_table(struct net *net,
const struct xt_table *table,
const struct arpt_replace *repl,
const struct nf_hook_ops *ops,
struct xt_table **res)
{
int ret;
struct xt_table_info *newinfo;
struct xt_table_info bootstrap = {0};
void *loc_cpu_entry;
struct xt_table *new_table;
newinfo = xt_a... | 14,482 |
88,239 | 0 | XML_StopParser(XML_Parser parser, XML_Bool resumable) {
if (parser == NULL)
return XML_STATUS_ERROR;
switch (parser->m_parsingStatus.parsing) {
case XML_SUSPENDED:
if (resumable) {
parser->m_errorCode = XML_ERROR_SUSPENDED;
return XML_STATUS_ERROR;
}
parser->m_parsingStatus.parsing = X... | 14,483 |
151,131 | 0 | void DevToolsDataSource::OnURLFetchComplete(const net::URLFetcher* source) {
DCHECK(source);
PendingRequestsMap::iterator it = pending_.find(source);
DCHECK(it != pending_.end());
std::string response;
source->GetResponseAsString(&response);
delete source;
it->second.Run(base::RefCountedString::TakeString... | 14,484 |
171,365 | 0 | void OMXCodec::setComponentRole() {
setComponentRole(mOMX, mNode, mIsEncoder, mMIME);
}
| 14,485 |
12,917 | 0 | int nlmsg_get_proto(struct nl_msg *msg)
{
return msg->nm_protocol;
}
| 14,486 |
158,776 | 0 | explicit FirstVisuallyNonEmptyPaintObserver(Shell* shell)
: WebContentsObserver(shell->web_contents()),
did_fist_visually_non_empty_paint_(false) {}
| 14,487 |
168,448 | 0 | void PlatformFontSkia::InitFromPlatformFont(const PlatformFontSkia* other) {
TRACE_EVENT0("fonts", "PlatformFontSkia::InitFromPlatformFont");
typeface_ = other->typeface_;
font_family_ = other->font_family_;
font_size_pixels_ = other->font_size_pixels_;
style_ = other->style_;
weight_ = other->weight_;
de... | 14,488 |
39,873 | 0 | void skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list)
{
unsigned long flags;
spin_lock_irqsave(&list->lock, flags);
__skb_queue_after(list, old, newsk);
spin_unlock_irqrestore(&list->lock, flags);
}
| 14,489 |
100,299 | 0 | virtual void SaveWifiNetwork(const WifiNetwork* network) {}
| 14,490 |
179,154 | 1 | void* ipc_alloc(int size)
{
void* out;
if(size > PAGE_SIZE)
out = vmalloc(size);
else
out = kmalloc(size, GFP_KERNEL);
return out;
}
| 14,491 |
126,885 | 0 | void BrowserView::UpdateReloadStopState(bool is_loading, bool force) {
toolbar_->reload_button()->ChangeMode(
is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, force);
}
| 14,492 |
123,464 | 0 | ScriptPromise ImageBitmapFactories::createImageBitmap(EventTarget& eventTarget, ImageBitmap* bitmap, int sx, int sy, int sw, int sh, ExceptionState& exceptionState)
{
if (!bitmap) {
exceptionState.throwTypeError("The ImageBitmap provided is invalid.");
return ScriptPromise();
}
if (!sw || !s... | 14,493 |
46,993 | 0 | static void encrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes)
{
const unsigned int bsize = SERPENT_BLOCK_SIZE;
struct crypt_priv *ctx = priv;
int i;
ctx->fpu_enabled = serpent_fpu_begin(ctx->fpu_enabled, nbytes);
if (nbytes >= SERPENT_AVX2_PARALLEL_BLOCKS * bsize) {
serpent_ecb_enc_16way(ctx->ctx, ... | 14,494 |
19,049 | 0 | void *tcp_v4_tw_get_peer(struct sock *sk)
{
struct inet_timewait_sock *tw = inet_twsk(sk);
return inet_getpeer_v4(tw->tw_daddr, 1);
}
| 14,495 |
133,860 | 0 | bool HFSBTreeIterator::Init(ReadStream* stream) {
DCHECK(!stream_);
stream_ = stream;
if (stream_->Seek(0, SEEK_SET) != 0) {
DLOG(ERROR) << "Failed to seek to header node";
return false;
}
BTNodeDescriptor node;
if (!stream_->ReadType(&node)) {
DLOG(ERROR) << "Failed to read BTNodeDescriptor";... | 14,496 |
140,239 | 0 | void BluetoothRemoteGATTServer::GetPrimaryServicesCallback(
mojom::blink::WebBluetoothGATTQueryQuantity quantity,
ScriptPromiseResolver* resolver,
mojom::blink::WebBluetoothResult result,
Optional<Vector<mojom::blink::WebBluetoothRemoteGATTServicePtr>> services) {
if (!resolver->getExecutionContext() ... | 14,497 |
31,394 | 0 | static int ipsecrequests_to_migrate(struct sadb_x_ipsecrequest *rq1, int len,
struct xfrm_migrate *m)
{
int err;
struct sadb_x_ipsecrequest *rq2;
int mode;
if (len <= sizeof(struct sadb_x_ipsecrequest) ||
len < rq1->sadb_x_ipsecrequest_len)
return -EINVAL;
/* old endoints */
err = parse_sockaddr_... | 14,498 |
43,217 | 0 | static void charstring_end(void)
{
byte *bp;
sprintf(line, "%d ", (int) (charstring_bp - charstring_buf));
eexec_string(line);
sprintf(line, "%s ", cs_start);
eexec_string(line);
for (bp = charstring_buf; bp < charstring_bp; bp++)
eexec_byte(*bp);
}
| 14,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.