unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
406 | 0 | fz_set_default_output_intent(fz_context *ctx, fz_default_colorspaces *default_cs, fz_colorspace *cs)
{
fz_drop_colorspace(ctx, default_cs->oi);
default_cs->oi = fz_keep_colorspace(ctx, cs);
switch (cs->n)
{
case 1:
if (default_cs->gray == fz_device_gray(ctx))
{
fz_drop_colorspace(ctx, default_cs->gray);
... | 11,500 |
70,082 | 0 | static void bmp_mask_get_shift_and_prec(OPJ_UINT32 mask, OPJ_UINT32* shift, OPJ_UINT32* prec)
{
OPJ_UINT32 l_shift, l_prec;
l_shift = l_prec = 0U;
if (mask != 0U) {
while ((mask & 1U) == 0U) {
mask >>= 1;
l_shift++;
}
while (mask & 1U) {
mask >>= 1;
l_prec++;
}
}
*shift = l_shift; *prec = l... | 11,501 |
38,600 | 0 | void sta_info_stop(struct ieee80211_local *local)
{
del_timer_sync(&local->sta_cleanup);
}
| 11,502 |
160,579 | 0 | void RenderFrameImpl::DidClearWindowObject() {
if (enabled_bindings_ & BINDINGS_POLICY_WEB_UI)
WebUIExtension::Install(frame_);
if (enabled_bindings_ & BINDINGS_POLICY_DOM_AUTOMATION)
DomAutomationController::Install(this, frame_);
if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION)
StatsColle... | 11,503 |
63,812 | 0 | httpd_logstats( long secs )
{
if ( str_alloc_count > 0 )
syslog( LOG_INFO,
" libhttpd - %d strings allocated, %lu bytes (%g bytes/str)",
str_alloc_count, (unsigned long) str_alloc_size,
(float) str_alloc_size / str_alloc_count );
}
| 11,504 |
131,919 | 0 | static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgTestInterfaceEmptyArg", "TestObjectPython", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 2)) {
... | 11,505 |
148,006 | 0 | void V8TestObject::UseToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg");
test_object_v8_internal::UseToImpl4Arg... | 11,506 |
157,005 | 0 | void WebMediaPlayerMS::SetPreload(WebMediaPlayer::Preload preload) {
DCHECK(thread_checker_.CalledOnValidThread());
}
| 11,507 |
59,616 | 0 | rngStreamTest(const char *filename,
const char *resul ATTRIBUTE_UNUSED,
const char *errr ATTRIBUTE_UNUSED,
int options) {
const char *base = baseFilename(filename);
const char *base2;
const char *instance;
int res = 0, len, ret;
char pattern[500];
char prefix[... | 11,508 |
20,621 | 0 | static void kvm_free_vmm_area(void)
{
if (kvm_vmm_base) {
/*Zero this area before free to avoid bits leak!!*/
memset((void *)kvm_vmm_base, 0, KVM_VMM_SIZE);
free_pages(kvm_vmm_base, get_order(KVM_VMM_SIZE));
kvm_vmm_base = 0;
kvm_vm_buffer = 0;
kvm_vsa_base = 0;
}
}
| 11,509 |
185,103 | 1 | void GpuCommandBufferStub::OnCreateTransferBuffer(int32 size,
int32 id_request,
IPC::Message* reply_message) {
TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnCreateTransferBuffer");
if (command_buffer_.get()) {
... | 11,510 |
127,041 | 0 | PassRefPtr<DateTimeChooser> ChromeClientImpl::openDateTimeChooser(DateTimeChooserClient* pickerClient, const DateTimeChooserParameters& parameters)
{
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
return DateTimeChooserImpl::create(this, pickerClient, parameters);
#else
return ExternalDateTimeChooser::create(this, m_webV... | 11,511 |
157,993 | 0 | void SetSerifFontFamilyWrapper(WebSettings* settings,
const base::string16& font,
UScriptCode script) {
settings->SetSerifFontFamily(WebString::FromUTF16(font), script);
}
| 11,512 |
14,084 | 0 | ProcRenderTriFan (ClientPtr client)
{
int rc, npoints;
PicturePtr pSrc, pDst;
PictFormatPtr pFormat;
REQUEST(xRenderTrianglesReq);
REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq);
if (!PictOpValid (stuff->op))
{
client->errorValue = stuff->op;
return BadValue;
}
VERIFY_PICTURE (pSrc... | 11,513 |
139,674 | 0 | void AudioContext::refNode(AudioNode* node)
{
ASSERT(isMainThread());
AutoLocker locker(this);
m_referencedNodes.append(node);
node->makeConnection();
}
| 11,514 |
78,650 | 0 | piv_put_data(sc_card_t *card, int tag, const u8 *buf, size_t buf_len)
{
int r;
u8 * sbuf;
size_t sbuflen;
u8 * p;
size_t tag_len;
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
tag_len = piv_objects[tag].tag_len;
sbuflen = put_tag_and_len(0x5c, tag_len, NULL) + buf_len;
if (!(sbuf = malloc(sbuflen)))
LOG... | 11,515 |
98,755 | 0 | void WebPluginDelegateProxy::CopyFromTransportToBacking(const gfx::Rect& rect) {
if (!backing_store_canvas_.get()) {
return;
}
#if defined(OS_MACOSX)
const size_t stride =
skia::PlatformCanvas::StrideForWidth(plugin_rect_.width());
const size_t chunk_size = 4 * rect.width();
uint8* source_data = st... | 11,516 |
10,712 | 0 | SetSuperRound( TT_ExecContext exc,
FT_F2Dot14 GridPeriod,
FT_Long selector )
{
switch ( (FT_Int)( selector & 0xC0 ) )
{
case 0:
exc->period = GridPeriod / 2;
break;
case 0x40:
exc->period = GridPeriod;
break;
... | 11,517 |
109,572 | 0 | const Vector<AnnotatedRegionValue>& Document::annotatedRegions() const
{
return m_annotatedRegions;
}
| 11,518 |
187,564 | 1 | WORD32 ih264d_parse_nal_unit(iv_obj_t *dec_hdl,
ivd_video_decode_op_t *ps_dec_op,
UWORD8 *pu1_buf,
UWORD32 u4_length)
{
dec_bit_stream_t *ps_bitstrm;
dec_struct_t *ps_dec = (dec_struct_t *)dec_hdl->pv_codec_handle;
ivd_video_decode_ip_t *ps_dec_in =
(ivd_video... | 11,519 |
67,471 | 0 | void __fsnotify_vfsmount_delete(struct vfsmount *mnt)
{
fsnotify_clear_marks_by_mount(mnt);
}
| 11,520 |
116,802 | 0 | int WebRTCTransportImpl::SendPacket(int channel, const void* data, int len) {
return network_->ReceivedRTPPacket(channel, data, len);
}
| 11,521 |
5,344 | 0 | xps_load_sfnt_name(xps_font_t *font, char *namep, const int buflen)
{
byte *namedata;
int offset, length;
/*int format;*/
int count, stringoffset;
int found;
int i, k;
found = 0;
strcpy(namep, "Unknown");
offset = xps_find_sfnt_table(font, "name", &length);
if (offset < 0 || le... | 11,522 |
107,076 | 0 | void QQuickWebViewAttached::setView(QQuickWebView* view)
{
if (m_view == view)
return;
m_view = view;
emit viewChanged();
}
| 11,523 |
41,654 | 0 | static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{
struct inode *inode = NULL;
struct btrfs_trans_handle *trans;
struct btrfs_root *root = BTRFS_I(dir)->root;
int err = 0;
int drop_on_err = 0;
u64 objectid = 0;
u64 index = 0;
/*
* 2 items for inode and ref
* 2 items for dir it... | 11,524 |
83,656 | 0 | int git_index_add_all(
git_index *index,
const git_strarray *paths,
unsigned int flags,
git_index_matched_path_cb cb,
void *payload)
{
int error;
git_repository *repo;
git_iterator *wditer = NULL;
git_pathspec ps;
bool no_fnmatch = (flags & GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH) != 0;
assert(index);
repo =... | 11,525 |
158,749 | 0 | bool GLES2DecoderImpl::SimulateFixedAttribs(
const char* function_name,
GLuint max_vertex_accessed, bool* simulated, GLsizei primcount) {
DCHECK(simulated);
*simulated = false;
if (gl_version_info().SupportsFixedType())
return true;
if (!state_.vertex_attrib_manager->HaveFixedAttribs()) {
retur... | 11,526 |
143,253 | 0 | HTMLCollection* Document::scripts()
{
return ensureCachedCollection<HTMLCollection>(DocScripts);
}
| 11,527 |
134,864 | 0 | float GetModernUIScaleWrapper() {
float result = 1.0f;
typedef float(WINAPI *GetModernUIScalePtr)(VOID);
HMODULE lib = LoadLibraryA("metro_driver.dll");
if (lib) {
GetModernUIScalePtr func =
reinterpret_cast<GetModernUIScalePtr>(
GetProcAddress(lib, "GetModernUIScale"));
if (func)
... | 11,528 |
100,343 | 0 | virtual const WifiNetworkVector& remembered_wifi_networks() const {
return wifi_networks_;
}
| 11,529 |
93,559 | 0 | static void ipmr_expire_process(unsigned long arg)
{
struct mr6_table *mrt = (struct mr6_table *)arg;
if (!spin_trylock(&mfc_unres_lock)) {
mod_timer(&mrt->ipmr_expire_timer, jiffies + 1);
return;
}
if (!list_empty(&mrt->mfc6_unres_queue))
ipmr_do_expire_process(mrt);
spin_unlock(&mfc_unres_lock);
}
| 11,530 |
3,047 | 0 | static int ciedefdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeDEF, get the values from that */
code = dict_find_string(&CIEdict, "RangeDEF", &tempr... | 11,531 |
157,071 | 0 | void InitializeWithCORS(const char* url,
bool expected,
UrlData::CORSMode cors_mode,
size_t file_size = kFileSize) {
GURL gurl(url);
data_source_.reset(new MockMultibufferDataSource(
base::ThreadTaskRunnerHandle::Get(),
... | 11,532 |
185,634 | 1 | void FrameSelection::MoveRangeSelection(const VisiblePosition& base_position,
const VisiblePosition& extent_position,
TextGranularity granularity) {
SelectionInDOMTree new_selection =
SelectionInDOMTree::Builder()
.SetBaseAndExtentDeprecated(base_position.DeepEquivalent(),
extent_position.DeepEquivalent())
.SetAffinity... | 11,533 |
134,172 | 0 | bool InputMethodWin::DispatchKeyEvent(
const base::NativeEvent& native_key_event) {
if (native_key_event.message == WM_CHAR) {
BOOL handled;
OnChar(native_key_event.hwnd, native_key_event.message,
native_key_event.wParam, native_key_event.lParam, &handled);
return !!handled; // Don't send ... | 11,534 |
167,642 | 0 | void SiteInstanceImpl::RenderProcessWillExit(RenderProcessHost* host) {
for (auto& observer : observers_)
observer.RenderProcessGone(this);
}
| 11,535 |
128,428 | 0 | void RenderLayerScrollableArea::paintScrollCorner(GraphicsContext* context, const IntPoint& paintOffset, const IntRect& damageRect)
{
IntRect absRect = scrollCornerRect();
absRect.moveBy(paintOffset);
if (!absRect.intersects(damageRect))
return;
if (m_scrollCorner) {
m_scrollCorner->pai... | 11,536 |
103,531 | 0 | void ExtensionService::UnloadAllExtensions() {
profile_->GetExtensionSpecialStoragePolicy()->
RevokeRightsForAllExtensions();
extensions_.clear();
disabled_extensions_.clear();
terminated_extension_ids_.clear();
terminated_extensions_.clear();
extension_runtime_data_.clear();
}
| 11,537 |
148,109 | 0 | static void VoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
ExceptionState exception_state(info.GetIsolate(), ExceptionState::kExecutionContext, "TestObject", "voidMethodLongArg");
TestObject* impl = V8TestObject::ToImpl(info.Holder());
if (UNLIKELY(info.Length() < 1)) {
exception... | 11,538 |
176,239 | 0 | static void DeleteImpl(Handle<JSObject> obj, uint32_t entry) {
Handle<SeededNumberDictionary> dict(
SeededNumberDictionary::cast(obj->elements()));
uint32_t index = GetIndexForEntryImpl(*dict, entry);
Handle<Object> result = SeededNumberDictionary::DeleteProperty(dict, entry);
USE(result);
DCHECK(result->I... | 11,539 |
103,469 | 0 | bool ExtensionService::SyncBundle::HasExtensionId(const std::string& id) const {
return synced_extensions.find(id) != synced_extensions.end();
}
| 11,540 |
42,549 | 0 | static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev)
{
struct mdp_superblock_1 *sb;
struct md_rdev *rdev2;
int max_dev, i;
/* make rdev->sb match mddev and rdev data. */
sb = page_address(rdev->sb_page);
sb->feature_map = 0;
sb->pad0 = 0;
sb->recovery_offset = cpu_to_le64(0);
memset(sb->pad3, ... | 11,541 |
161,813 | 0 | void PlatformSensorProviderLinux::StopPollingThread() {
DCHECK(file_task_runner_);
DCHECK(file_task_runner_->BelongsToCurrentThread());
if (polling_thread_ && polling_thread_->IsRunning())
polling_thread_->Stop();
}
| 11,542 |
45,073 | 0 | static int lua_ap_requestbody(lua_State *L)
{
const char *filename;
request_rec *r;
apr_off_t maxSize;
r = ap_lua_check_request_rec(L, 1);
filename = luaL_optstring(L, 2, 0);
maxSize = luaL_optint(L, 3, 0);
if (r) {
apr_off_t size;
if (maxSize > 0 && r->rema... | 11,543 |
2,833 | 0 | need_secrets (NMSetting *setting)
{
/* Assume that VPN connections need secrets since they almost always will */
return g_ptr_array_sized_new (1);
}
| 11,544 |
21,052 | 0 | static int mem_cgroup_do_precharge(unsigned long count)
{
int ret = 0;
int batch_count = PRECHARGE_COUNT_AT_ONCE;
struct mem_cgroup *memcg = mc.to;
if (mem_cgroup_is_root(memcg)) {
mc.precharge += count;
/* we don't need css_get for root */
return ret;
}
/* try to charge at once */
if (count > 1) {
stru... | 11,545 |
47,501 | 0 | static int cryp_setup_context(struct cryp_ctx *ctx,
struct cryp_device_data *device_data)
{
u32 control_register = CRYP_CR_DEFAULT;
switch (cryp_mode) {
case CRYP_MODE_INTERRUPT:
writel_relaxed(CRYP_IMSC_DEFAULT, &device_data->base->imsc);
break;
case CRYP_MODE_DMA:
writel_relaxed(CRYP_DMACR_DEFAUL... | 11,546 |
12,445 | 0 | static char * check_for_domain(char **ppuser)
{
char * original_string;
char * usernm;
char * domainnm;
int original_len;
int len;
int i;
if(ppuser == NULL)
return NULL;
original_string = *ppuser;
if (original_string == NULL)
return NULL;
original_len = strlen(original_string);
usernm = st... | 11,547 |
110,100 | 0 | void PpapiPluginProcessHost::OpenChannelToPlugin(Client* client) {
if (process_->GetHost()->IsChannelOpening()) {
pending_requests_.push_back(client);
return;
}
RequestPluginChannel(client);
}
| 11,548 |
62,267 | 0 | indent_string (u_int indent)
{
static char buf[20];
u_int idx;
idx = 0;
buf[idx] = '\0';
/*
* Does the static buffer fit ?
*/
if (sizeof(buf) < ((indent/8) + (indent %8) + 2)) {
return buf;
}
/*
* Heading newline.
*/
buf[idx] = '\n';
idx++;
while (ind... | 11,549 |
93,331 | 0 | static void tun_setup(struct net_device *dev)
{
struct tun_struct *tun = netdev_priv(dev);
tun->owner = INVALID_UID;
tun->group = INVALID_GID;
dev->ethtool_ops = &tun_ethtool_ops;
dev->needs_free_netdev = true;
dev->priv_destructor = tun_free_netdev;
/* We prefer our own queue length */
dev->tx_queue_len = TU... | 11,550 |
164,289 | 0 | int should_grant_call_count() { return should_grant_call_count_; }
| 11,551 |
31,015 | 0 | static inline int rtm_msgindex(int msgtype)
{
int msgindex = msgtype - RTM_BASE;
/*
* msgindex < 0 implies someone tried to register a netlink
* control code. msgindex >= RTM_NR_MSGTYPES may indicate that
* the message type has not been added to linux/rtnetlink.h
*/
BUG_ON(msgindex < 0 || msgindex >= RTM_NR... | 11,552 |
59,394 | 0 | nameNsPush(xmlParserCtxtPtr ctxt, const xmlChar * value,
const xmlChar *prefix, const xmlChar *URI, int nsNr)
{
if (ctxt->nameNr >= ctxt->nameMax) {
const xmlChar * *tmp;
void **tmp2;
ctxt->nameMax *= 2;
tmp = (const xmlChar * *) xmlRealloc((xmlChar * *)ctxt->nameTab,
... | 11,553 |
182,575 | 1 | static netdev_tx_t hns_nic_net_xmit(struct sk_buff *skb,
struct net_device *ndev)
{
struct hns_nic_priv *priv = netdev_priv(ndev);
int ret;
assert(skb->queue_mapping < ndev->ae_handle->q_num);
ret = hns_nic_net_xmit_hw(ndev, skb,
&tx_ring_data(priv, skb->queue_mapping));
if (ret == NETDEV_TX_OK) {
netif_tra... | 11,554 |
29,045 | 0 | void ssl_transform_free( ssl_transform *transform )
{
#if defined(POLARSSL_ZLIB_SUPPORT)
deflateEnd( &transform->ctx_deflate );
inflateEnd( &transform->ctx_inflate );
#endif
memset( transform, 0, sizeof( ssl_transform ) );
}
| 11,555 |
127,232 | 0 | WorkerProcessLauncher::Core::~Core() {
DCHECK(stopping_);
}
| 11,556 |
156,205 | 0 | AutoAdvancingVirtualTimeDomain* RendererSchedulerImpl::GetVirtualTimeDomain() {
return virtual_time_domain_.get();
}
| 11,557 |
50,789 | 0 | extra_last_record(struct isoent *isoent)
{
if (isoent->extr_rec_list.first == NULL)
return (NULL);
return ((struct extr_rec *)(void *)
((char *)(isoent->extr_rec_list.last)
- offsetof(struct extr_rec, next)));
}
| 11,558 |
80,823 | 0 | GF_Err pmax_dump(GF_Box *a, FILE * trace)
{
GF_PMAXBox *p;
p = (GF_PMAXBox *)a;
gf_isom_box_dump_start(a, "MaxPacketSizeBox", trace);
fprintf(trace, "MaximumSize=\"%d\">\n", p->maxSize);
gf_isom_box_dump_done("MaxPacketSizeBox", a, trace);
return GF_OK;
}
| 11,559 |
28,418 | 0 | static struct fib6_node * fib6_lookup_1(struct fib6_node *root,
struct lookup_args *args)
{
struct fib6_node *fn;
__be32 dir;
if (unlikely(args->offset == 0))
return NULL;
/*
* Descend on a tree
*/
fn = root;
for (;;) {
struct fib6_node *next;
dir = addr_bit_set(args->addr, fn->fn_bit);
nex... | 11,560 |
59,599 | 0 | load_xpath_expr (xmlDocPtr parent_doc, const char* filename) {
xmlXPathObjectPtr xpath;
xmlDocPtr doc;
xmlChar *expr;
xmlXPathContextPtr ctx;
xmlNodePtr node;
xmlNsPtr ns;
/*
* load XPath expr as a file
*/
xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
xm... | 11,561 |
97,642 | 0 | xmlXPathDebugDumpCompExpr(FILE *output, xmlXPathCompExprPtr comp,
int depth) {
int i;
char shift[100];
if ((output == NULL) || (comp == NULL)) return;
for (i = 0;((i < depth) && (i < 25));i++)
shift[2 * i] = shift[2 * i + 1] = ' ';
shift[2 * i] = shift[2 * i + 1] = 0;
... | 11,562 |
85,997 | 0 | static bool task_will_free_mem(struct task_struct *task)
{
struct mm_struct *mm = task->mm;
struct task_struct *p;
bool ret = true;
/*
* Skip tasks without mm because it might have passed its exit_mm and
* exit_oom_victim. oom_reaper could have rescued that but do not rely
* on that for now. We can consider ... | 11,563 |
134,852 | 0 | void WaitForCopySourceReady() {
while (!GetRenderWidgetHostViewPort()->IsSurfaceAvailableForCopy())
GiveItSomeTime();
}
| 11,564 |
113,936 | 0 | void RegistrationManager::RegistrationStatus::Disable() {
enabled = false;
state = invalidation::InvalidationListener::UNREGISTERED;
registration_timer.Stop();
delay = base::TimeDelta();
}
| 11,565 |
2,514 | 0 | IsValidJsonNumber(const char *str, int len)
{
bool numeric_error;
JsonLexContext dummy_lex;
/*
* json_lex_number expects a leading '-' to have been eaten already.
*
* having to cast away the constness of str is ugly, but there's not much
* easy alternative.
*/
if (*str == '-')
{
dummy_lex.input = (... | 11,566 |
176,997 | 0 | void InputDispatcher::resumeAfterTargetsNotReadyTimeoutLocked(nsecs_t newTimeout,
const sp<InputChannel>& inputChannel) {
if (newTimeout > 0) {
mInputTargetWaitTimeoutTime = now() + newTimeout;
} else {
mInputTargetWaitTimeoutExpired = true;
if (inputChannel.get()) {
ssize_t connectionIndex = getC... | 11,567 |
85,696 | 0 | static int hns_nic_net_open(struct net_device *ndev)
{
struct hns_nic_priv *priv = netdev_priv(ndev);
struct hnae_handle *h = priv->ae_handle;
int ret;
if (test_bit(NIC_STATE_TESTING, &priv->state))
return -EBUSY;
priv->link = 0;
netif_carrier_off(ndev);
ret = netif_set_real_num_tx_queues(ndev, h->q_num);
... | 11,568 |
62,396 | 0 | ts_print(netdissect_options *ndo,
register const struct timeval *tvp)
{
register int s;
struct tm *tm;
time_t Time;
char buf[TS_BUF_SIZE];
static struct timeval tv_ref;
struct timeval tv_result;
int negative_offset;
int nano_prec;
switch (ndo->ndo_tflag) {
case 0: /* Default */
s = (tvp->tv_sec +... | 11,569 |
173,401 | 0 | OMX_ERRORTYPE omx_vdec::allocate_input_buffer(
OMX_IN OMX_HANDLETYPE hComp,
OMX_INOUT OMX_BUFFERHEADERTYPE** bufferHdr,
OMX_IN OMX_U32 port,
OMX_IN OMX_PTR appData,
OMX_IN OMX_U32 bytes)
{
OMX_ERRORTYPE eRet = ... | 11,570 |
173,215 | 0 | standard_info_imp(standard_display *dp, png_structp pp, png_infop pi,
int nImages)
{
/* Note that the validation routine has the side effect of turning on
* interlace handling in the subsequent code.
*/
standard_info_part1(dp, pp, pi);
/* And the info callback has to call this (or png_read_update_info - ... | 11,571 |
170,897 | 0 | status_t OMXNodeInstance::freeBuffer(
OMX_U32 portIndex, OMX::buffer_id buffer) {
Mutex::Autolock autoLock(mLock);
CLOG_BUFFER(freeBuffer, "%s:%u %#x", portString(portIndex), portIndex, buffer);
removeActiveBuffer(portIndex, buffer);
OMX_BUFFERHEADERTYPE *header = findBufferHeader(buffer, portInd... | 11,572 |
170,945 | 0 | static vpx_codec_err_t vp8_get_last_ref_updates(vpx_codec_alg_priv_t *ctx,
va_list args)
{
int *update_info = va_arg(args, int *);
if (update_info && !ctx->yv12_frame_buffers.use_frame_threads)
{
VP8D_COMP *pbi = (VP8D_COMP *)ctx->yv12_frame_buffers.pbi[0];
... | 11,573 |
73,457 | 0 | static inline ssize_t EdgeY(const ssize_t y,const size_t rows)
{
if (y < 0L)
return(0L);
if (y >= (ssize_t) rows)
return((ssize_t) (rows-1));
return(y);
}
| 11,574 |
103,392 | 0 | int bytes_per_row() const { return bytes_per_row_; }
| 11,575 |
125,440 | 0 | void GDataFileSystem::RemoveOnUIThread(
const FilePath& file_path,
bool is_recursive,
const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
directory_service_->GetEntryInfoByPath(
file_path,
base::Bind(
&GDataFileSystem::RemoveOnUIThreadAf... | 11,576 |
104,141 | 0 | error::Error GLES2DecoderImpl::HandleGetUniformLocationImmediate(
uint32 immediate_data_size, const gles2::GetUniformLocationImmediate& c) {
uint32 name_size = c.data_size;
const char* name = GetImmediateDataAs<const char*>(
c, name_size, immediate_data_size);
if (!name) {
return error::kOutOfBounds... | 11,577 |
44,033 | 0 | crm_xml_replace(xmlNode * node, const char *name, const char *value)
{
bool dirty = FALSE;
xmlAttr *attr = NULL;
const char *old_value = NULL;
CRM_CHECK(node != NULL, return NULL);
CRM_CHECK(name != NULL && name[0] != 0, return NULL);
old_value = crm_element_value(node, name);
/* Could be... | 11,578 |
92,342 | 0 | internalEntityProcessor(XML_Parser parser,
const char *s,
const char *end,
const char **nextPtr)
{
ENTITY *entity;
const char *textStart, *textEnd;
const char *next;
enum XML_Error result;
OPEN_INTERNAL_ENTITY *openEntity = parser->m_open... | 11,579 |
131,626 | 0 | static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
... | 11,580 |
56,434 | 0 | http_SetResp(struct http *to, const char *proto, uint16_t status,
const char *response)
{
CHECK_OBJ_NOTNULL(to, HTTP_MAGIC);
http_SetH(to, HTTP_HDR_PROTO, proto);
assert(status >= 100 && status <= 999);
to->status = status;
http_SetH(to, HTTP_HDR_RESPONSE, response);
}
| 11,581 |
172,168 | 0 | static entry_t *entry_find(const config_t *config, const char *section, const char *key) {
section_t *sec = section_find(config, section);
if (!sec)
return NULL;
for (const list_node_t *node = list_begin(sec->entries); node != list_end(sec->entries); node = list_next(node)) {
entry_t *entry = list_node(node);
if... | 11,582 |
25,337 | 0 | asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
{
unsigned long ip;
if (!test_thread_flag(TIF_SYSCALL_TRACE))
return scno;
if (!(current->ptrace & PT_PTRACED))
return scno;
/*
* Save IP. IP is used to denote syscall entry/exit:
* IP = 0 -> entry, = 1 -> exit
*/
ip = regs->ARM_ip... | 11,583 |
33,849 | 0 | cib_ccm_dispatch(gpointer user_data)
{
int rc = 0;
oc_ev_t *ccm_token = (oc_ev_t *) user_data;
crm_trace("received callback");
if (ccm_api_handle_event == NULL) {
ccm_api_handle_event =
find_library_function(&ccm_library, CCM_LIBRARY, "oc_ev_handle_event", 1);
}
rc = (*ccm... | 11,584 |
73,052 | 0 | BGD_DECLARE(int) gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, int a)
{
int c;
int ct = -1;
int op = -1;
long rd, gd, bd, ad, dist;
long mindist = 4 * 255 * 255; /* init to max poss dist */
if (im->trueColor) {
return gdTrueColorAlpha (r, g, b, a);
}
for (c = 0; c < im->colorsTotal; c++) {
... | 11,585 |
94,891 | 0 | int usbnet_change_mtu (struct net_device *net, int new_mtu)
{
struct usbnet *dev = netdev_priv(net);
int ll_mtu = new_mtu + net->hard_header_len;
int old_hard_mtu = dev->hard_mtu;
int old_rx_urb_size = dev->rx_urb_size;
if (new_mtu <= 0)
return -EINVAL;
if ((ll_mtu % dev->maxpacket) == 0)
return -EDOM;
n... | 11,586 |
123,749 | 0 | bool FileEnumerator::IsDirectory(const FindInfo& info) {
return S_ISDIR(info.stat.st_mode);
}
| 11,587 |
2,214 | 0 | void FoFiType1C::getFontMatrix(double *mat) {
int i;
if (topDict.firstOp == 0x0c1e && privateDicts[0].hasFontMatrix) {
if (topDict.hasFontMatrix) {
mat[0] = topDict.fontMatrix[0] * privateDicts[0].fontMatrix[0] +
topDict.fontMatrix[1] * privateDicts[0].fontMatrix[2];
mat[1] = topDict.fontMa... | 11,588 |
170,581 | 0 | int VirtualizerForceVirtualizationMode(EffectContext *pContext, audio_devices_t forcedDevice) {
ALOGV("VirtualizerForceVirtualizationMode: forcedDev=0x%x enabled=%d tmpDisabled=%d",
forcedDevice, pContext->pBundledContext->bVirtualizerEnabled,
pContext->pBundledContext->bVirtualizerTempDisab... | 11,589 |
33,142 | 0 | static int xfrm_do_migrate(struct sk_buff *skb, struct nlmsghdr *nlh,
struct nlattr **attrs)
{
return -ENOPROTOOPT;
}
| 11,590 |
52,577 | 0 | static void request_gathered_write(h2o_http2_conn_t *conn)
{
assert(conn->state < H2O_HTTP2_CONN_STATE_IS_CLOSING);
if (conn->_write.buf_in_flight == NULL) {
if (!h2o_timeout_is_linked(&conn->_write.timeout_entry))
h2o_timeout_link(conn->super.ctx->loop, &conn->super.ctx->zero_timeout, &conn... | 11,591 |
84,993 | 0 | do_add_counters(struct net *net, const void __user *user,
unsigned int len, int compat)
{
unsigned int i;
struct xt_counters_info tmp;
struct xt_counters *paddc;
struct xt_table *t;
const struct xt_table_info *private;
int ret = 0;
struct ipt_entry *iter;
unsigned int addend;
paddc = xt_copy_counters_from_u... | 11,592 |
116,610 | 0 | void RenderViewImpl::EnsureMediaStreamImpl() {
#if defined(ENABLE_P2P_APIS)
if (!p2p_socket_dispatcher_)
p2p_socket_dispatcher_ = new content::P2PSocketDispatcher(this);
#endif
#if defined(ENABLE_WEBRTC)
if (!media_stream_dispatcher_)
media_stream_dispatcher_ = new MediaStreamDispatcher(this);
if (!medi... | 11,593 |
90,727 | 0 | static void cvarinit(JF, js_Ast *list)
{
while (list) {
js_Ast *var = list->a;
if (var->b) {
cexp(J, F, var->b);
emitline(J, F, var);
emitlocal(J, F, OP_SETLOCAL, OP_SETVAR, var->a);
emit(J, F, OP_POP);
}
list = list->b;
}
}
| 11,594 |
143,192 | 0 | void Document::finishedParsing()
{
DCHECK(!scriptableDocumentParser() || !m_parser->isParsing());
DCHECK(!scriptableDocumentParser() || m_readyState != Loading);
setParsingState(InDOMContentLoaded);
DocumentParserTiming::from(*this).markParserStop();
if (!m_documentTiming.domContentLoadedEventStart... | 11,595 |
143,892 | 0 | WebRunnerBrowserContext::CreateMediaRequestContext() {
DCHECK(url_request_getter_.get());
return url_request_getter_.get();
}
| 11,596 |
174,285 | 0 | status_t Camera3Device::tryRemoveDummyStreamLocked() {
ATRACE_CALL();
status_t res;
if (mDummyStreamId == NO_STREAM) return OK;
if (mOutputStreams.size() == 1) return OK;
ALOGV("%s: Camera %d: Removing the dummy stream", __FUNCTION__, mId);
sp<Camera3StreamInterface> deletedStream;
ssize_t outputStr... | 11,597 |
71,435 | 0 | MagickExport void *RelinquishAlignedMemory(void *memory)
{
if (memory == (void *) NULL)
return((void *) NULL);
#if defined(MAGICKCORE_HAVE_POSIX_MEMALIGN)
free(memory);
#elif defined(MAGICKCORE_HAVE__ALIGNED_MALLOC)
_aligned_free(memory);
#else
free(*((void **) memory-1));
#endif
return(NULL);
}
| 11,598 |
17,562 | 0 | PanoramiXRenderSetPictureClipRectangles(ClientPtr client)
{
REQUEST(xRenderSetPictureClipRectanglesReq);
int result = Success, j;
PanoramiXRes *pict;
REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq);
VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess);
FOR_NSCREENS_BACKW... | 11,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.