unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
17,974 | 0 | newkeys_to_blob(struct sshbuf *m, struct ssh *ssh, int mode)
{
struct sshbuf *b;
struct sshcipher_ctx *cc;
struct sshcomp *comp;
struct sshenc *enc;
struct sshmac *mac;
struct newkeys *newkey;
int r;
if ((newkey = ssh->state->newkeys[mode]) == NULL)
return SSH_ERR_INTERNAL_ERROR;
enc = &newkey->enc;
mac = ... | 800 |
46,653 | 0 | static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
unsigned int key_len)
{
struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm);
u32 *flags = &tfm->crt_flags;
int ret;
ret = need_fallback(key_len);
if (ret < 0) {
*flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
return -EINVAL;
}
sctx->key_len = key_... | 801 |
145,236 | 0 | void Dispatcher::OnMessageInvoke(const std::string& extension_id,
const std::string& module_name,
const std::string& function_name,
const base::ListValue& args,
bool user_gesture) {
Invo... | 802 |
141,139 | 0 | bool Document::IsTrustedTypesEnabledForDoc() const {
return SecurityContext::RequireTrustedTypes() &&
origin_trials::TrustedDOMTypesEnabled(this);
}
| 803 |
83,356 | 0 | static int ssl_parse_hello_verify_request( mbedtls_ssl_context *ssl )
{
const unsigned char *p = ssl->in_msg + mbedtls_ssl_hs_hdr_len( ssl );
int major_ver, minor_ver;
unsigned char cookie_len;
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse hello verify request" ) );
/*
* struct {
* ProtocolVer... | 804 |
171,250 | 0 | status_t SoundTriggerHwService::onTransact(
uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) {
return BnSoundTriggerHwService::onTransact(code, data, reply, flags);
}
| 805 |
119,260 | 0 | void HTMLFormElement::removeFromPastNamesMap(HTMLElement& element)
{
if (!m_pastNamesMap)
return;
PastNamesMap::iterator end = m_pastNamesMap->end();
for (PastNamesMap::iterator it = m_pastNamesMap->begin(); it != end; ++it) {
if (it->value.get() == &element) {
it->value = 0;
... | 806 |
55,718 | 0 | init_WinZip_AES_decryption(struct archive_read *a)
{
struct zip *zip = (struct zip *)(a->format->data);
const void *p;
const uint8_t *pv;
size_t key_len, salt_len;
uint8_t derived_key[MAX_DERIVED_KEY_BUF_SIZE];
int retry;
int r;
if (zip->cctx_valid || zip->hctx_valid)
return (ARCHIVE_OK);
switch (zip->entr... | 807 |
48,961 | 0 | __be32 inet_current_timestamp(void)
{
u32 secs;
u32 msecs;
struct timespec64 ts;
ktime_get_real_ts64(&ts);
/* Get secs since midnight. */
(void)div_u64_rem(ts.tv_sec, SECONDS_PER_DAY, &secs);
/* Convert to msecs. */
msecs = secs * MSEC_PER_SEC;
/* Convert nsec to msec. */
msecs += (u32)ts.tv_nsec / NSEC_PER... | 808 |
107,578 | 0 | void ewk_view_paint_context_paint_contents(Ewk_View_Paint_Context* context, const Eina_Rectangle* area)
{
EINA_SAFETY_ON_NULL_RETURN(context);
EINA_SAFETY_ON_NULL_RETURN(area);
WebCore::IntRect rect(area->x, area->y, area->w, area->h);
if (context->view->isTransparent())
context->graphicContex... | 809 |
94,032 | 0 | void op_addAvxRoundingMode(MCInst *MI, int v)
{
if (MI->csh->detail) {
MI->flat_insn->detail->x86.avx_rm = v;
}
}
| 810 |
135,090 | 0 | void GetStatusCallback(AppCacheStatus status, void* param) {
last_status_result_ = status;
last_callback_param_ = param;
}
| 811 |
45,679 | 0 | static struct crypto_instance *crypto_ctr_alloc(struct rtattr **tb)
{
struct crypto_instance *inst;
struct crypto_alg *alg;
int err;
err = crypto_check_attr_type(tb, CRYPTO_ALG_TYPE_BLKCIPHER);
if (err)
return ERR_PTR(err);
alg = crypto_attr_alg(tb[1], CRYPTO_ALG_TYPE_CIPHER,
CRYPTO_ALG_TYPE_MASK);
if ... | 812 |
15,709 | 0 | static int get_uint16_equal(QEMUFile *f, void *pv, size_t size)
{
uint16_t *v = pv;
uint16_t v2;
qemu_get_be16s(f, &v2);
if (*v == v2) {
return 0;
}
return -EINVAL;
}
| 813 |
6,524 | 0 | hash_bucket( const char* key,
hashtable* ht )
{
const char* kp = key;
unsigned long res = 0;
hashnode* bp = ht->table, *ndp;
/* Mocklisp hash function. */
while ( *kp )
res = ( res << 5 ) - res + *kp++;
ndp = bp + ( res % ht->size );
while ( *ndp )
... | 814 |
55,952 | 0 | static void tty_update_time(struct timespec *time)
{
unsigned long sec = get_seconds();
/*
* We only care if the two values differ in anything other than the
* lower three bits (i.e every 8 seconds). If so, then we can update
* the time of the tty device, otherwise it could be construded as a
* security lea... | 815 |
119,761 | 0 | void NavigationControllerImpl::FinishRestore(int selected_index,
RestoreType type) {
DCHECK(selected_index >= 0 && selected_index < GetEntryCount());
ConfigureEntriesForRestore(&entries_, type);
SetMaxRestoredPageID(static_cast<int32>(GetEntryCount()));
last_commit... | 816 |
129,530 | 0 | const FeatureInfo::Workarounds& workarounds() const {
return feature_info_->workarounds();
}
| 817 |
75,971 | 0 | timeval_to_double(const timeval_t *t)
{
/* The casts are necessary to avoid conversion warnings */
return (double)t->tv_sec + (double)t->tv_usec / TIMER_HZ_FLOAT;
}
| 818 |
57,518 | 0 | struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
{
struct ext4_iloc iloc;
struct ext4_inode *raw_inode;
struct ext4_inode_info *ei;
struct inode *inode;
journal_t *journal = EXT4_SB(sb)->s_journal;
long ret;
int block;
inode = iget_locked(sb, ino);
if (!inode)
return ERR_PTR(-ENOMEM);
if ... | 819 |
60,287 | 0 | struct key *request_key_auth_new(struct key *target, const void *callout_info,
size_t callout_len, struct key *dest_keyring)
{
struct request_key_auth *rka, *irka;
const struct cred *cred = current->cred;
struct key *authkey = NULL;
char desc[20];
int ret = -ENOMEM;
kenter("%d,", target->serial);
/* alloc... | 820 |
37,101 | 0 | static int handle_wrmsr(struct kvm_vcpu *vcpu)
{
struct msr_data msr;
u32 ecx = vcpu->arch.regs[VCPU_REGS_RCX];
u64 data = (vcpu->arch.regs[VCPU_REGS_RAX] & -1u)
| ((u64)(vcpu->arch.regs[VCPU_REGS_RDX] & -1u) << 32);
msr.data = data;
msr.index = ecx;
msr.host_initiated = false;
if (vmx_set_msr(vcpu, &msr) != ... | 821 |
63,297 | 0 | static void MagickPNGErrorHandler(png_struct *ping,png_const_charp message)
{
ExceptionInfo
*exception;
Image
*image;
PNGErrorInfo
*error_info;
error_info=(PNGErrorInfo *) png_get_error_ptr(ping);
image=error_info->image;
exception=error_info->exception;
(void) LogMagickEvent(CoderEvent,Ge... | 822 |
154,509 | 0 | void GLES2DecoderPassthroughImpl::RestoreBufferBindings() const {}
| 823 |
18,863 | 0 | static int __net_init icmp_sk_init(struct net *net)
{
int i, err;
net->ipv4.icmp_sk =
kzalloc(nr_cpu_ids * sizeof(struct sock *), GFP_KERNEL);
if (net->ipv4.icmp_sk == NULL)
return -ENOMEM;
for_each_possible_cpu(i) {
struct sock *sk;
err = inet_ctl_sock_create(&sk, PF_INET,
SOCK_RAW, IPPROTO_ICMP... | 824 |
176,272 | 0 | static uint32_t GetEntryForIndexImpl(Isolate* isolate, JSObject* holder,
FixedArrayBase* store, uint32_t index,
PropertyFilter filter) {
DisallowHeapAllocation no_gc;
SeededNumberDictionary* dictionary = SeededNumberDictionary::cast(store);
int entry = dictionary->FindEntry(isolate, index);
if (entry == SeededNu... | 825 |
159,541 | 0 | void Unpack<WebGLImageConversion::kDataFormatABGR8, uint8_t, uint8_t>(
const uint8_t* source,
uint8_t* destination,
unsigned pixels_per_row) {
for (unsigned i = 0; i < pixels_per_row; ++i) {
destination[0] = source[3];
destination[1] = source[2];
destination[2] = source[1];
destination[3] ... | 826 |
17,895 | 0 | static void zrle_write_u16(VncState *vs, uint16_t value)
{
vnc_write(vs, (uint8_t *)&value, 2);
}
| 827 |
45,262 | 0 | static int udf_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{
struct inode *inode;
struct udf_fileident_bh fibh;
struct fileIdentDesc cfi, *fi;
int err;
struct udf_inode_info *dinfo = UDF_I(dir);
struct udf_inode_info *iinfo;
inode = udf_new_inode(dir, S_IFDIR | mode);
if (IS_ERR(inode))
ret... | 828 |
74,627 | 0 | static void free_types_list(char *list[])
{
char **n;
if (!list)
return;
for (n = list; *n; n++)
free(*n);
free(list);
}
| 829 |
97,220 | 0 | ObjectContentType WebFrameLoaderClient::objectContentType(
const KURL& url,
const String& explicit_mime_type) {
String mime_type = explicit_mime_type;
if (mime_type.isEmpty()) {
String filename = url.lastPathComponent();
int extension_pos = filename.reverseFind('.');
if (extension_pos >= 0)
... | 830 |
25,081 | 0 | static int addr_compare(const struct inetpeer_addr *a,
const struct inetpeer_addr *b)
{
int i, n = (a->family == AF_INET ? 1 : 4);
for (i = 0; i < n; i++) {
if (a->addr.a6[i] == b->addr.a6[i])
continue;
if (a->addr.a6[i] < b->addr.a6[i])
return -1;
return 1;
}
return 0;
}
| 831 |
110,959 | 0 | void RootWindowHostLinux::Show() {
XSizeHints size_hints;
size_hints.flags = PPosition;
size_hints.x = bounds_.x();
size_hints.y = bounds_.y();
XSetWMNormalHints(xdisplay_, xwindow_, &size_hints);
XMapWindow(xdisplay_, xwindow_);
}
| 832 |
128,027 | 0 | void AwContents::OnReceivedIcon(const GURL& icon_url, const SkBitmap& bitmap) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
if (obj.is_null())
return;
content::NavigationEntry* entry =
web_contents_->GetControlle... | 833 |
181,799 | 1 | static Image *ReadGROUP4Image(const ImageInfo *image_info,
ExceptionInfo *exception)
{
char
filename[MagickPathExtent];
FILE
*file;
Image
*image;
ImageInfo
*read_info;
int
c,
unique_file;
MagickBooleanType
status;
size_t
length;
ssize_t
offset,
strip_offset;
/*
Open image file.
*/
assert(image_info != (const Im... | 834 |
138,938 | 0 | explicit TestObserver(WallpaperManager* wallpaper_manager)
: update_wallpaper_count_(0), wallpaper_manager_(wallpaper_manager) {
DCHECK(wallpaper_manager_);
wallpaper_manager_->AddObserver(this);
}
| 835 |
33,675 | 0 | pkinit_identity_set_prompter(pkinit_identity_crypto_context id_cryptoctx,
krb5_prompter_fct prompter,
void *prompter_data)
{
id_cryptoctx->prompter = prompter;
id_cryptoctx->prompter_data = prompter_data;
return 0;
}
| 836 |
153,263 | 0 | void DesktopWindowTreeHostX11::OnDisplayMetricsChanged(
const display::Display& display,
uint32_t changed_metrics) {
aura::WindowTreeHost::OnDisplayMetricsChanged(display, changed_metrics);
if ((changed_metrics & DISPLAY_METRIC_DEVICE_SCALE_FACTOR) &&
display::Screen::GetScreen()->GetDisplayNearestWi... | 837 |
48,190 | 0 | DECLAREcpFunc(cpSeparate2ContigByRow)
{
tsize_t scanlinesizein = TIFFScanlineSize(in);
tsize_t scanlinesizeout = TIFFScanlineSize(out);
tdata_t inbuf;
tdata_t outbuf;
register uint8 *inp, *outp;
register uint32 n;
uint32 row;
tsample_t s;
inbuf = _TIFFmalloc(scanlinesizein);
outbuf = _TIFFmalloc(scanlinesize... | 838 |
30,654 | 0 | static unsigned int irda_poll(struct file * file, struct socket *sock,
poll_table *wait)
{
struct sock *sk = sock->sk;
struct irda_sock *self = irda_sk(sk);
unsigned int mask;
IRDA_DEBUG(4, "%s()\n", __func__);
poll_wait(file, sk_sleep(sk), wait);
mask = 0;
/* Exceptional events? */
if (sk->sk_err)
... | 839 |
36,892 | 0 | void set_nlink(struct inode *inode, unsigned int nlink)
{
if (!nlink) {
clear_nlink(inode);
} else {
/* Yes, some filesystems do change nlink from zero to one */
if (inode->i_nlink == 0)
atomic_long_dec(&inode->i_sb->s_remove_count);
inode->__i_nlink = nlink;
}
}
| 840 |
88,892 | 0 | static MagickBooleanType InverseQuadrantSwap(const size_t width,
const size_t height,const double *source,double *destination)
{
register ssize_t
x;
ssize_t
center,
y;
/*
Swap quadrants.
*/
center=(ssize_t) (width/2L)+1L;
for (y=1L; y < (ssize_t) height; y++)
for (x=0L; x < (ssize_t)... | 841 |
71,378 | 0 | int t2p_process_jpeg_strip(
unsigned char* strip,
tsize_t* striplength,
unsigned char* buffer,
tsize_t buffersize,
tsize_t* bufferoffset,
tstrip_t no,
uint32 height){
tsize_t i=0;
while (i < *striplength) {
tsize_t datalen;
uint16 ri;
uint16 v_samp;
uint16 h_samp;
int j;
int ncomp;
/* ... | 842 |
132,475 | 0 | ExtensionFunction::ResponseAction UsbGetUserSelectedDevicesFunction::Run() {
scoped_ptr<extensions::core_api::usb::GetUserSelectedDevices::Params>
parameters = GetUserSelectedDevices::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(parameters.get());
if (!user_gesture()) {
return RespondNow(OneArgu... | 843 |
148,941 | 0 | static void TRACE_IDX_INPUTS(sqlite3_index_info *p){
int i;
if( !sqlite3WhereTrace ) return;
for(i=0; i<p->nConstraint; i++){
sqlite3DebugPrintf(" constraint[%d]: col=%d termid=%d op=%d usabled=%d\n",
i,
p->aConstraint[i].iColumn,
p->aConstraint[i].iTermOffset,
p->aConstraint[i].o... | 844 |
28,712 | 0 | static void __report_tpr_access(struct kvm_lapic *apic, bool write)
{
struct kvm_vcpu *vcpu = apic->vcpu;
struct kvm_run *run = vcpu->run;
kvm_make_request(KVM_REQ_REPORT_TPR_ACCESS, vcpu);
run->tpr_access.rip = kvm_rip_read(vcpu);
run->tpr_access.is_write = write;
}
| 845 |
47,779 | 0 | static int _snd_pcm_hw_param_last(struct snd_pcm_hw_params *params,
snd_pcm_hw_param_t var)
{
int changed;
if (hw_is_mask(var))
changed = snd_mask_refine_last(hw_param_mask(params, var));
else if (hw_is_interval(var))
changed = snd_interval_refine_last(hw_param_interval(params, var));
else
return -EINVA... | 846 |
92,770 | 0 | static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sds)
{
struct sched_domain *child = env->sd->child;
struct sched_group *sg = env->sd->groups;
struct sg_lb_stats *local = &sds->local_stat;
struct sg_lb_stats tmp_sgs;
bool prefer_sibling = child && child->flags & SD_PREFER_SIBLING;
int... | 847 |
103,776 | 0 | WebPlugin* RenderView::CreateNPAPIPlugin(
WebFrame* frame,
const WebPluginParams& params,
const FilePath& path,
const std::string& mime_type) {
return new webkit::npapi::WebPluginImpl(
frame, params, path, mime_type, AsWeakPtr());
}
| 848 |
17,738 | 0 | ProcXF86DRIGetClientDriverName(register ClientPtr client)
{
xXF86DRIGetClientDriverNameReply rep = {
.type = X_Reply,
.sequenceNumber = client->sequence,
.clientDriverNameLength = 0
};
char *clientDriverName;
REQUEST(xXF86DRIGetClientDriverNameReq);
REQUEST_SIZE_MATCH(xXF86D... | 849 |
126,511 | 0 | gfx::Rect TabStripGtk::GetIdealBounds(int index) {
DCHECK(index >= 0 && index < GetTabCount());
return tab_data_.at(index).ideal_bounds;
}
| 850 |
166,243 | 0 | AudioInputDeviceManager* MediaStreamManager::audio_input_device_manager() {
DCHECK(audio_input_device_manager_.get());
return audio_input_device_manager_.get();
}
| 851 |
36,408 | 0 | static int pppol2tp_proc_open(struct inode *inode, struct file *file)
{
return seq_open_net(inode, file, &pppol2tp_seq_ops,
sizeof(struct pppol2tp_seq_data));
}
| 852 |
184,316 | 1 | bool Plugin::LoadNaClModuleCommon(nacl::DescWrapper* wrapper,
NaClSubprocess* subprocess,
const Manifest* manifest,
bool should_report_uma,
ErrorInfo* error_info,
pp::CompletionCallback init_done_cb,
pp::CompletionCallback crash_cb) {
ServiceRuntime* new_service_runtime =
new ServiceRuntime(this, manifest, should_repor... | 853 |
63,390 | 0 | static void ape_apply_filters(APEContext *ctx, int32_t *decoded0,
int32_t *decoded1, int count)
{
int i;
for (i = 0; i < APE_FILTER_LEVELS; i++) {
if (!ape_filter_orders[ctx->fset][i])
break;
apply_filter(ctx, ctx->filters[i], decoded0, decoded1, count,... | 854 |
13,362 | 0 | SmartScheduleStopTimer (void)
{
struct itimerval timer;
if (SmartScheduleDisable)
return;
timer.it_interval.tv_sec = 0;
timer.it_interval.tv_usec = 0;
timer.it_value.tv_sec = 0;
timer.it_value.tv_usec = 0;
(void) setitimer (ITIMER_REAL, &timer, 0);
}
| 855 |
104,109 | 0 | TextureManager::TextureInfo* GetTextureInfoForTarget(GLenum target) {
TextureUnit& unit = texture_units_[active_texture_unit_];
TextureManager::TextureInfo* info = NULL;
switch (target) {
case GL_TEXTURE_2D:
info = unit.bound_texture_2d;
break;
case GL_TEXTURE_CUBE_MAP:
c... | 856 |
67,538 | 0 | int ext4_setattr(struct dentry *dentry, struct iattr *attr)
{
struct inode *inode = d_inode(dentry);
int error, rc = 0;
int orphan = 0;
const unsigned int ia_valid = attr->ia_valid;
error = inode_change_ok(inode, attr);
if (error)
return error;
if (is_quota_modification(inode, attr)) {
error = dquot_initia... | 857 |
140,600 | 0 | pp::URLLoader OutOfProcessInstance::CreateURLLoaderInternal() {
pp::URLLoader loader(this);
const PPB_URLLoaderTrusted* trusted_interface =
reinterpret_cast<const PPB_URLLoaderTrusted*>(
pp::Module::Get()->GetBrowserInterface(
PPB_URLLOADERTRUSTED_INTERFACE));
if (trusted_interface)... | 858 |
184,222 | 1 | bool ChromotingInstance::Init(uint32_t argc,
const char* argn[],
const char* argv[]) {
CHECK(!initialized_);
initialized_ = true;
VLOG(1) << "Started ChromotingInstance::Init";
if (!media::IsMediaLibraryInitialized()) {
LOG(ERROR) << "Media libra... | 859 |
165,942 | 0 | void RenderFrameImpl::WillSendRequest(blink::WebURLRequest& request) {
if (committing_main_request_ &&
request.GetFrameType() !=
network::mojom::RequestContextFrameType::kNone) {
return;
}
if (render_view_->renderer_preferences_.enable_do_not_track)
request.SetHTTPHeaderField(blink::WebSt... | 860 |
63,418 | 0 | static void init_predictor_decoder(APEContext *ctx)
{
APEPredictor *p = &ctx->predictor;
/* Zero the history buffers */
memset(p->historybuffer, 0, PREDICTOR_SIZE * sizeof(*p->historybuffer));
p->buf = p->historybuffer;
/* Initialize and zero the coefficients */
if (ctx->fileversion < 3930) {
... | 861 |
177,190 | 0 | ACodec::LoadedState::LoadedState(ACodec *codec)
: BaseState(codec) {
}
| 862 |
171,593 | 0 | String8 String8::walkPath(String8* outRemains) const
{
const char* cp;
const char*const str = mString;
const char* buf = str;
cp = strchr(buf, OS_PATH_SEPARATOR);
if (cp == buf) {
buf = buf+1;
cp = strchr(buf, OS_PATH_SEPARATOR);
}
if (cp == NULL) {
String8 res = buf != str ? String8(buf) :... | 863 |
38,233 | 0 | static u64 __get_raw_cpu_id(u64 ctx, u64 A, u64 X, u64 r4, u64 r5)
{
return raw_smp_processor_id();
}
| 864 |
46,440 | 0 | xfs_file_mmap(
struct file *filp,
struct vm_area_struct *vma)
{
vma->vm_ops = &xfs_file_vm_ops;
file_accessed(filp);
return 0;
}
| 865 |
22,071 | 0 | raptor_turtle_writer_reference(raptor_turtle_writer* turtle_writer,
raptor_uri* uri)
{
unsigned char* uri_str;
size_t length;
uri_str = raptor_uri_to_relative_counted_uri_string(turtle_writer->base_uri, uri, &length);
raptor_iostream_write_byte('<', turtle_writer->iostr);
i... | 866 |
136,450 | 0 | void ConversionContext::PopState() {
DCHECK_EQ(nullptr, previous_transform_);
const auto& previous_state = state_stack_.back();
AppendRestore(previous_state.saved_count);
current_transform_ = previous_state.transform;
previous_transform_ = previous_state.previous_transform;
current_clip_ = previous_state.c... | 867 |
41,519 | 0 | static struct hlist_head *listen_hash(struct sockaddr_dn *addr)
{
int i;
unsigned int hash = addr->sdn_objnum;
if (hash == 0) {
hash = addr->sdn_objnamel;
for(i = 0; i < le16_to_cpu(addr->sdn_objnamel); i++) {
hash ^= addr->sdn_objname[i];
hash ^= (hash << 3);
}
}
return &dn_sk_hash[hash & DN_SK_HASH... | 868 |
58,789 | 0 | int __remove_suid(struct dentry *dentry, int kill)
{
struct iattr newattrs;
newattrs.ia_valid = ATTR_FORCE | kill;
return notify_change(dentry, &newattrs);
}
| 869 |
17,728 | 0 | DGAUninstallColormap(ColormapPtr pmap)
{
ScreenPtr pScreen = pmap->pScreen;
DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen);
if (pScreenPriv->current && pScreenPriv->dgaColormap) {
if (pmap == pScreenPriv->dgaColormap) {
pScreenPriv->dgaColormap = NULL;
}
}
pScr... | 870 |
127,505 | 0 | bool JPEGImageDecoder::setSize(unsigned width, unsigned height)
{
if (!ImageDecoder::setSize(width, height))
return false;
prepareScaleDataIfNecessary();
return true;
}
| 871 |
5,612 | 0 | int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *a, ASN1_BIT_STRING *signature,
char *data, EVP_PKEY *pkey)
{
EVP_MD_CTX ctx;
const EVP_MD *type;
unsigned char *p,*buf_in=NULL;
int ret= -1,i,inl;
EVP_MD_CTX_init(&ctx);
i=OBJ_obj2nid(a->algorithm);
type=EVP_get_digestbyname(OBJ_nid2sn(i));
if (type == NULL)
{... | 872 |
137,283 | 0 | void Textfield::SetColor(SkColor value) {
GetRenderText()->SetColor(value);
cursor_view_.layer()->SetColor(value);
SchedulePaint();
}
| 873 |
62,044 | 0 | static void build_sk_flow_key(struct flowi4 *fl4, const struct sock *sk)
{
const struct inet_sock *inet = inet_sk(sk);
const struct ip_options_rcu *inet_opt;
__be32 daddr = inet->inet_daddr;
rcu_read_lock();
inet_opt = rcu_dereference(inet->inet_opt);
if (inet_opt && inet_opt->opt.srr)
daddr = inet_opt->opt.fa... | 874 |
145,229 | 0 | void Dispatcher::OnClearTabSpecificPermissions(
const std::vector<std::string>& extension_ids,
bool update_origin_whitelist,
int tab_id) {
for (const std::string& id : extension_ids) {
const Extension* extension = RendererExtensionRegistry::Get()->GetByID(id);
if (extension) {
URLPatternSet ... | 875 |
3,632 | 0 | static int rsa_item_verify(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn,
X509_ALGOR *sigalg, ASN1_BIT_STRING *sig,
EVP_PKEY *pkey)
{
/* Sanity check: make sure it is PSS */
if (OBJ_obj2nid(sigalg->algorithm) != NID_rsassaPss) {
RSAerr(RSA_F_RSA_IT... | 876 |
87,399 | 0 | int main(int argc, char* argv[])
{
size_t elements = sizeof(args) / sizeof(args[0]);
size_t x;
const char* fname = "xfreerdp-argument.1.xml";
FILE* fp = NULL;
/* Open output file for writing, truncate if existing. */
fp = fopen(fname, "w");
if (NULL == fp)
{
fprintf(stderr, "Could not open '%s' for writing.... | 877 |
100,578 | 0 | void BrowserTitlebar::UpdateTitlebarAlignment() {
if (browser_window_->browser()->type() == Browser::TYPE_NORMAL) {
if (using_custom_frame_ && !browser_window_->IsMaximized()) {
gtk_alignment_set_padding(GTK_ALIGNMENT(titlebar_alignment_),
kTitlebarHeight, 0, kTabStripLeftPadding, 0);
} else {... | 878 |
31,645 | 0 | sctp_disposition_t sctp_sf_violation(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
/* Make sure that the chunk has a valid length. */
... | 879 |
102,577 | 0 | void NaClProcessHost::OnChildDied() {
#if defined(OS_WIN)
NaClBrokerService::GetInstance()->OnLoaderDied();
#endif
BrowserChildProcessHost::OnChildDied();
}
| 880 |
69,640 | 0 | rend_service_requires_uptime(rend_service_t *service)
{
int i;
rend_service_port_config_t *p;
for (i=0; i < smartlist_len(service->ports); ++i) {
p = smartlist_get(service->ports, i);
if (smartlist_contains_int_as_string(get_options()->LongLivedPorts,
p->virtual_port))
... | 881 |
56,112 | 0 | static struct pmu *perf_init_event(struct perf_event *event)
{
struct pmu *pmu = NULL;
int idx;
int ret;
idx = srcu_read_lock(&pmus_srcu);
rcu_read_lock();
pmu = idr_find(&pmu_idr, event->attr.type);
rcu_read_unlock();
if (pmu) {
ret = perf_try_init_event(pmu, event);
if (ret)
pmu = ERR_PTR(ret);
got... | 882 |
179,963 | 1 | bool_t xdr_krb5_tl_data(XDR *xdrs, krb5_tl_data **tl_data_head)
{
krb5_tl_data *tl, *tl2;
bool_t more;
unsigned int len;
switch (xdrs->x_op) {
case XDR_FREE:
tl = tl2 = *tl_data_head;
while (tl) {
tl2 = tl->tl_data_next;
free(tl->tl_data_contents);
free(tl);
... | 883 |
110,846 | 0 | bool safeCreateFile(const String& path, CFDataRef data)
{
WCHAR tempDirPath[MAX_PATH];
if (!GetTempPathW(WTF_ARRAY_LENGTH(tempDirPath), tempDirPath))
return false;
WCHAR tempPath[MAX_PATH];
if (!GetTempFileNameW(tempDirPath, L"WEBKIT", 0, tempPath))
return false;
HANDLE tempFileHan... | 884 |
139,392 | 0 | static bool EnabledSelectAll(LocalFrame& frame,
Event*,
EditorCommandSource source) {
frame.GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets();
const VisibleSelection& selection =
frame.Selection().ComputeVisibleSelectionInDOMTree();
if (s... | 885 |
85,552 | 0 | static void hns_gmac_set_mac_addr(void *mac_drv, char *mac_addr)
{
struct mac_driver *drv = (struct mac_driver *)mac_drv;
u32 high_val = mac_addr[1] | (mac_addr[0] << 8);
u32 low_val = mac_addr[5] | (mac_addr[4] << 8)
| (mac_addr[3] << 16) | (mac_addr[2] << 24);
u32 val = dsaf_read_dev(drv, GMAC_STATION_ADDR_H... | 886 |
60,993 | 0 | request_is_satisfied (NautilusDirectory *directory,
NautilusFile *file,
Request request)
{
if (REQUEST_WANTS_TYPE (request, REQUEST_FILE_LIST) &&
!(directory->details->directory_loaded &&
directory->details->directory_loaded_sent_notifica... | 887 |
22,314 | 0 | static enum s_alloc __visit_domain_allocation_hell(struct s_data *d,
const struct cpumask *cpu_map)
{
#ifdef CONFIG_NUMA
if (!alloc_cpumask_var(&d->domainspan, GFP_KERNEL))
return sa_none;
if (!alloc_cpumask_var(&d->covered, GFP_KERNEL))
return sa_domainspan;
if (!alloc_cpumask_var(&d->notcovered, GFP_K... | 888 |
21,439 | 0 | static int alignfile(struct file *file, loff_t *foffset)
{
static const char buf[4] = { 0, };
DUMP_WRITE(buf, roundup(*foffset, 4) - *foffset, foffset);
return 1;
}
| 889 |
38,760 | 0 | hstore_skeys(PG_FUNCTION_ARGS)
{
FuncCallContext *funcctx;
HStore *hs;
int i;
if (SRF_IS_FIRSTCALL())
{
hs = PG_GETARG_HS(0);
funcctx = SRF_FIRSTCALL_INIT();
setup_firstcall(funcctx, hs, NULL);
}
funcctx = SRF_PERCALL_SETUP();
hs = (HStore *) funcctx->user_fctx;
i = funcctx->call_cntr;
if (i < H... | 890 |
44,411 | 0 | static int lxcfs_getattr(const char *path, struct stat *sb)
{
if (strcmp(path, "/") == 0) {
sb->st_mode = S_IFDIR | 00755;
sb->st_nlink = 2;
return 0;
}
if (strncmp(path, "/cgroup", 7) == 0) {
return cg_getattr(path, sb);
}
if (strncmp(path, "/proc", 5) == 0) {
return proc_getattr(path, sb);
}
return -... | 891 |
59,671 | 0 | static int csnmp_dispatch_table(host_definition_t *host,
data_definition_t *data,
csnmp_list_instances_t *instance_list,
csnmp_table_values_t **value_table) {
const data_set_t *ds;
value_list_t vl = VALUE_LIST_INIT;
c... | 892 |
58,315 | 0 | static void arm_iommu_unmap_page(struct device *dev, dma_addr_t handle,
size_t size, enum dma_data_direction dir,
struct dma_attrs *attrs)
{
struct dma_iommu_mapping *mapping = dev->archdata.mapping;
dma_addr_t iova = handle & PAGE_MASK;
struct page *page = phys_to_page(iommu_iova_to_phys(mapping->domain, iova))... | 893 |
175,452 | 0 | static int in_close_pcm_devices(struct stream_in *in)
{
struct pcm_device *pcm_device;
struct listnode *node;
struct audio_device *adev = in->dev;
list_for_each(node, &in->pcm_dev_list) {
pcm_device = node_to_item(node, struct pcm_device, stream_list_node);
if (pcm_device) {
if (pcm_device->pcm)
... | 894 |
62,446 | 0 | parse_post_op_attr(netdissect_options *ndo,
const uint32_t *dp, int verbose)
{
ND_TCHECK(dp[0]);
if (!EXTRACT_32BITS(&dp[0]))
return (dp + 1);
dp++;
if (verbose) {
return parsefattr(ndo, dp, verbose, 1);
} else
return (dp + (NFSX_V3FATTR / sizeof (uint32_t)));
trunc:
return (NULL);
}
| 895 |
150,293 | 0 | bool PasswordAutofillAgent::FindPasswordInfoForElement(
const WebInputElement& element,
WebInputElement* username_element,
WebInputElement* password_element,
PasswordInfo** password_info) {
DCHECK(username_element && password_element && password_info);
username_element->Reset();
password_element->... | 896 |
46,039 | 0 | _xdr_kadm5_policy_ent_rec(XDR *xdrs, kadm5_policy_ent_rec *objp, int vers)
{
if (!xdr_nullstring(xdrs, &objp->policy)) {
return (FALSE);
}
/* these all used to be u_int32, but it's stupid for sized types
to be exposed at the api, and they're the same as longs on the
wire. */
if (!xdr_long(xdrs, &objp->pw_... | 897 |
139,041 | 0 | void SetResult(scoped_refptr<UsbDeviceHandle> device_handle) {
device_handle_ = device_handle;
run_loop_.Quit();
}
| 898 |
23,892 | 0 | static __exit void veth_exit(void)
{
rtnl_link_unregister(&veth_link_ops);
}
| 899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.