unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
174,085 | 0 | virtual status_t setDefaultBufferDataSpace(
android_dataspace defaultDataSpace) {
Parcel data, reply;
data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor());
data.writeInt32(static_cast<int32_t>(defaultDataSpace));
status_t result = remote()->transact(SET_DEFAULT_BUFFE... | 10,200 |
31,194 | 0 | const char *crypto_default_geniv(const struct crypto_alg *alg)
{
if (((alg->cra_flags & CRYPTO_ALG_TYPE_MASK) ==
CRYPTO_ALG_TYPE_BLKCIPHER ? alg->cra_blkcipher.ivsize :
alg->cra_ablkcipher.ivsize) !=
alg->cra_blocksize)
return "chainiv";
return alg->cra_flags & CRYPTO_ALG_ASYNC ?
"eseqiv" ... | 10,201 |
39,401 | 0 | static int normalize_ioctl(unsigned int *cmd, int *size)
{
int i;
for (i = 0; i < ARRAY_SIZE(ioctl_table); i++) {
if ((*cmd & 0xffff) == (ioctl_table[i] & 0xffff)) {
*size = _IOC_SIZE(*cmd);
*cmd = ioctl_table[i];
if (*size > _IOC_SIZE(*cmd)) {
pr_info("ioctl not yet supported\n");
return -EFAULT;... | 10,202 |
126,352 | 0 | gfx::Rect BrowserWindowGtk::GetInstantBounds() {
return ui::GetWidgetScreenBounds(contents_container_->widget());
}
| 10,203 |
92,045 | 0 | static struct request *elv_next_request(struct request_queue *q)
{
struct request *rq;
struct blk_flush_queue *fq = blk_get_flush_queue(q, NULL);
WARN_ON_ONCE(q->mq_ops);
while (1) {
list_for_each_entry(rq, &q->queue_head, queuelist) {
if (blk_pm_allow_request(rq))
return rq;
if (rq->rq_flags & RQF_S... | 10,204 |
95,193 | 0 | static void copy_to_array(const char *key, void *data, void *void_rock)
{
uint32_t *attributes = (uint32_t *)data;
struct list_rock_recursivematch *rock =
(struct list_rock_recursivematch *)void_rock;
assert(rock->count > 0);
rock->array[--rock->count].name = key;
rock->array[rock->count].at... | 10,205 |
26,503 | 0 | static void pmcraid_reset_alert_done(struct pmcraid_cmd *cmd)
{
struct pmcraid_instance *pinstance = cmd->drv_inst;
u32 status = ioread32(pinstance->ioa_status);
unsigned long lock_flags;
/* if the critical operation in progress bit is set or the wait times
* out, invoke reset engine to proceed with hard reset. ... | 10,206 |
185,466 | 1 | static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
TestNode* imp = WTF::getPtr(proxyImp->locationWithCallWith());
if (!imp)
return;
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(... | 10,207 |
167,522 | 0 | WebMediaPlayer::LoadTiming WebMediaPlayerImpl::Load(
LoadType load_type,
const blink::WebMediaPlayerSource& source,
CORSMode cors_mode) {
DVLOG(1) << __func__;
DCHECK(source.IsURL());
blink::WebURL url = source.GetAsURL();
DVLOG(1) << __func__ << "(" << load_type << ", " << GURL(url) << ", "
... | 10,208 |
174,203 | 0 | void Camera3Device::RequestThread::configurationComplete() {
Mutex::Autolock l(mRequestLock);
mReconfigured = true;
}
| 10,209 |
40,374 | 0 | static struct sock *rfcomm_get_sock_by_channel(int state, u8 channel, bdaddr_t *src)
{
struct sock *sk = NULL, *sk1 = NULL;
read_lock(&rfcomm_sk_list.lock);
sk_for_each(sk, &rfcomm_sk_list.head) {
if (state && sk->sk_state != state)
continue;
if (rfcomm_pi(sk)->channel == channel) {
/* Exact match. */
... | 10,210 |
12,813 | 0 | static int tls1_alpn_handle_client_hello_late(SSL *s, int *ret, int *al)
{
const unsigned char *selected = NULL;
unsigned char selected_len = 0;
if (s->ctx->alpn_select_cb != NULL && s->cert->alpn_proposed != NULL) {
int r = s->ctx->alpn_select_cb(s, &selected, &selected_len,
... | 10,211 |
23,815 | 0 | static int __init macvlan_init_module(void)
{
int err;
register_netdevice_notifier(&macvlan_notifier_block);
err = macvlan_link_register(&macvlan_link_ops);
if (err < 0)
goto err1;
return 0;
err1:
unregister_netdevice_notifier(&macvlan_notifier_block);
return err;
}
| 10,212 |
152,685 | 0 | void Histogram::Add(int value) {
AddCount(value, 1);
}
| 10,213 |
85,762 | 0 | static ssize_t o2nm_node_ipv4_port_store(struct config_item *item,
const char *page, size_t count)
{
struct o2nm_node *node = to_o2nm_node(item);
unsigned long tmp;
char *p = (char *)page;
tmp = simple_strtoul(p, &p, 0);
if (!p || (*p && (*p != '\n')))
return -EINVAL;
if (tmp == 0)
return -EINVAL;
if... | 10,214 |
149,075 | 0 | static void closeAllCursors(Vdbe *p){
if( p->pFrame ){
VdbeFrame *pFrame;
for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
sqlite3VdbeFrameRestore(pFrame);
p->pFrame = 0;
p->nFrame = 0;
}
assert( p->nFrame==0 );
closeCursorsInFrame(p);
if( p->aMem ){
releaseMemArray(p->a... | 10,215 |
164,681 | 0 | bool error_called() const { return error_called_; }
| 10,216 |
109,302 | 0 | void InspectorPageAgent::getResourceContent(ErrorString* errorString, const String& frameId, const String& url, String* content, bool* base64Encoded)
{
Frame* frame = assertFrame(errorString, frameId);
if (!frame)
return;
resourceContent(errorString, frame, KURL(ParsedURLString, url), content, base6... | 10,217 |
37,605 | 0 | static void walk_shadow_page_lockless_end(struct kvm_vcpu *vcpu)
{
/*
* Make sure the write to vcpu->mode is not reordered in front of
* reads to sptes. If it does, kvm_commit_zap_page() can see us
* OUTSIDE_GUEST_MODE and proceed to free the shadow page table.
*/
smp_mb();
vcpu->mode = OUTSIDE_GUEST_MODE;
... | 10,218 |
165,751 | 0 | bool ShouldQuicHeadersIncludeH2StreamDependencies(
const VariationParameters& quic_trial_params) {
return base::LowerCaseEqualsASCII(
GetVariationParam(quic_trial_params,
"headers_include_h2_stream_dependency"),
"true");
}
| 10,219 |
140,296 | 0 | bool Editor::canCut() const {
return canCopy() && canDelete();
}
| 10,220 |
60,277 | 0 | int install_thread_keyring_to_cred(struct cred *new)
{
struct key *keyring;
if (new->thread_keyring)
return 0;
keyring = keyring_alloc("_tid", new->uid, new->gid, new,
KEY_POS_ALL | KEY_USR_VIEW,
KEY_ALLOC_QUOTA_OVERRUN,
NULL, NULL);
if (IS_ERR(keyring))
return PTR_ERR(keyring);
new->thread_keyr... | 10,221 |
52,384 | 0 | static bool find_jump_target(const struct xt_table_info *t,
const struct ipt_entry *target)
{
struct ipt_entry *iter;
xt_entry_foreach(iter, t->entries, t->size) {
if (iter == target)
return true;
}
return false;
}
| 10,222 |
167,696 | 0 | void WebRuntimeFeatures::EnableCompositedSelectionUpdate(bool enable) {
RuntimeEnabledFeatures::SetCompositedSelectionUpdateEnabled(enable);
}
| 10,223 |
162,401 | 0 | MojoResult Core::DuplicateBufferHandle(
MojoHandle buffer_handle,
const MojoDuplicateBufferHandleOptions* options,
MojoHandle* new_buffer_handle) {
RequestContext request_context;
scoped_refptr<Dispatcher> dispatcher(GetDispatcher(buffer_handle));
if (!dispatcher)
return MOJO_RESULT_INVALID_ARGUME... | 10,224 |
7,974 | 0 | static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
{
int i;
uint16_t limit;
VncDisplay *vd = vs->vd;
if (data[0] > 3) {
update_displaychangelistener(&vd->dcl, VNC_REFRESH_INTERVAL_BASE);
}
switch (data[0]) {
case VNC_MSG_CLIENT_SET_PIXEL_FORMAT:
if (len... | 10,225 |
128,142 | 0 | void CastSelectDefaultView::UpdateLabel() {
if (cast_config_delegate_ == nullptr ||
cast_config_delegate_->HasCastExtension() == false)
return;
cast_config_delegate_->GetReceiversAndActivities(base::Bind(
&CastSelectDefaultView::UpdateLabelCallback, base::Unretained(this)));
}
| 10,226 |
125,434 | 0 | void GDataFileSystem::Remove(const FilePath& file_path,
bool is_recursive,
const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
RunTaskOnUIThread(base::Bind(&GDataFileSystem::RemoveOnUIThread,
... | 10,227 |
36,095 | 0 | isofs_hash(const struct dentry *dentry, struct qstr *qstr)
{
return isofs_hash_common(qstr, 0);
}
| 10,228 |
10,439 | 0 | static void megasas_finish_dcmd(MegasasCmd *cmd, uint32_t iov_size)
{
trace_megasas_finish_dcmd(cmd->index, iov_size);
if (cmd->frame->header.sge_count) {
qemu_sglist_destroy(&cmd->qsg);
}
if (iov_size > cmd->iov_size) {
if (megasas_frame_is_ieee_sgl(cmd)) {
cmd->frame->dcmd... | 10,229 |
88,612 | 0 | mwifiex_cmd_uap_sys_config(struct host_cmd_ds_command *cmd, u16 cmd_action,
u32 type, void *cmd_buf)
{
u8 *tlv;
u16 cmd_size, param_size, ie_size;
struct host_cmd_ds_sys_config *sys_cfg;
cmd->command = cpu_to_le16(HostCmd_CMD_UAP_SYS_CONFIG);
cmd_size = (u16)(sizeof(struct host_cmd_ds_sys_config) + S_DS_GEN... | 10,230 |
49,945 | 0 | php_mysqlnd_ok_free_mem(void * _packet, zend_bool stack_allocation TSRMLS_DC)
{
MYSQLND_PACKET_OK *p= (MYSQLND_PACKET_OK *) _packet;
if (p->message) {
mnd_efree(p->message);
p->message = NULL;
}
if (!stack_allocation) {
mnd_pefree(p, p->header.persistent);
}
}
| 10,231 |
79,077 | 0 | static inline bool match_option(const char *arg, int arglen, const char *opt)
{
int len = strlen(opt);
return len == arglen && !strncmp(arg, opt, len);
}
| 10,232 |
113,559 | 0 | double AccessibilityUIElement::clickPointY()
{
return 0.0f;
}
| 10,233 |
47,807 | 0 | int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
u_int32_t mask)
{
struct snd_pcm_hw_constraints *constrs = &runtime->hw_constraints;
struct snd_mask *maskp = constrs_mask(constrs, var);
*maskp->bits &= mask;
memset(maskp->bits + 1, 0, (SNDRV_MASK_MAX-32) / 8); /* cl... | 10,234 |
27,943 | 0 | static int orinoco_ioctl_setsens(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *srq,
char *extra)
{
struct orinoco_private *priv = ndev_priv(dev);
int val = srq->value;
unsigned long flags;
if (!priv->has_sensitivity)
return -EOPNOTSUPP;
if ((val < 1) || (val > 3))
retu... | 10,235 |
52,920 | 0 | static int init_subctxts(struct qib_devdata *dd,
struct qib_ctxtdata *rcd,
const struct qib_user_info *uinfo)
{
int ret = 0;
unsigned num_subctxts;
size_t size;
/*
* If the user is requesting zero subctxts,
* skip the subctxt allocation.
*/
if (uinfo->spu_subctxt_cnt <= 0)
goto bail;
num_subctxts... | 10,236 |
124,142 | 0 | static void ResetCounters() {
close_counter = 0;
}
| 10,237 |
78,134 | 0 | static void sc_asn1_print_integer(const u8 * buf, size_t buflen)
{
size_t a = 0;
if (buflen > sizeof(a)) {
printf("0x%s", sc_dump_hex(buf, buflen));
} else {
size_t i;
for (i = 0; i < buflen; i++) {
a <<= 8;
a |= buf[i];
}
printf("%"SC_FORMAT_LEN_SIZE_T"u", a);
}
}
| 10,238 |
148,059 | 0 | static void VoidMethodDefaultNullableStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
TestObject* impl = V8TestObject::ToImpl(info.Holder());
V8StringResource<kTreatNullAndUndefinedAsNullString> default_string_arg;
if (!info[0]->IsUndefined()) {
default_string_arg = info[0];
if (!defaul... | 10,239 |
35,576 | 0 | static void get_descriptor_table_ptr(struct x86_emulate_ctxt *ctxt,
u16 selector, struct desc_ptr *dt)
{
const struct x86_emulate_ops *ops = ctxt->ops;
u32 base3 = 0;
if (selector & 1 << 2) {
struct desc_struct desc;
u16 sel;
memset (dt, 0, sizeof *dt);
if (!ops->get_segment(ctxt, &sel, &desc, &ba... | 10,240 |
164,779 | 0 | static bool AdvanceToStartCode(const uint8_t* buffer,
int buffer_size,
int* offset,
int bytes_needed,
int num_bits,
uint32_t start_code) {
DCHECK_GE(bytes_needed, ... | 10,241 |
184,403 | 1 | void PrintPreviewUI::ClearAllPreviewData() {
print_preview_data_service()->RemoveEntry(preview_ui_addr_str_);
}
| 10,242 |
112,184 | 0 | ListValue* MakeRepeatedValue(const F& fields, V* (*converter_fn)(T)) {
ListValue* list = new ListValue();
for (typename F::const_iterator it = fields.begin(); it != fields.end();
++it) {
list->Append(converter_fn(*it));
}
return list;
}
| 10,243 |
71,668 | 0 | ModuleExport size_t RegisterRAWImage(void)
{
MagickInfo
*entry;
entry=SetMagickInfo("R");
entry->decoder=(DecodeImageHandler *) ReadRAWImage;
entry->encoder=(EncodeImageHandler *) WriteRAWImage;
entry->raw=MagickTrue;
entry->endian_support=MagickTrue;
entry->description=ConstantString("Raw red sample... | 10,244 |
118,755 | 0 | unsigned ContainerNode::childElementCount() const
{
unsigned count = 0;
Node* n = firstChild();
while (n) {
count += n->isElementNode();
n = n->nextSibling();
}
return count;
}
| 10,245 |
184,960 | 1 | bool TabsCaptureVisibleTabFunction::RunImpl() {
PrefService* service = profile()->GetPrefs();
if (service->GetBoolean(prefs::kDisableScreenshots)) {
error_ = keys::kScreenshotsDisabled;
return false;
}
WebContents* web_contents = NULL;
if (!GetTabToCapture(&web_contents))
return false;
image_format_ = FORMAT_JPEG; /... | 10,246 |
53,456 | 0 | timeval_equals(struct timeval * tv0, struct timeval * tv1)
{
if ( tv0->tv_sec == tv1->tv_sec && tv0->tv_usec == tv1->tv_usec )
return 1;
else
return 0;
}
| 10,247 |
79,625 | 0 | static int msg_cache_check(const char *id, struct BodyCache *bcache, void *data)
{
struct Context *ctx = (struct Context *) data;
if (!ctx)
return -1;
struct PopData *pop_data = (struct PopData *) ctx->data;
if (!pop_data)
return -1;
#ifdef USE_HCACHE
/* keep hcache file if hcache == bcache */
if (... | 10,248 |
56,975 | 0 | static int fuse_write_begin(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned flags,
struct page **pagep, void **fsdata)
{
pgoff_t index = pos >> PAGE_CACHE_SHIFT;
struct fuse_conn *fc = get_fuse_conn(file_inode(file));
struct page *page;
loff_t fsize;
int err = -ENOMEM;
WA... | 10,249 |
96,956 | 0 | long get_user_pages_longterm(unsigned long start, unsigned long nr_pages,
unsigned int gup_flags, struct page **pages,
struct vm_area_struct **vmas_arg)
{
struct vm_area_struct **vmas = vmas_arg;
unsigned long flags;
long rc, i;
if (!pages)
return -EINVAL;
if (!vmas) {
vmas = kcalloc(nr_pages... | 10,250 |
41,196 | 0 | static void tcp_reset(struct sock *sk)
{
/* We want the right error as BSD sees it (and indeed as we do). */
switch (sk->sk_state) {
case TCP_SYN_SENT:
sk->sk_err = ECONNREFUSED;
break;
case TCP_CLOSE_WAIT:
sk->sk_err = EPIPE;
break;
case TCP_CLOSE:
return;
default:
sk->sk_err = ECONNRESET;
}
/* Thi... | 10,251 |
173,875 | 0 | BlockEntry::BlockEntry(Cluster* p, long idx) : m_pCluster(p), m_index(idx) {}
| 10,252 |
129,401 | 0 | error::Error GLES2DecoderImpl::HandleDiscardBackbufferCHROMIUM(
uint32 immediate_data_size, const cmds::DiscardBackbufferCHROMIUM& c) {
if (surface_->DeferDraws())
return error::kDeferCommandUntilLater;
if (!surface_->SetBackbufferAllocation(false))
return error::kLostContext;
backbuffer_needs_clear_b... | 10,253 |
159,102 | 0 | void DownloadItemImpl::DestinationCompleted(
int64_t total_bytes,
std::unique_ptr<crypto::SecureHash> secure_hash) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(state_ == TARGET_PENDING_INTERNAL || state_ == IN_PROGRESS_INTERNAL);
DVLOG(20) << __func__ << "() download=" << DebugString(true);
OnAllDa... | 10,254 |
71,527 | 0 | static Image *ReadEMFImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
Gdiplus::Bitmap
*bitmap;
Gdiplus::BitmapData
bitmap_data;
Gdiplus::GdiplusStartupInput
startup_input;
Gdiplus::Graphics
*graphics;
Gdiplus::Image
*source;
Gdiplus::Rect
rect;
GeometryInfo
... | 10,255 |
49,600 | 0 | static void ffs_epfile_async_io_complete(struct usb_ep *_ep,
struct usb_request *req)
{
struct ffs_io_data *io_data = req->context;
ENTER();
INIT_WORK(&io_data->work, ffs_user_copy_worker);
schedule_work(&io_data->work);
}
| 10,256 |
9,359 | 0 | void ossl_statem_set_error(SSL *s)
{
s->statem.state = MSG_FLOW_ERROR;
}
| 10,257 |
60,463 | 0 | static void flag_skiplist_free(void *data) {
RFlagsAtOffset *item = (RFlagsAtOffset *)data;
r_list_free (item->flags);
free (data);
}
| 10,258 |
44,387 | 0 | static bool cpuline_in_cpuset(const char *line, const char *cpuset)
{
int cpu;
if (sscanf(line, "processor : %d", &cpu) != 1)
return false;
return cpu_in_cpuset(cpu, cpuset);
}
| 10,259 |
119,915 | 0 | void FrameLoader::loadWithNavigationAction(const ResourceRequest& request, const NavigationAction& action, FrameLoadType type, PassRefPtr<FormState> formState, const SubstituteData& substituteData, const String& overrideEncoding)
{
ASSERT(m_client->hasWebView());
if (m_frame->document()->pageDismissalEventBeing... | 10,260 |
92,138 | 0 | struct ib_xrcd *mlx5_ib_alloc_xrcd(struct ib_device *ibdev,
struct ib_ucontext *context,
struct ib_udata *udata)
{
struct mlx5_ib_dev *dev = to_mdev(ibdev);
struct mlx5_ib_xrcd *xrcd;
int err;
if (!MLX5_CAP_GEN(dev->mdev, xrc))
return ERR_PTR(-ENOSYS);
xrcd = kmalloc(sizeof(*xrcd), GFP_KERNEL);
... | 10,261 |
126,359 | 0 | int BrowserWindowGtk::GetVerticalOffset() {
return (IsMaximized() || (!UseCustomFrame())) ?
-kCustomFrameBackgroundVerticalOffset : 0;
}
| 10,262 |
143,621 | 0 | void RenderWidgetHostImpl::ForwardGestureEventWithLatencyInfo(
const blink::WebGestureEvent& gesture_event,
const ui::LatencyInfo& ui_latency) {
TRACE_EVENT0("input", "RenderWidgetHostImpl::ForwardGestureEvent");
if (ShouldDropInputEvents())
return;
if (gesture_event.type == blink::WebInputEvent::Ges... | 10,263 |
156,114 | 0 | const Vector<IntSize>& HTMLLinkElement::IconSizes() const {
return icon_sizes_;
}
| 10,264 |
15,504 | 0 | static char *allocate_tempopt_if_needed(
const struct dhcp_optflag *optflag,
char *buffer,
int *length_p)
{
char *allocated = NULL;
if ((optflag->flags & OPTION_TYPE_MASK) == OPTION_BIN) {
const char *end;
allocated = xstrdup(buffer); /* more than enough */
end = hex2bin(allocated, buffer, 255);
if (err... | 10,265 |
145,192 | 0 | void ChromeExtensionsDispatcherDelegate::InitOriginPermissions(
const extensions::Extension* extension,
bool is_extension_active) {
if (is_extension_active &&
extension->permissions_data()->HasAPIPermission(
extensions::APIPermission::kManagement)) {
blink::WebSecurityPolicy::addOriginAcce... | 10,266 |
142,148 | 0 | FileManagerBrowserTestBase::CreateDriveIntegrationService(Profile* profile) {
if (base::FeatureList::IsEnabled(chromeos::features::kDriveFs)) {
drive_volumes_[profile->GetOriginalProfile()] =
std::make_unique<DriveFsTestVolume>(profile->GetOriginalProfile());
if (!IsIncognitoModeTest() && !DoesTestSta... | 10,267 |
127,873 | 0 | static int GetElementId(BitReader* reader) {
if (reader->bits_available() >= 8) {
int num_bits_to_read = 0;
static int prefix[] = { 0x80, 0x4000, 0x200000, 0x10000000 };
for (int i = 0; i < 4; ++i) {
num_bits_to_read += 7;
if (ReadBits(reader, 1) == 1) {
if (reader->bits_available() < ... | 10,268 |
100,858 | 0 | void CheckNextNameValuePair(HttpUtil::NameValuePairsIterator* parser,
bool expect_next,
bool expect_valid,
std::string expected_name,
std::string expected_value) {
ASSERT_EQ(expect_next, parser->GetNext());... | 10,269 |
85,950 | 0 | static void flush_current_bio_list(struct blk_plug_cb *cb, bool from_schedule)
{
struct dm_offload *o = container_of(cb, struct dm_offload, cb);
struct bio_list list;
struct bio *bio;
int i;
INIT_LIST_HEAD(&o->cb.list);
if (unlikely(!current->bio_list))
return;
for (i = 0; i < 2; i++) {
list = current->bi... | 10,270 |
180,424 | 1 | struct bpf_map *bpf_map_get_with_uref(u32 ufd)
{
struct fd f = fdget(ufd);
struct bpf_map *map;
map = __bpf_map_get(f);
if (IS_ERR(map))
return map;
bpf_map_inc(map, true);
fdput(f);
return map;
}
| 10,271 |
119,114 | 0 | FileProxyTest()
: file_thread_("FileProxyTestFileThread"),
error_(File::FILE_OK),
bytes_written_(-1),
weak_factory_(this) {}
| 10,272 |
137,288 | 0 | void Textfield::SetHorizontalAlignment(gfx::HorizontalAlignment alignment) {
GetRenderText()->SetHorizontalAlignment(alignment);
}
| 10,273 |
168,087 | 0 | void AutofillManager::SetExternalDelegate(AutofillExternalDelegate* delegate) {
external_delegate_ = delegate;
autocomplete_history_manager_->SetExternalDelegate(delegate);
}
| 10,274 |
3,617 | 0 | static int rsa_priv_decode(EVP_PKEY *pkey, PKCS8_PRIV_KEY_INFO *p8)
{
const unsigned char *p;
int pklen;
if (!PKCS8_pkey_get0(NULL, &p, &pklen, NULL, p8))
return 0;
return old_rsa_priv_decode(pkey, &p, pklen);
}
| 10,275 |
88,149 | 0 | static inline struct sk_buff *hci_uart_dequeue(struct hci_uart *hu)
{
struct sk_buff *skb = hu->tx_skb;
if (!skb) {
percpu_down_read(&hu->proto_lock);
if (test_bit(HCI_UART_PROTO_READY, &hu->flags))
skb = hu->proto->dequeue(hu);
percpu_up_read(&hu->proto_lock);
} else {
hu->tx_skb = NULL;
}
return s... | 10,276 |
103,428 | 0 | void ExtensionService::CheckExternalUninstall(const std::string& id) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
ProviderCollection::const_iterator i;
for (i = external_extension_providers_.begin();
i != external_extension_providers_.end(); ++i) {
DCHECK(i->get()->IsReady());
if (i->ge... | 10,277 |
10,761 | 0 | int ssl3_send_client_key_exchange(SSL *s)
{
unsigned char *p,*d;
int n;
unsigned long alg_k;
#ifndef OPENSSL_NO_RSA
unsigned char *q;
EVP_PKEY *pkey=NULL;
#endif
#ifndef OPENSSL_NO_KRB5
KSSL_ERR kssl_err;
#endif /* OPENSSL_NO_KRB5 */
#ifndef OPENSSL_NO_ECDH
EC_KEY *clnt_ecdh = NULL;
const EC_POINT *srvr_ecpoin... | 10,278 |
131,487 | 0 | static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
v8SetReturnValueFast(info, WTF::getPtr(imp->nodeAttribute()), imp);
}
| 10,279 |
116,636 | 0 | void RenderViewImpl::OnFindReplyAck() {
if (queued_find_reply_message_.get()) {
Send(queued_find_reply_message_.release());
}
}
| 10,280 |
116,734 | 0 | IPC::SyncMessageFilter* MockRenderThread::GetSyncMessageFilter() {
return NULL;
}
| 10,281 |
86,021 | 0 | int f2fs_issue_flush(struct f2fs_sb_info *sbi)
{
struct flush_cmd_control *fcc = SM_I(sbi)->fcc_info;
struct flush_cmd cmd;
int ret;
if (test_opt(sbi, NOBARRIER))
return 0;
if (!test_opt(sbi, FLUSH_MERGE)) {
ret = submit_flush_wait(sbi);
atomic_inc(&fcc->issued_flush);
return ret;
}
if (atomic_inc_ret... | 10,282 |
57,366 | 0 | static int sco_sock_sendmsg(struct socket *sock, struct msghdr *msg,
size_t len)
{
struct sock *sk = sock->sk;
int err;
BT_DBG("sock %p, sk %p", sock, sk);
err = sock_error(sk);
if (err)
return err;
if (msg->msg_flags & MSG_OOB)
return -EOPNOTSUPP;
lock_sock(sk);
if (sk->sk_state == BT_CONNECTED... | 10,283 |
72,341 | 0 | cleanup_socket(void)
{
if (cleanup_pid != 0 && getpid() != cleanup_pid)
return;
debug("%s: cleanup", __func__);
if (socket_name[0])
unlink(socket_name);
if (socket_dir[0])
rmdir(socket_dir);
}
| 10,284 |
67,112 | 0 | flac_read_flac2f (SF_PRIVATE *psf, float *ptr, sf_count_t len)
{ FLAC_PRIVATE* pflac = (FLAC_PRIVATE*) psf->codec_data ;
sf_count_t total = 0, current ;
unsigned readlen ;
pflac->pcmtype = PFLAC_PCM_FLOAT ;
while (total < len)
{ pflac->ptr = ptr + total ;
readlen = (len - total > 0x1000000) ? 0x1000000 : (unsi... | 10,285 |
167,647 | 0 | int GetReceivedMessages(FrameTreeNode* ftn) {
int received_messages = 0;
EXPECT_TRUE(ExecuteScriptAndExtractInt(
ftn, "window.domAutomationController.send(window.receivedMessages);",
&received_messages));
return received_messages;
}
| 10,286 |
35,034 | 0 | static int sctp_send_asconf_del_ip(struct sock *sk,
struct sockaddr *addrs,
int addrcnt)
{
struct sctp_sock *sp;
struct sctp_endpoint *ep;
struct sctp_association *asoc;
struct sctp_transport *transport;
struct sctp_bind_addr *bp;
struct sctp_chunk *chunk;
union sctp_addr *laddr;
void *addr_... | 10,287 |
85,475 | 0 | static void sas_unregister_common_dev(struct asd_sas_port *port, struct domain_device *dev)
{
struct sas_ha_struct *ha = port->ha;
sas_notify_lldd_dev_gone(dev);
if (!dev->parent)
dev->port->port_dev = NULL;
else
list_del_init(&dev->siblings);
spin_lock_irq(&port->dev_list_lock);
list_del_init(&dev->dev_lis... | 10,288 |
152,412 | 0 | WebFrameLoadType NavigationTypeToLoadType(
FrameMsg_Navigate_Type::Value navigation_type,
bool should_replace_current_entry,
bool has_valid_page_state) {
switch (navigation_type) {
case FrameMsg_Navigate_Type::RELOAD:
case FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL:
return WebFrameL... | 10,289 |
73,219 | 0 | static int jpc_com_dumpparms(jpc_ms_t *ms, FILE *out)
{
jpc_com_t *com = &ms->parms.com;
unsigned int i;
int printable;
fprintf(out, "regid = %d;\n", com->regid);
printable = 1;
for (i = 0; i < com->len; ++i) {
if (!isprint(com->data[i])) {
printable = 0;
break;
}
}
if (printable) {
fprintf(out, "da... | 10,290 |
127,743 | 0 | int64_t MockNetworkTransaction::GetTotalReceivedBytes() const {
return received_bytes_;
}
| 10,291 |
158,274 | 0 | void RenderWidgetHostImpl::ForwardWheelEventWithLatencyInfo(
const blink::WebMouseWheelEvent& wheel_event,
const ui::LatencyInfo& latency) {
TRACE_EVENT2("input", "RenderWidgetHostImpl::ForwardWheelEvent", "dx",
wheel_event.delta_x, "dy", wheel_event.delta_y);
if (ShouldDropInputEvents())
... | 10,292 |
183,533 | 1 | bool Vp9Parser::ParseSuperframe() {
const uint8_t* stream = stream_;
off_t bytes_left = bytes_left_;
DCHECK(frames_.empty());
// Make sure we don't parse stream_ more than once.
stream_ = nullptr;
bytes_left_ = 0;
if (bytes_left < 1)
return false;
// If this is a superframe, the last byte in the str... | 10,293 |
19,457 | 0 | static void efx_ethtool_get_stats(struct net_device *net_dev,
struct ethtool_stats *stats,
u64 *data)
{
struct efx_nic *efx = netdev_priv(net_dev);
struct efx_mac_stats *mac_stats = &efx->mac_stats;
struct efx_ethtool_stat *stat;
struct efx_channel *channel;
struct efx_tx_queue *tx_queue;
struct rtnl_... | 10,294 |
97,468 | 0 | void FrameLoader::receivedData(const char* data, int length)
{
activeDocumentLoader()->receivedData(data, length);
}
| 10,295 |
53,246 | 0 | static struct async *reap_as(struct usb_dev_state *ps)
{
DECLARE_WAITQUEUE(wait, current);
struct async *as = NULL;
struct usb_device *dev = ps->dev;
add_wait_queue(&ps->wait, &wait);
for (;;) {
__set_current_state(TASK_INTERRUPTIBLE);
as = async_getcompleted(ps);
if (as || !connected(ps))
break;
if (s... | 10,296 |
167,436 | 0 | void SVGStyleElement::FinishParsingChildren() {
StyleElement::ProcessingResult result =
StyleElement::FinishParsingChildren(*this);
SVGElement::FinishParsingChildren();
if (result == StyleElement::kProcessingFatalError)
NotifyLoadedSheetAndAllCriticalSubresources(
kErrorOccurredLoadingSubresourc... | 10,297 |
4,020 | 0 | GBool DCTStream::readMCURow() {
int data1[64];
Guchar data2[64];
Guchar *p1, *p2;
int pY, pCb, pCr, pR, pG, pB;
int h, v, horiz, vert, hSub, vSub;
int x1, x2, y2, x3, y3, x4, y4, x5, y5, cc, i;
int c;
for (x1 = 0; x1 < width; x1 += mcuWidth) {
if (restartInterval > 0 && restartCtr == 0) {
c ... | 10,298 |
101,492 | 0 | void PrepareFrameAndViewForPrint::FinishPrinting() {
if (!finished_) {
finished_ = true;
frame_->printEnd();
web_view_->resize(prev_view_size_);
if (WebFrame* web_frame = web_view_->mainFrame())
web_frame->setScrollOffset(prev_scroll_offset_);
}
}
| 10,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.