unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
117,575 | 0 | gfx::Rect SettingLevelBubbleDelegateView::GetAnchorRect() {
gfx::Size view_size = GetPreferredSize();
gfx::Rect monitor_area = gfx::Screen::GetMonitorAreaNearestWindow(NULL);
return (gfx::Rect(
monitor_area.x() + kBubbleXRatio * monitor_area.width(),
monitor_area.bottom() - view_size.height() / 2 - kB... | 5,500 |
104,320 | 0 | static void PrepareStringForFileOps(const FilePath& text,
FilePath::StringType* output) {
#if defined(OS_WIN)
TrimWhitespace(text.value(), TRIM_ALL, output);
replace(output->begin(), output->end(), '/', '\\');
#else
TrimWhitespaceUTF8(text.value(), TRIM_ALL, output);
#endif
}
| 5,501 |
86,526 | 0 | static int test_signed_short_formatting(void)
{
int i, j;
int num_sshort_tests;
int failed = 0;
#if (SIZEOF_SHORT == 1)
i=1; ss_test[i].num = 0x7F; ss_test[i].expected = "127";
i++; ss_test[i].num = 0x70; ss_test[i].expected = "112";
i++; ss_test[i].num = 0x07; ss_test[i].expected = "7";
i++; ss_test[... | 5,502 |
21,056 | 0 | static void mem_cgroup_end_move(struct mem_cgroup *memcg)
{
int cpu;
if (!memcg)
return;
get_online_cpus();
spin_lock(&memcg->pcp_counter_lock);
for_each_online_cpu(cpu)
per_cpu(memcg->stat->count[MEM_CGROUP_ON_MOVE], cpu) -= 1;
memcg->nocpu_base.count[MEM_CGROUP_ON_MOVE] -= 1;
spin_unlock(&memcg->pcp_count... | 5,503 |
83,994 | 0 | GF_Err btrt_Read(GF_Box *s, GF_BitStream *bs)
{
GF_BitRateBox *ptr = (GF_BitRateBox *)s;
ptr->bufferSizeDB = gf_bs_read_u32(bs);
ptr->maxBitrate = gf_bs_read_u32(bs);
ptr->avgBitrate = gf_bs_read_u32(bs);
return GF_OK;
}
| 5,504 |
5,443 | 0 | static void Ins_SCVTCI( INS_ARG )
{
CUR.GS.control_value_cutin = (TT_F26Dot6)args[0];
}
| 5,505 |
172,410 | 0 | void *get_omx_component_factory_fn(void)
{
return(new omx_venc);
}
| 5,506 |
26,376 | 0 | cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
{
int hotcpu = (unsigned long)hcpu;
switch (action) {
case CPU_UP_PREPARE:
case CPU_UP_PREPARE_FROZEN:
watchdog_prepare_cpu(hotcpu);
break;
case CPU_ONLINE:
case CPU_ONLINE_FROZEN:
if (watchdog_enabled)
watchdog_enable(hotcpu);
... | 5,507 |
68,073 | 0 | void ef_globals_free(void)
{
SAFE_FREE(ef_gbls->source_file);
SAFE_FREE(ef_gbls->output_file);
SAFE_FREE(ef_gbls);
return;
}
| 5,508 |
74,299 | 0 | int read_super(char *source)
{
squashfs_super_block_3 sBlk_3;
struct squashfs_super_block sBlk_4;
/*
* Try to read a Squashfs 4 superblock
*/
read_fs_bytes(fd, SQUASHFS_START, sizeof(struct squashfs_super_block),
&sBlk_4);
swap = sBlk_4.s_magic != SQUASHFS_MAGIC;
SQUASHFS_INSWAP_SUPER_BLOCK(&sBlk_4);
if(... | 5,509 |
120,640 | 0 | void Element::setContainsFullScreenElement(bool flag)
{
ensureElementRareData()->setContainsFullScreenElement(flag);
setNeedsStyleRecalc(SyntheticStyleChange);
}
| 5,510 |
90,690 | 0 | static int dec(struct cstate *g, int c)
{
if (c >= '0' && c <= '9') return c - '0';
die(g, "invalid quantifier");
return 0;
}
| 5,511 |
134,228 | 0 | bool BrowserRootView::AreDropTypesRequired() {
return true;
}
| 5,512 |
136,836 | 0 | void LocalDOMWindow::scrollBy(const ScrollToOptions& scroll_to_options) const {
if (!IsCurrentlyDisplayedInFrame())
return;
document()->UpdateStyleAndLayoutIgnorePendingStylesheets();
LocalFrameView* view = GetFrame()->View();
if (!view)
return;
Page* page = GetFrame()->GetPage();
if (!page)
... | 5,513 |
14,284 | 0 | mysqlnd_old_escape_string(char * newstr, const char * escapestr, size_t escapestr_len TSRMLS_DC)
{
DBG_ENTER("mysqlnd_old_escape_string");
DBG_RETURN(mysqlnd_cset_escape_slashes(mysqlnd_find_charset_name("latin1"), newstr, escapestr, escapestr_len TSRMLS_CC));
}
| 5,514 |
3,072 | 0 | static int devicepbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op = osp;
*stage = 0;
*cont = 0;
make_int(op, 0);
return 0;
}
| 5,515 |
77,358 | 0 | ofproto_port_is_lacp_current(struct ofproto *ofproto, ofp_port_t ofp_port)
{
struct ofport *ofport = ofproto_get_port(ofproto, ofp_port);
return (ofport && ofproto->ofproto_class->port_is_lacp_current
? ofproto->ofproto_class->port_is_lacp_current(ofport)
: -1);
}
| 5,516 |
27,583 | 0 | midi_synth_hw_control(int dev, unsigned char *event)
{
}
| 5,517 |
84,171 | 0 | ptaExtendArrays(PTA *pta)
{
PROCNAME("ptaExtendArrays");
if (!pta)
return ERROR_INT("pta not defined", procName, 1);
if ((pta->x = (l_float32 *)reallocNew((void **)&pta->x,
sizeof(l_float32) * pta->nalloc,
2 * sizeof(l_float32) * pta->... | 5,518 |
155,001 | 0 | bool WebGLRenderingContextBase::ValidateShaderType(const char* function_name,
GLenum shader_type) {
switch (shader_type) {
case GL_VERTEX_SHADER:
case GL_FRAGMENT_SHADER:
return true;
case GL_COMPUTE_SHADER:
if (context_type_ != Platform::kWeb... | 5,519 |
58,570 | 0 | SECURITY_STATUS SEC_ENTRY AcceptSecurityContext(PCredHandle phCredential, PCtxtHandle phContext,
PSecBufferDesc pInput, ULONG fContextReq, ULONG TargetDataRep, PCtxtHandle phNewContext,
PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsTimeStamp)
{
char* Name;
SECURITY_STATUS status;
SecurityFunctionTa... | 5,520 |
146,940 | 0 | LocalFrame* WebLocalFrameImpl::CreateChildFrame(
const AtomicString& name,
HTMLFrameOwnerElement* owner_element) {
DCHECK(client_);
TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe");
WebTreeScopeType scope =
GetFrame()->GetDocument() == owner_element->GetTreeScope()
? WebTreeSco... | 5,521 |
102,496 | 0 | void LayerTreeCoordinator::syncLayerState(WebLayerID id, const WebLayerInfo& info)
{
if (m_shouldSendScrollPositionUpdate) {
m_webPage->send(Messages::LayerTreeCoordinatorProxy::DidChangeScrollPosition(m_visibleContentsRect.location()));
m_shouldSendScrollPositionUpdate = false;
}
m_shouldS... | 5,522 |
10,774 | 0 | static unsigned long ssl_session_hash(const SSL_SESSION *a)
{
unsigned long l;
l=(unsigned long)
((unsigned int) a->session_id[0] )|
((unsigned int) a->session_id[1]<< 8L)|
((unsigned long)a->session_id[2]<<16L)|
((unsigned long)a->session_id[3]<<24L);
return(l);
}
| 5,523 |
45,235 | 0 | psf_get_filelen (SF_PRIVATE *psf)
{ sf_count_t filelen ;
if (psf->virtual_io)
return psf->vio.get_filelen (psf->vio_user_data) ;
filelen = psf_get_filelen_handle (psf->file.handle) ;
if (filelen == -1)
{ psf_log_syserr (psf, errno) ;
return (sf_count_t) -1 ;
} ;
if (filelen == -SFE_BAD_STAT_SIZE)
{ psf-... | 5,524 |
12,830 | 0 | ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
long length)
{
ASN1_INTEGER *ret = NULL;
const unsigned char *p;
unsigned char *s;
long len;
int inf, tag, xclass;
int i;
if ((a == NULL) || ((*a) == NULL)) {
if ((ret = M_ASN... | 5,525 |
23,851 | 0 | static void tun_cleanup(void)
{
misc_deregister(&tun_miscdev);
rtnl_link_unregister(&tun_link_ops);
}
| 5,526 |
82,095 | 0 | mrb_include_module(mrb_state *mrb, struct RClass *c, struct RClass *m)
{
int changed = include_module_at(mrb, c, find_origin(c), m, 1);
if (changed < 0) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "cyclic include detected");
}
}
| 5,527 |
179,594 | 1 | static int dccp_packet(struct nf_conn *ct, const struct sk_buff *skb,
unsigned int dataoff, enum ip_conntrack_info ctinfo,
u_int8_t pf, unsigned int hooknum,
unsigned int *timeouts)
{
struct net *net = nf_ct_net(ct);
enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo);
struct dccp_hdr _dh, *dh;
u_int8_t type, old_state, new... | 5,528 |
72,584 | 0 | static void rb_update_pages(struct ring_buffer_per_cpu *cpu_buffer)
{
int success;
if (cpu_buffer->nr_pages_to_update > 0)
success = rb_insert_pages(cpu_buffer);
else
success = rb_remove_pages(cpu_buffer,
-cpu_buffer->nr_pages_to_update);
if (success)
cpu_buffer->nr_pages += cpu_buffer->nr_pages_to_upd... | 5,529 |
43,646 | 0 | static int do_tmpfile(struct nameidata *nd, unsigned flags,
const struct open_flags *op,
struct file *file, int *opened)
{
static const struct qstr name = QSTR_INIT("/", 1);
struct dentry *child;
struct inode *dir;
struct path path;
int error = path_lookupat(nd, flags | LOOKUP_DIRECTORY, &path);
if (unlikely(... | 5,530 |
7,334 | 0 | string_strncasecmp (const char *string1, const char *string2, int max)
{
int count, diff;
if (!string1 || !string2)
return (string1) ? 1 : ((string2) ? -1 : 0);
count = 0;
while ((count < max) && string1[0] && string2[0])
{
diff = utf8_charcasecmp (string1, string2);
if (di... | 5,531 |
56,341 | 0 | gdImageRotateBicubicFixed(gdImagePtr src, const float degrees,const int bgColor)
{
const float _angle = (float)((- degrees / 180.0f) * M_PI);
const int src_w = gdImageSX(src);
const int src_h = gdImageSY(src);
const unsigned int new_width = abs((int)(src_w*cos(_angle))) + abs((int)(src_h*sin(_angle) + 0.5f));
cons... | 5,532 |
57,071 | 0 | static void nfs40_clear_delegation_stateid(struct nfs4_state *state)
{
if (rcu_access_pointer(NFS_I(state->inode)->delegation) != NULL)
nfs_finish_clear_delegation_stateid(state);
}
| 5,533 |
80,335 | 0 | GF_Err pmax_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_PMAXBox *ptr = (GF_PMAXBox *)s;
if (ptr == NULL) return GF_BAD_PARAM;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
gf_bs_write_u32(bs, ptr->maxSize);
return GF_OK;
}
| 5,534 |
122,642 | 0 | const gfx::ImageSkia& Extension::GetDefaultIcon(bool is_app) {
int id = is_app ? IDR_APP_DEFAULT_ICON : IDR_EXTENSION_DEFAULT_ICON;
return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed(id);
}
| 5,535 |
29,084 | 0 | bool kvm_is_mmio_pfn(pfn_t pfn)
{
if (pfn_valid(pfn)) {
int reserved;
struct page *tail = pfn_to_page(pfn);
struct page *head = compound_trans_head(tail);
reserved = PageReserved(head);
if (head != tail) {
/*
* "head" is not a dangling pointer
* (compound_trans_head takes care of that)
* but t... | 5,536 |
10,076 | 0 | Direct_Move_Orig( EXEC_OP_ TT_GlyphZone zone,
FT_UShort point,
FT_F26Dot6 distance )
{
FT_F26Dot6 v;
#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
FT_ASSERT( !CUR.face->unpatented_hinting );
#endif
v = CUR.GS.freeVector.x;
if ( v !=... | 5,537 |
185,645 | 1 | void TextTrack::addCue(TextTrackCue* cue) {
DCHECK(cue);
// TODO(93143): Add spec-compliant behavior for negative time values.
if (std::isnan(cue->startTime()) || std::isnan(cue->endTime()) ||
cue->startTime() < 0 || cue->endTime() < 0)
return;
// https://html.spec.whatwg.org/multipage/embedded-content.html... | 5,538 |
143,966 | 0 | png_get_oFFs(png_structp png_ptr, png_infop info_ptr,
png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)
{
png_debug1(1, "in %s retrieval function", "oFFs");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)
&& offset_x != NULL && offset_y != NULL && unit_type != NULL... | 5,539 |
26,693 | 0 | static int nl80211_get_wiphy(struct sk_buff *skb, struct genl_info *info)
{
struct sk_buff *msg;
struct cfg80211_registered_device *dev = info->user_ptr[0];
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
if (!msg)
return -ENOMEM;
if (nl80211_send_wiphy(msg, info->snd_pid, info->snd_seq, 0, dev) < 0) {
nlms... | 5,540 |
3,910 | 0 | RGBGrayEncoder::RGBGrayEncoder(Stream *strA):
FilterStream(strA) {
bufPtr = bufEnd = buf;
eof = gFalse;
}
| 5,541 |
180,668 | 1 | static int iwch_l2t_send(struct t3cdev *tdev, struct sk_buff *skb, struct l2t_entry *l2e)
{
int error = 0;
struct cxio_rdev *rdev;
rdev = (struct cxio_rdev *)tdev->ulp;
if (cxio_fatal_error(rdev)) {
kfree_skb(skb);
return -EIO;
}
error = l2t_send(tdev, skb, l2e);
if (error < 0)
kfree_skb(skb);
return error;
}
| 5,542 |
181,922 | 1 | static int mem_resize(jas_stream_memobj_t *m, int bufsize)
{
unsigned char *buf;
//assert(m->buf_);
assert(bufsize >= 0);
JAS_DBGLOG(100, ("mem_resize(%p, %d)\n", m, bufsize));
if (!(buf = jas_realloc2(m->buf_, bufsize, sizeof(unsigned char))) &&
bufsize) {
JAS_DBGLOG(100, ("mem_resize realloc failed\n"));
return -... | 5,543 |
95,185 | 0 | static void cmd_xfer(const char *tag, const char *name,
const char *toserver, const char *topart)
{
int r = 0, partial_success = 0, mbox_count = 0;
struct xfer_header *xfer = NULL;
struct xfer_list list = { &imapd_namespace, imapd_userid, NULL, 0, NULL };
struct xfer_item *item, *ne... | 5,544 |
148,203 | 0 | static void XmlAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::ToImpl(holder);
V8SetReturnValueInt(info, impl->xmlAttribute());
}
| 5,545 |
171,142 | 0 | void MediaPlayerService::AudioOutput::close()
{
ALOGV("close");
sp<AudioTrack> track;
{
Mutex::Autolock lock(mLock);
track = mTrack;
close_l(); // clears mTrack
}
}
| 5,546 |
9,376 | 0 | int statem_flush(SSL *s)
{
s->rwstate = SSL_WRITING;
if (BIO_flush(s->wbio) <= 0) {
return 0;
}
s->rwstate = SSL_NOTHING;
return 1;
}
| 5,547 |
128,929 | 0 | StateBase* doSerializeArrayBuffer(v8::Handle<v8::Value> arrayBuffer, StateBase* next)
{
return doSerialize(arrayBuffer, next);
}
| 5,548 |
15,810 | 0 | void ctdb_tcp_node_connect(struct event_context *ev, struct timed_event *te,
struct timeval t, void *private_data)
{
struct ctdb_node *node = talloc_get_type(private_data,
struct ctdb_node);
struct ctdb_tcp_node *tnode = talloc_get_type(node->private_data,
struct ctdb_tcp_node);
struct ctd... | 5,549 |
11,082 | 0 | void smbd_setup_sig_hup_handler(void)
{
struct tevent_signal *se;
se = tevent_add_signal(smbd_event_context(),
smbd_event_context(),
SIGHUP, 0,
smbd_sig_hup_handler,
NULL);
if (!se) {
exit_server("failed to setup SIGHUP handler");
}
}
| 5,550 |
107,602 | 0 | void ewk_view_scroll(Evas_Object* ewkView, Evas_Coord deltaX, Evas_Coord deltaY, Evas_Coord scrollX, Evas_Coord scrollY, Evas_Coord scrollWidth, Evas_Coord scrollHeight, Evas_Coord centerX, Evas_Coord centerY, Evas_Coord centerWidth, Evas_Coord centerHeight, bool mainFrame)
{
DBG("ewkView=%p, delta: %d,%d, scroll: ... | 5,551 |
108,761 | 0 | void PPB_ImageData_Impl::Unmap() {
backend_->Unmap();
}
| 5,552 |
123,731 | 0 | static bool CreateTemporaryDirInDirImpl(const FilePath& base_dir,
const FilePath::StringType& name_tmpl,
FilePath* new_dir) {
base::ThreadRestrictions::AssertIOAllowed(); // For call to mkdtemp().
DCHECK(name_tmpl.find("XXXXXX") != Fil... | 5,553 |
28,050 | 0 | static void decode_rgb_frame(FFV1Context *s, uint8_t *src[3], int w, int h, int stride[3])
{
int x, y, p;
int16_t *sample[4][2];
int lbd = s->avctx->bits_per_raw_sample <= 8;
int bits = s->avctx->bits_per_raw_sample > 0 ? s->avctx->bits_per_raw_sample : 8;
int offset = 1 << bits;
for (x = ... | 5,554 |
37,914 | 0 | static int svm_vm_has_apicv(struct kvm *kvm)
{
return 0;
}
| 5,555 |
85,593 | 0 | int hns_rcb_common_init_hw(struct rcb_common_cb *rcb_common)
{
u32 reg_val;
int i;
int port_num = hns_rcb_common_get_port_num(rcb_common);
hns_rcb_comm_exc_irq_en(rcb_common, 0);
reg_val = dsaf_read_dev(rcb_common, RCB_COM_CFG_INIT_FLAG_REG);
if (0x1 != (reg_val & 0x1)) {
dev_err(rcb_common->dsaf_dev->dev,
... | 5,556 |
78,962 | 0 | CopyKeyNamesToKeymap(struct xkb_keymap *keymap, KeyNamesInfo *info)
{
struct xkb_key *keys;
xkb_keycode_t min_key_code, max_key_code, kc;
min_key_code = info->min_key_code;
max_key_code = info->max_key_code;
/* If the keymap has no keys, let's just use the safest pair we know. */
if (min_key_co... | 5,557 |
164,947 | 0 | void ResourceDispatcherHostImpl::OnInit() {
scheduler_.reset(new network::ResourceScheduler(enable_resource_scheduler_));
}
| 5,558 |
126,898 | 0 | void BrowserTabStripController::CloseTab(int model_index,
CloseTabSource source) {
hover_tab_selector_.CancelTabTransition();
tabstrip_->PrepareForCloseAt(model_index, source);
model_->CloseTabContentsAt(model_index,
TabStripModel::CLOSE_USER_... | 5,559 |
33,931 | 0 | blank_screen(void)
{
#if CURSES_ENABLED
int lpc = 0;
for (lpc = 0; lpc < LINES; lpc++) {
move(lpc, 0);
clrtoeol();
}
move(0, 0);
refresh();
#endif
}
| 5,560 |
136,648 | 0 | SubstituteData FrameLoader::DefaultSubstituteDataForURL(const KURL& url) {
if (!ShouldTreatURLAsSrcdocDocument(url))
return SubstituteData();
String srcdoc = frame_->DeprecatedLocalOwner()->FastGetAttribute(srcdocAttr);
DCHECK(!srcdoc.IsNull());
CString encoded_srcdoc = srcdoc.Utf8();
return SubstituteDat... | 5,561 |
123,250 | 0 | bool RenderWidgetHostViewAura::ShouldDescendIntoChildForEventHandling(
aura::Window* child,
const gfx::Point& location) {
return true;
}
| 5,562 |
57,686 | 0 | void kvm_arch_commit_memory_region(struct kvm *kvm,
const struct kvm_userspace_memory_region *mem,
const struct kvm_memory_slot *old,
const struct kvm_memory_slot *new,
enum kvm_mr_change change)
{
int nr_mmu_pages = 0;
if (!kvm->arch.n_requested_mmu_pages)
nr_mmu_pages = kvm_mmu_calculate_mmu_page... | 5,563 |
116,515 | 0 | ChromeWebUIControllerFactory::ChromeWebUIControllerFactory() {
}
| 5,564 |
107,492 | 0 | static Eina_Bool _ewk_view_smart_pre_render_region(Ewk_View_Smart_Data* smartData, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height, float zoom)
{
WRN("not supported by engine. smartDAta=%p area=%d,%d+%dx%d, zoom=%f",
smartData, x, y, width, height, zoom);
return false;
}
| 5,565 |
112,791 | 0 | void PrintPreviewUI::OnInitiatorTabClosed() {
TabContents* preview_tab =
TabContents::FromWebContents(web_ui()->GetWebContents());
printing::BackgroundPrintingManager* background_printing_manager =
g_browser_process->background_printing_manager();
if (background_printing_manager->HasPrintPreviewTab(pr... | 5,566 |
98,907 | 0 | PassRefPtr<Element> HTMLConstructionSite::attachToCurrent(PassRefPtr<Element> child)
{
return attach(currentElement(), child);
}
| 5,567 |
36,569 | 0 | static void cgsleep_spec(struct timespec *ts_diff, const struct timespec *ts_start)
{
struct timespec now;
timeraddspec(ts_diff, ts_start);
cgtimer_time(&now);
timersubspec(ts_diff, &now);
if (unlikely(ts_diff->tv_sec < 0))
return;
nanosleep(ts_diff, NULL);
}
| 5,568 |
127,416 | 0 | void StyleResolver::updateFont(StyleResolverState& state)
{
state.fontBuilder().createFont(m_fontSelector, state.parentStyle(), state.style());
}
| 5,569 |
17,871 | 0 | static struct dirent *local_readdir(FsContext *ctx, V9fsFidOpenState *fs)
{
struct dirent *entry;
again:
entry = readdir(fs->dir.stream);
if (!entry) {
return NULL;
}
if (ctx->export_flags & V9FS_SM_MAPPED) {
entry->d_type = DT_UNKNOWN;
} else if (ctx->export_flags & V9FS_SM_MA... | 5,570 |
3,769 | 0 | _dbus_concat_dir_and_file (DBusString *dir,
const DBusString *next_component)
{
dbus_bool_t dir_ends_in_slash;
dbus_bool_t file_starts_with_slash;
if (_dbus_string_get_length (dir) == 0 ||
_dbus_string_get_length (next_component) == 0)
return TRUE;
dir_ends_in_slash ... | 5,571 |
171,051 | 0 | void RilSapSocket::onCommandsSocketClosed() {
sendDisconnect();
RLOGE("Socket command closed");
}
| 5,572 |
152,634 | 0 | void HTMLFormControlElement::dispatchBlurEvent(
Element* newFocusedElement,
WebFocusType type,
InputDeviceCapabilities* sourceCapabilities) {
if (type != WebFocusTypePage)
m_wasFocusedByMouse = false;
HTMLElement::dispatchBlurEvent(newFocusedElement, type, sourceCapabilities);
hideVisibleValidatio... | 5,573 |
88,477 | 0 | static MagickBooleanType WritePTIFImage(const ImageInfo *image_info,
Image *image)
{
ExceptionInfo
*exception;
Image
*images,
*next,
*pyramid_image;
ImageInfo
*write_info;
MagickBooleanType
status;
PointInfo
resolution;
size_t
columns,
rows;
/*
Create pyrami... | 5,574 |
151,246 | 0 | static bool HasTextContent(Resource* cached_resource) {
Resource::Type type = cached_resource->GetType();
return type == Resource::kCSSStyleSheet || type == Resource::kXSLStyleSheet ||
type == Resource::kScript || type == Resource::kRaw ||
type == Resource::kImportResource || type == Resource::kMa... | 5,575 |
142,289 | 0 | ChromePasswordManagerClient::GetPasswordManager() const {
return &password_manager_;
}
| 5,576 |
15,073 | 0 | int dom_document_resolve_externals_read(dom_object *obj, zval **retval TSRMLS_DC)
{
dom_doc_propsptr doc_prop;
ALLOC_ZVAL(*retval);
if (obj->document) {
doc_prop = dom_get_doc_props(obj->document);
ZVAL_BOOL(*retval, doc_prop->resolveexternals);
} else {
ZVAL_FALSE(*retval);
}
return SUCCESS;
}
| 5,577 |
146,065 | 0 | void WebGL2RenderingContextBase::clearBufferuiv(GLenum buffer,
GLint drawbuffer,
const Vector<GLuint>& value,
GLuint src_offset) {
if (isContextLost() ||
!ValidateClear... | 5,578 |
88,679 | 0 | static int dwc3_gadget_set_ep_config(struct dwc3 *dwc, struct dwc3_ep *dep,
bool modify, bool restore)
{
const struct usb_ss_ep_comp_descriptor *comp_desc;
const struct usb_endpoint_descriptor *desc;
struct dwc3_gadget_ep_cmd_params params;
if (dev_WARN_ONCE(dwc->dev, modify && restore,
"Can't modify and re... | 5,579 |
19,666 | 0 | static struct page *alloc_fresh_huge_page_node(struct hstate *h, int nid)
{
struct page *page;
if (h->order >= MAX_ORDER)
return NULL;
page = alloc_pages_exact_node(nid,
htlb_alloc_mask|__GFP_COMP|__GFP_THISNODE|
__GFP_REPEAT|__GFP_NOWARN,
huge_page_order(h));
if (page) {
if (arch_prepare_hugepage(p... | 5,580 |
109,066 | 0 | WebKit::WebColorChooser* RenderViewImpl::createColorChooser(
WebKit::WebColorChooserClient* client,
const WebKit::WebColor& initial_color) {
RendererWebColorChooserImpl* color_chooser =
new RendererWebColorChooserImpl(this, client);
color_chooser->Open(static_cast<SkColor>(initial_color));
return co... | 5,581 |
121,333 | 0 | void WebURLLoaderImpl::loadSynchronously(const WebURLRequest& request,
WebURLResponse& response,
WebURLError& error,
WebData& data) {
ResourceLoaderBridge::SyncLoadResponse sync_load_response;
... | 5,582 |
164,977 | 0 | void HTMLCanvasElement::AddListener(CanvasDrawListener* listener) {
listeners_.insert(listener);
}
| 5,583 |
186,588 | 1 | bool ChildProcessSecurityPolicyImpl::CanSetAsOriginHeader(int child_id,
const GURL& url) {
if (!url.is_valid())
return false; // Can't set invalid URLs as origin headers.
// about:srcdoc cannot be used as an origin
if (url == kAboutSrcDocURL)
return false;
// If this process can commit |url|, it can use |url| as an ... | 5,584 |
174,342 | 0 | status_t IPCThreadState::waitForResponse(Parcel *reply, status_t *acquireResult)
{
uint32_t cmd;
int32_t err;
while (1) {
if ((err=talkWithDriver()) < NO_ERROR) break;
err = mIn.errorCheck();
if (err < NO_ERROR) break;
if (mIn.dataAvail() == 0) continue;
cmd = (uint32_t)mIn.readInt32();
... | 5,585 |
4,130 | 0 | void Splash::pipeRunSimpleRGB8(SplashPipe *pipe) {
*pipe->destColorPtr++ = state->rgbTransferR[pipe->cSrc[0]];
*pipe->destColorPtr++ = state->rgbTransferG[pipe->cSrc[1]];
*pipe->destColorPtr++ = state->rgbTransferB[pipe->cSrc[2]];
*pipe->destAlphaPtr++ = 255;
++pipe->x;
}
| 5,586 |
86,866 | 0 | TEE_Result syscall_cipher_update(unsigned long state, const void *src,
size_t src_len, void *dst, uint64_t *dst_len)
{
return tee_svc_cipher_update_helper(state, false /* last_block */,
src, src_len, dst, dst_len);
}
| 5,587 |
92,041 | 0 | static bool blk_update_bidi_request(struct request *rq, blk_status_t error,
unsigned int nr_bytes,
unsigned int bidi_bytes)
{
if (blk_update_request(rq, error, nr_bytes))
return true;
/* Bidi request must be completed as a whole */
if (unlikely(blk_bidi_rq(rq)) &&
blk_update_request(rq->next_... | 5,588 |
162,474 | 0 | void ImageResource::MultipartDataReceived(const char* bytes, size_t size) {
DCHECK(multipart_parser_);
Resource::AppendData(bytes, size);
}
| 5,589 |
65,418 | 0 | check_lock_length(u64 offset, u64 length)
{
return ((length == 0) || ((length != NFS4_MAX_UINT64) &&
(length > ~offset)));
}
| 5,590 |
5,832 | 0 | static void ehci_trace_usbsts(uint32_t mask, int state)
{
/* interrupts */
if (mask & USBSTS_INT) {
trace_usb_ehci_usbsts("INT", state);
}
if (mask & USBSTS_ERRINT) {
trace_usb_ehci_usbsts("ERRINT", state);
}
if (mask & USBSTS_PCD) {
trace_usb_ehci_usbsts("PCD", state);
... | 5,591 |
113,105 | 0 | bool DownloadItemImpl::ShouldOpenFileBasedOnExtension() {
return delegate_->ShouldOpenFileBasedOnExtension(GetUserVerifiedFilePath());
}
| 5,592 |
10,221 | 0 | ft_glyphslot_init( FT_GlyphSlot slot )
{
FT_Driver driver = slot->face->driver;
FT_Driver_Class clazz = driver->clazz;
FT_Memory memory = driver->root.memory;
FT_Error error = FT_Err_Ok;
FT_Slot_Internal internal;
slot->library = driver->root.library;
if... | 5,593 |
161,144 | 0 | void MediaStreamManager::OnStreamStarted(const std::string& label) {
DeviceRequest* const request = FindRequest(label);
if (!request)
return;
if (request->ui_proxy) {
request->ui_proxy->OnStarted(
base::BindOnce(&MediaStreamManager::StopMediaStreamFromBrowser,
base::Unretai... | 5,594 |
47,471 | 0 | static int adf_ctl_ioctl_dev_config(struct file *fp, unsigned int cmd,
unsigned long arg)
{
int ret;
struct adf_user_cfg_ctl_data *ctl_data;
struct adf_accel_dev *accel_dev;
ret = adf_ctl_alloc_resources(&ctl_data, arg);
if (ret)
return ret;
accel_dev = adf_devmgr_get_dev_by_id(ctl_data->device_id);
... | 5,595 |
72,347 | 0 | no_identities(SocketEntry *e, u_int type)
{
struct sshbuf *msg;
int r;
if ((msg = sshbuf_new()) == NULL)
fatal("%s: sshbuf_new failed", __func__);
if ((r = sshbuf_put_u8(msg,
(type == SSH_AGENTC_REQUEST_RSA_IDENTITIES) ?
SSH_AGENT_RSA_IDENTITIES_ANSWER :
SSH2_AGENT_IDENTITIES_ANSWER)) != 0 ||
... | 5,596 |
165,531 | 0 | void ContentSecurityPolicy::LogToConsole(ConsoleMessage* console_message,
LocalFrame* frame) {
if (frame)
frame->GetDocument()->AddConsoleMessage(console_message);
else if (execution_context_)
execution_context_->AddConsoleMessage(console_message);
else
console... | 5,597 |
167,861 | 0 | void FrameLoader::SetReferrerForFrameRequest(FrameLoadRequest& frame_request) {
ResourceRequest& request = frame_request.GetResourceRequest();
Document* origin_document = frame_request.OriginDocument();
if (!origin_document)
return;
if (request.DidSetHTTPReferrer())
return;
if (frame_request.GetShoul... | 5,598 |
7,827 | 0 | TT_Run_Context( TT_ExecContext exec,
FT_Bool debug )
{
FT_Error error;
if ( ( error = TT_Goto_CodeRange( exec, tt_coderange_glyph, 0 ) )
!= TT_Err_Ok )
return error;
exec->zp0 = exec->pts;
exec->zp1 = exec->pts;
exec->zp2 = exec->pts;
exec->G... | 5,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.