unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
40,972 | 0 | wchar_t* DupWcs(cmsContext ContextID, const wchar_t* ptr)
{
if (ptr == NULL) return NULL;
return (wchar_t*) _cmsDupMem(ContextID, ptr, (mywcslen(ptr) + 1) * sizeof(wchar_t));
}
| 10,000 |
132,277 | 0 | void RenderFrameImpl::WidgetWillClose() {
FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WidgetWillClose());
}
| 10,001 |
145,315 | 0 | void TestFeaturesNativeHandler::GetAPIFeatures(
const v8::FunctionCallbackInfo<v8::Value>& args) {
scoped_ptr<JSONFeatureProviderSource> source(
ExtensionsClient::Get()->CreateFeatureProviderSource("api"));
scoped_ptr<content::V8ValueConverter> converter(
content::V8ValueConverter::create());
args... | 10,002 |
16,021 | 0 | XmpFilePtr xmp_files_open_new(const char *path, XmpOpenFileOptions options)
{
CHECK_PTR(path, NULL);
RESET_ERROR;
try {
auto txf = std::unique_ptr<SXMPFiles>(new SXMPFiles);
txf->OpenFile(path, XMP_FT_UNKNOWN, options);
return reinterpret_cast<XmpFilePtr>(txf.release());
}
... | 10,003 |
25,990 | 0 | ctx_group_list(struct perf_event *event, struct perf_event_context *ctx)
{
if (event->attr.pinned)
return &ctx->pinned_groups;
else
return &ctx->flexible_groups;
}
| 10,004 |
36,502 | 0 | static bool card_id_ok(struct snd_card *card, const char *id)
{
int i;
if (!snd_info_check_reserved_words(id))
return false;
for (i = 0; i < snd_ecards_limit; i++) {
if (snd_cards[i] && snd_cards[i] != card &&
!strcmp(snd_cards[i]->id, id))
return false;
}
return true;
}
| 10,005 |
113,990 | 0 | void NotifyRefreshNetwork() {
ash::NetworkObserver* observer = tray_->network_observer();
chromeos::NetworkLibrary* crosnet =
chromeos::CrosLibrary::Get()->GetNetworkLibrary();
if (observer) {
ash::NetworkIconInfo info;
info.image = network_icon_->GetIconAndText(&info.description);
... | 10,006 |
20,186 | 0 | int sock_no_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m,
size_t len)
{
return -EOPNOTSUPP;
}
| 10,007 |
25,448 | 0 | unsigned long perf_instruction_pointer(struct pt_regs *regs)
{
unsigned long ip;
if (TRAP(regs) != 0xf00)
return regs->nip; /* not a PMU interrupt */
ip = mfspr(SPRN_SIAR) + perf_ip_adjust(regs);
return ip;
}
| 10,008 |
14,558 | 0 | int BN_set_word(BIGNUM *a, BN_ULONG w)
{
bn_check_top(a);
if (bn_expand(a,(int)sizeof(BN_ULONG)*8) == NULL) return(0);
a->neg = 0;
a->d[0] = w;
a->top = (w ? 1 : 0);
bn_check_top(a);
return(1);
}
| 10,009 |
59,124 | 0 | static int check_reg_arg(struct bpf_verifier_env *env, u32 regno,
enum reg_arg_type t)
{
struct bpf_reg_state *regs = env->cur_state->regs;
if (regno >= MAX_BPF_REG) {
verbose(env, "R%d is invalid\n", regno);
return -EINVAL;
}
if (t == SRC_OP) {
/* check whether register used as source operand can be re... | 10,010 |
68,080 | 0 | static ut64 baddr(RBinFile *arch) {
return 0;
}
| 10,011 |
42,340 | 0 | static int path_lookupat(int dfd, const struct filename *name,
unsigned int flags, struct nameidata *nd)
{
struct path path;
int err;
/*
* Path walking is largely split up into 2 different synchronisation
* schemes, rcu-walk and ref-walk (explained in
* Documentation/filesystems/path-lookup.txt). These sh... | 10,012 |
45,148 | 0 | static const char *req_protocol_field(request_rec *r)
{
return r->protocol;
}
| 10,013 |
127,570 | 0 | void DetachSharedMemory(Display* display, XSharedMemoryId shmseg) {
DCHECK(QuerySharedMemorySupport(display));
XShmSegmentInfo shminfo;
memset(&shminfo, 0, sizeof(shminfo));
shminfo.shmseg = shmseg;
if (!XShmDetach(display, &shminfo))
NOTREACHED();
}
| 10,014 |
3,713 | 0 | _dbus_append_user_from_current_process (DBusString *str)
{
return _dbus_string_append_uint (str,
_dbus_geteuid ());
}
| 10,015 |
128,200 | 0 | ScriptPromise Notification::requestPermission(ScriptState* scriptState, NotificationPermissionCallback* deprecatedCallback)
{
ExecutionContext* context = scriptState->executionContext();
if (NotificationPermissionClient* permissionClient = NotificationPermissionClient::from(context))
return permissionCl... | 10,016 |
132,860 | 0 | void PictureLayerImpl::UpdateIdealScales() {
DCHECK(CanHaveTilings());
float min_contents_scale = MinimumContentsScale();
DCHECK_GT(min_contents_scale, 0.f);
float min_page_scale = layer_tree_impl()->min_page_scale_factor();
DCHECK_GT(min_page_scale, 0.f);
float min_device_scale = 1.f;
float min_source_s... | 10,017 |
15,495 | 0 | read_response_body (struct http_stat *hs, int sock, FILE *fp, wgint contlen,
wgint contrange, bool chunked_transfer_encoding,
char *url, char *warc_timestamp_str, char *warc_request_uuid,
ip_address *warc_ip, char *type, int statcode, char *head)
{
int warc_... | 10,018 |
94,728 | 0 | static inline int build_open_flags(int flags, umode_t mode, struct open_flags *op)
{
int lookup_flags = 0;
int acc_mode = ACC_MODE(flags);
if (flags & (O_CREAT | __O_TMPFILE))
op->mode = (mode & S_IALLUGO) | S_IFREG;
else
op->mode = 0;
/* Must never be set by userspace */
flags &= ~FMODE_NONOTIFY & ~O_CLOEX... | 10,019 |
40,238 | 0 | static int pn_backlog_rcv(struct sock *sk, struct sk_buff *skb)
{
int err = sock_queue_rcv_skb(sk, skb);
if (err < 0)
kfree_skb(skb);
return err ? NET_RX_DROP : NET_RX_SUCCESS;
}
| 10,020 |
30,117 | 0 | void __weak arch_ftrace_update_code(int command)
{
ftrace_run_stop_machine(command);
}
| 10,021 |
68,222 | 0 | static struct sock *llc_lookup_dgram(struct llc_sap *sap,
const struct llc_addr *laddr)
{
struct sock *rc;
struct hlist_nulls_node *node;
int slot = llc_sk_laddr_hashfn(sap, laddr);
struct hlist_nulls_head *laddr_hb = &sap->sk_laddr_hash[slot];
rcu_read_lock_bh();
again:
sk_nulls_for_each_rcu(rc, node, ... | 10,022 |
188,406 | 1 | long Cluster::HasBlockEntries(
const Segment* pSegment,
long long off, //relative to start of segment payload
long long& pos,
long& len)
{
assert(pSegment);
assert(off >= 0); //relative to segment
IMkvReader* const pReader = pSegment->m_pReader;
long long total, avail;
long status =... | 10,023 |
2,446 | 0 | NTSTATUS smb2cli_req_compound_submit(struct tevent_req **reqs,
int num_reqs)
{
struct smbXcli_req_state *state;
struct tevent_req *subreq;
struct iovec *iov;
int i, num_iov, nbt_len;
int tf_iov = -1;
const DATA_BLOB *encryption_key = NULL;
uint64_t encryption_session_id = 0;
uint64_t nonce_high = UINT6... | 10,024 |
8,660 | 0 | size_t mptsas_config_phy_0(MPTSASState *s, uint8_t **data, int address)
{
int phy_handle = -1;
int dev_handle = -1;
int i = mptsas_phy_addr_get(s, address);
SCSIDevice *dev;
if (i < 0) {
trace_mptsas_config_sas_phy(s, address, i, phy_handle, dev_handle, 0);
return i;
}
dev ... | 10,025 |
75,679 | 0 | hfs_cat_read_file_folder_record(HFS_INFO * hfs, TSK_OFF_T off,
hfs_file_folder * record)
{
TSK_FS_INFO *fs = (TSK_FS_INFO *) & (hfs->fs_info);
ssize_t cnt;
char rec_type[2];
memset(record, 0, sizeof(hfs_file_folder));
cnt = tsk_fs_attr_read(hfs->catalog_attr, off, rec_type, 2, 0);
if (cnt ... | 10,026 |
168,943 | 0 | DevToolsAgentHostImpl::~DevToolsAgentHostImpl() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
NotifyDestroyed();
}
| 10,027 |
60,408 | 0 | static void __fanout_unlink(struct sock *sk, struct packet_sock *po)
{
struct packet_fanout *f = po->fanout;
int i;
spin_lock(&f->lock);
for (i = 0; i < f->num_members; i++) {
if (f->arr[i] == sk)
break;
}
BUG_ON(i >= f->num_members);
f->arr[i] = f->arr[f->num_members - 1];
f->num_members--;
if (f->num_m... | 10,028 |
104,936 | 0 | ::ppapi::TrackerBase* GetTrackerBase() {
return ResourceTracker::Get();
}
| 10,029 |
45,539 | 0 | static void authenc_esn_verify_ahash_update_done(struct crypto_async_request *areq,
int err)
{
u8 *ihash;
unsigned int authsize;
struct ablkcipher_request *abreq;
struct aead_request *req = areq->data;
struct crypto_aead *authenc_esn = crypto_aead_reqtfm(req);
struct crypto_authenc_esn_ctx *ctx = crypto_ae... | 10,030 |
177,619 | 0 | int num_buffers() const { return num_buffers_; }
| 10,031 |
30,734 | 0 | static int rfcomm_sock_create(struct net *net, struct socket *sock,
int protocol, int kern)
{
struct sock *sk;
BT_DBG("sock %p", sock);
sock->state = SS_UNCONNECTED;
if (sock->type != SOCK_STREAM && sock->type != SOCK_RAW)
return -ESOCKTNOSUPPORT;
sock->ops = &rfcomm_sock_ops;
sk = rfcomm_sock_all... | 10,032 |
14,808 | 0 | ftp_rename(ftpbuf_t *ftp, const char *src, const char *dest)
{
if (ftp == NULL) {
return 0;
}
if (!ftp_putcmd(ftp, "RNFR", src)) {
return 0;
}
if (!ftp_getresp(ftp) || ftp->resp != 350) {
return 0;
}
if (!ftp_putcmd(ftp, "RNTO", dest)) {
return 0;
}
if (!ftp_getresp(ftp) || ftp->resp != 250) {
return... | 10,033 |
64,563 | 0 | int _yr_re_fiber_split(
RE_FIBER_LIST* fiber_list,
RE_FIBER_POOL* fiber_pool,
RE_FIBER* fiber,
RE_FIBER** new_fiber)
{
int32_t i;
FAIL_ON_ERROR(_yr_re_fiber_create(fiber_pool, new_fiber));
(*new_fiber)->sp = fiber->sp;
(*new_fiber)->ip = fiber->ip;
(*new_fiber)->rc = fiber->rc;
for (i = 0... | 10,034 |
174,656 | 0 | void HeapCache::free_heap(const wp<IBinder>& binder)
{
sp<IMemoryHeap> rel;
{
Mutex::Autolock _l(mHeapCacheLock);
ssize_t i = mHeapCache.indexOfKey(binder);
if (i>=0) {
heap_info_t& info(mHeapCache.editValueAt(i));
int32_t c = android_atomic_dec(&info.count);
if (c == 1) {
ALOGD_IF(VERBOSE,
... | 10,035 |
7,660 | 0 | static int v9fs_receive_response(V9fsProxy *proxy, int type,
int *status, void *response)
{
int retval;
ProxyHeader header;
struct iovec *reply = &proxy->in_iovec;
*status = 0;
reply->iov_len = 0;
retval = socket_read(proxy->sockfd, reply->iov_base, PROXY_HDR_SZ... | 10,036 |
22,285 | 0 | SYSCALL_DEFINE1(sched_getscheduler, pid_t, pid)
{
struct task_struct *p;
int retval;
if (pid < 0)
return -EINVAL;
retval = -ESRCH;
rcu_read_lock();
p = find_process_by_pid(pid);
if (p) {
retval = security_task_getscheduler(p);
if (!retval)
retval = p->policy
| (p->sched_reset_on_fork ? SCHED_RESET... | 10,037 |
96,763 | 0 | prepare_decryption( RIJNDAEL_context *ctx )
{
int r;
if (0)
;
#ifdef USE_AESNI
else if (ctx->use_aesni)
{
_gcry_aes_aesni_prepare_decryption (ctx);
}
#endif /*USE_AESNI*/
#ifdef USE_SSSE3
else if (ctx->use_ssse3)
{
_gcry_aes_ssse3_prepare_decryption (ctx);
}
#endif /*USE_SSSE3*/... | 10,038 |
88,625 | 0 | int mwifiex_uap_prepare_cmd(struct mwifiex_private *priv, u16 cmd_no,
u16 cmd_action, u32 type,
void *data_buf, void *cmd_buf)
{
struct host_cmd_ds_command *cmd = cmd_buf;
switch (cmd_no) {
case HostCmd_CMD_UAP_SYS_CONFIG:
if (mwifiex_cmd_uap_sys_config(cmd, cmd_action, type, data_buf))
return -1... | 10,039 |
102,501 | 0 | LayerTreeCoordinator::~LayerTreeCoordinator()
{
HashSet<WebCore::CoordinatedGraphicsLayer*> registeredLayers;
registeredLayers.swap(m_registeredLayers);
HashSet<WebCore::CoordinatedGraphicsLayer*>::iterator end = registeredLayers.end();
for (HashSet<WebCore::CoordinatedGraphicsLayer*>::iterator it = re... | 10,040 |
62,438 | 0 | print_32bits_val(netdissect_options *ndo, const uint32_t *dat)
{
ND_PRINT((ndo, "%lu", (u_long)EXTRACT_32BITS(dat)));
}
| 10,041 |
87,919 | 0 | static int fm10k_clean_rx_irq(struct fm10k_q_vector *q_vector,
struct fm10k_ring *rx_ring,
int budget)
{
struct sk_buff *skb = rx_ring->skb;
unsigned int total_bytes = 0, total_packets = 0;
u16 cleaned_count = fm10k_desc_unused(rx_ring);
while (likely(total_packets < budget)) {
union fm10k_rx_d... | 10,042 |
8,680 | 0 | append_uri_pathel (const char *b, const char *e, bool escaped,
struct growable *dest)
{
const char *p;
int quoted, outlen;
int mask;
if (opt.restrict_files_os == restrict_unix)
mask = filechr_not_unix;
else if (opt.restrict_files_os == restrict_vms)
mask = filechr_not_vms;
else
... | 10,043 |
130,145 | 0 | bool GenerateStateFromBeaconAndAttemptCount(HKEY* key, DWORD blacklist_state) {
LONG result = 0;
if (blacklist_state == blacklist::BLACKLIST_ENABLED) {
return (SetDWValue(key,
blacklist::kBeaconAttemptCount,
static_cast<DWORD>(0)) == ERROR_SUCCESS);
} else {
D... | 10,044 |
58,092 | 0 | static int snd_compr_start(struct snd_compr_stream *stream)
{
int retval;
if (stream->runtime->state != SNDRV_PCM_STATE_PREPARED)
return -EPERM;
retval = stream->ops->trigger(stream, SNDRV_PCM_TRIGGER_START);
if (!retval)
stream->runtime->state = SNDRV_PCM_STATE_RUNNING;
return retval;
}
| 10,045 |
123,093 | 0 | int RenderWidgetHostViewAndroid::GetNativeImeAdapter() {
return reinterpret_cast<int>(&ime_adapter_android_);
}
| 10,046 |
174,094 | 0 | virtual void allocateBuffers(bool async, uint32_t width, uint32_t height,
PixelFormat format, uint32_t usage) {
Parcel data, reply;
data.writeInterfaceToken(IGraphicBufferProducer::getInterfaceDescriptor());
data.writeInt32(static_cast<int32_t>(async));
data.writeUint32(width);
data.w... | 10,047 |
82,961 | 0 | static int bin_mem(RCore *r, int mode) {
RList *mem = NULL;
if (!r) return false;
if (!IS_MODE_JSON(mode)) {
if (!(IS_MODE_RAD (mode) || IS_MODE_SET (mode))) {
r_cons_println ("[Memory]\n");
}
}
if (!(mem = r_bin_get_mem (r->bin))) {
if (IS_MODE_JSON (mode)) {
r_cons_print("[]");
}
return false;
}... | 10,048 |
129,052 | 0 | void writeUint32(uint32_t value)
{
append(Uint32Tag);
doWriteUint32(value);
}
| 10,049 |
86,696 | 0 | static void blk_mq_free_bitmap(struct blk_mq_ctxmap *bitmap)
{
kfree(bitmap->map);
}
| 10,050 |
135,765 | 0 | int InputMethodController::TextInputFlags() const {
Element* element = GetDocument().FocusedElement();
if (!element)
return kWebTextInputFlagNone;
int flags = 0;
const AtomicString& autocomplete =
element->getAttribute(HTMLNames::autocompleteAttr);
if (autocomplete == "on")
flags |= kWebTextIn... | 10,051 |
9,101 | 0 | static int vrend_decode_create_stream_output_target(struct vrend_decode_ctx *ctx, uint32_t handle, uint16_t length)
{
uint32_t res_handle, buffer_size, buffer_offset;
if (length != VIRGL_OBJ_STREAMOUT_SIZE)
return EINVAL;
res_handle = get_buf_entry(ctx, VIRGL_OBJ_STREAMOUT_RES_HANDLE);
buffer_offset... | 10,052 |
87,345 | 0 | vips_foreign_load_gif_dispose( GObject *gobject )
{
VipsForeignLoadGif *gif = (VipsForeignLoadGif *) gobject;
vips_foreign_load_gif_close( gif );
VIPS_UNREF( gif->frame );
VIPS_UNREF( gif->previous );
VIPS_FREE( gif->comment );
VIPS_FREE( gif->line )
G_OBJECT_CLASS( vips_foreign_load_gif_parent_class )->... | 10,053 |
121,620 | 0 | inline bool SearchBuffer::needsMoreContext() const
{
return m_needsMoreContext;
}
| 10,054 |
37,697 | 0 | struct assoc_array_edit *assoc_array_insert(struct assoc_array *array,
const struct assoc_array_ops *ops,
const void *index_key,
void *object)
{
struct assoc_array_walk_result result;
struct assoc_array_edit *edit;
pr_devel("-->%s()\n", __func__);
/* The leaf pointer we're given must no... | 10,055 |
135,076 | 0 | void AppCacheHost::ObserveGroupBeingUpdated(AppCacheGroup* group) {
DCHECK(!group_being_updated_.get());
group_being_updated_ = group;
newest_cache_of_group_being_updated_ = group->newest_complete_cache();
group->AddUpdateObserver(this);
}
| 10,056 |
105,005 | 0 | HttpBridgeFactory::HttpBridgeFactory(
net::URLRequestContextGetter* baseline_context_getter) {
DCHECK(baseline_context_getter != NULL);
request_context_getter_ =
new HttpBridge::RequestContextGetter(baseline_context_getter);
}
| 10,057 |
82,793 | 0 | static void _anal_calls(RCore *core, ut64 addr, ut64 addr_end) {
RAnalOp op;
int bufi;
int depth = r_config_get_i (core->config, "anal.depth");
const int addrbytes = core->io->addrbytes;
const int bsz = 4096;
ut8 *buf;
ut8 *block;
bufi = 0;
if (addr_end - addr > UT32_MAX) {
return;
}
buf = malloc (bsz);
b... | 10,058 |
79,622 | 0 | char *imap_fix_path(struct ImapData *idata, const char *mailbox, char *path, size_t plen)
{
int i = 0;
char delim = '\0';
if (idata)
delim = idata->delim;
while (mailbox && *mailbox && i < plen - 1)
{
if ((ImapDelimChars && strchr(ImapDelimChars, *mailbox)) || (delim && *mailbox == delim))
{
... | 10,059 |
66,068 | 0 | static int do_boot_mode(struct edgeport_serial *serial,
const struct firmware *fw)
{
struct device *dev = &serial->serial->interface->dev;
int status = 0;
struct edge_ti_manuf_descriptor *ti_manuf_desc;
struct edgeport_fw_hdr *fw_hdr = (struct edgeport_fw_hdr *)fw->data;
dev_dbg(dev, "%s - RUNNING IN BOOT MODE\... | 10,060 |
9,653 | 0 | static int php_is_file_ok(const cwd_state *state) /* {{{ */
{
struct stat buf;
if (php_sys_stat(state->cwd, &buf) == 0 && S_ISREG(buf.st_mode))
return (0);
return (1);
}
/* }}} */
| 10,061 |
72,619 | 0 | ring_buffer_read_finish(struct ring_buffer_iter *iter)
{
struct ring_buffer_per_cpu *cpu_buffer = iter->cpu_buffer;
unsigned long flags;
/*
* Ring buffer is disabled from recording, here's a good place
* to check the integrity of the ring buffer.
* Must prevent readers from trying to read, as the check
* cl... | 10,062 |
169,917 | 0 | xsltInitCtxtKeys(xsltTransformContextPtr ctxt, xsltDocumentPtr idoc) {
xsltStylesheetPtr style;
xsltKeyDefPtr keyDef;
if ((ctxt == NULL) || (idoc == NULL))
return;
#ifdef KEY_INIT_DEBUG
fprintf(stderr, "xsltInitCtxtKeys on document\n");
#endif
#ifdef WITH_XSLT_DEBUG_KEYS
if ((idoc->doc != NULL) && (... | 10,063 |
47,886 | 0 | bool skb_page_frag_refill(unsigned int sz, struct page_frag *pfrag, gfp_t gfp)
{
if (pfrag->page) {
if (page_ref_count(pfrag->page) == 1) {
pfrag->offset = 0;
return true;
}
if (pfrag->offset + sz <= pfrag->size)
return true;
put_page(pfrag->page);
}
pfrag->offset = 0;
if (SKB_FRAG_PAGE_ORDER) {
... | 10,064 |
21,240 | 0 | int handle_pte_fault(struct mm_struct *mm,
struct vm_area_struct *vma, unsigned long address,
pte_t *pte, pmd_t *pmd, unsigned int flags)
{
pte_t entry;
spinlock_t *ptl;
entry = *pte;
if (!pte_present(entry)) {
if (pte_none(entry)) {
if (vma->vm_ops) {
if (likely(vma->vm_ops->fault))
re... | 10,065 |
31,779 | 0 | static void print_fatal_signal(int signr)
{
struct pt_regs *regs = signal_pt_regs();
printk(KERN_INFO "%s/%d: potentially unexpected fatal signal %d.\n",
current->comm, task_pid_nr(current), signr);
#if defined(__i386__) && !defined(__arch_um__)
printk(KERN_INFO "code at %08lx: ", regs->ip);
{
int i;
for (i ... | 10,066 |
90,812 | 0 | static time_t gf_mktime_utc(struct tm *tm)
{
static const u32 days_per_month[2][12] = {
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
};
time_t time=0;
int i;
for (i=70; i<tm->tm_year; i++) {
time += leap_year(i) ? 366 : 365;
}
for (i=0; i<tm->tm_mon; ... | 10,067 |
159,120 | 0 | std::string GetDownloadTypeNames(DownloadItem::DownloadType type) {
switch (type) {
case DownloadItem::TYPE_ACTIVE_DOWNLOAD:
return "NEW_DOWNLOAD";
case DownloadItem::TYPE_HISTORY_IMPORT:
return "HISTORY_IMPORT";
case DownloadItem::TYPE_SAVE_PAGE_AS:
return "SAVE_PAGE_AS";
default:
... | 10,068 |
43,184 | 0 | static void oz_hcd_endpoint_reset(struct usb_hcd *hcd,
struct usb_host_endpoint *ep)
{
}
| 10,069 |
120,290 | 0 | void FolderHeaderView::ButtonPressed(views::Button* sender,
const ui::Event& event) {
delegate_->GiveBackFocusToSearchBox();
delegate_->NavigateBack(folder_item_, event);
}
| 10,070 |
18,405 | 0 | spawn(WebKitWebView *web_view, GArray *argv, GString *result) {
(void)web_view; (void)result;
gchar *path = NULL;
if (argv_idx(argv, 0) &&
((path = find_existing_file(argv_idx(argv, 0)))) ) {
run_command(path, 0,
((const gchar **) (argv->data + sizeof(gchar*))),
... | 10,071 |
37,584 | 0 | static inline u64 rsvd_bits(int s, int e)
{
return ((1ULL << (e - s + 1)) - 1) << s;
}
| 10,072 |
39,599 | 0 | static int __init aio_setup(void)
{
static struct file_system_type aio_fs = {
.name = "aio",
.mount = aio_mount,
.kill_sb = kill_anon_super,
};
aio_mnt = kern_mount(&aio_fs);
if (IS_ERR(aio_mnt))
panic("Failed to create aio fs mount.");
kiocb_cachep = KMEM_CACHE(kiocb, SLAB_HWCACHE_ALIGN|SLAB_PANIC);
k... | 10,073 |
90,454 | 0 | void ib_uverbs_detach_umcast(struct ib_qp *qp,
struct ib_uqp_object *uobj)
{
struct ib_uverbs_mcast_entry *mcast, *tmp;
list_for_each_entry_safe(mcast, tmp, &uobj->mcast_list, list) {
ib_detach_mcast(qp, &mcast->gid, mcast->lid);
list_del(&mcast->list);
kfree(mcast);
}
}
| 10,074 |
88,954 | 0 | static unsigned int PNMInteger(Image *image,CommentInfo *comment_info,
const unsigned int base)
{
int
c;
unsigned int
value;
/*
Skip any leading whitespace.
*/
do
{
c=ReadBlobByte(image);
if (c == EOF)
return(0);
if (c == (int) '#')
c=PNMComment(image,comment_info);
... | 10,075 |
143,602 | 0 | void RenderWidgetHostImpl::CompositorFrameDrawn(
const std::vector<ui::LatencyInfo>& latency_info) {
for (size_t i = 0; i < latency_info.size(); i++) {
std::set<RenderWidgetHostImpl*> rwhi_set;
for (const auto& lc : latency_info[i].latency_components()) {
if (lc.first.first == ui::INPUT_EVENT_LATENC... | 10,076 |
187,133 | 1 | void MediaElementAudioSourceHandler::Process(size_t number_of_frames) {
AudioBus* output_bus = Output(0).Bus();
// Use a tryLock() to avoid contention in the real-time audio thread.
// If we fail to acquire the lock then the HTMLMediaElement must be in the
// middle of reconfiguring its playback engine, so we output s... | 10,077 |
14,424 | 0 | session_set_fds(Session *s, int fdin, int fdout, int fderr, int ignore_fderr,
int is_tty)
{
if (!compat20)
fatal("session_set_fds: called for proto != 2.0");
/*
* now that have a child and a pipe to the child,
* we can activate our channel and register the fd's
*/
if (s->chanid == -1)
fatal("no channel... | 10,078 |
100,609 | 0 | void VoiceInteractionOverlay::HideAnimation() {
animation_state_ = AnimationState::HIDDEN;
{
ui::ScopedLayerAnimationSettings settings(ripple_layer_->GetAnimator());
settings.SetTransitionDuration(
base::TimeDelta::FromMilliseconds(kHideDurationMs));
settings.SetTweenType(gfx::Tween::LINEAR_OUT... | 10,079 |
60,501 | 0 | int kvm_arch_create_vcpu_debugfs(struct kvm_vcpu *vcpu)
{
return 0;
}
| 10,080 |
120,051 | 0 | ~FileBrowserPrivateGetDriveFilesFunction() {
}
| 10,081 |
91,724 | 0 | int am_save_post(request_rec *r, const char **relay_state)
{
am_mod_cfg_rec *mod_cfg;
const char *content_type;
const char *charset;
const char *psf_id;
char *psf_name;
char *post_data;
apr_size_t post_data_len;
apr_size_t written;
apr_file_t *psf;
mod_cfg = am_get_mod_cfg(r->se... | 10,082 |
132,506 | 0 | UsbSetConfigurationFunction::UsbSetConfigurationFunction() {
}
| 10,083 |
149,700 | 0 | void ShowLocalBubble() {
controller()->ShowBubbleForLocalSave(CreditCard(),
base::Bind(&SaveCardCallback));
}
| 10,084 |
133,781 | 0 | bool SetClientSocketForSSL(SSL* ssl, SSLClientSocketOpenSSL* socket) {
return SSL_set_ex_data(ssl, ssl_socket_data_index_, socket) != 0;
}
| 10,085 |
36,989 | 0 | static __init bool allow_1_setting(u32 msr, u32 ctl)
{
u32 vmx_msr_low, vmx_msr_high;
rdmsr(msr, vmx_msr_low, vmx_msr_high);
return vmx_msr_high & ctl;
}
| 10,086 |
57,945 | 0 | static int nf_tables_commit(struct sk_buff *skb)
{
struct net *net = sock_net(skb->sk);
struct nft_trans *trans, *next;
struct nft_trans_elem *te;
/* Bump generation counter, invalidate any dump in progress */
while (++net->nft.base_seq == 0);
/* A new generation has just started */
net->nft.gencursor = gencur... | 10,087 |
109,577 | 0 | KURL Document::baseURI() const
{
return m_baseURL;
}
| 10,088 |
118,626 | 0 | void BlockLoop(base::WaitableEvent* completion, base::Callback<bool()> work) {
do {
completion->Wait();
} while (work.Run());
base::MessageLoop::current()->QuitNow();
}
| 10,089 |
83,191 | 0 | mrb_yield_cont(mrb_state *mrb, mrb_value b, mrb_value self, mrb_int argc, const mrb_value *argv)
{
struct RProc *p;
mrb_callinfo *ci;
if (mrb_nil_p(b)) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "no block given");
}
if (mrb_type(b) != MRB_TT_PROC) {
mrb_raise(mrb, E_TYPE_ERROR, "not a block");
}
p = mrb... | 10,090 |
112,887 | 0 | bool GDataCache::IsUnderGDataCacheDirectory(const FilePath& path) const {
return cache_root_path_ == path || cache_root_path_.IsParent(path);
}
| 10,091 |
31,557 | 0 | sctp_chunk_length_valid(struct sctp_chunk *chunk,
__u16 required_length)
{
__u16 chunk_length = ntohs(chunk->chunk_hdr->length);
if (unlikely(chunk_length < required_length))
return 0;
return 1;
}
| 10,092 |
35,835 | 0 | void sctp_chunk_assign_ssn(struct sctp_chunk *chunk)
{
struct sctp_datamsg *msg;
struct sctp_chunk *lchunk;
struct sctp_stream *stream;
__u16 ssn;
__u16 sid;
if (chunk->has_ssn)
return;
/* All fragments will be on the same stream */
sid = ntohs(chunk->subh.data_hdr->stream);
stream = &chunk->asoc->ssnmap->... | 10,093 |
178,429 | 1 | int ssl3_send_server_key_exchange(SSL *s)
{
#ifndef OPENSSL_NO_RSA
unsigned char *q;
int j, num;
RSA *rsa;
unsigned char md_buf[MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH];
unsigned int u;
#endif
#ifndef OPENSSL_NO_DH
DH *dh = NULL, *dhp;
#endif
#ifndef OPENSSL_NO_ECDH
EC_KEY *ecdh = NULL, *ecdhp;
unsigned char *encodedPoin... | 10,094 |
187,417 | 1 | int validate_camera_metadata_structure(const camera_metadata_t *metadata,
const size_t *expected_size) {
if (metadata == NULL) {
ALOGE("%s: metadata is null!", __FUNCTION__);
return ERROR;
}
// Check that the metadata pointer is well-aligned first.
{
static const struct {
const char *name;
size_t alignment;
} alignme... | 10,095 |
95,225 | 0 | static int list_cb(struct findall_data *data, void *rockp)
{
struct list_rock *rock = (struct list_rock *)rockp;
if (!data) {
if (!(rock->last_attributes & MBOX_ATTRIBUTE_HASCHILDREN))
rock->last_attributes |= MBOX_ATTRIBUTE_HASNOCHILDREN;
perform_output(NULL, NULL, rock);
re... | 10,096 |
121,737 | 0 | EmbeddedWorkerContextClient::~EmbeddedWorkerContextClient() {
DCHECK(g_worker_client_tls.Pointer()->Get() != NULL);
g_worker_client_tls.Pointer()->Set(NULL);
}
| 10,097 |
114,797 | 0 | __xmlIndentTreeOutput(void) {
if (IS_MAIN_THREAD)
return (&xmlIndentTreeOutput);
else
return (&xmlGetGlobalState()->xmlIndentTreeOutput);
}
| 10,098 |
80,980 | 0 | static bool nested_guest_cr0_valid(struct kvm_vcpu *vcpu, unsigned long val)
{
u64 fixed0 = to_vmx(vcpu)->nested.msrs.cr0_fixed0;
u64 fixed1 = to_vmx(vcpu)->nested.msrs.cr0_fixed1;
struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
if (to_vmx(vcpu)->nested.msrs.secondary_ctls_high &
SECONDARY_EXEC_UNRESTRICTED_GUEST &&
... | 10,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.