unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
47,072 | 0 | static int __init twofish_init(void)
{
u64 xcr0;
if (!cpu_has_avx || !cpu_has_osxsave) {
printk(KERN_INFO "AVX instructions are not detected.\n");
return -ENODEV;
}
xcr0 = xgetbv(XCR_XFEATURE_ENABLED_MASK);
if ((xcr0 & (XSTATE_SSE | XSTATE_YMM)) != (XSTATE_SSE | XSTATE_YMM)) {
printk(KERN_INFO "AVX detecte... | 7,000 |
13,542 | 0 | static void Free_PairPos1( HB_PairPosFormat1* ppf1,
HB_UShort format1,
HB_UShort format2 )
{
HB_UShort n, count;
HB_PairSet* ps;
if ( ppf1->PairSet )
{
count = ppf1->PairSetCount;
ps = ppf1->PairSet;
for ( n = 0; n < count; n++ )
Free_PairSet( ... | 7,001 |
97,871 | 0 | void RenderView::CapturePageInfo(int load_id, bool preliminary_capture) {
if (load_id != page_id_)
return; // this capture call is no longer relevant due to navigation
if (load_id == last_indexed_page_id_)
return; // we already indexed this page
if (!webview())
return;
WebFrame* main_frame = web... | 7,002 |
184,733 | 1 | GesturePoint::GesturePoint()
: first_touch_time_(0.0),
last_touch_time_(0.0),
last_tap_time_(0.0),
velocity_calculator_(kBufferedPoints) {
}
| 7,003 |
184,195 | 1 | void InfoBarContainer::ChangeTabContents(TabContents* contents) {
registrar_.RemoveAll();
RemoveAllChildViews(false);
tab_contents_ = contents;
if (tab_contents_) {
UpdateInfoBars();
Source<TabContents> tc_source(tab_contents_);
registrar_.Add(this, NotificationType::TAB_CONTENTS_INFOBAR_ADDED,... | 7,004 |
107,379 | 0 | bool GetFindBarWindowInfoForBrowser(
Browser* browser, gfx::Point* position, bool* fully_visible) {
FindBarTesting* find_bar =
browser->GetFindBarController()->find_bar()->GetFindBarTesting();
return find_bar->GetFindBarWindowInfo(position, fully_visible);
}
| 7,005 |
153,579 | 0 | void GLES2Implementation::BufferSubData(GLenum target,
GLintptr offset,
GLsizeiptr size,
const void* data) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBufferSu... | 7,006 |
1,373 | 0 | static uint32_t *rpc_add_credentials(uint32_t *p)
{
int hl;
int hostnamelen = 0;
/* Here's the executive summary on authentication requirements of the
* various NFS server implementations: Linux accepts both AUTH_NONE
* and AUTH_UNIX authentication (also accepts an empty hostname field
* in the AUTH_UNIX sche... | 7,007 |
25,290 | 0 | xscale1pmu_write_counter(int counter, u32 val)
{
switch (counter) {
case XSCALE_CYCLE_COUNTER:
asm volatile("mcr p14, 0, %0, c1, c0, 0" : : "r" (val));
break;
case XSCALE_COUNTER0:
asm volatile("mcr p14, 0, %0, c2, c0, 0" : : "r" (val));
break;
case XSCALE_COUNTER1:
asm volatile("mcr p14, 0, %0, c3, c0, 0... | 7,008 |
150,947 | 0 | void Bluetooth::RequestDeviceCallback(
ScriptPromiseResolver* resolver,
mojom::blink::WebBluetoothResult result,
mojom::blink::WebBluetoothDevicePtr device) {
if (!resolver->GetExecutionContext() ||
resolver->GetExecutionContext()->IsContextDestroyed()) {
return;
}
if (result == mojom::b... | 7,009 |
105,101 | 0 | PassRefPtr<Range> Range::cloneRange(ExceptionCode& ec) const
{
if (!m_start.container()) {
ec = INVALID_STATE_ERR;
return 0;
}
return Range::create(m_ownerDocument, m_start.container(), m_start.offset(), m_end.container(), m_end.offset());
}
| 7,010 |
89,789 | 0 | usage (int ecode, FILE *out)
{
fprintf (out, "usage: %s [OPTIONS...] [--] COMMAND [ARGS...]\n\n", argv0);
fprintf (out,
" --help Print this help\n"
" --version Print version\n"
" --args FD Parse NUL-separated args... | 7,011 |
49,893 | 0 | phar_entry_data *phar_get_or_create_entry_data(char *fname, int fname_len, char *path, int path_len, const char *mode, char allow_dir, char **error, int security) /* {{{ */
{
phar_archive_data *phar;
phar_entry_info *entry, etemp;
phar_entry_data *ret;
const char *pcr_error;
char is_dir;
#ifdef PHP_WIN32
phar_un... | 7,012 |
91,672 | 0 | static void encap_finish(void)
{
hash_clean(encap_hash, (void (*)(void *))encap_free);
hash_free(encap_hash);
encap_hash = NULL;
#if ENABLE_BGP_VNC
hash_clean(vnc_hash, (void (*)(void *))encap_free);
hash_free(vnc_hash);
vnc_hash = NULL;
#endif
}
| 7,013 |
142,094 | 0 | CGaiaCredentialBase::UIProcessInfo::~UIProcessInfo() {}
| 7,014 |
67,630 | 0 | MODRET set_userdirroot(cmd_rec *cmd) {
int bool = -1;
config_rec *c = NULL;
CHECK_ARGS(cmd, 1);
CHECK_CONF(cmd, CONF_ANON);
bool = get_boolean(cmd, 1);
if (bool == -1)
CONF_ERROR(cmd, "expected Boolean parameter");
c = add_config_param(cmd->argv[0], 1, NULL);
c->argv[0] = pcalloc(c->pool, sizeof(... | 7,015 |
187,948 | 1 | void impeg2d_dec_pic_data_thread(dec_state_t *ps_dec)
{
WORD32 i4_continue_decode;
WORD32 i4_cur_row, temp;
UWORD32 u4_bits_read;
WORD32 i4_dequeue_job;
IMPEG2D_ERROR_CODES_T e_error;
i4_cur_row = ps_dec->u2_mb_y + 1;
i4_continue_decode = 1;
i4_dequeue_job = 1;
do
{
if(i4_cur_row ... | 7,016 |
151,637 | 0 | ukm::UkmRecorder* ChromePaymentRequestDelegate::GetUkmRecorder() {
return g_browser_process->ukm_recorder();
}
| 7,017 |
103,242 | 0 | void WebSocketJob::CloseInternal() {
if (spdy_websocket_stream_.get())
spdy_websocket_stream_->Close();
if (socket_.get())
socket_->Close();
}
| 7,018 |
158,688 | 0 | void GLES2DecoderImpl::DoReleaseTexImage2DCHROMIUM(
GLenum target, GLint image_id) {
TRACE_EVENT0("gpu", "GLES2DecoderImpl::DoReleaseTexImage2DCHROMIUM");
TextureRef* texture_ref =
texture_manager()->GetTextureInfoForTargetUnlessDefault(&state_, target);
if (!texture_ref) {
LOCAL_SET_GL_ERROR(
... | 7,019 |
113,176 | 0 | explicit FadeInAnimationDelegate(views::View* view) : view_(view) {}
| 7,020 |
75,347 | 0 | packet_stats(const tcpreplay_stats_t *stats)
{
struct timeval diff;
COUNTER diff_us;
COUNTER bytes_sec = 0;
u_int32_t bytes_sec_10ths = 0;
COUNTER mb_sec = 0;
u_int32_t mb_sec_100ths = 0;
u_int32_t mb_sec_1000ths = 0;
COUNTER pkts_sec = 0;
u_int32_t pkts_sec_100ths = 0;
timersub... | 7,021 |
112,296 | 0 | void ShellWindow::RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest* request,
const content::MediaResponseCallback& callback) {
content::MediaStreamDevices devices;
content::MediaStreamDeviceMap::const_iterator iter =
request->devices.find(content... | 7,022 |
179,898 | 1 | int main(int argc, char *argv[])
{
int ret;
struct lxc_lock *lock;
lock = lxc_newlock(NULL, NULL);
if (!lock) {
fprintf(stderr, "%d: failed to get unnamed lock\n", __LINE__);
exit(1);
}
ret = lxclock(lock, 0);
if (ret) {
fprintf(stderr, "%d: failed to take unnamed lock (%d)\n", __LINE__, ret);
exit(1);
}
ret = lxcunl... | 7,023 |
35,453 | 0 | static void ttusbdecfe_release(struct dvb_frontend* fe)
{
struct ttusbdecfe_state* state = (struct ttusbdecfe_state*) fe->demodulator_priv;
kfree(state);
}
| 7,024 |
60,697 | 0 | static int sctp_setsockopt_pr_supported(struct sock *sk,
char __user *optval,
unsigned int optlen)
{
struct sctp_assoc_value params;
struct sctp_association *asoc;
int retval = -EINVAL;
if (optlen != sizeof(params))
goto out;
if (copy_from_user(¶ms, optval, optlen)) {
retval = -EFAULT;
goto o... | 7,025 |
43,318 | 0 | int CLASS median4 (int *p)
{
int min, max, sum, i;
min = max = sum = p[0];
for (i=1; i < 4; i++) {
sum += p[i];
if (min > p[i]) min = p[i];
if (max < p[i]) max = p[i];
}
return (sum - min - max) >> 1;
}
| 7,026 |
115,712 | 0 | void ScreenRecorder::DoStopOnEncodeThread(const base::Closure& done_task) {
DCHECK_EQ(encode_loop_, MessageLoop::current());
encoder_stopped_ = true;
capture_loop_->PostTask(FROM_HERE, done_task);
}
| 7,027 |
136,541 | 0 | void PaintController::ResetCurrentListIndices() {
next_item_to_match_ = 0;
next_item_to_index_ = 0;
next_chunk_to_match_ = 0;
under_invalidation_checking_begin_ = 0;
under_invalidation_checking_end_ = 0;
skipped_probable_under_invalidation_count_ = 0;
}
| 7,028 |
140,765 | 0 | bool GLES2DecoderImpl::FormsTextureCopyingFeedbackLoop(
TextureRef* texture, GLint level) {
Framebuffer* framebuffer = features().chromium_framebuffer_multisample ?
framebuffer_state_.bound_read_framebuffer.get() :
framebuffer_state_.bound_draw_framebuffer.get();
if (!framebuffer)
return false;
... | 7,029 |
114,564 | 0 | WebPluginProxy::~WebPluginProxy() {
#if defined(USE_X11)
if (windowless_shm_pixmaps_[0] != None)
XFreePixmap(ui::GetXDisplay(), windowless_shm_pixmaps_[0]);
if (windowless_shm_pixmaps_[1] != None)
XFreePixmap(ui::GetXDisplay(), windowless_shm_pixmaps_[1]);
#endif
#if defined(OS_MACOSX)
if (accelerated_su... | 7,030 |
14,828 | 0 | cvt_flip(int type, int flip)
{
if (flip == 0)
return type;
switch (type) {
case FILE_BESHORT:
return FILE_LESHORT;
case FILE_BELONG:
return FILE_LELONG;
case FILE_BEDATE:
return FILE_LEDATE;
case FILE_BELDATE:
return FILE_LELDATE;
case FILE_BEQUAD:
return FILE_LEQUAD;
case FILE_BEQDATE:
return FIL... | 7,031 |
1,439 | 0 | static void ct_build_clabel(const struct nf_conntrack *ct, struct nethdr *n)
{
const struct nfct_bitmask *b;
uint32_t *words;
unsigned int wordcount, i, maxbit;
if (!nfct_attr_is_set(ct, ATTR_CONNLABELS))
return;
b = nfct_get_attr(ct, ATTR_CONNLABELS);
maxbit = nfct_bitmask_maxbit(b);
for (i=0; i <= maxbit;... | 7,032 |
183,576 | 1 | void WebPluginDelegateProxy::OnGetWindowScriptNPObject(
int route_id, bool* success, intptr_t* npobject_ptr) {
*success = false;
NPObject* npobject = NULL;
if (plugin_)
npobject = plugin_->GetWindowScriptNPObject();
if (!npobject)
return;
// The stub will delete itself when the proxy tells it that it's released, ... | 7,033 |
57,190 | 0 | int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo)
{
struct rpc_task *task;
struct nfs4_get_lease_time_args args;
struct nfs4_get_lease_time_res res = {
.lr_fsinfo = fsinfo,
};
struct nfs4_get_lease_time_data data = {
.args = &args,
.res = &res,
.clp = clp,
};
struct rpc_mess... | 7,034 |
55,863 | 0 | static inline ssize_t do_tty_write(
ssize_t (*write)(struct tty_struct *, struct file *, const unsigned char *, size_t),
struct tty_struct *tty,
struct file *file,
const char __user *buf,
size_t count)
{
ssize_t ret, written = 0;
unsigned int chunk;
ret = tty_write_lock(tty, file->f_flags & O_NDELAY);
if (ret... | 7,035 |
43,550 | 0 | static int sctp_getsockopt_recvrcvinfo(struct sock *sk, int len,
char __user *optval,
int __user *optlen)
{
int val = 0;
if (len < sizeof(int))
return -EINVAL;
len = sizeof(int);
if (sctp_sk(sk)->recvrcvinfo)
val = 1;
if (put_user(len, optlen))
return -EFAULT;
if (copy_to_user(optval... | 7,036 |
71,720 | 0 | static void SVGComment(void *context,const xmlChar *value)
{
SVGInfo
*svg_info;
/*
A comment has been parsed.
*/
(void) LogMagickEvent(CoderEvent,GetMagickModule()," SAX.comment(%s)",
value);
svg_info=(SVGInfo *) context;
if (svg_info->comment != (char *) NULL)
(void) ConcatenateString(&sv... | 7,037 |
68,301 | 0 | static inline int __pmu_filter_match(struct perf_event *event)
{
struct pmu *pmu = event->pmu;
return pmu->filter_match ? pmu->filter_match(event) : 1;
}
| 7,038 |
147,179 | 0 | void V8TestObject::ActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute_Se... | 7,039 |
54,093 | 0 | static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh)
{
struct net *net = sock_net(skb->sk);
struct nlattr *tb[IFA_MAX+1];
struct in_device *in_dev;
struct ifaddrmsg *ifm;
struct in_ifaddr *ifa, **ifap;
int err = -EINVAL;
ASSERT_RTNL();
err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFA_MAX, ifa_ip... | 7,040 |
90,638 | 0 | zip_read_data_zipx_lzma_alone(struct archive_read *a, const void **buff,
size_t *size, int64_t *offset)
{
struct zip* zip = (struct zip *)(a->format->data);
int ret;
lzma_ret lz_ret;
const void* compressed_buf;
ssize_t bytes_avail, in_bytes, to_consume;
(void) offset; /* UNUSED */
/* Initialize decompresso... | 7,041 |
103,494 | 0 | void ExtensionServiceBackend::LoadSingleExtensionWithFileAccess(
const FilePath& extension_path,
bool allow_file_access,
bool prompt_for_plugins) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
int flags = allow_file_access ?
Extension::ALLOW_FILE_ACCESS : Extension::NO_FLAGS;
if (Exte... | 7,042 |
173,855 | 0 | virtual status_t getState(
node_id node, OMX_STATETYPE* state) {
Parcel data, reply;
data.writeInterfaceToken(IOMX::getInterfaceDescriptor());
data.writeInt32((int32_t)node);
remote()->transact(GET_STATE, data, &reply);
*state = static_cast<OMX_STATETYPE>(reply.readInt32());
ret... | 7,043 |
169,639 | 0 | std::string TestURLLoader::TestUntrustedCrossOriginRequest() {
pp::URLRequestInfo request(instance_);
std::string cross_origin_url = GetReachableCrossOriginURL("test_case.html");
request.SetURL(cross_origin_url);
request.SetAllowCrossOriginRequests(true);
int32_t rv = OpenUntrusted(request, NULL);
if (rv !... | 7,044 |
123,437 | 0 | void ChromeDownloadManagerDelegate::OnTargetPathDetermined(
int32 download_id,
const content::DownloadTargetCallback& callback,
DownloadItem::TargetDisposition disposition,
content::DownloadDangerType danger_type,
const FilePath& target_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI))... | 7,045 |
74,230 | 0 | record_timing_stats(
const char *text /* text message */
)
{
static unsigned int flshcnt;
l_fp now;
u_long day;
if (!stats_control)
return;
get_systime(&now);
filegen_setup(&timingstats, now.l_ui);
day = now.l_ui / 86400 + MJD_1900;
now.l_ui %= 86400;
if (timingstats.fp != NULL) {
fprintf(timingstats.f... | 7,046 |
100,739 | 0 | xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) {
int len = 0, l;
int c;
int count = 0;
#ifdef DEBUG
nbParseNCNameComplex++;
#endif
/*
* Handler for more complex cases
*/
GROW;
c = CUR_CHAR(l);
if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */
(!xmlIsNameStartCha... | 7,047 |
153,516 | 0 | float GM2TabStyle::GetHoverOpacity() const {
const float range_start = float{GetStandardWidth()};
const float range_end = float{GetMinimumInactiveWidth()};
const float value_in_range = float{tab_->width()};
const float t = (value_in_range - range_start) / (range_end - range_start);
return tab_->controller()->... | 7,048 |
78,275 | 0 | static int coolkey_check_sw(sc_card_t *card, unsigned int sw1, unsigned int sw2)
{
sc_debug(card->ctx, SC_LOG_DEBUG_NORMAL,
"sw1 = 0x%02x, sw2 = 0x%02x\n", sw1, sw2);
if (sw1 == 0x90)
return SC_SUCCESS;
if (sw1 == 0x9c) {
if (sw2 == 0xff) {
/* shouldn't happen on a production applet, 0x9cff is a debugging... | 7,049 |
152,726 | 0 | HistogramType LinearHistogram::GetHistogramType() const {
return LINEAR_HISTOGRAM;
}
| 7,050 |
93,556 | 0 | static void *ip6mr_vif_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
struct ipmr_vif_iter *iter = seq->private;
struct net *net = seq_file_net(seq);
struct mr6_table *mrt = iter->mrt;
++*pos;
if (v == SEQ_START_TOKEN)
return ip6mr_vif_seq_idx(net, iter, 0);
while (++iter->ct < mrt->maxvif) {
if (!M... | 7,051 |
21,246 | 0 | static inline int is_cow_mapping(vm_flags_t flags)
{
return (flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE;
}
| 7,052 |
44,860 | 0 | int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
{
struct super_block *sb = inode->i_sb;
ext4_lblk_t punch_start, punch_stop;
handle_t *handle;
unsigned int credits;
loff_t new_size, ioffset;
int ret;
/* Collapse range works only on fs block size aligned offsets. */
if (offset & (EXT4_CL... | 7,053 |
19,855 | 0 | static bool nfs41_match_stateid(const nfs4_stateid *s1,
const nfs4_stateid *s2)
{
if (memcmp(s1->other, s2->other, sizeof(s1->other)) != 0)
return false;
if (s1->seqid == s2->seqid)
return true;
if (s1->seqid == 0 || s2->seqid == 0)
return true;
return false;
}
| 7,054 |
93,966 | 0 | xfs_start_page_writeback(
struct page *page,
int clear_dirty)
{
ASSERT(PageLocked(page));
ASSERT(!PageWriteback(page));
/*
* if the page was not fully cleaned, we need to ensure that the higher
* layers come back to it correctly. That means we need to keep the page
* dirty, and for WB_SYNC_ALL writeback ... | 7,055 |
150,545 | 0 | std::string DoGetCurrentNetworkID(
network::NetworkConnectionTracker* network_connection_tracker) {
while (true) {
auto connection_type = GetConnectionType(network_connection_tracker);
std::string ssid_mccmnc;
switch (connection_type) {
case network::mojom::ConnectionType::CONNECTION_UNKNOWN:
... | 7,056 |
1,366 | 0 | static int nfs_mount_reply(unsigned char *pkt, unsigned len)
{
int ret;
ret = rpc_check_reply(pkt, 1);
if (ret)
return ret;
memcpy(dirfh, pkt + sizeof(struct rpc_reply) + 4, NFS_FHSIZE);
return 0;
}
| 7,057 |
127,903 | 0 | void DocumentThreadableLoader::handlePreflightResponse(const ResourceResponse& response)
{
String accessControlErrorDescription;
if (!passesAccessControlCheck(response, effectiveAllowCredentials(), getSecurityOrigin(), accessControlErrorDescription, m_requestContext)) {
handlePreflightFailure(response.... | 7,058 |
25,479 | 0 | static int fpr_set(struct task_struct *target, const struct user_regset *regset,
unsigned int pos, unsigned int count,
const void *kbuf, const void __user *ubuf)
{
#ifdef CONFIG_VSX
double buf[33];
int i;
#endif
flush_fp_to_thread(target);
#ifdef CONFIG_VSX
/* copy to local buffer then write that out */
... | 7,059 |
182,905 | 1 | void gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out)
{
gdImagePtr pim = 0, tim = im;
int interlace, BitsPerPixel;
interlace = im->interlace;
if (im->trueColor) {
/* Expensive, but the only way that produces an
acceptable result: mix down to a palette
based temporary image. */
pim = gdImageCreatePaletteFromTrueColor(im, 1,... | 7,060 |
158,703 | 0 | const CompressedFormatInfo* GetCompressedFormatInfo(GLenum format) {
for (size_t i = 0; i < arraysize(kCompressedFormatInfoArray); i++) {
if (kCompressedFormatInfoArray[i].format == format) {
return &kCompressedFormatInfoArray[i];
}
}
return nullptr;
}
| 7,061 |
182,119 | 1 | int _our_safe_pcap_next_ex(pcap_t *pcap, struct pcap_pkthdr **pkthdr,
const u_char **pktdata, const char *funcname,
const int line, const char *file)
{
int res = pcap_next_ex(pcap, pkthdr, pktdata);
if (*pktdata && *pkthdr) {
if ((*pkthdr)->len > MAXPACKET) {
fprintf(stderr, "safe_pcap_next_ex ERROR: Invalid packet le... | 7,062 |
162,084 | 0 | void ForwardRequest(const char* service_name,
mojo::InterfaceRequest<Interface> request) {
service_manager::Connector* connector =
ServiceManagerConnection::GetForProcess()->GetConnector();
connector->BindInterface(service_name, std::move(request));
}
| 7,063 |
169,498 | 0 | MockCacheVisitor() {}
| 7,064 |
166,773 | 0 | void LargeObjectPage::RemoveFromHeap() {
static_cast<LargeObjectArena*>(Arena())->FreeLargeObjectPage(this);
}
| 7,065 |
103,637 | 0 | static void AppendParams(const std::vector<string16>& additional_names,
const std::vector<string16>& additional_values,
WebVector<WebString>* existing_names,
WebVector<WebString>* existing_values) {
DCHECK(additional_names.size() == additional... | 7,066 |
130,882 | 0 | static void methodWithOptionalStringIsNullStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjectV8Internal::methodWithOptionalStringIsNullStringMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
| 7,067 |
79,742 | 0 | png_handle_sCAL(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
{
png_bytep buffer;
size_t i;
int state;
png_debug(1, "in png_handle_sCAL");
if ((png_ptr->mode & PNG_HAVE_IHDR) == 0)
png_chunk_error(png_ptr, "missing IHDR");
else if ((png_ptr->mode & PNG_HAVE_IDAT) != 0)
{
... | 7,068 |
67,464 | 0 | void unlock_rename(struct dentry *p1, struct dentry *p2)
{
inode_unlock(p1->d_inode);
if (p1 != p2) {
inode_unlock(p2->d_inode);
mutex_unlock(&p1->d_sb->s_vfs_rename_mutex);
}
}
| 7,069 |
127,207 | 0 | void DesktopSessionWin::OnSessionDetached() {
DCHECK(main_task_runner_->BelongsToCurrentThread());
DCHECK(launcher_.get() != NULL);
launcher_.reset();
}
| 7,070 |
86,247 | 0 | static int pcrypt_aead_decrypt(struct aead_request *req)
{
int err;
struct pcrypt_request *preq = aead_request_ctx(req);
struct aead_request *creq = pcrypt_request_ctx(preq);
struct padata_priv *padata = pcrypt_request_padata(preq);
struct crypto_aead *aead = crypto_aead_reqtfm(req);
struct pcrypt_aead_ctx *ctx =... | 7,071 |
120,572 | 0 | void Element::normalizeAttributes()
{
if (!hasAttributes())
return;
for (unsigned i = 0; i < attributeCount(); ++i) {
if (RefPtr<Attr> attr = attrIfExists(attributeItem(i)->name()))
attr->normalize();
}
}
| 7,072 |
20,894 | 0 | static int vcpu_mmio_write(struct kvm_vcpu *vcpu, gpa_t addr, int len,
const void *v)
{
int handled = 0;
int n;
do {
n = min(len, 8);
if (!(vcpu->arch.apic &&
!kvm_iodevice_write(&vcpu->arch.apic->dev, addr, n, v))
&& kvm_io_bus_write(vcpu->kvm, KVM_MMIO_BUS, addr, n, v))
break;
handled... | 7,073 |
51,406 | 0 | static void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc)
{
int i, l, x1, x2, dy;
int oc; /* old pixel value */
int wx2,wy2;
/* stack of filled segments */
struct seg *stack;
struct seg *sp;
char **pts;
if (!im->tile) {
return;
}
wx2=im->sx;wy2=im->sy;
nc = gdImageTileGet(im,x,y);
pts = (... | 7,074 |
7,111 | 0 | tt_cmap14_init( TT_CMap14 cmap,
FT_Byte* table )
{
cmap->cmap.data = table;
table += 6;
cmap->num_selectors = FT_PEEK_ULONG( table );
cmap->max_results = 0;
cmap->results = NULL;
return FT_Err_Ok;
}
| 7,075 |
105,409 | 0 | void webkit_web_view_copy_clipboard(WebKitWebView* webView)
{
g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
if (webkit_web_view_can_copy_clipboard(webView))
g_signal_emit(webView, webkit_web_view_signals[COPY_CLIPBOARD], 0);
}
| 7,076 |
82,277 | 0 | mrb_obj_clone(mrb_state *mrb, mrb_value self)
{
struct RObject *p;
mrb_value clone;
if (mrb_immediate_p(self)) {
mrb_raisef(mrb, E_TYPE_ERROR, "can't clone %S", self);
}
if (mrb_type(self) == MRB_TT_SCLASS) {
mrb_raise(mrb, E_TYPE_ERROR, "can't clone singleton class");
}
p = (struct RObject*)mrb_... | 7,077 |
15,826 | 0 | static void virtio_net_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
dc->props = virtio_net_properties;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
vdc->realize = virtio_net_device_realize;
vdc->unr... | 7,078 |
109,599 | 0 | PassRefPtr<Attr> Document::createAttributeNS(const String& namespaceURI, const String& qualifiedName, ExceptionState& es, bool shouldIgnoreNamespaceChecks)
{
String prefix, localName;
if (!parseQualifiedName(qualifiedName, prefix, localName, es))
return 0;
QualifiedName qName(prefix, localName, nam... | 7,079 |
26,071 | 0 | void perf_event_enable(struct perf_event *event)
{
struct perf_event_context *ctx = event->ctx;
struct task_struct *task = ctx->task;
if (!task) {
/*
* Enable the event on the cpu that it's on
*/
cpu_function_call(event->cpu, __perf_event_enable, event);
return;
}
raw_spin_lock_irq(&ctx->lock);
if (... | 7,080 |
58,216 | 0 | void scheduler_ipi(void)
{
/*
* Fold TIF_NEED_RESCHED into the preempt_count; anybody setting
* TIF_NEED_RESCHED remotely (for the first time) will also send
* this IPI.
*/
preempt_fold_need_resched();
if (llist_empty(&this_rq()->wake_list)
&& !tick_nohz_full_cpu(smp_processor_id())
&& !got_nohz_idle_... | 7,081 |
46,094 | 0 | bool_t auth_gssapi_seal_seq(
gss_ctx_id_t context,
uint32_t seq_num,
gss_buffer_t out_buf)
{
gss_buffer_desc in_buf;
OM_uint32 gssstat, minor_stat;
uint32_t nl_seq_num;
nl_seq_num = htonl(seq_num);
in_buf.length = sizeof(uint32_t);
in_buf.value = (char *) &nl_seq_num;
... | 7,082 |
161,438 | 0 | void GotUsageAndQuotaDataCallback(
std::unique_ptr<StorageHandler::GetUsageAndQuotaCallback> callback,
blink::mojom::QuotaStatusCode code,
int64_t usage,
int64_t quota,
base::flat_map<storage::QuotaClient::ID, int64_t> usage_breakdown) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
BrowserThread::Pos... | 7,083 |
12,888 | 0 | int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int dlen)
{
int i, ret = 0;
unsigned long l;
for (i = dlen; i > 0; i -= 3) {
if (i >= 3) {
l = (((unsigned long)f[0]) << 16L) |
(((unsigned long)f[1]) << 8L) | f[2];
*(t++) = conv_bin2ascii(l >> 18... | 7,084 |
119,581 | 0 | void RenderBlock::computeBlockDirectionPositionsForLine(RootInlineBox* lineBox, BidiRun* firstRun, GlyphOverflowAndFallbackFontsMap& textBoxDataMap,
VerticalPositionCache& verticalPositionCache)
{
setLogicalHeight(lineBox->alignBoxesInBlockDirection(logicalHei... | 7,085 |
70,780 | 0 | static int build_feed_streams(void)
{
FFServerStream *stream, *feed;
int i, fd;
/* gather all streams */
for(stream = config.first_stream; stream; stream = stream->next) {
feed = stream->feed;
if (!feed)
continue;
if (stream->is_feed) {
for(i=0;i<stream-... | 7,086 |
53,462 | 0 | archive_read_format_rar_options(struct archive_read *a,
const char *key, const char *val)
{
struct rar *rar;
int ret = ARCHIVE_FAILED;
rar = (struct rar *)(a->format->data);
if (strcmp(key, "hdrcharset") == 0) {
if (val == NULL || val[0] == 0)
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
... | 7,087 |
13,930 | 0 | gs_get_colorname_string(const gs_memory_t *mem, gs_separation_name colorname_index,
unsigned char **ppstr, unsigned int *pname_size)
{
ref nref;
name_index_ref(mem, colorname_index, &nref);
name_string_ref(mem, &nref, &nref);
return obj_string_data(mem, &nref, (const unsigned ch... | 7,088 |
149,807 | 0 | bool LayerTreeHost::IsThreaded() const {
DCHECK(compositor_mode_ != CompositorMode::THREADED ||
task_runner_provider_->HasImplThread());
return compositor_mode_ == CompositorMode::THREADED;
}
| 7,089 |
73,843 | 0 | php_http_url_t *php_http_url_from_zval(zval *value, unsigned flags TSRMLS_DC)
{
zval *zcpy;
php_http_url_t *purl;
switch (Z_TYPE_P(value)) {
case IS_ARRAY:
case IS_OBJECT:
purl = php_http_url_from_struct(HASH_OF(value));
break;
default:
zcpy = php_http_ztyp(IS_STRING, value);
purl = php_http_url_parse(Z... | 7,090 |
43,476 | 0 | static int cbc_encrypt(struct blkcipher_desc *desc,
struct scatterlist *dst, struct scatterlist *src,
unsigned int nbytes)
{
struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm));
struct blkcipher_walk walk;
int err;
blkcipher_walk_init(&walk, dst, src, nbytes);
err = blkcipher_w... | 7,091 |
154,668 | 0 | error::Error GLES2DecoderPassthroughImpl::DoGenTextures(
GLsizei n,
volatile GLuint* textures) {
return GenHelper(n, textures, &resources_->texture_id_map,
[this](GLsizei n, GLuint* textures) {
api()->glGenTexturesFn(n, textures);
});
}
| 7,092 |
48,350 | 0 | void t2p_read_tiff_init(T2P* t2p, TIFF* input){
tdir_t directorycount=0;
tdir_t i=0;
uint16 pagen=0;
uint16 paged=0;
uint16 xuint16=0;
directorycount=TIFFNumberOfDirectories(input);
t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_PAGE)));
if(t2p->tiff_pages==NULL)... | 7,093 |
145,490 | 0 | void ResourceDispatcherHostImpl::DidReceiveResponse(ResourceLoader* loader) {
ResourceRequestInfoImpl* info = loader->GetRequestInfo();
net::URLRequest* request = loader->request();
if (request->was_fetched_via_proxy() &&
request->was_fetched_via_spdy() &&
request->url().SchemeIs(url::kHttpScheme)) {
... | 7,094 |
19,471 | 0 | static void efx_fill_test(unsigned int test_index,
struct ethtool_string *strings, u64 *data,
int *test, const char *unit_format, int unit_id,
const char *test_format, const char *test_id)
{
struct ethtool_string unit_str, test_str;
/* Fill data value, if applicable */
if (data)
data[test_index] = ... | 7,095 |
113,826 | 0 | void BlacklistAddOneDll(const wchar_t* module_name,
bool check_in_browser,
sandbox::TargetPolicy* policy) {
HMODULE module = check_in_browser ? ::GetModuleHandleW(module_name) : NULL;
if (!module) {
std::wstring name(module_name);
size_t period = name.rfind(L'... | 7,096 |
54,065 | 0 | static void devinet_sysctl_unregister(struct in_device *idev)
{
}
| 7,097 |
115,880 | 0 | static bool _ewk_frame_rect_is_negative_value(const WebCore::IntRect& rect)
{
return (rect.x() < 0 || rect.y() < 0);
}
| 7,098 |
777 | 0 | poppler_page_get_crop_box (PopplerPage *page, PopplerRectangle *rect)
{
PDFRectangle* cropBox = page->page->getCropBox ();
rect->x1 = cropBox->x1;
rect->x2 = cropBox->x2;
rect->y1 = cropBox->y1;
rect->y2 = cropBox->y2;
}
| 7,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.