unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
22,064 | 0 | raptor_turtle_writer_literal(raptor_turtle_writer* turtle_writer,
raptor_namespace_stack *nstack,
const unsigned char* s, const unsigned char* lang,
raptor_uri* datatype)
{
/* DBL_MAX = 309 decimal digits */
#define INT_MAX_LEN 3... | 6,500 |
152,370 | 0 | RenderFrameImpl::GetURLLoaderFactory() {
return GetLoaderFactoryBundle();
}
| 6,501 |
169,388 | 0 | void SurfaceHitTestReadyNotifier::WaitForSurfaceReady(
RenderWidgetHostViewBase* root_view) {
viz::SurfaceId root_surface_id = root_view->GetCurrentSurfaceId();
while (!ContainsSurfaceId(root_surface_id)) {
base::RunLoop run_loop;
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, ... | 6,502 |
44,276 | 0 | static bool always_dump_vma(struct vm_area_struct *vma)
{
/* Any vsyscall mappings? */
if (vma == get_gate_vma(vma->vm_mm))
return true;
/*
* Assume that all vmas with a .name op should always be dumped.
* If this changes, a new vm_ops field can easily be added.
*/
if (vma->vm_ops && vma->vm_ops->name && v... | 6,503 |
110,648 | 0 | bool GLES2DecoderImpl::ValidateCompressedTexSubDimensions(
const char* function_name,
GLenum target, GLint level, GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height, GLenum format,
TextureManager::TextureInfo* texture) {
if (xoffset < 0 || yoffset < 0) {
SetGLError(
GL_INVALID_VAL... | 6,504 |
58,832 | 0 | struct page *read_cache_page_async(struct address_space *mapping,
pgoff_t index,
int (*filler)(void *,struct page*),
void *data)
{
struct page *page;
int err;
retry:
page = __read_cache_page(mapping, index, filler, data);
if (IS_ERR(page))
return page;
if (PageUptodate(page))
goto out;
lock_page... | 6,505 |
104,961 | 0 | void GraphicsContext::drawRect(const IntRect& rect)
{
if (paintingDisabled())
return;
m_data->context->SetPen(wxPen(strokeColor(), strokeThickness(), strokeStyleToWxPenStyle(strokeStyle())));
m_data->context->DrawRectangle(rect.x(), rect.y(), rect.width(), rect.height());
}
| 6,506 |
161,694 | 0 | void VaapiVideoDecodeAccelerator::ReturnCurrInputBuffer_Locked() {
DCHECK(decoder_thread_task_runner_->BelongsToCurrentThread());
lock_.AssertAcquired();
DCHECK(curr_input_buffer_.get());
curr_input_buffer_.reset();
TRACE_COUNTER1("Video Decoder", "Input buffers", input_buffers_.size());
}
| 6,507 |
161,739 | 0 | PlatformSensorAccelerometerMac::GetDefaultConfiguration() {
return PlatformSensorConfiguration(
SensorTraits<SensorType::ACCELEROMETER>::kDefaultFrequency);
}
| 6,508 |
120,618 | 0 | void Element::scrollByPages(int pages)
{
scrollByUnits(pages, ScrollByPage);
}
| 6,509 |
176,270 | 0 | static PropertyDetails GetDetailsImpl(JSObject* holder, uint32_t entry) {
uint32_t length = static_cast<uint32_t>(GetString(holder)->length());
if (entry < length) {
PropertyAttributes attributes =
static_cast<PropertyAttributes>(READ_ONLY | DONT_DELETE);
return PropertyDetails(kData, attributes, 0, PropertyCellT... | 6,510 |
156,647 | 0 | blink::ParsedFeaturePolicy CreateFPHeaderMatchesAll(
blink::mojom::FeaturePolicyFeature feature) {
blink::ParsedFeaturePolicy result(1);
result[0].feature = feature;
result[0].matches_all_origins = true;
return result;
}
| 6,511 |
22,870 | 0 | static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct nfs4_exception *exception)
{
struct nfs_client *clp = server->nfs_client;
struct nfs4_state *state = exception->state;
int ret = errorcode;
exception->retry = 0;
switch(errorcode) {
case 0:
return 0;
case -NFS4ERR_ADMIN... | 6,512 |
109,992 | 0 | HTMLSelectElement::HTMLSelectElement(const QualifiedName& tagName, Document* document, HTMLFormElement* form, bool createdByParser)
: HTMLFormControlElementWithState(tagName, document, form)
, m_typeAhead(this)
, m_size(0)
, m_lastOnChangeIndex(-1)
, m_activeSelectionAnchorIndex(-1)
, m_activeSe... | 6,513 |
70,156 | 0 | static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteSshort(int16 value)
{
if ((value<-0x80)||(value>0x7F))
return(TIFFReadDirEntryErrRange);
else
return(TIFFReadDirEntryErrOk);
}
| 6,514 |
169,318 | 0 | void SendRoutedGestureTapSequence(content::WebContents* web_contents,
gfx::Point point) {
RenderWidgetHostViewAura* rwhva = static_cast<RenderWidgetHostViewAura*>(
web_contents->GetRenderWidgetHostView());
ui::GestureEventDetails gesture_tap_down_details(ui::ET_GESTURE_TAP_DO... | 6,515 |
4,570 | 0 | static inline void php_openssl_rand_add_timeval() /* {{{ */
{
struct timeval tv;
gettimeofday(&tv, NULL);
RAND_add(&tv, sizeof(tv), 0.0);
}
/* }}} */
| 6,516 |
99,555 | 0 | BookmarkDrag::~BookmarkDrag() {
}
| 6,517 |
129,173 | 0 | void Framebuffer::OnTextureRefDetached(TextureRef* texture) {
manager_->OnTextureRefDetached(texture);
}
| 6,518 |
50,875 | 0 | set_num_723(unsigned char *p, uint16_t value)
{
archive_le16enc(p, value);
archive_be16enc(p+2, value);
}
| 6,519 |
25,440 | 0 | static ieee754sp fpemu_sp_rsqrt(ieee754sp s)
{
return ieee754sp_div(ieee754sp_one(0), ieee754sp_sqrt(s));
}
| 6,520 |
140,634 | 0 | void OutOfProcessInstance::NotifyNumberOfFindResultsChanged(int total,
bool final_result) {
if (final_result) {
NumberOfFindResultsChanged(total, final_result);
SetTickmarks(tickmarks_);
return;
}
if (recently_sent_find_update_)
return;
... | 6,521 |
1,407 | 0 | XcursorFileSave (FILE * file,
const XcursorComments *comments,
const XcursorImages *images)
{
XcursorFile f;
if (!file || !comments || !images)
return XcursorFalse;
_XcursorStdioFileInitialize (file, &f);
return XcursorXcFileSave (&f, comments, images) && fflush (file) != EOF;
}
| 6,522 |
10,846 | 0 | int MacroExpander::expandEscapedMacro(const QString &str, int pos, QStringList &ret)
{
ushort option = str[pos+1].unicode();
switch (option) {
case 'f': // Filepath
case 'F': // case insensitive
if (m_device.is<Solid::StorageAccess>()) {
ret << m_device.as<Solid::StorageAccess>()->f... | 6,523 |
75,629 | 0 | static int read_float_info (WavpackStream *wps, WavpackMetadata *wpmd)
{
int bytecnt = wpmd->byte_length;
char *byteptr = (char *)wpmd->data;
if (bytecnt != 4)
return FALSE;
wps->float_flags = *byteptr++;
wps->float_shift = *byteptr++;
wps->float_max_exp = *byteptr++;
wps->float_no... | 6,524 |
22,806 | 0 | int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr)
{
int status;
spin_lock(&inode->i_lock);
/* Don't do a WCC update if these attributes are already stale */
if ((fattr->valid & NFS_ATTR_FATTR) == 0 ||
!nfs_inode_attrs_need_update(inode, fattr)) {
fattr->valid &= ~(NFS_ATTR_W... | 6,525 |
164,567 | 0 | static int dbpageBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
int i;
int iPlan = 0;
/* If there is a schema= constraint, it must be honored. Report a
** ridiculously large estimated cost if the schema= constraint is
** unavailable
*/
for(i=0; i<pIdxInfo->nConstraint; i++){
struct sqli... | 6,526 |
114,580 | 0 | std::string RenderThreadImpl::GetLocale() {
const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
const std::string& lang =
parsed_command_line.GetSwitchValueASCII(switches::kLang);
DCHECK(!lang.empty() ||
(!parsed_command_line.HasSwitch(switches::kRendererProcess) &&
!par... | 6,527 |
76,444 | 0 | void mremap_userfaultfd_prep(struct vm_area_struct *vma,
struct vm_userfaultfd_ctx *vm_ctx)
{
struct userfaultfd_ctx *ctx;
ctx = vma->vm_userfaultfd_ctx.ctx;
if (ctx && (ctx->features & UFFD_FEATURE_EVENT_REMAP)) {
vm_ctx->ctx = ctx;
userfaultfd_ctx_get(ctx);
WRITE_ONCE(ctx->mmap_changing, true);
}
}... | 6,528 |
60,981 | 0 | new_files_state_unref (NewFilesState *state)
{
state->count--;
if (state->count == 0)
{
if (state->directory)
{
state->directory->details->new_files_in_progress =
g_list_remove (state->directory->details->new_files_in_progress,
stat... | 6,529 |
87,013 | 0 | static DetectTransaction GetDetectTx(const uint8_t ipproto, const AppProto alproto,
void *alstate, const uint64_t tx_id, void *tx_ptr, const int tx_end_state,
const uint8_t flow_flags)
{
const uint64_t detect_flags = AppLayerParserGetTxDetectFlags(ipproto, alproto, tx_ptr, flow_flags);
if (detec... | 6,530 |
118,663 | 0 | UserCloudPolicyManagerFactoryChromeOS::GetForProfile(
Profile* profile) {
return GetInstance()->GetManagerForProfile(profile);
}
| 6,531 |
10,509 | 0 | iscsi_co_writev_flags(BlockDriverState *bs, int64_t sector_num, int nb_sectors,
QEMUIOVector *iov, int flags)
{
IscsiLun *iscsilun = bs->opaque;
struct IscsiTask iTask;
uint64_t lba;
uint32_t num_sectors;
bool fua = flags & BDRV_REQ_FUA;
if (fua) {
assert(iscsilun-... | 6,532 |
91,425 | 0 | static int check_xadd(struct bpf_verifier_env *env, int insn_idx, struct bpf_insn *insn)
{
int err;
if ((BPF_SIZE(insn->code) != BPF_W && BPF_SIZE(insn->code) != BPF_DW) ||
insn->imm != 0) {
verbose(env, "BPF_XADD uses reserved fields\n");
return -EINVAL;
}
/* check src1 operand */
err = check_reg_arg(e... | 6,533 |
149,061 | 0 | static void checkListProperties(sqlite3 *db){
sqlite3 *p;
for(p=sqlite3BlockedList; p; p=p->pNextBlocked){
int seen = 0;
sqlite3 *p2;
/* Verify property (1) */
assert( p->pUnlockConnection || p->pBlockingConnection );
/* Verify property (2) */
for(p2=sqlite3BlockedList; p2!=p; p2=p2->pNext... | 6,534 |
27,903 | 0 | static size_t fuse_send_write_pages(struct fuse_req *req, struct file *file,
struct inode *inode, loff_t pos,
size_t count)
{
size_t res;
unsigned offset;
unsigned i;
for (i = 0; i < req->num_pages; i++)
fuse_wait_on_page_writeback(inode, req->pages[i]->index);
res = fuse_send_write(req, file, ... | 6,535 |
175,484 | 0 | static int out_get_next_write_timestamp(const struct audio_stream_out *stream,
int64_t *timestamp)
{
(void)stream;
(void)timestamp;
return -EINVAL;
}
| 6,536 |
169,583 | 0 | void CastStreamingNativeHandler::GetSupportedParamsCastRtpStream(
const v8::FunctionCallbackInfo<v8::Value>& args) const {
CHECK_EQ(1, args.Length());
CHECK(args[0]->IsInt32());
const int transport_id = args[0]->ToInt32(args.GetIsolate())->Value();
CastRtpStream* transport = GetRtpStreamOrThrow(transport_i... | 6,537 |
125,361 | 0 | void GetDocumentResourceIdOnBlockingPool(
const FilePath& local_file_path,
std::string* resource_id) {
DCHECK(resource_id);
if (DocumentEntry::HasHostedDocumentExtension(local_file_path)) {
std::string error;
DictionaryValue* dict_value = NULL;
JSONFileValueSerializer serializer(local_file_path... | 6,538 |
21,889 | 0 | int drm_mode_create_dumb_ioctl(struct drm_device *dev,
void *data, struct drm_file *file_priv)
{
struct drm_mode_create_dumb *args = data;
if (!dev->driver->dumb_create)
return -ENOSYS;
return dev->driver->dumb_create(file_priv, dev, args);
}
| 6,539 |
82,082 | 0 | mrb_define_class_under(mrb_state *mrb, struct RClass *outer, const char *name, struct RClass *super)
{
mrb_sym id = mrb_intern_cstr(mrb, name);
struct RClass * c;
#if 0
if (!super) {
mrb_warn(mrb, "no super class for '%S::%S', Object assumed",
mrb_obj_value(outer), mrb_sym2str(mrb, id));
}
#en... | 6,540 |
162,628 | 0 | HeadlessDevToolsManagerDelegate::GetWindowBounds(
content::DevToolsAgentHost* agent_host,
int session_id,
int command_id,
const base::DictionaryValue* params) {
HeadlessWebContentsImpl* web_contents;
const base::Value* window_id_value = params->FindKey("windowId");
if (!window_id_value || !window_... | 6,541 |
106,921 | 0 | void RenderBox::removeFloatingOrPositionedChildFromBlockLists()
{
ASSERT(isFloatingOrPositioned());
if (documentBeingDestroyed())
return;
if (isFloating()) {
RenderBlock* parentBlock = 0;
for (RenderObject* curr = parent(); curr && !curr->isRenderView(); curr = curr->parent()) {
... | 6,542 |
108,969 | 0 | void RenderViewImpl::OnSetActive(bool active) {
if (webview())
webview()->setIsActive(active);
#if defined(OS_MACOSX)
std::set<WebPluginDelegateProxy*>::iterator plugin_it;
for (plugin_it = plugin_delegates_.begin();
plugin_it != plugin_delegates_.end(); ++plugin_it) {
(*plugin_it)->SetWindowFocus... | 6,543 |
83,397 | 0 | DeleteRoute(PMIB_IPFORWARD_ROW2 fwd_row)
{
return DeleteIpForwardEntry2(fwd_row);
}
| 6,544 |
37,316 | 0 | static void vmx_vcpu_put(struct kvm_vcpu *vcpu)
{
__vmx_load_host_state(to_vmx(vcpu));
if (!vmm_exclusive) {
__loaded_vmcs_clear(to_vmx(vcpu)->loaded_vmcs);
vcpu->cpu = -1;
kvm_cpu_vmxoff();
}
}
| 6,545 |
173,834 | 0 | OMX_ERRORTYPE omx_video::free_buffer(OMX_IN OMX_HANDLETYPE hComp,
OMX_IN OMX_U32 port,
OMX_IN OMX_BUFFERHEADERTYPE* buffer)
{
(void)hComp;
OMX_ERRORTYPE eRet = OMX_ErrorNone;
unsigned int nPortIndex;
DEBUG_PRINT_LOW("In for encoder free_buffer");
if (m_state == OMX_... | 6,546 |
82,036 | 0 | R_API ut64 r_anal_bb_opaddr_at(RAnalBlock *bb, ut64 off) {
ut16 delta, delta_off, last_delta;
int i;
if (!r_anal_bb_is_in_offset (bb, off)) {
return UT64_MAX;
}
last_delta = 0;
delta_off = off - bb->addr;
for (i = 0; i < bb->ninstr; i++) {
delta = r_anal_bb_offset_inst (bb, i);
if (delta > delta_off) {
... | 6,547 |
138,452 | 0 | void Document::setWindowAttributeEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener)
{
LocalDOMWindow* domWindow = this->domWindow();
if (!domWindow)
return;
domWindow->setAttributeEventListener(eventType, listener);
}
| 6,548 |
151,013 | 0 | void DefaultBindingsDelegate::OpenInNewTab(const std::string& url) {
content::OpenURLParams params(GURL(url), content::Referrer(),
WindowOpenDisposition::NEW_FOREGROUND_TAB,
ui::PAGE_TRANSITION_LINK, false);
Browser* browser = FindBrowser(web_contents_... | 6,549 |
4,557 | 0 | static EVP_PKEY * php_openssl_generate_private_key(struct php_x509_request * req)
{
char * randfile = NULL;
int egdsocket, seeded;
EVP_PKEY * return_val = NULL;
if (req->priv_key_bits < MIN_KEY_LENGTH) {
php_error_docref(NULL, E_WARNING, "private key length is too short; it needs to be at least %d bits, not %d",... | 6,550 |
60,403 | 0 | static int bnep_session(void *arg)
{
struct bnep_session *s = arg;
struct net_device *dev = s->dev;
struct sock *sk = s->sock->sk;
struct sk_buff *skb;
wait_queue_t wait;
BT_DBG("");
set_user_nice(current, -15);
init_waitqueue_entry(&wait, current);
add_wait_queue(sk_sleep(sk), &wait);
while (1) {
set_cu... | 6,551 |
182,588 | 1 | bool f2fs_init_extent_tree(struct inode *inode, struct f2fs_extent *i_ext)
{
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
struct extent_tree *et;
struct extent_node *en;
struct extent_info ei;
if (!f2fs_may_extent_tree(inode)) {
/* drop largest extent */
if (i_ext && i_ext->len) {
i_ext->len = 0;
ret... | 6,552 |
157,204 | 0 | void WebMediaPlayerImpl::ExitPictureInPicture(
blink::WebMediaPlayer::PipWindowClosedCallback callback) {
delegate_->DidPictureInPictureModeEnd(delegate_id_, std::move(callback));
OnPictureInPictureModeEnded();
}
| 6,553 |
138,830 | 0 | MockRenderProcessHost* TestRenderViewHost::GetProcess() const {
return static_cast<MockRenderProcessHost*>(RenderViewHostImpl::GetProcess());
}
| 6,554 |
187,647 | 1 | image_transform_png_set_background_set(PNG_CONST image_transform *this,
transform_display *that, png_structp pp, png_infop pi)
{
png_byte colour_type, bit_depth;
png_byte random_bytes[8]; /* 8 bytes - 64 bits - the biggest pixel */
int expand;
png_color_16 back;
/* We need a background colour, because we don't know ex... | 6,555 |
36,424 | 0 | static int pppol2tp_session_ioctl(struct l2tp_session *session,
unsigned int cmd, unsigned long arg)
{
struct ifreq ifr;
int err = 0;
struct sock *sk;
int val = (int) arg;
struct pppol2tp_session *ps = l2tp_session_priv(session);
struct l2tp_tunnel *tunnel = session->tunnel;
struct pppol2tp_ioc_stats stats... | 6,556 |
4,602 | 0 | PHP_FUNCTION(openssl_private_encrypt)
{
zval *key, *crypted;
EVP_PKEY *pkey;
int cryptedlen;
zend_string *cryptedbuf = NULL;
int successful = 0;
zend_resource *keyresource = NULL;
char * data;
size_t data_len;
zend_long padding = RSA_PKCS1_PADDING;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz/z|l", &data, ... | 6,557 |
123,656 | 0 | gfx::Size GpuCommandBufferStub::GetSurfaceSize() const {
if (!surface_)
return gfx::Size();
return surface_->GetSize();
}
| 6,558 |
41,155 | 0 | static void tcp_fixup_rcvbuf(struct sock *sk)
{
u32 mss = tcp_sk(sk)->advmss;
u32 icwnd = TCP_DEFAULT_INIT_RCVWND;
int rcvmem;
/* Limit to 10 segments if mss <= 1460,
* or 14600/mss segments, with a minimum of two segments.
*/
if (mss > 1460)
icwnd = max_t(u32, (1460 * TCP_DEFAULT_INIT_RCVWND) / mss, 2);
... | 6,559 |
100,621 | 0 | VoiceInteractionOverlay::~VoiceInteractionOverlay() {}
| 6,560 |
85,914 | 0 | void dm_lock_md_type(struct mapped_device *md)
{
mutex_lock(&md->type_lock);
}
| 6,561 |
144,645 | 0 | void WebContentsImpl::Replace(const base::string16& word) {
RenderFrameHost* focused_frame = GetFocusedFrame();
if (!focused_frame)
return;
focused_frame->Send(new InputMsg_Replace(
focused_frame->GetRoutingID(), word));
}
| 6,562 |
115,975 | 0 | void ewk_frame_view_create_for_view(Evas_Object* ewkFrame, Evas_Object* view)
{
DBG("ewkFrame=%p, view=%p", ewkFrame, view);
EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData);
EINA_SAFETY_ON_NULL_RETURN(smartData->frame);
Evas_Coord width, height;
evas_object_geometry_get(view, 0, 0, &width, &height)... | 6,563 |
65,105 | 0 | static MagickBooleanType ReadDXT5(Image *image, DDSInfo *dds_info,
ExceptionInfo *exception)
{
DDSColors
colors;
ssize_t
j,
y;
MagickSizeType
alpha_bits;
PixelPacket
*q;
register ssize_t
i,
x;
unsigned char
a0,
a1;
size_t
alpha,
bits,
code,
alpha... | 6,564 |
96,025 | 0 | int FS_FindVM(void **startSearch, char *found, int foundlen, const char *name, int enableDll)
{
searchpath_t *search, *lastSearch;
directory_t *dir;
pack_t *pack;
char dllName[MAX_OSPATH], qvmName[MAX_OSPATH];
char *netpath;
if(!fs_searchpaths)
Com_Error(ERR_FATAL, "Filesystem call made without initialization"... | 6,565 |
80,012 | 0 | GF_Err clap_Size(GF_Box *s)
{
s->size += 32;
return GF_OK;
}
| 6,566 |
79,128 | 0 | static ssize_t ucma_connect(struct ucma_file *file, const char __user *inbuf,
int in_len, int out_len)
{
struct rdma_ucm_connect cmd;
struct rdma_conn_param conn_param;
struct ucma_context *ctx;
int ret;
if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
return -EFAULT;
if (!cmd.conn_param.valid)
return -... | 6,567 |
63,620 | 0 | static inline void php_register_server_variables(TSRMLS_D)
{
zval *array_ptr = NULL;
ALLOC_ZVAL(array_ptr);
array_init(array_ptr);
INIT_PZVAL(array_ptr);
if (PG(http_globals)[TRACK_VARS_SERVER]) {
zval_ptr_dtor(&PG(http_globals)[TRACK_VARS_SERVER]);
}
PG(http_globals)[TRACK_VARS_SERVER] = array_ptr;
/* Serv... | 6,568 |
18,477 | 0 | static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val)
{
int error = 0;
char if_file[128];
FILE *file;
char cmd[512];
char *mac_addr;
/*
* Set the configuration for the specified interface with
* the information provided. Since there is no standard
* way to configure an interface, w... | 6,569 |
150,939 | 0 | void Bluetooth::ContextDestroyed(ExecutionContext*) {
client_bindings_.CloseAllBindings();
}
| 6,570 |
92,304 | 0 | copyEntityTable(XML_Parser oldParser,
HASH_TABLE *newTable,
STRING_POOL *newPool,
const HASH_TABLE *oldTable)
{
HASH_TABLE_ITER iter;
const XML_Char *cachedOldBase = NULL;
const XML_Char *cachedNewBase = NULL;
hashTableIterInit(&iter, oldTable);
for (;;) {
... | 6,571 |
167,011 | 0 | FrameMsg_Navigate_Type::Value GetNavigationType(
const GURL& old_url,
const GURL& new_url,
ReloadType reload_type,
const NavigationEntryImpl& entry,
const FrameNavigationEntry& frame_entry,
bool is_same_document_history_load) {
switch (reload_type) {
case ReloadType::NORMAL:
return F... | 6,572 |
145,795 | 0 | static BROTLI_INLINE void ProcessSingleCodeLength(uint32_t code_len,
uint32_t* symbol, uint32_t* repeat, uint32_t* space,
uint32_t* prev_code_len, uint16_t* symbol_lists,
uint16_t* code_length_histo, int* next_symbol) {
*repeat = 0;
if (code_len != 0) { /* code_len == 1..15 */
symbol_lists[next_symb... | 6,573 |
96,167 | 0 | MagickExport QuantumFormatType GetQuantumFormat(const QuantumInfo *quantum_info)
{
assert(quantum_info != (QuantumInfo *) NULL);
assert(quantum_info->signature == MagickSignature);
return(quantum_info->format);
}
| 6,574 |
104,138 | 0 | error::Error GLES2DecoderImpl::HandleGetString(
uint32 immediate_data_size, const gles2::GetString& c) {
GLenum name = static_cast<GLenum>(c.name);
if (!validators_->string_type.IsValid(name)) {
SetGLError(GL_INVALID_ENUM, "glGetString: name GL_INVALID_ENUM");
return error::kNoError;
}
const char* g... | 6,575 |
163,225 | 0 | void ExpectChildFrameCollapsed(Shell* shell,
const std::string& frame_id,
bool expect_collapsed) {
ExpectChildFrameSetAsCollapsedInFTN(shell, expect_collapsed);
ExpectChildFrameCollapsedInLayout(shell, frame_id, expect_collapsed);
}
| 6,576 |
15,930 | 0 | Container::Container(WEBP_MetaHandler* handler) : Chunk(NULL, handler)
{
this->needsRewrite = false;
XMP_IO* file = handler->parent->ioRef;
file->Seek(12, kXMP_SeekFromStart);
XMP_Int64 size = handler->initialFileSize;
XMP_Uns32 peek = 0;
while (file->Offset() < size) {
peek = XIO::... | 6,577 |
4,288 | 0 | PHP_FUNCTION(connection_status)
{
RETURN_LONG(PG(connection_status));
}
| 6,578 |
175,129 | 0 | static bool is_wifi_interface(const char *name)
{
if (strncmp(name, "wlan", 4) != 0 && strncmp(name, "p2p", 3) != 0) {
/* not a wifi interface; ignore it */
return false;
} else {
return true;
}
}
| 6,579 |
152,482 | 0 | void RenderFrameImpl::PostMessageEvent(int32_t source_routing_id,
const base::string16& source_origin,
const base::string16& target_origin,
blink::TransferableMessage message) {
message.EnsureDataIsOwn... | 6,580 |
65,557 | 0 | __be32 nfsd4_bind_conn_to_session(struct svc_rqst *rqstp,
struct nfsd4_compound_state *cstate,
struct nfsd4_bind_conn_to_session *bcts)
{
__be32 status;
struct nfsd4_conn *conn;
struct nfsd4_session *session;
struct net *net = SVC_NET(rqstp);
struct nfsd_net *nn = net_generic(net, nfsd_net_id);
if ... | 6,581 |
6,970 | 0 | tt_cmap0_get_info( TT_CMap cmap,
TT_CMapInfo *cmap_info )
{
FT_Byte* p = cmap->data + 4;
cmap_info->format = 0;
cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p );
return FT_Err_Ok;
}
| 6,582 |
119,437 | 0 | void RenderThreadImpl::SetResourceDispatcherDelegate(
ResourceDispatcherDelegate* delegate) {
resource_dispatcher()->set_delegate(delegate);
}
| 6,583 |
163,442 | 0 | bool OmniboxViewViews::OnAfterPossibleChange(bool allow_keyword_ui_change) {
State new_state;
GetState(&new_state);
OmniboxView::StateChanges state_changes =
GetStateChanges(state_before_change_, new_state);
state_changes.text_differs =
state_changes.text_differs ||
(ime_composing_before_chan... | 6,584 |
66,633 | 0 | static int gs_cmd_reset(struct gs_usb *gsusb, struct gs_can *gsdev)
{
struct gs_device_mode *dm;
struct usb_interface *intf = gsdev->iface;
int rc;
dm = kzalloc(sizeof(*dm), GFP_KERNEL);
if (!dm)
return -ENOMEM;
dm->mode = GS_CAN_MODE_RESET;
rc = usb_control_msg(interface_to_usbdev(intf),
usb_sndctr... | 6,585 |
15,858 | 0 | static void virtio_net_set_queues(VirtIONet *n)
{
int i;
int r;
for (i = 0; i < n->max_queues; i++) {
if (i < n->curr_queues) {
r = peer_attach(n, i);
assert(!r);
} else {
r = peer_detach(n, i);
assert(!r);
}
}
}
| 6,586 |
18,486 | 0 | static int __meminit __add_zone(struct zone *zone, unsigned long phys_start_pfn)
{
struct pglist_data *pgdat = zone->zone_pgdat;
int nr_pages = PAGES_PER_SECTION;
int nid = pgdat->node_id;
int zone_type;
unsigned long flags;
zone_type = zone - pgdat->node_zones;
if (!zone->wait_table) {
int ret;
ret = init... | 6,587 |
174,141 | 0 | void OMX::CallbackDispatcher::dispatch(std::list<omx_message> &messages) {
if (mOwner == NULL) {
ALOGV("Would have dispatched a message to a node that's already gone.");
return;
}
mOwner->onMessages(messages);
}
| 6,588 |
174,988 | 0 | status_t CameraDeviceClient::flush() {
ATRACE_CALL();
ALOGV("%s", __FUNCTION__);
status_t res = OK;
if ( (res = checkPid(__FUNCTION__) ) != OK) return res;
Mutex::Autolock icl(mBinderSerializationLock);
if (!mDevice.get()) return DEAD_OBJECT;
return mDevice->flush();
}
| 6,589 |
148,371 | 0 | bool WebContentsImpl::FocusLocationBarByDefault() {
NavigationEntryImpl* entry = controller_.GetPendingEntry();
if (controller_.IsInitialNavigation() && entry &&
!entry->is_renderer_initiated() &&
entry->GetURL() == url::kAboutBlankURL) {
return true;
}
return delegate_ && delegate_->ShouldFocus... | 6,590 |
100,089 | 0 | bool ParseHostAndPort(std::string::const_iterator host_and_port_begin,
std::string::const_iterator host_and_port_end,
std::string* host,
int* port) {
if (host_and_port_begin >= host_and_port_end)
return false;
const char* auth_begin = &(*host_an... | 6,591 |
3,592 | 0 | int ssl3_get_cert_verify(SSL *s)
{
EVP_PKEY *pkey = NULL;
unsigned char *p;
int al, ok, ret = 0;
long n;
int type = 0, i, j;
X509 *peer;
const EVP_MD *md = NULL;
EVP_MD_CTX mctx;
EVP_MD_CTX_init(&mctx);
/*
* We should only process a CertificateVerify message if we have rece... | 6,592 |
92,218 | 0 | static int serdes_phy_create(struct serdes_ctrl *ctrl, u8 idx, struct phy **phy)
{
struct serdes_macro *macro;
*phy = devm_phy_create(ctrl->dev, NULL, &serdes_ops);
if (IS_ERR(*phy))
return PTR_ERR(*phy);
macro = devm_kzalloc(ctrl->dev, sizeof(*macro), GFP_KERNEL);
if (!macro)
return -ENOMEM;
macro->idx = ... | 6,593 |
48,535 | 0 | static int ion_debug_client_show(struct seq_file *s, void *unused)
{
struct ion_client *client = s->private;
struct rb_node *n;
size_t sizes[ION_NUM_HEAP_IDS] = {0};
const char *names[ION_NUM_HEAP_IDS] = {NULL};
int i;
mutex_lock(&debugfs_mutex);
if (!is_client_alive(client)) {
seq_printf(s, "ion_client 0x%p ... | 6,594 |
26,326 | 0 | static void sched_domain_node_span(int node, struct cpumask *span)
{
nodemask_t used_nodes;
int i;
cpumask_clear(span);
nodes_clear(used_nodes);
cpumask_or(span, span, cpumask_of_node(node));
node_set(node, used_nodes);
for (i = 1; i < SD_NODES_PER_DOMAIN; i++) {
int next_node = find_next_best_node(node, &u... | 6,595 |
151,897 | 0 | void RenderFrameHostImpl::CancelInitialHistoryLoad() {
NOTIMPLEMENTED();
}
| 6,596 |
21,347 | 0 | static unsigned offset_il_node(struct mempolicy *pol,
struct vm_area_struct *vma, unsigned long off)
{
unsigned nnodes = nodes_weight(pol->v.nodes);
unsigned target;
int c;
int nid = -1;
if (!nnodes)
return numa_node_id();
target = (unsigned int)off % nnodes;
c = 0;
do {
nid = next_node(nid, pol->v.nodes... | 6,597 |
181,421 | 1 | static int decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
PicContext *s = avctx->priv_data;
AVFrame *frame = data;
uint32_t *palette;
int bits_per_plane, bpp, etype, esize, npal, pos_after_pal;
int i, x, y, plane, tmp, ret, val;
bytestream2_init(&s->g, avpkt->data, avpkt->size);
if... | 6,598 |
27,435 | 0 | static inline void ipip6_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb)
{
if (INET_ECN_is_ce(iph->tos))
IP6_ECN_set_ce(ipv6_hdr(skb));
}
| 6,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.