unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
142,189 | 0 | base::FilePath GetTeamDrivePath(const std::string& team_drive_name) {
return GetTeamDriveGrandRoot().Append(team_drive_name);
}
| 12,600 |
112,292 | 0 | bool ShellWindow::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(ShellWindow, message)
IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
}
| 12,601 |
82,823 | 0 | struct MACH0_(obj_t)* MACH0_(mach0_new)(const char* file, bool verbose) {
ut8 *buf;
struct MACH0_(obj_t) *bin;
if (!(bin = malloc (sizeof (struct MACH0_(obj_t))))) {
return NULL;
}
memset (bin, 0, sizeof (struct MACH0_(obj_t)));
bin->verbose = verbose;
bin->file = file;
if (!(buf = (ut8*)r_file_slurp (file, &... | 12,602 |
36,023 | 0 | static int ceph_x_encrypt(struct ceph_crypto_key *secret,
void *ibuf, int ilen, void *obuf, size_t olen)
{
struct ceph_x_encrypt_header head = {
.struct_v = 1,
.magic = cpu_to_le64(CEPHX_ENC_MAGIC)
};
size_t len = olen - sizeof(u32);
int ret;
ret = ceph_encrypt2(secret, obuf + sizeof(u32), &len,
&... | 12,603 |
117,003 | 0 | bool GestureSequence::Click(const TouchEvent& event,
const GesturePoint& point, Gestures* gestures) {
DCHECK(state_ == GS_PENDING_SYNTHETIC_CLICK);
if (point.IsInClickWindow(event)) {
AppendClickGestureEvent(point, gestures);
if (point.IsInDoubleClickWindow(event))
AppendDoubleClickGestureEvent(po... | 12,604 |
40,904 | 0 | static int json_integer_equal(json_t *integer1, json_t *integer2)
{
return json_integer_value(integer1) == json_integer_value(integer2);
}
| 12,605 |
9,619 | 0 | static zend_bool php_check_cancel_upload(php_session_rfc1867_progress *progress TSRMLS_DC) /* {{{ */
{
zval **progress_ary, **cancel_upload;
if (zend_symtable_find(Z_ARRVAL_P(PS(http_session_vars)), progress->key.c, progress->key.len+1, (void**)&progress_ary) != SUCCESS) {
return 0;
}
if (Z_TYPE_PP(progress_ary)... | 12,606 |
48,891 | 0 | void netdev_rx_csum_fault(struct net_device *dev)
{
if (net_ratelimit()) {
pr_err("%s: hw csum failure\n", dev ? dev->name : "<unknown>");
dump_stack();
}
}
| 12,607 |
3,936 | 0 | GBool CMYKGrayEncoder::fillBuf() {
int c0, c1, c2, c3;
int i;
if (eof) {
return gFalse;
}
c0 = str->getChar();
c1 = str->getChar();
c2 = str->getChar();
c3 = str->getChar();
if (c3 == EOF) {
eof = gTrue;
return gFalse;
}
i = (3 * c0 + 6 * c1 + c2) / 10 + c3;
if (i > 255) i = 255;
... | 12,608 |
42,174 | 0 | static inline int current_is_64bit(void)
{
/*
* We can't use test_thread_flag() here because we may be on an
* interrupt stack, and the thread flags don't get copied over
* from the thread_info on the main stack to the interrupt stack.
*/
return !test_ti_thread_flag(task_thread_info(current), TIF_32BIT);
}
| 12,609 |
138,820 | 0 | ~ScopedCommitStateResetter() {
if (!disabled_) {
render_frame_host_->set_nav_entry_id(0);
}
}
| 12,610 |
170,644 | 0 | int Effect_SetState(preproc_effect_t *effect, uint32_t state)
{
int status = 0;
ALOGV("Effect_SetState proc %d, new %d old %d", effect->procId, state, effect->state);
switch(state) {
case PREPROC_EFFECT_STATE_INIT:
switch(effect->state) {
case PREPROC_EFFECT_STATE_ACTIVE:
effect->ops->disable(effec... | 12,611 |
160,727 | 0 | void RenderFrameImpl::SetCustomURLLoaderFactory(
network::mojom::URLLoaderFactoryPtr factory) {
GetLoaderFactoryBundle()->SetDefaultFactory(std::move(factory));
}
| 12,612 |
111,314 | 0 | void WebPagePrivate::resumeRootLayerCommit()
{
if (!m_suspendRootLayerCommit)
return;
m_suspendRootLayerCommit = false;
m_needsCommit = true;
}
| 12,613 |
162,750 | 0 | void BaseRenderingContext2D::putImageData(ImageData* data,
int dx,
int dy,
int dirty_x,
int dirty_y,
int dirty... | 12,614 |
3,181 | 0 | zincludecolorspace(i_ctx_t * i_ctx_p)
{
os_ptr op = osp;
ref nsref;
int code;
check_type(*op, t_name);
name_string_ref(imemory, op, &nsref);
code = gs_includecolorspace(igs, nsref.value.const_bytes, r_size(&nsref));
if (!code)
pop(1);
return code;
}
| 12,615 |
169,420 | 0 | ResourceRequest CreateXHRRequestWithOrigin(const char* origin) {
ResourceRequest request = CreateXHRRequest("http://bar.com/simple_page.html");
request.site_for_cookies = GURL(origin);
request.headers.SetHeader(net::HttpRequestHeaders::kOrigin, origin);
return request;
}
| 12,616 |
109,801 | 0 | void Document::setBaseURLOverride(const KURL& url)
{
m_baseURLOverride = url;
updateBaseURL();
}
| 12,617 |
160,150 | 0 | void BackendIO::OpenEntry(const std::string& key, Entry** entry) {
operation_ = OP_OPEN;
key_ = key;
entry_ptr_ = entry;
}
| 12,618 |
153,577 | 0 | void GLES2Implementation::BufferDataHelper(GLenum target,
GLsizeiptr size,
const void* data,
GLenum usage) {
if (!ValidateSize("glBufferData", size))
return;
#if defined(MEMORY_SANITIZ... | 12,619 |
41,504 | 0 | static inline void dn_socket_format_entry(struct seq_file *seq, struct sock *sk)
{
struct dn_scp *scp = DN_SK(sk);
char buf1[DN_ASCBUF_LEN];
char buf2[DN_ASCBUF_LEN];
char local_object[DN_MAXOBJL+3];
char remote_object[DN_MAXOBJL+3];
dn_printable_object(&scp->addr, local_object);
dn_printable_object(&scp->peer,... | 12,620 |
37,788 | 0 | static int nested_svm_intercept_ioio(struct vcpu_svm *svm)
{
unsigned port, size, iopm_len;
u16 val, mask;
u8 start_bit;
u64 gpa;
if (!(svm->nested.intercept & (1ULL << INTERCEPT_IOIO_PROT)))
return NESTED_EXIT_HOST;
port = svm->vmcb->control.exit_info_1 >> 16;
size = (svm->vmcb->control.exit_info_1 & SVM_IO... | 12,621 |
112,633 | 0 | void DocumentLoader::addResponse(const ResourceResponse& r)
{
if (!m_stopRecordingResponses)
m_responses.append(r);
}
| 12,622 |
187,108 | 1 | void WebGL2RenderingContextBase::deleteVertexArray(
WebGLVertexArrayObject* vertex_array) {
if (isContextLost() || !vertex_array)
return;
if (!vertex_array->IsDefaultObject() &&
vertex_array == bound_vertex_array_object_)
SetBoundVertexArrayObject(nullptr);
vertex_array->DeleteObject(ContextGL());
}
| 12,623 |
171,400 | 0 | static void local_socket_destroy(asocket* s) {
apacket *p, *n;
int exit_on_close = s->exit_on_close;
D("LS(%d): destroying fde.fd=%d", s->id, s->fde.fd);
/* IMPORTANT: the remove closes the fd
** that belongs to this socket
*/
fdevent_remove(&s->fde);
/* dispose of any unwritten data */
for (... | 12,624 |
111,020 | 0 | void FileSystemOperation::DoWrite(scoped_ptr<net::URLRequest> blob_request) {
int file_flags = base::PLATFORM_FILE_OPEN |
base::PLATFORM_FILE_WRITE |
base::PLATFORM_FILE_ASYNC;
FileSystemOperationContext* write_context = new FileSystemOperationContext(
operation_context_... | 12,625 |
116,245 | 0 | void QQuickWebViewPrivate::didSameDocumentNavigation()
{
Q_Q(QQuickWebView);
q->emitUrlChangeIfNeeded();
emit q->navigationHistoryChanged();
}
| 12,626 |
38,226 | 0 | void requeue_futex(struct futex_q *q, struct futex_hash_bucket *hb1,
struct futex_hash_bucket *hb2, union futex_key *key2)
{
/*
* If key1 and key2 hash to the same bucket, no need to
* requeue.
*/
if (likely(&hb1->chain != &hb2->chain)) {
plist_del(&q->list, &hb1->chain);
hb_waiters_dec(hb1);
plist_... | 12,627 |
95,042 | 0 | http_write(const struct http *hp, int lvl, const char *pfx)
{
int l;
AZ(VSB_finish(hp->vsb));
vtc_dump(hp->vl, lvl, pfx, VSB_data(hp->vsb), VSB_len(hp->vsb));
l = write(hp->fd, VSB_data(hp->vsb), VSB_len(hp->vsb));
if (l != VSB_len(hp->vsb))
vtc_log(hp->vl, hp->fatal, "Write failed: (%d vs %d) %s",
l, VSB... | 12,628 |
37,218 | 0 | static void vmx_adjust_tsc_offset(struct kvm_vcpu *vcpu, s64 adjustment, bool host)
{
u64 offset = vmcs_read64(TSC_OFFSET);
vmcs_write64(TSC_OFFSET, offset + adjustment);
if (is_guest_mode(vcpu)) {
/* Even when running L2, the adjustment needs to apply to L1 */
to_vmx(vcpu)->nested.vmcs01_tsc_offset += adjustme... | 12,629 |
16,230 | 0 | GahpServer::uncacheProxy( GahpProxyInfo *gahp_proxy )
{
static const char *command = "UNCACHE_PROXY";
if (m_commands_supported->contains_anycase(command)==FALSE) {
return false;
}
std::string buf;
int x = sprintf(buf,"%s %d",command,gahp_proxy->proxy->id);
ASSERT( x > 0 );
write_line(buf.c_str());
Gahp_Ar... | 12,630 |
127,865 | 0 | static bool CheckMJpeg(const uint8* buffer, int buffer_size) {
RCHECK(buffer_size >= 16);
int offset = 0;
int last_restart = -1;
int num_codes = 0;
while (offset + 5 < buffer_size) {
RCHECK(buffer[offset] == 0xff);
uint8 code = buffer[offset + 1];
RCHECK(code >= 0xc0 || code == 1);
if (code ... | 12,631 |
95,020 | 0 | cmd_http_expect(CMD_ARGS)
{
struct http *hp;
const char *lhs;
char *cmp;
const char *rhs;
(void)cmd;
(void)vl;
CAST_OBJ_NOTNULL(hp, priv, HTTP_MAGIC);
assert(!strcmp(av[0], "expect"));
av++;
AN(av[0]);
AN(av[1]);
AN(av[2]);
AZ(av[3]);
lhs = cmd_var_resolve(hp, av[0]);
cmp = av[1];
rhs = cmd_var_resolv... | 12,632 |
12,031 | 0 | size_t rand_acquire_entropy_from_cpu(RAND_POOL *pool)
{
size_t bytes_needed;
unsigned char *buffer;
bytes_needed = rand_pool_bytes_needed(pool, 1 /*entropy_factor*/);
if (bytes_needed > 0) {
buffer = rand_pool_add_begin(pool, bytes_needed);
if (buffer != NULL) {
/* Whicheve... | 12,633 |
183,157 | 1 | init_ext2_xattr(void)
{
ext2_xattr_cache = mb_cache_create("ext2_xattr", 6);
if (!ext2_xattr_cache)
return -ENOMEM;
return 0;
}
| 12,634 |
68,478 | 0 | void fs_private_homedir(void) {
char *homedir = cfg.homedir;
char *private_homedir = cfg.home_private;
assert(homedir);
assert(private_homedir);
int xflag = store_xauthority();
int aflag = store_asoundrc();
uid_t u = getuid();
gid_t g = getgid();
struct stat s;
if (stat(homedir, &s) == -1) {
fprintf(std... | 12,635 |
54,292 | 0 | SPL_METHOD(SplDoublyLinkedList, valid)
{
spl_dllist_object *intern = Z_SPLDLLIST_P(getThis());
if (zend_parse_parameters_none() == FAILURE) {
return;
}
RETURN_BOOL(intern->traverse_pointer != NULL);
}
| 12,636 |
26,490 | 0 | static void pmcraid_reinit_cmdblk(struct pmcraid_cmd *cmd)
{
pmcraid_init_cmdblk(cmd, -1);
}
| 12,637 |
8,906 | 0 | void vrend_renderer_get_rect(int res_handle, struct iovec *iov, unsigned int num_iovs,
uint32_t offset, int x, int y, int width, int height)
{
struct vrend_resource *res = vrend_resource_lookup(res_handle, 0);
struct vrend_transfer_info transfer_info;
struct pipe_box box;
int el... | 12,638 |
23,804 | 0 | static void macvlan_ethtool_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *drvinfo)
{
snprintf(drvinfo->driver, 32, "macvlan");
snprintf(drvinfo->version, 32, "0.1");
}
| 12,639 |
161,004 | 0 | void ChromeClientImpl::SetNeedsLowLatencyInput(LocalFrame* frame,
bool needs_low_latency) {
DCHECK(frame);
WebLocalFrameImpl* web_frame = WebLocalFrameImpl::FromFrame(frame);
WebFrameWidgetBase* widget = web_frame->LocalRoot()->FrameWidget();
if (!widget)
retur... | 12,640 |
58,573 | 0 | SECURITY_STATUS SEC_ENTRY ApplyControlToken(PCtxtHandle phContext, PSecBufferDesc pInput)
{
return SEC_E_OK;
}
| 12,641 |
77,833 | 0 | bson_iter_find_case (bson_iter_t *iter, /* INOUT */
const char *key) /* IN */
{
BSON_ASSERT (iter);
BSON_ASSERT (key);
while (bson_iter_next (iter)) {
if (!bson_strcasecmp (key, bson_iter_key (iter))) {
return true;
}
}
return false;
}
| 12,642 |
28,197 | 0 | static av_cold int rpza_decode_init(AVCodecContext *avctx)
{
RpzaContext *s = avctx->priv_data;
s->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_RGB555;
avcodec_get_frame_defaults(&s->frame);
return 0;
}
| 12,643 |
173,902 | 0 | const Chapters::Atom* Chapters::Edition::GetAtom(int index) const {
if (index < 0)
return NULL;
if (index >= m_atoms_count)
return NULL;
return m_atoms + index;
}
| 12,644 |
74,064 | 0 | dwarf_get_elf(Dwarf_Debug dbg, dwarf_elf_handle * elf,
Dwarf_Error * error)
{
struct Dwarf_Obj_Access_Interface_s * obj = 0;
if (dbg == NULL) {
_dwarf_error(NULL, error, DW_DLE_DBG_NULL);
return (DW_DLV_ERROR);
}
obj = dbg->de_obj_file;
if (obj) {
dwarf_elf_object_access... | 12,645 |
93,529 | 0 | static int ip6mr_forward2(struct net *net, struct mr6_table *mrt,
struct sk_buff *skb, struct mfc6_cache *c, int vifi)
{
struct ipv6hdr *ipv6h;
struct mif_device *vif = &mrt->vif6_table[vifi];
struct net_device *dev;
struct dst_entry *dst;
struct flowi6 fl6;
if (!vif->dev)
goto out_free;
#ifdef CONFIG_IP... | 12,646 |
50,630 | 0 | static int srpt_ch_qp_rtr(struct srpt_rdma_ch *ch, struct ib_qp *qp)
{
struct ib_qp_attr qp_attr;
int attr_mask;
int ret;
qp_attr.qp_state = IB_QPS_RTR;
ret = ib_cm_init_qp_attr(ch->cm_id, &qp_attr, &attr_mask);
if (ret)
goto out;
qp_attr.max_dest_rd_atomic = 4;
ret = ib_modify_qp(qp, &qp_attr, attr_mask);... | 12,647 |
36,066 | 0 | static void udf_update_extents(struct inode *inode,
struct kernel_long_ad laarr[EXTENT_MERGE_SIZE],
int startnum, int endnum,
struct extent_position *epos)
{
int start = 0, i;
struct kernel_lb_addr tmploc;
uint32_t tmplen;
if (startnum > endnum) {
for (i = 0; i < (startnum - endnum)... | 12,648 |
23,957 | 0 | static int airo_get_power(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *vwrq,
char *extra)
{
struct airo_info *local = dev->ml_priv;
__le16 mode;
readConfigRid(local, 1);
mode = local->config.powerSaveMode;
if ((vwrq->disabled = (mode == POWERSAVE_CAM)))
return 0;
if ((v... | 12,649 |
96,661 | 0 | MagickExport MagickOffsetType TellBlob(const Image *image)
{
BlobInfo
*magick_restrict blob_info;
MagickOffsetType
offset;
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",im... | 12,650 |
2,299 | 0 | _PUBLIC_ void string_replace_m(char *s, char oldc, char newc)
{
struct smb_iconv_handle *ic = get_iconv_handle();
while (s && *s) {
size_t size;
codepoint_t c = next_codepoint_handle(ic, s, &size);
if (c == oldc) {
*s = newc;
}
s += size;
}
}
| 12,651 |
123,674 | 0 | void GpuCommandBufferStub::OnSetClientHasMemoryAllocationChangedCallback(
bool has_callback) {
TRACE_EVENT0(
"gpu",
"GpuCommandBufferStub::OnSetClientHasMemoryAllocationChangedCallback");
if (has_callback) {
GetMemoryManager()->AddClient(
this,
surface_id_ != 0,
true,
... | 12,652 |
10,538 | 0 | retr_rate (wgint bytes, double secs)
{
static char res[20];
static const char *rate_names[] = {"B/s", "KB/s", "MB/s", "GB/s" };
static const char *rate_names_bits[] = {"b/s", "Kb/s", "Mb/s", "Gb/s" };
int units;
double dlrate = calc_rate (bytes, secs, &units);
/* Use more digits for smaller numbers (regard... | 12,653 |
61,263 | 0 | EXPORTED void mboxlist_done(void)
{
/* DB->done() handled by cyrus_done() */
}
| 12,654 |
178,500 | 1 | static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value,
BN_GENCB *cb)
{
BIGNUM *r0 = NULL, *r1 = NULL, *r2 = NULL, *r3 = NULL, *tmp;
BIGNUM local_r0, local_d, local_p;
BIGNUM *pr0, *d, *p;
int bitsp, bitsq, ok = -1, n = 0;
BN_CTX *ctx = NULL;
unsigned lon... | 12,655 |
60,000 | 0 | static int snd_usb_mixer_controls(struct usb_mixer_interface *mixer)
{
struct mixer_build state;
int err;
const struct usbmix_ctl_map *map;
void *p;
memset(&state, 0, sizeof(state));
state.chip = mixer->chip;
state.mixer = mixer;
state.buffer = mixer->hostif->extra;
state.buflen = mixer->hostif->extralen;
/... | 12,656 |
35,349 | 0 | static void ipip_tunnel_link(struct ipip_net *ipn, struct ip_tunnel *t)
{
struct ip_tunnel __rcu **tp = ipip_bucket(ipn, t);
rcu_assign_pointer(t->next, rtnl_dereference(*tp));
rcu_assign_pointer(*tp, t);
}
| 12,657 |
141,110 | 0 | bool Document::HasValidNamespaceForElements(const QualifiedName& q_name) {
if (!q_name.Prefix().IsEmpty() && q_name.NamespaceURI().IsNull())
return false;
if (q_name.Prefix() == g_xml_atom &&
q_name.NamespaceURI() != xml_names::kNamespaceURI)
return false;
if (q_name.Prefix() == g_xmlns_atom ||
... | 12,658 |
120,863 | 0 | void OneClickSigninSyncStarter::ConfirmAndSignin() {
SigninManager* signin = SigninManagerFactory::GetForProfile(profile_);
if (confirmation_required_ == CONFIRM_UNTRUSTED_SIGNIN) {
EnsureBrowser();
browser_->window()->ShowOneClickSigninBubble(
BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_SAML_MODAL_... | 12,659 |
178,293 | 1 | my_object_str_hash_len (MyObject *obj, GHashTable *table, guint *len, GError **error)
{
*len = 0;
g_hash_table_foreach (table, hash_foreach, len);
return TRUE;
}
| 12,660 |
39,496 | 0 | static int wanxl_puts_command(card_t *card, u32 cmd)
{
unsigned long timeout = jiffies + 5 * HZ;
writel(cmd, card->plx + PLX_MAILBOX_1);
do {
if (readl(card->plx + PLX_MAILBOX_1) == 0)
return 0;
schedule();
}while (time_after(timeout, jiffies));
return -1;
}
| 12,661 |
51,533 | 0 | static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
{
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *skb1;
u32 seq, end_seq;
tcp_ecn_check_ce(tp, skb);
if (unlikely(tcp_try_rmem_schedule(sk, skb, skb->truesize))) {
NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPOFODROP);
tcp_drop(sk, skb);
re... | 12,662 |
1,379 | 0 | XcursorImageDestroy (XcursorImage *image)
{
free (image);
}
| 12,663 |
62,400 | 0 | unaligned_memcpy(void *p, const void *q, size_t l)
{
memcpy(p, q, l);
}
| 12,664 |
32,330 | 0 | static inline int check_mnt(struct mount *mnt)
{
return mnt->mnt_ns == current->nsproxy->mnt_ns;
}
| 12,665 |
156,426 | 0 | PageHandler::~PageHandler() {
}
| 12,666 |
52,109 | 0 | long get_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm,
unsigned long start, unsigned long nr_pages,
int write, int force, struct page **pages,
struct vm_area_struct **vmas)
{
return __get_user_pages_locked(tsk, mm, start, nr_pages, write, force,
pages, vmas, NULL, false,
... | 12,667 |
84,051 | 0 | static void rewrite_nalus_list(GF_List *nalus, GF_BitStream *bs, Bool rewrite_start_codes, u32 nal_unit_size_field)
{
u32 i, count = gf_list_count(nalus);
for (i=0; i<count; i++) {
GF_AVCConfigSlot *sl = (GF_AVCConfigSlot*)gf_list_get(nalus, i);
if (rewrite_start_codes) gf_bs_write_u32(bs, 1);
else gf_bs_write_... | 12,668 |
72,151 | 0 | static bool _step_is_starting(uint32_t job_id, uint32_t step_id)
{
starting_step_t starting_step;
starting_step.job_id = job_id;
starting_step.step_id = step_id;
bool ret = false;
slurm_mutex_lock(&conf->starting_steps_lock);
if (list_find_first( conf->starting_steps,
&_compare_starting_steps,
... | 12,669 |
154,968 | 0 | void WebGLRenderingContextBase::OnBeforeDrawCall() {
ClearIfComposited();
MarkContextChanged(kCanvasChanged);
}
| 12,670 |
176,318 | 0 | static Maybe<int64_t> IndexOfValueSlowPath(Isolate* isolate,
Handle<JSObject> receiver,
Handle<Object> value,
uint32_t start_from,
uint32_t length) {
for (uint32_t k = start_from; k < length; ++k) {
LookupIterator it(isolate, receiver, k);
if (!it.IsFound()) {
continue;
}
Handle<Object> element_k;
ASSIGN_... | 12,671 |
57,498 | 0 | void ext4_da_update_reserve_space(struct inode *inode,
int used, int quota_claim)
{
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
struct ext4_inode_info *ei = EXT4_I(inode);
int mdb_free = 0, allocated_meta_blocks = 0;
spin_lock(&ei->i_block_reservation_lock);
trace_ext4_da_update_reserve_space(inode, use... | 12,672 |
14,015 | 0 | gs_lib_ctx_t *gs_lib_ctx_get_interp_instance(const gs_memory_t *mem)
{
if (mem == NULL)
return NULL;
return mem->gs_lib_ctx;
}
| 12,673 |
135,120 | 0 | DEFINE_TRACE(Document)
{
#if ENABLE(OILPAN)
visitor->trace(m_importsController);
visitor->trace(m_docType);
visitor->trace(m_implementation);
visitor->trace(m_autofocusElement);
visitor->trace(m_focusedElement);
visitor->trace(m_hoverNode);
visitor->trace(m_activeHoverElement);
visitor->... | 12,674 |
66,588 | 0 | static struct port *find_port_by_vtermno(u32 vtermno)
{
struct port *port;
struct console *cons;
unsigned long flags;
spin_lock_irqsave(&pdrvdata_lock, flags);
list_for_each_entry(cons, &pdrvdata.consoles, list) {
if (cons->vtermno == vtermno) {
port = container_of(cons, struct port, cons);
goto out;
}
... | 12,675 |
72,532 | 0 | rb_event_is_commit(struct ring_buffer_per_cpu *cpu_buffer,
struct ring_buffer_event *event)
{
unsigned long addr = (unsigned long)event;
unsigned long index;
index = rb_event_index(event);
addr &= PAGE_MASK;
return cpu_buffer->commit_page->page == (void *)addr &&
rb_commit_index(cpu_buffer) == index;
}
| 12,676 |
6,511 | 0 | _bdf_list_join( _bdf_list_t* list,
int c,
unsigned long *alen )
{
unsigned long i, j;
char *fp, *dp;
*alen = 0;
if ( list == 0 || list->used == 0 )
return 0;
dp = list->field[0];
for ( i = j = 0; i < list->used; i++ )
... | 12,677 |
126,726 | 0 | void BrowserView::ConfirmBrowserCloseWithPendingDownloads() {
DownloadInProgressDialogView::Show(browser_.get(), GetNativeWindow());
}
| 12,678 |
128,178 | 0 | base::WaitableEvent* event() { return event_.get(); }
| 12,679 |
9,626 | 0 | static int php_session_decode(const char *val, int vallen TSRMLS_DC) /* {{{ */
{
if (!PS(serializer)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown session.serialize_handler. Failed to decode session object");
return FAILURE;
}
if (PS(serializer)->decode(val, vallen TSRMLS_CC) == FAILURE) {
php_sessio... | 12,680 |
13,861 | 0 | ZEND_METHOD(CURLFile, getMimeType)
{
curlfile_get_property("mime", INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
| 12,681 |
101,205 | 0 | void ProcessCommitResponseCommand::ModelChangingExecuteImpl(
SyncSession* session) {
ProcessCommitResponse(session);
ExtensionsActivityMonitor* monitor = session->context()->extensions_monitor();
if (session->status_controller()->HasBookmarkCommitActivity() &&
session->status_controller()->syncer_status... | 12,682 |
37,086 | 0 | static int handle_rmode_exception(struct kvm_vcpu *vcpu,
int vec, u32 err_code)
{
/*
* Instruction with address size override prefix opcode 0x67
* Cause the #SS fault with 0 error code in VM86 mode.
*/
if (((vec == GP_VECTOR) || (vec == SS_VECTOR)) && err_code == 0) {
if (emulate_instruction(vcpu, 0) ==... | 12,683 |
59,204 | 0 | static int shash_update_unaligned(struct shash_desc *desc, const u8 *data,
unsigned int len)
{
struct crypto_shash *tfm = desc->tfm;
struct shash_alg *shash = crypto_shash_alg(tfm);
unsigned long alignmask = crypto_shash_alignmask(tfm);
unsigned int unaligned_len = alignmask + 1 -
((unsigned long)dat... | 12,684 |
119,779 | 0 | NavigationControllerImpl::GetSessionStorageNamespaceMap() const {
return session_storage_namespace_map_;
}
| 12,685 |
22,563 | 0 | static void sched_rt_avg_update(struct rq *rq, u64 rt_delta)
{
rq->rt_avg += rt_delta;
sched_avg_update(rq);
}
| 12,686 |
44,173 | 0 | CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
const unsigned char *key, size_t keylen,
unsigned int flags)
{
CMS_ContentInfo *cms;
if (!cipher)
{
CMSerr(CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT, CMS_R_NO_CIPHER);
return NULL;
}
cms = CMS_ContentInfo_new();
if (!cms)
retur... | 12,687 |
45,766 | 0 | static int crypto_rfc4543_setkey(struct crypto_aead *parent, const u8 *key,
unsigned int keylen)
{
struct crypto_rfc4543_ctx *ctx = crypto_aead_ctx(parent);
struct crypto_aead *child = ctx->child;
int err;
if (keylen < 4)
return -EINVAL;
keylen -= 4;
memcpy(ctx->nonce, key + keylen, 4);
crypto_aead_cle... | 12,688 |
12,275 | 0 | gpgsm_keylist (void *engine, const char *pattern, int secret_only,
gpgme_keylist_mode_t mode)
{
engine_gpgsm_t gpgsm = engine;
char *line;
gpgme_error_t err;
int list_mode = 0;
if (mode & GPGME_KEYLIST_MODE_LOCAL)
list_mode |= 1;
if (mode & GPGME_KEYLIST_MODE_EXTERN)
list_mode |= 2;
if (... | 12,689 |
25,340 | 0 | static int vfp_get(struct task_struct *target,
const struct user_regset *regset,
unsigned int pos, unsigned int count,
void *kbuf, void __user *ubuf)
{
int ret;
struct thread_info *thread = task_thread_info(target);
struct vfp_hard_struct const *vfp = &thread->vfpstate.hard;
const size_t user_fpregs_... | 12,690 |
48,195 | 0 | DECLAREcpFunc(cpContigTiles2ContigTiles)
{
return cpImage(in, out,
readContigTilesIntoBuffer,
writeBufferToContigTiles,
imagelength, imagewidth, spp);
}
| 12,691 |
45,737 | 0 | static void crypto_gcm_free(struct crypto_instance *inst)
{
struct gcm_instance_ctx *ctx = crypto_instance_ctx(inst);
crypto_drop_skcipher(&ctx->ctr);
crypto_drop_ahash(&ctx->ghash);
kfree(inst);
}
| 12,692 |
100,943 | 0 | ScriptableHandle::~ScriptableHandle() {
PLUGIN_PRINTF(("ScriptableHandle::~ScriptableHandle (this=%p)\n",
static_cast<void*>(this)));
if (NULL == g_ValidHandles) {
return;
}
g_ValidHandles->erase(this);
if (desc_handle_ != NULL) {
PLUGIN_PRINTF(("ScriptableHandle::~ScriptableHandle "
... | 12,693 |
6,996 | 0 | tt_sbit_decoder_load_bit_aligned( TT_SBitDecoder decoder,
FT_Byte* p,
FT_Byte* limit,
FT_Int x_pos,
FT_Int y_pos )
{
FT_Error error ... | 12,694 |
129,545 | 0 | void AudioParam::connect(AudioNodeOutput* output)
{
ASSERT(context()->isGraphOwner());
ASSERT(output);
if (!output)
return;
if (m_outputs.contains(output))
return;
output->addParam(this);
m_outputs.add(output);
changedOutputs();
}
| 12,695 |
48,498 | 0 | static void start_unregistering(struct ctl_table_header *p)
{
/*
* if p->used is 0, nobody will ever touch that entry again;
* we'll eliminate all paths to it before dropping sysctl_lock
*/
if (unlikely(p->used)) {
struct completion wait;
init_completion(&wait);
p->unregistering = &wait;
spin_unlock(&sy... | 12,696 |
10,060 | 0 | event_font_change( int delta )
{
int num_indices;
if ( status.font_index + delta >= handle->num_fonts ||
status.font_index + delta < 0 )
return;
status.font_index += delta;
FTDemo_Set_Current_Font( handle, handle->fonts[status.font_index] );
FTDemo_Set_Curre... | 12,697 |
59,597 | 0 | launchTests(testDescPtr tst) {
int res = 0, err = 0;
size_t i;
char *result;
char *error;
int mem;
if (tst == NULL) return(-1);
if (tst->in != NULL) {
glob_t globbuf;
globbuf.gl_offs = 0;
glob(tst->in, GLOB_DOOFFS, NULL, &globbuf);
for (i = 0;i < globbuf.gl_pathc;i++) {
if (!check... | 12,698 |
105,706 | 0 | InputMethodLibrary* InputMethodLibrary::GetImpl(bool stub) {
if (stub) {
return new InputMethodLibraryStubImpl();
} else {
InputMethodLibraryImpl* impl = new InputMethodLibraryImpl();
if (!impl->Init()) {
LOG(ERROR) << "Failed to initialize InputMethodLibraryImpl";
}
return impl;
}
}
| 12,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.