unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
149,377 | 0 | bool CheckClientDownloadRequest::IsSupportedDownload(
const download::DownloadItem& item,
const base::FilePath& target_path,
DownloadCheckResultReason* reason,
ClientDownloadRequest::DownloadType* type) {
if (item.GetUrlChain().empty()) {
*reason = REASON_EMPTY_URL_CHAIN;
return false;
}
c... | 2,000 |
29,913 | 0 | ssize_t proc_gid_map_write(struct file *file, const char __user *buf, size_t size, loff_t *ppos)
{
struct seq_file *seq = file->private_data;
struct user_namespace *ns = seq->private;
struct user_namespace *seq_ns = seq_user_ns(seq);
if (!ns->parent)
return -EPERM;
if ((seq_ns != ns) && (seq_ns != ns->parent))... | 2,001 |
82,577 | 0 | void jswrap_graphics_init() {
#ifdef USE_LCD_FSMC
JsVar *parent = jspNewObject("LCD", "Graphics");
if (parent) {
JsVar *parentObj = jsvSkipName(parent);
JsGraphics gfx;
graphicsStructInit(&gfx);
gfx.data.type = JSGRAPHICSTYPE_FSMC;
gfx.graphicsVar = parentObj;
gfx.data.width = 320;
gfx.d... | 2,002 |
159,825 | 0 | static bool IsSlash(UChar c) {
return (c == '/' || c == '\\');
}
| 2,003 |
101,796 | 0 | void Browser::Search() {
const GURL& url = GetSelectedTabContents()->GetURL();
if (url.SchemeIs(chrome::kChromeUIScheme) &&
url.host() == chrome::kChromeUINewTabHost) {
CloseTab();
return;
}
if (window_->IsFullscreen()) {
ToggleFullscreenMode();
MessageLoop::current()->PostTask(
F... | 2,004 |
41,435 | 0 | static int ovl_readlink(struct dentry *dentry, char __user *buf, int bufsiz)
{
struct path realpath;
struct inode *realinode;
ovl_path_real(dentry, &realpath);
realinode = realpath.dentry->d_inode;
if (!realinode->i_op->readlink)
return -EINVAL;
touch_atime(&realpath);
return realinode->i_op->readlink(real... | 2,005 |
48,683 | 0 | static void *session_realloc(void *p, size_t size, void *ctx)
{
h2_session *session = ctx;
ap_log_cerror(APLOG_MARK, APLOG_TRACE6, 0, session->c,
"h2_session(%ld): realloc(%ld)",
session->id, (long)size);
return realloc(p, size);
}
| 2,006 |
137,098 | 0 | void InputType::SanitizeValueInResponseToMinOrMaxAttributeChange() {}
| 2,007 |
174,524 | 0 | dhcp_message_add_addr(struct dhcp_message *dhcp,
uint8_t type, struct in_addr addr)
{
uint8_t *p;
size_t len;
p = dhcp->options;
while (*p != DHO_END) {
p++;
p += *p + 1;
}
len = p - (uint8_t *)dhcp;
if (len + 6 > sizeof(*dhcp)) {
errno = ENOMEM;
return -1;
}
PUTADDR(type, addr);
*p = DHO_END;
ret... | 2,008 |
18,115 | 0 | pango_glyph_string_copy (PangoGlyphString *string)
{
PangoGlyphString *new_string;
if (string == NULL)
return NULL;
new_string = g_slice_new (PangoGlyphString);
*new_string = *string;
new_string->glyphs = g_memdup (string->glyphs,
string->space * sizeof (PangoGlyphInfo));
new_string->log_clus... | 2,009 |
64,743 | 0 | int dns_packet_read(DnsPacket *p, size_t sz, const void **ret, size_t *start) {
assert(p);
if (p->rindex + sz > p->size)
return -EMSGSIZE;
if (ret)
*ret = (uint8_t*) DNS_PACKET_DATA(p) + p->rindex;
if (start)
*start = p->rindex;
... | 2,010 |
50,168 | 0 | static void alloc_globals_dtor(zend_alloc_globals *alloc_globals)
{
zend_mm_shutdown(alloc_globals->mm_heap, 1, 1);
}
| 2,011 |
84,238 | 0 | selaReadStream(FILE *fp)
{
l_int32 i, n, version;
SEL *sel;
SELA *sela;
PROCNAME("selaReadStream");
if (!fp)
return (SELA *)ERROR_PTR("stream not defined", procName, NULL);
if (fscanf(fp, "\nSela Version %d\n", &version) != 1)
return (SELA *)ERROR_PTR("not a sela file", procName,... | 2,012 |
33,554 | 0 | static inline void shmem_unacct_blocks(unsigned long flags, long pages)
{
if (flags & VM_NORESERVE)
vm_unacct_memory(pages * VM_ACCT(PAGE_CACHE_SIZE));
}
| 2,013 |
118,236 | 0 | views::View* AutofillDialogViews::GetNotificationAreaForTesting() {
return notification_area_;
}
| 2,014 |
154,908 | 0 | ~ScopedUnpackStateButAlignmentReset() {
if (skip_pixels_ != 0) {
api_->glPixelStoreiFn(GL_UNPACK_SKIP_PIXELS, skip_pixels_);
}
if (skip_rows_ != 0) {
api_->glPixelStoreiFn(GL_UNPACK_SKIP_ROWS, skip_rows_);
}
if (skip_images_ != 0) {
api_->glPixelStoreiFn(GL_UNPACK_SKIP_IMAGES, sk... | 2,015 |
176,284 | 0 | static Handle<Object> GetInternalImpl(Handle<JSObject> holder,
uint32_t entry) {
return Subclass::GetImpl(holder->GetIsolate(), holder->elements(), entry);
}
| 2,016 |
46,520 | 0 | int test_probable_prime_coprime(BIO *bp, BN_CTX *ctx)
{
int i, j, ret = 0;
BIGNUM r;
BN_ULONG primes[5] = { 2, 3, 5, 7, 11 };
BN_init(&r);
for (i = 0; i < 1000; i++)
{
if (!bn_probable_prime_dh_coprime(&r, 1024, ctx)) goto err;
for (j = 0; j < 5; j++)
{
if (BN_mod_word(&r, primes[j]) == 0)
{... | 2,017 |
73,343 | 0 | void ass_frame_unref(ASS_Image *img)
{
if (!img || --((ASS_ImagePriv *) img)->ref_count)
return;
do {
ASS_ImagePriv *priv = (ASS_ImagePriv *) img;
img = img->next;
if (priv->source)
ass_cache_dec_ref(priv->source);
else
ass_aligned_free(priv->resul... | 2,018 |
282 | 0 | cluster_unintern (struct cluster_list *cluster)
{
if (cluster->refcnt)
cluster->refcnt--;
if (cluster->refcnt == 0)
{
hash_release (cluster_hash, cluster);
cluster_free (cluster);
}
}
| 2,019 |
168,352 | 0 | void BrowserView::SetIntentPickerViewVisibility(bool visible) {
LocationBarView* location_bar = GetLocationBarView();
if (!location_bar->intent_picker_view())
return;
if (location_bar->intent_picker_view()->visible() != visible) {
location_bar->intent_picker_view()->SetVisible(visible);
location_bar... | 2,020 |
179,803 | 1 | static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
struct sctp_association *assoc,
sctp_socket_type_t type)
{
struct sctp_sock *oldsp = sctp_sk(oldsk);
struct sctp_sock *newsp = sctp_sk(newsk);
struct sctp_bind_bucket *pp; /* hash list port iterator */
struct sctp_endpoint *newep = newsp->ep;
struct ... | 2,021 |
123,071 | 0 | bool RenderWidgetHostImpl::TryGetBackingStore(const gfx::Size& desired_size,
BackingStore** backing_store) {
if (view_->HasAcceleratedSurface(desired_size)) {
*backing_store = NULL;
return true;
}
*backing_store = BackingStoreManager::GetBackingStore(this, de... | 2,022 |
39,632 | 0 | static int futex_proxy_trylock_atomic(u32 __user *pifutex,
struct futex_hash_bucket *hb1,
struct futex_hash_bucket *hb2,
union futex_key *key1, union futex_key *key2,
struct futex_pi_state **ps, int set_waiters)
{
struct futex_q *top_waiter = NULL;
u32 curval;
int ret;
if (get_futex_value_locke... | 2,023 |
178,780 | 1 | static struct page *alloc_huge_page(struct vm_area_struct *vma,
unsigned long addr, int avoid_reserve)
{
struct hstate *h = hstate_vma(vma);
struct page *page;
struct address_space *mapping = vma->vm_file->f_mapping;
struct inode *inode = mapping->host;
long chg;
/*
* Processes that did not create the mapping will... | 2,024 |
91,777 | 0 | void comps_objmrtree_set_n(COMPS_ObjMRTree *rt, char *key,
size_t len, void *ndata) {
__comps_objmrtree_set(rt, key, len, ndata);
}
| 2,025 |
179,262 | 1 | int ext4_orphan_del(handle_t *handle, struct inode *inode)
{
struct list_head *prev;
struct ext4_inode_info *ei = EXT4_I(inode);
struct ext4_sb_info *sbi;
__u32 ino_next;
struct ext4_iloc iloc;
int err = 0;
if (!EXT4_SB(inode->i_sb)->s_journal)
return 0;
mutex_lock(&EXT4_SB(inode->i_sb)->s_orphan_lock);
if (list_emp... | 2,026 |
175,409 | 0 | status_t SampleTable::setTimeToSampleParams(
off64_t data_offset, size_t data_size) {
if (mHasTimeToSample || data_size < 8) {
return ERROR_MALFORMED;
}
uint8_t header[8];
if (mDataSource->readAt(
data_offset, header, sizeof(header)) < (ssize_t)sizeof(header)) {
return ERROR_IO;
}
if (U32_AT(... | 2,027 |
182,290 | 1 | int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
{
MOVMuxContext *mov = s->priv_data;
AVIOContext *pb = s->pb;
MOVTrack *trk = &mov->tracks[pkt->stream_index];
AVCodecParameters *par = trk->par;
unsigned int samples_in_chunk = 0;
int size = pkt->size, ret = 0;
uint8_t *reformatted_... | 2,028 |
153,996 | 0 | GLsync GLES2DecoderImpl::DoFenceSync(GLenum condition, GLbitfield flags) {
const char* function_name = "glFenceSync";
if (condition != GL_SYNC_GPU_COMMANDS_COMPLETE) {
LOCAL_SET_GL_ERROR(GL_INVALID_ENUM, function_name, "invalid condition");
return 0;
}
if (flags != 0) {
LOCAL_SET_GL_ERROR(GL_INVALID... | 2,029 |
80,929 | 0 | static inline u16 evmcs_read16(unsigned long field) { return 0; }
| 2,030 |
93,610 | 0 | nvmet_fc_free_ls_iodlist(struct nvmet_fc_tgtport *tgtport)
{
struct nvmet_fc_ls_iod *iod = tgtport->iod;
int i;
for (i = 0; i < NVMET_LS_CTX_COUNT; iod++, i++) {
fc_dma_unmap_single(tgtport->dev,
iod->rspdma, NVME_FC_MAX_LS_BUFFER_SIZE,
DMA_TO_DEVICE);
kfree(iod->rqstbuf);
list_del(&iod->ls_list);
}
... | 2,031 |
101,031 | 0 | UsageTracker* QuotaManager::GetUsageTracker(StorageType type) const {
switch (type) {
case kStorageTypeTemporary:
return temporary_usage_tracker_.get();
case kStorageTypePersistent:
return persistent_usage_tracker_.get();
default:
NOTREACHED();
}
return NULL;
}
| 2,032 |
119,587 | 0 | static inline InlineBox* createInlineBoxForRenderer(RenderObject* obj, bool isRootLineBox, bool isOnlyRun = false)
{
if (isRootLineBox)
return toRenderBlock(obj)->createAndAppendRootInlineBox();
if (obj->isText()) {
InlineTextBox* textBox = toRenderText(obj)->createInlineTextBox();
if (... | 2,033 |
126,034 | 0 | PasswordStoreLoginsChangedObserver::PasswordStoreLoginsChangedObserver(
AutomationProvider* automation,
IPC::Message* reply_message,
PasswordStoreChange::Type expected_type,
const std::string& result_key)
: automation_(automation->AsWeakPtr()),
reply_message_(reply_message),
expected_typ... | 2,034 |
142,902 | 0 | void HTMLMediaElement::SetNetworkState(NetworkState state) {
if (network_state_ == state)
return;
network_state_ = state;
if (GetMediaControls())
GetMediaControls()->NetworkStateChanged();
}
| 2,035 |
717 | 0 | int dns_dn_label_to_str(const char *dn, int dn_len, char *str, int str_len)
{
char *ptr;
int i, sz;
if (str_len < dn_len - 1)
return -1;
ptr = str;
for (i = 0; i < dn_len-1; ++i) {
sz = dn[i];
if (i)
*ptr++ = '.';
memcpy(ptr, dn+i+1, sz);
ptr += sz;
i += sz;
}
*ptr++ = '\0';
return (ptr - str... | 2,036 |
73,751 | 0 | smb_ofile_close_and_next(smb_ofile_t *of)
{
smb_ofile_t *next_of;
smb_tree_t *tree;
ASSERT(of);
ASSERT(of->f_magic == SMB_OFILE_MAGIC);
mutex_enter(&of->f_mutex);
switch (of->f_state) {
case SMB_OFILE_STATE_OPEN:
/* The file is still open. */
of->f_refcnt++;
ASSERT(of->f_refcnt);
tree = of->f_tree;
m... | 2,037 |
87,960 | 0 | static inline void next_request(blk_status_t err)
{
unsigned long saved_flags;
spin_lock_irqsave(&pcd_lock, saved_flags);
if (!blk_update_request(pcd_req, err, blk_rq_cur_bytes(pcd_req))) {
__blk_mq_end_request(pcd_req, err);
pcd_req = NULL;
}
pcd_busy = 0;
pcd_request();
spin_unlock_irqrestore(&pcd_lock, s... | 2,038 |
111,562 | 0 | static JSValueRef touchCancelCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
notImplemented();
return JSValueMakeUndefined(context);
}
| 2,039 |
178,100 | 1 | static int mptsas_process_scsi_io_request(MPTSASState *s,
MPIMsgSCSIIORequest *scsi_io,
hwaddr addr)
{
MPTSASRequest *req;
MPIMsgSCSIIOReply reply;
SCSIDevice *sdev;
int status;
mptsas_fix_scsi_io_endianness(scsi_io);
trace_mptsas_process_scsi_io_request(s, scsi_io->Bus, scsi_io->TargetID,
scsi_io->LUN[1], scsi_io->D... | 2,040 |
87,939 | 0 | static void fm10k_receive_skb(struct fm10k_q_vector *q_vector,
struct sk_buff *skb)
{
napi_gro_receive(&q_vector->napi, skb);
}
| 2,041 |
143,397 | 0 | void Job::StartCreateV8Resolver(
const scoped_refptr<ProxyResolverScriptData>& script_data,
scoped_ptr<ProxyResolverV8>* resolver,
const CompletionCallback& callback) {
CheckIsOnOriginThread();
resolver_out_ = resolver;
script_data_ = script_data;
Start(CREATE_V8_RESOLVER, true /*blocking*/, callb... | 2,042 |
144,364 | 0 | int ExtensionInstallPrompt::Prompt::GetDialogButtons() const {
if (type_ == POST_INSTALL_PERMISSIONS_PROMPT && ShouldDisplayRevokeButton()) {
return kButtons[type_] | ui::DIALOG_BUTTON_OK;
}
return kButtons[type_];
}
| 2,043 |
105,181 | 0 | AttributeChange(PassRefPtr<Element> element, const QualifiedName& name, const String& value)
: m_element(element), m_name(name), m_value(value)
{
}
| 2,044 |
139,507 | 0 | static bool ExecuteSelectToMark(LocalFrame& frame,
Event*,
EditorCommandSource,
const String&) {
const EphemeralRange mark =
frame.GetEditor().Mark().ToNormalizedEphemeralRange();
EphemeralRange selection = frame.G... | 2,045 |
108,584 | 0 | GtkWidget* AddMenuEntry(GtkWidget* menu_widget, const char* text,
GCallback callback, Shell* shell) {
GtkWidget* entry = gtk_menu_item_new_with_label(text);
g_signal_connect(entry, "activate", callback, shell);
gtk_menu_shell_append(GTK_MENU_SHELL(menu_widget), entry);
return entry;
}
| 2,046 |
148,726 | 0 | V4L2JpegEncodeAccelerator::JpegBufferRecord::JpegBufferRecord()
: at_device(false) {
memset(address, 0, sizeof(address));
memset(length, 0, sizeof(length));
}
| 2,047 |
82,478 | 0 | bool jsvIsNative(const JsVar *v) { return v && (v->flags&JSV_NATIVE)!=0; }
| 2,048 |
144,829 | 0 | TabStripModel* tsm() { return browser()->tab_strip_model(); }
| 2,049 |
137,084 | 0 | double InputType::Minimum() const {
return CreateStepRange(kRejectAny).Minimum().ToDouble();
}
| 2,050 |
6,978 | 0 | tt_cmap4_validate( FT_Byte* table,
FT_Validator valid )
{
FT_Byte* p;
FT_UInt length;
FT_Byte *ends, *starts, *offsets, *deltas, *glyph_ids;
FT_UInt num_segs;
FT_Error error = FT_Err_Ok;
if ( table + 2 + 2 > valid->limit )
FT_INVALID_TOO_SHORT;
... | 2,051 |
93,147 | 0 | print_trans2(netdissect_options *ndo,
const u_char *words, const u_char *dat, const u_char *buf, const u_char *maxbuf)
{
u_int bcc;
static const struct smbfnsint *fn = &trans2_fns[0];
const u_char *data, *param;
const u_char *w = words + 1;
const char *f1 = NULL, *f2 = NULL;
int pcn... | 2,052 |
57,466 | 0 | static int ext4_valid_extent_idx(struct inode *inode,
struct ext4_extent_idx *ext_idx)
{
ext4_fsblk_t block = idx_pblock(ext_idx);
return ext4_data_block_valid(EXT4_SB(inode->i_sb), block, 1);
}
| 2,053 |
168,955 | 0 | void TerminateServiceWorkerOnIO(
base::WeakPtr<ServiceWorkerContextCore> context_weak,
int64_t version_id) {
if (ServiceWorkerContextCore* context = context_weak.get()) {
if (ServiceWorkerVersion* version = context->GetLiveVersion(version_id))
version->StopWorker(base::DoNothing());
}
}
| 2,054 |
177,239 | 0 | void ACodec::initiateConfigureComponent(const sp<AMessage> &msg) {
msg->setWhat(kWhatConfigureComponent);
msg->setTarget(this);
msg->post();
}
| 2,055 |
21,416 | 0 | sector_t swapdev_block(int type, pgoff_t offset)
{
struct block_device *bdev;
if ((unsigned int)type >= nr_swapfiles)
return 0;
if (!(swap_info[type]->flags & SWP_WRITEOK))
return 0;
return map_swap_entry(swp_entry(type, offset), &bdev);
}
| 2,056 |
164,107 | 0 | bool AppCacheDatabase::FindLastStorageIds(
int64_t* last_group_id,
int64_t* last_cache_id,
int64_t* last_response_id,
int64_t* last_deletable_response_rowid) {
DCHECK(last_group_id && last_cache_id && last_response_id &&
last_deletable_response_rowid);
*last_group_id = 0;
*last_cache_id ... | 2,057 |
169,555 | 0 | v8::Local<v8::Object> ToEnumObject(v8::Isolate* isolate,
EnumType start_after,
EnumType end_at) {
v8::Local<v8::Object> object = v8::Object::New(isolate);
for (int i = start_after + 1; i <= end_at; ++i) {
v8::Local<v8::String> value = v8::Str... | 2,058 |
105,020 | 0 | SyncBackendHostTest()
: ui_thread_(BrowserThread::UI, &ui_loop_),
io_thread_(BrowserThread::IO) {}
| 2,059 |
27,308 | 0 | static bool ldm_create_data_partitions (struct parsed_partitions *pp,
const struct ldmdb *ldb)
{
struct list_head *item;
struct vblk *vb;
struct vblk *disk;
struct vblk_part *part;
int part_num = 1;
BUG_ON (!pp || !ldb);
disk = ldm_get_disk_objid (ldb);
if (!disk) {
ldm_crit ("Can't find the ID of this... | 2,060 |
126,962 | 0 | bool AudioInputRendererHost::OnMessageReceived(const IPC::Message& message,
bool* message_was_ok) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP_EX(AudioInputRendererHost, message, *message_was_ok)
IPC_MESSAGE_HANDLER(AudioInputHostMsg_StartDevice, OnStartDevice)
... | 2,061 |
46,627 | 0 | static void ccm_calculate_auth_mac(struct aead_request *req, u8 mac[])
{
struct crypto_aead *aead = crypto_aead_reqtfm(req);
struct crypto_aes_ctx *ctx = crypto_aead_ctx(aead);
struct __packed { __be16 l; __be32 h; u16 len; } ltag;
struct scatter_walk walk;
u32 len = req->assoclen;
u32 macp = 0;
/* prepend the ... | 2,062 |
170,797 | 0 | status_t SampleTable::setSyncSampleParams(off64_t data_offset, size_t data_size) {
if (mSyncSampleOffset >= 0 || data_size < 8) {
return ERROR_MALFORMED;
}
mSyncSampleOffset = data_offset;
uint8_t header[8];
if (mDataSource->readAt(
data_offset, header, sizeof(header)) < (ssize_t)sizeof(heade... | 2,063 |
121,763 | 0 | void UDPSocketLibevent::WriteWatcher::OnFileCanWriteWithoutBlocking(int) {
if (!socket_->write_callback_.is_null())
socket_->DidCompleteWrite();
}
| 2,064 |
112,097 | 0 | void SyncManager::SyncInternal::OnSyncEngineEvent(
const SyncEngineEvent& event) {
DCHECK(thread_checker_.CalledOnValidThread());
if (event.what_happened == SyncEngineEvent::SYNC_CYCLE_ENDED) {
ModelSafeRoutingInfo enabled_types;
registrar_->GetModelSafeRoutingInfo(&enabled_types);
{
ReadTrans... | 2,065 |
60,889 | 0 | enumerate_children_callback (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
DirectoryLoadState *state;
GFileEnumerator *enumerator;
GError *error;
state = user_data;
if (state->directory == NULL)
{
/*... | 2,066 |
152,778 | 0 | SparseHistogram::SparseHistogram(const std::string& name)
: HistogramBase(name),
samples_(new SampleMap(HashMetricName(name))),
logged_samples_(new SampleMap(samples_->id())) {}
| 2,067 |
60,868 | 0 | count_more_files_callback (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
DirectoryCountState *state;
NautilusDirectory *directory;
GError *error;
GList *files;
state = user_data;
directory = state->directory;
... | 2,068 |
66,702 | 0 | static int dvb_usbv2_resume_common(struct dvb_usb_device *d)
{
int ret = 0, i, active_fe;
struct dvb_frontend *fe;
dev_dbg(&d->udev->dev, "%s:\n", __func__);
for (i = 0; i < MAX_NO_OF_ADAPTER_PER_DEVICE; i++) {
active_fe = d->adapter[i].active_fe;
if (d->adapter[i].dvb_adap.priv && active_fe != -1) {
fe = d... | 2,069 |
112,303 | 0 | explicit FindViewByID(int route_id) : route_id_(route_id), view_(NULL) {
}
| 2,070 |
118,582 | 0 | void AppLauncherHandler::CreateAppInfo(
const Extension* extension,
ExtensionService* service,
base::DictionaryValue* value) {
value->Clear();
base::string16 short_name = base::UTF8ToUTF16(extension->short_name());
base::i18n::UnadjustStringForLocaleDirection(&short_name);
NewTabUI::SetUrlTitleAndD... | 2,071 |
129,021 | 0 | StateBase* writeDenseArray(uint32_t numProperties, uint32_t length, StateBase* state)
{
m_writer.writeDenseArray(numProperties, length);
return pop(state);
}
| 2,072 |
149,262 | 0 | bool HTMLFormControlElement::willValidate() const {
return ListedElement::WillValidate();
}
| 2,073 |
153,956 | 0 | bool GLES2DecoderImpl::DoBindOrCopyTexImageIfNeeded(Texture* texture,
GLenum textarget,
GLuint texture_unit) {
if (texture && !texture->IsAttachedToFramebuffer()) {
Texture::ImageState image_state;
gl::GLIm... | 2,074 |
40,544 | 0 | static int __net_init netlink_net_init(struct net *net)
{
#ifdef CONFIG_PROC_FS
if (!proc_create("netlink", 0, net->proc_net, &netlink_seq_fops))
return -ENOMEM;
#endif
return 0;
}
| 2,075 |
6,867 | 0 | void inet_set_tos(int fd, const struct sockaddr_storage *from, int tos)
{
#ifdef IP_TOS
if (from->ss_family == AF_INET)
setsockopt(fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));
#endif
#ifdef IPV6_TCLASS
if (from->ss_family == AF_INET6) {
if (IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)from)->sin6_addr))
/* v4-... | 2,076 |
12,084 | 0 | int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar,
const EC_POINT *point, const BIGNUM *p_scalar, BN_CTX *ctx)
{
/* just a convenient interface to EC_POINTs_mul() */
const EC_POINT *points[1];
const BIGNUM *scalars[1];
points[0] = point;
scalars[0] = p_sc... | 2,077 |
48,705 | 0 | int h2_stream_input_is_open(const h2_stream *stream)
{
return input_open(stream);
}
| 2,078 |
83,412 | 0 | RemoveListItem(list_item_t **pfirst, match_fn_t match, LPVOID ctx)
{
LPVOID data = NULL;
list_item_t **pnext;
for (pnext = pfirst; *pnext; pnext = &(*pnext)->next)
{
list_item_t *item = *pnext;
if (!match(item->data, ctx))
{
continue;
}
/* Found item... | 2,079 |
33,781 | 0 | long vhost_dev_check_owner(struct vhost_dev *dev)
{
/* Are you the owner? If not, I don't think you mean to do that */
return dev->mm == current->mm ? 0 : -EPERM;
}
| 2,080 |
92,713 | 0 | void task_numa_free(struct task_struct *p)
{
struct numa_group *grp = p->numa_group;
void *numa_faults = p->numa_faults;
unsigned long flags;
int i;
if (grp) {
spin_lock_irqsave(&grp->lock, flags);
for (i = 0; i < NR_NUMA_HINT_FAULT_STATS * nr_node_ids; i++)
grp->faults[i] -= p->numa_faults[i];
grp->tota... | 2,081 |
24,684 | 0 | int posix_cpu_timer_del(struct k_itimer *timer)
{
struct task_struct *p = timer->it.cpu.task;
int ret = 0;
if (likely(p != NULL)) {
read_lock(&tasklist_lock);
if (unlikely(p->signal == NULL)) {
/*
* We raced with the reaping of the task.
* The deletion should have cleared us off the list.
*/
B... | 2,082 |
93,663 | 0 | static void cqspi_configure_cs_and_sizes(struct spi_nor *nor)
{
struct cqspi_flash_pdata *f_pdata = nor->priv;
struct cqspi_st *cqspi = f_pdata->cqspi;
void __iomem *iobase = cqspi->iobase;
unsigned int reg;
/* configure page size and block size. */
reg = readl(iobase + CQSPI_REG_SIZE);
reg &= ~(CQSPI_REG_SIZE_... | 2,083 |
16,673 | 0 | ReadUserLogFileState::~ReadUserLogFileState( void )
{
}
| 2,084 |
22,970 | 0 | static void nfs_free_unique_id(struct rb_root *root, struct nfs_unique_id *id)
{
rb_erase(&id->rb_node, root);
}
| 2,085 |
130,495 | 0 | GetErrorQuery::GetErrorQuery(
QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset)
: Query(manager, target, shm_id, shm_offset) {
}
| 2,086 |
60,665 | 0 | static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval,
int __user *optlen)
{
if (len == 0)
return -EINVAL;
if (len > sizeof(struct sctp_event_subscribe))
len = sizeof(struct sctp_event_subscribe);
if (put_user(len, optlen))
return -EFAULT;
if (copy_to_user(optval, &sctp_sk(sk)-... | 2,087 |
133,720 | 0 | static bool isNonCanonicalCharacter(UChar c)
{
return (c == '\\' || c == '0' || c == '\0' || c >= 127);
}
| 2,088 |
179,542 | 1 | static __u8 *ch_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
if (*rsize >= 17 && rdesc[11] == 0x3c && rdesc[12] == 0x02) {
hid_info(hdev, "fixing up Cherry Cymotion report descriptor\n");
rdesc[11] = rdesc[16] = 0xff;
rdesc[12] = rdesc[17] = 0x03;
}
return rdesc;
}
| 2,089 |
44,149 | 0 | int pipe_proc_fn(struct ctl_table *table, int write, void __user *buf,
size_t *lenp, loff_t *ppos)
{
int ret;
ret = proc_dointvec_minmax(table, write, buf, lenp, ppos);
if (ret < 0 || !write)
return ret;
pipe_max_size = round_pipe_size(pipe_max_size);
return ret;
}
| 2,090 |
144,824 | 0 | void SimulateFreezeSignal(content::WebContents* contents) {
static_cast<TabLifecycleUnitSource::TabLifecycleUnit*>(
TabLifecycleUnitExternal::FromWebContents(contents))
->UpdateLifecycleState(mojom::LifecycleState::kFrozen);
}
| 2,091 |
115,142 | 0 | bool GraphicsContext3D::ImageExtractor::extractImage(bool premultiplyAlpha, bool ignoreGammaAndColorProfile)
{
UNUSED_PARAM(ignoreGammaAndColorProfile);
if (!m_image)
return false;
if (m_image->data())
m_qtImage = QImage::fromData(reinterpret_cast<const uchar*>(m_image->data()->data()), m_i... | 2,092 |
59,069 | 0 | static int tcmu_glfs_flush(struct tcmu_device *dev,
struct tcmulib_cmd *cmd)
{
struct glfs_state *state = tcmu_get_dev_private(dev);
glfs_cbk_cookie *cookie;
cookie = calloc(1, sizeof(*cookie));
if (!cookie) {
tcmu_err("Could not allocate cookie: %m\n");
goto out;
}
cookie->dev = d... | 2,093 |
82,205 | 0 | mrb_obj_protected_methods(mrb_state *mrb, mrb_value self)
{
mrb_bool recur = TRUE;
mrb_get_args(mrb, "|b", &recur);
return mrb_obj_methods(mrb, recur, self, NOEX_PROTECTED); /* protected attribute not define */
}
| 2,094 |
85,153 | 0 | static bool __has_merged_page(struct f2fs_bio_info *io, struct inode *inode,
struct page *page, nid_t ino)
{
struct bio_vec *bvec;
struct page *target;
int i;
if (!io->bio)
return false;
if (!inode && !page && !ino)
return true;
bio_for_each_segment_all(bvec, io->bio, i) {
if (bvec->bv_page->mappi... | 2,095 |
109,731 | 0 | void Document::maybeHandleHttpRefresh(const String& content, HttpRefreshType httpRefreshType)
{
if (m_isViewSource || !m_frame)
return;
double delay;
String refreshURL;
if (!parseHTTPRefresh(content, httpRefreshType == HttpRefreshFromMetaTag, delay, refreshURL))
return;
if (refreshU... | 2,096 |
182,416 | 1 | int git_delta_apply(
void **out,
size_t *out_len,
const unsigned char *base,
size_t base_len,
const unsigned char *delta,
size_t delta_len)
{
const unsigned char *delta_end = delta + delta_len;
size_t base_sz, res_sz, alloc_sz;
unsigned char *res_dp;
*out = NULL;
*out_len = 0;
/*
* Check that the base size matches th... | 2,097 |
163,844 | 0 | const Extension* ExtensionBrowserTest::LoadExtensionIncognito(
const base::FilePath& path) {
return LoadExtensionWithFlags(path,
kFlagEnableFileAccess | kFlagEnableIncognito);
}
| 2,098 |
170,493 | 0 | void Parcel::restoreAllowFds(bool lastValue)
{
mAllowFds = lastValue;
}
| 2,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.