unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
177,262 | 0 | bool ACodec::OutputPortSettingsChangedState::onMessageReceived(
const sp<AMessage> &msg) {
bool handled = false;
switch (msg->what()) {
case kWhatFlush:
case kWhatShutdown:
case kWhatResume:
case kWhatSetParameters:
{
if (msg->what() == kWhatResume) {
ALOGV("[%s] Deferring resume", mCodec->mCo... | 15,200 |
3,478 | 0 | irc_server_free_all ()
{
/* for each server in memory, remove it */
while (irc_servers)
{
irc_server_free (irc_servers);
}
}
| 15,201 |
46,160 | 0 | static long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
{
struct inode *inode;
struct dentry *dentry;
struct fd f;
int error;
error = -EINVAL;
if (length < 0)
goto out;
error = -EBADF;
f = fdget(fd);
if (!f.file)
goto out;
/* explicitly opened as large or we are on 64-bit box */
if (f.f... | 15,202 |
100,198 | 0 | int PluginResponseUtils::GetResponseInfo(
const net::HttpResponseHeaders* response_headers,
CPResponseInfoType type, void* buf, size_t buf_size) {
if (!response_headers)
return CPERR_FAILURE;
switch (type) {
case CPRESPONSEINFO_HTTP_STATUS:
if (buf && buf_size) {
int status = response_heade... | 15,203 |
8,345 | 0 | static int xhci_setup_packet(XHCITransfer *xfer)
{
XHCIState *xhci = xfer->xhci;
USBEndpoint *ep;
int dir;
dir = xfer->in_xfer ? USB_TOKEN_IN : USB_TOKEN_OUT;
if (xfer->packet.ep) {
ep = xfer->packet.ep;
} else {
ep = xhci_epid_to_usbep(xhci, xfer->slotid, xfer->epid);
... | 15,204 |
164,524 | 0 | static void checkPtrmap(
IntegrityCk *pCheck, /* Integrity check context */
Pgno iChild, /* Child page number */
u8 eType, /* Expected pointer map type */
Pgno iParent /* Expected pointer map parent page number */
){
int rc;
u8 ePtrmapType;
Pgno iPtrmapParent;
rc = pt... | 15,205 |
49,011 | 0 | void brcmf_cfg80211_detach(struct brcmf_cfg80211_info *cfg)
{
if (!cfg)
return;
brcmf_btcoex_detach(cfg);
wiphy_unregister(cfg->wiphy);
kfree(cfg->ops);
wl_deinit_priv(cfg);
brcmf_free_wiphy(cfg->wiphy);
}
| 15,206 |
183,116 | 1 | BGD_DECLARE(gdImagePtr) gdImageCropThreshold(gdImagePtr im, const unsigned int color, const float threshold)
{
const int width = gdImageSX(im);
const int height = gdImageSY(im);
int x,y;
int match;
gdRect crop;
crop.x = 0;
crop.y = 0;
crop.width = 0;
crop.height = 0;
/* Pierre: crop everything sounds bad *... | 15,207 |
113,788 | 0 | ~PrintPreviewRequestIdMapWithLock() {}
| 15,208 |
177,654 | 0 | virtual void BeginPassHook(unsigned int /*pass*/) {
#if WRITE_COMPRESSED_STREAM
outfile_ = fopen("vp90-2-05-resize.ivf", "wb");
#endif
}
| 15,209 |
132,798 | 0 | scoped_ptr<LayerImpl> PictureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
return PictureLayerImpl::Create(tree_impl, id(), is_mask_);
}
| 15,210 |
39,107 | 0 | varbittypmodout(PG_FUNCTION_ARGS)
{
int32 typmod = PG_GETARG_INT32(0);
PG_RETURN_CSTRING(anybit_typmodout(typmod));
}
| 15,211 |
48,239 | 0 | static int dump_byte (FILE *dumpfile, int format, char *dump_tag, unsigned char data)
{
int j, k;
char dump_array[10];
unsigned char bitset;
if (dumpfile == NULL)
{
TIFFError ("", "Invalid FILE pointer for dump file");
return (1);
}
if (format == DUMP_TEXT)
{
fprintf (dumpfile," %... | 15,212 |
32,687 | 0 | static void tg3_probe_ncsi(struct tg3 *tp)
{
u32 apedata;
apedata = tg3_ape_read32(tp, TG3_APE_SEG_SIG);
if (apedata != APE_SEG_SIG_MAGIC)
return;
apedata = tg3_ape_read32(tp, TG3_APE_FW_STATUS);
if (!(apedata & APE_FW_STATUS_READY))
return;
if (tg3_ape_read32(tp, TG3_APE_FW_FEATURES) & TG3_APE_FW_FEATURE_... | 15,213 |
114,201 | 0 | void GpuProcessHost::OnChannelConnected(int32 peer_pid) {
while (!queued_messages_.empty()) {
Send(queued_messages_.front());
queued_messages_.pop();
}
}
| 15,214 |
58,034 | 0 | static struct nft_trans *nft_trans_alloc(struct nft_ctx *ctx, int msg_type,
u32 size)
{
struct nft_trans *trans;
trans = kzalloc(sizeof(struct nft_trans) + size, GFP_KERNEL);
if (trans == NULL)
return NULL;
trans->msg_type = msg_type;
trans->ctx = *ctx;
return trans;
}
| 15,215 |
133,304 | 0 | bool AcceleratorControllerDelegateAura::HandlesAction(
AcceleratorAction action) {
switch (action) {
case DEBUG_TOGGLE_DESKTOP_BACKGROUND_MODE:
case DEBUG_TOGGLE_DEVICE_SCALE_FACTOR:
case DEBUG_TOGGLE_ROOT_WINDOW_FULL_SCREEN:
case DEBUG_TOGGLE_SHOW_DEBUG_BORDERS:
case DEBUG_TOGGLE_SHOW_FPS_COU... | 15,216 |
31,274 | 0 | static inline void blkcipher_map_src(struct blkcipher_walk *walk)
{
walk->src.virt.addr = scatterwalk_map(&walk->in);
}
| 15,217 |
98,798 | 0 | void WebPluginDelegateProxy::OnInitiateHTTPRangeRequest(
const std::string& url,
const std::string& range_info,
int range_request_id) {
plugin_->InitiateHTTPRangeRequest(
url.c_str(), range_info.c_str(), range_request_id);
}
| 15,218 |
942 | 0 | static int CMSError(int ecode, const char *msg)
{
error(-1,const_cast<char *>(msg));
return 1;
}
| 15,219 |
161,109 | 0 | void CreateTabCaptureUIRequest(int target_render_process_id,
int target_render_frame_id) {
DCHECK(!ui_request_);
target_process_id_ = target_render_process_id;
target_frame_id_ = target_render_frame_id;
ui_request_.reset(new MediaStreamRequest(
target_render_pr... | 15,220 |
54,731 | 0 | static ssize_t snd_seq_read(struct file *file, char __user *buf, size_t count,
loff_t *offset)
{
struct snd_seq_client *client = file->private_data;
struct snd_seq_fifo *fifo;
int err;
long result = 0;
struct snd_seq_event_cell *cell;
if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_INPUT))
return -ENXIO... | 15,221 |
172,546 | 0 | status_t StreamingProcessor::startStream(StreamType type,
const Vector<int32_t> &outputStreams) {
ATRACE_CALL();
status_t res;
if (type == NONE) return INVALID_OPERATION;
sp<CameraDeviceBase> device = mDevice.promote();
if (device == 0) {
ALOGE("%s: Camera %d: Device does not exist", __FUNCTION__,... | 15,222 |
131,373 | 0 | static void enforceRangeLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjectPythonV8Internal::enforceRangeLongAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Exe... | 15,223 |
92,908 | 0 | run_err(const char *fmt,...)
{
static FILE *fp;
va_list ap;
++errs;
if (fp != NULL || (remout != -1 && (fp = fdopen(remout, "w")))) {
(void) fprintf(fp, "%c", 0x01);
(void) fprintf(fp, "scp: ");
va_start(ap, fmt);
(void) vfprintf(fp, fmt, ap);
va_end(ap);
(void) fprintf(fp, "\n");
(void) fflush(fp);
... | 15,224 |
135,309 | 0 | bool Document::needsLayoutTreeUpdate() const
{
if (!isActive() || !view())
return false;
if (needsFullLayoutTreeUpdate())
return true;
if (childNeedsStyleRecalc())
return true;
if (childNeedsStyleInvalidation())
return true;
if (layoutView()->wasNotifiedOfSubtreeChang... | 15,225 |
37,667 | 0 | static u32 vmx_get_interrupt_shadow(struct kvm_vcpu *vcpu, int mask)
{
u32 interruptibility = vmcs_read32(GUEST_INTERRUPTIBILITY_INFO);
int ret = 0;
if (interruptibility & GUEST_INTR_STATE_STI)
ret |= KVM_X86_SHADOW_INT_STI;
if (interruptibility & GUEST_INTR_STATE_MOV_SS)
ret |= KVM_X86_SHADOW_INT_MOV_SS;
re... | 15,226 |
127 | 0 | PHP_FUNCTION(openssl_verify)
{
zval **key;
EVP_PKEY *pkey;
int err;
EVP_MD_CTX md_ctx;
const EVP_MD *mdtype;
long keyresource = -1;
char * data; int data_len;
char * signature; int signature_len;
zval *method = NULL;
long signature_algo = OPENSSL_ALGO_SHA1;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSR... | 15,227 |
111,489 | 0 | void InputHandler::paste()
{
executeTextEditCommand("Paste");
}
| 15,228 |
1,267 | 0 | SplashCoord Splash::getStrokeAlpha() {
return state->strokeAlpha;
}
| 15,229 |
112,776 | 0 | void PrintPreviewHandler::SendCloudPrintEnabled() {
Profile* profile = Profile::FromBrowserContext(
preview_web_contents()->GetBrowserContext());
PrefService* prefs = profile->GetPrefs();
if (prefs->GetBoolean(prefs::kCloudPrintSubmitEnabled)) {
GURL gcp_url(CloudPrintURL(profile).GetCloudPrintServiceUR... | 15,230 |
175,059 | 0 | SoundPool::SoundPool(int maxChannels, const audio_attributes_t* pAttributes)
{
ALOGV("SoundPool constructor: maxChannels=%d, attr.usage=%d, attr.flags=0x%x, attr.tags=%s",
maxChannels, pAttributes->usage, pAttributes->flags, pAttributes->tags);
mMaxChannels = maxChannels;
if (mMaxChannels < 1) {
... | 15,231 |
141,467 | 0 | void PaintLayerScrollableArea::RegisterForAnimation() {
if (HasBeenDisposed())
return;
if (LocalFrame* frame = GetLayoutBox()->GetFrame()) {
if (LocalFrameView* frame_view = frame->View())
frame_view->AddAnimatingScrollableArea(this);
}
}
| 15,232 |
74,287 | 0 | void *progress_thread(void *arg)
{
struct timespec requested_time, remaining;
struct itimerval itimerval;
struct winsize winsize;
if(ioctl(1, TIOCGWINSZ, &winsize) == -1) {
if(isatty(STDOUT_FILENO))
ERROR("TIOCGWINSZ ioctl failed, defaulting to 80 "
"columns\n");
columns = 80;
} else
columns = winsiz... | 15,233 |
174,334 | 0 | status_t IPCThreadState::sendReply(const Parcel& reply, uint32_t flags)
{
status_t err;
status_t statusBuffer;
err = writeTransactionData(BC_REPLY, flags, -1, 0, reply, &statusBuffer);
if (err < NO_ERROR) return err;
return waitForResponse(NULL, NULL);
}
| 15,234 |
18,720 | 0 | int ip6_frag_match(struct inet_frag_queue *q, void *a)
{
struct frag_queue *fq;
struct ip6_create_arg *arg = a;
fq = container_of(q, struct frag_queue, q);
return (fq->id == arg->id && fq->user == arg->user &&
ipv6_addr_equal(&fq->saddr, arg->src) &&
ipv6_addr_equal(&fq->daddr, arg->dst));
}
| 15,235 |
7,586 | 0 | static uint64_t cirrus_linear_read(void *opaque, hwaddr addr,
unsigned size)
{
CirrusVGAState *s = opaque;
uint32_t ret;
addr &= s->cirrus_addr_mask;
if (((s->vga.sr[0x17] & 0x44) == 0x44) &&
((addr & s->linear_mmio_mask) == s->linear_mmio_mask)) {
/* memory... | 15,236 |
16,383 | 0 | CStarter::CStarter()
{
Execute = NULL;
orig_cwd = NULL;
is_gridshell = false;
ShuttingDown = FALSE;
jic = NULL;
jobUniverse = CONDOR_UNIVERSE_VANILLA;
pre_script = NULL;
post_script = NULL;
starter_stdin_fd = -1;
starter_stdout_fd = -1;
starter_stderr_fd = -1;
deferral_tid = -1;
suspended = false;
m_privs... | 15,237 |
86,056 | 0 | static int f2fs_set_qf_name(struct super_block *sb, int qtype,
substring_t *args)
{
struct f2fs_sb_info *sbi = F2FS_SB(sb);
char *qname;
int ret = -EINVAL;
if (sb_any_quota_loaded(sb) && !sbi->s_qf_names[qtype]) {
f2fs_msg(sb, KERN_ERR,
"Cannot change journaled "
"quota options when quota turned on"... | 15,238 |
89,845 | 0 | AddAnyPortMapping(struct upnphttp * h, const char * action, const char * ns)
{
int r;
static const char resp[] =
"<u:%sResponse "
"xmlns:u=\"%s\">"
"<NewReservedPort>%hu</NewReservedPort>"
"</u:%sResponse>";
char body[512];
int bodylen;
struct NameValueParserData data;
const char * int_ip, * int_port, *... | 15,239 |
17,479 | 0 | ProcXvUngrabPort(ClientPtr client)
{
XvPortPtr pPort;
REQUEST(xvGrabPortReq);
REQUEST_SIZE_MATCH(xvGrabPortReq);
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
return XvdiUngrabPort(client, pPort, stuff->time);
}
| 15,240 |
106,539 | 0 | void WebPageProxy::getMenuBarIsVisible(bool& menuBarIsVisible)
{
menuBarIsVisible = m_uiClient.menuBarIsVisible(this);
}
| 15,241 |
106,357 | 0 | void SyncBackendHost::Core::SetParentJsEventRouter(JsEventRouter* router) {
DCHECK_EQ(MessageLoop::current(), host_->frontend_loop_);
DCHECK(router);
parent_router_ = router;
MessageLoop* core_message_loop = host_->core_thread_.message_loop();
CHECK(core_message_loop);
core_message_loop->PostTask(
FRO... | 15,242 |
115,690 | 0 | void HostNPScriptObject::NotifyAccessCode(bool success) {
DCHECK_EQ(MessageLoop::current(), host_context_.main_message_loop());
if (state_ == kRequestedAccessCode) {
SetState(success ? kReceivedAccessCode : kError);
}
}
| 15,243 |
182,197 | 1 | parse_group_prop_ntr_selection_method(struct ofpbuf *payload,
enum ofp11_group_type group_type,
enum ofp15_group_mod_command group_cmd,
struct ofputil_group_props *gp)
{
struct ntr_group_prop_selection_method *prop = payload->data;
size_t fields_len, method_len;
enum ofperr error;
switch (group_type) {
case OFPGT11_SE... | 15,244 |
156,735 | 0 | void WaitForBothCommits() { outer_run_loop.Run(); }
| 15,245 |
14,560 | 0 | int BN_ucmp(const BIGNUM *a, const BIGNUM *b)
{
int i;
BN_ULONG t1,t2,*ap,*bp;
bn_check_top(a);
bn_check_top(b);
i=a->top-b->top;
if (i != 0) return(i);
ap=a->d;
bp=b->d;
for (i=a->top-1; i>=0; i--)
{
t1= ap[i];
t2= bp[i];
if (t1 != t2)
return((t1 > t2) ? 1 : -1);
}
return(0);
}
| 15,246 |
155,216 | 0 | void HTMLFormElement::disassociate(FormAssociatedElement& e) {
m_associatedElementsAreDirty = true;
m_associatedElements.clear();
removeFromPastNamesMap(toHTMLElement(e));
}
| 15,247 |
92,570 | 0 | group_type group_classify(struct sched_group *group,
struct sg_lb_stats *sgs)
{
if (sgs->group_no_capacity)
return group_overloaded;
if (sg_imbalanced(group))
return group_imbalanced;
if (sgs->group_misfit_task_load)
return group_misfit_task;
return group_other;
}
| 15,248 |
141,413 | 0 | ScrollbarTheme& PaintLayerScrollableArea::GetPageScrollbarTheme() const {
DCHECK(!HasBeenDisposed());
Page* page = GetLayoutBox()->GetFrame()->GetPage();
DCHECK(page);
return page->GetScrollbarTheme();
}
| 15,249 |
68,221 | 0 | static struct llc_sap_state_trans *llc_find_sap_trans(struct llc_sap *sap,
struct sk_buff *skb)
{
int i = 0;
struct llc_sap_state_trans *rc = NULL;
struct llc_sap_state_trans **next_trans;
struct llc_sap_state *curr_state = &llc_sap_state_table[sap->state - 1];
/*
* Search thru events for this state ... | 15,250 |
104,221 | 0 | GLint ComputeImageDataSize(GLint width, GLint height) const {
GLint row_size = width * bytes_per_pixel_;
if (height > 1) {
GLint temp = row_size + pack_alignment_ - 1;
GLint padded_row_size = (temp / pack_alignment_) * pack_alignment_;
GLint size_of_all_but_last_row = (height - 1) * padded_r... | 15,251 |
10,148 | 0 | Ins_PUSHW( INS_ARG )
{
FT_UShort L, K;
L = (FT_UShort)( CUR.opcode - 0xB8 + 1 );
if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )
{
CUR.error = TT_Err_Stack_Overflow;
return;
}
CUR.IP++;
for ( K = 0; K < L; K++ )
args[K] = GET_ShortIns();
CUR.step_ins = FALSE;... | 15,252 |
11,762 | 0 | lock_encryption_data_new (DBusGMethodInvocation *context,
Device *luks_device,
Device *cleartext_device)
{
LockEncryptionData *data;
data = g_new0 (LockEncryptionData, 1);
data->refcount = 1;
data->context = context;
data->luks_device = g_object_ref (luks_... | 15,253 |
45,392 | 0 | ssize_t btrfs_getxattr(struct dentry *dentry, const char *name,
void *buffer, size_t size)
{
/*
* If this is a request for a synthetic attribute in the system.*
* namespace use the generic infrastructure to resolve a handler
* for it via sb->s_xattr.
*/
if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_S... | 15,254 |
115,144 | 0 | void GraphicsContext3DPrivate::initializeANGLE()
{
ShBuiltInResources ANGLEResources;
ShInitBuiltInResources(&ANGLEResources);
m_context->getIntegerv(GraphicsContext3D::MAX_VERTEX_ATTRIBS, &ANGLEResources.MaxVertexAttribs);
m_context->getIntegerv(GraphicsContext3D::MAX_VERTEX_UNIFORM_VECTORS, &ANGLERes... | 15,255 |
101,104 | 0 | void GetCachedOrigins(StorageType type, std::set<GURL>* origins) {
ASSERT_TRUE(origins != NULL);
origins->clear();
quota_manager_->GetCachedOrigins(type, origins);
}
| 15,256 |
62,377 | 0 | bittok2str(register const struct tok *lp, register const char *fmt,
register u_int v)
{
return (bittok2str_internal(lp, fmt, v, ", "));
}
| 15,257 |
102,570 | 0 | virtual ~RelayCreateTemporary() {
if (file_handle_ != base::kInvalidPlatformFileValue)
base::FileUtilProxy::Close(message_loop_proxy_, file_handle_, NULL);
}
| 15,258 |
72,980 | 0 | AuthDigestCred(struct http_auth *ha, Str uname, Str pw, ParsedURL *pu,
HRequest *hr, FormList *request)
{
Str tmp, a1buf, a2buf, rd, s;
unsigned char md5[MD5_DIGEST_LENGTH + 1];
Str uri = HTTPrequestURI(pu, hr);
char nc[] = "00000001";
FILE *fp;
Str algorithm = qstr_unquote(get_auth_par... | 15,259 |
83,992 | 0 | void avcc_del(GF_Box *s)
{
GF_AVCConfigurationBox *ptr = (GF_AVCConfigurationBox *)s;
if (ptr->config) gf_odf_avc_cfg_del(ptr->config);
gf_free(ptr);
}
| 15,260 |
155,696 | 0 | void PressReleasePrimaryTrigger(unsigned int index) {
TogglePrimaryTrigger(index);
TogglePrimaryTrigger(index);
}
| 15,261 |
88,443 | 0 | void *GPMF_RawData(GPMF_stream *ms)
{
if (ms)
{
return (void *)&ms->buffer[ms->pos + 2];
}
return NULL;
}
| 15,262 |
75,480 | 0 | kdc_process_s4u2proxy_req(kdc_realm_t *kdc_active_realm,
krb5_kdc_req *request,
const krb5_enc_tkt_part *t2enc,
const krb5_db_entry *server,
krb5_const_principal server_princ,
krb5_const_pri... | 15,263 |
85,804 | 0 | static int ocfs2_file_release(struct inode *inode, struct file *file)
{
struct ocfs2_inode_info *oi = OCFS2_I(inode);
spin_lock(&oi->ip_lock);
if (!--oi->ip_open_count)
oi->ip_flags &= ~OCFS2_INODE_OPEN_DIRECT;
trace_ocfs2_file_release(inode, file, file->f_path.dentry,
oi->ip_blkno,
file->f_path.dentr... | 15,264 |
97,139 | 0 | void NavigationController::RendererDidNavigateToNewPage(
const ViewHostMsg_FrameNavigate_Params& params, bool* did_replace_entry) {
NavigationEntry* new_entry;
if (pending_entry_) {
new_entry = new NavigationEntry(*pending_entry_);
new_entry->set_page_type(NavigationEntry::NORMAL_PAGE);
} else {
... | 15,265 |
96,529 | 0 | static int AppLayerProtoDetectTest19(void)
{
int result = 0;
Flow *f = NULL;
uint8_t http_buf1[] = "MPUT one\r\n";
uint32_t http_buf1_len = sizeof(http_buf1) - 1;
TcpSession ssn;
Packet *p = NULL;
Signature *s = NULL;
ThreadVars tv;
DetectEngineThreadCtx *det_ctx = NULL;
DetectEn... | 15,266 |
86,074 | 0 | static struct extent_node *__init_extent_tree(struct f2fs_sb_info *sbi,
struct extent_tree *et, struct extent_info *ei)
{
struct rb_node **p = &et->root.rb_node;
struct extent_node *en;
en = __attach_extent_node(sbi, et, ei, NULL, p);
if (!en)
return NULL;
et->largest = en->ei;
et->cached_en = en;
return... | 15,267 |
15,733 | 0 | void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd,
void *opaque)
{
VMStateField *field = vmsd->fields;
if (vmsd->pre_save) {
vmsd->pre_save(opaque);
}
while (field->name) {
if (!field->field_exists ||
field->field_exists(opaque, vmsd... | 15,268 |
17,581 | 0 | ProcRenderCreateLinearGradient(ClientPtr client)
{
PicturePtr pPicture;
int len;
int error = 0;
xFixed *stops;
xRenderColor *colors;
REQUEST(xRenderCreateLinearGradientReq);
REQUEST_AT_LEAST_SIZE(xRenderCreateLinearGradientReq);
LEGAL_NEW_RESOURCE(stuff->pid, client);
len = (clie... | 15,269 |
70,594 | 0 | evdns_base_search_add(struct evdns_base *base, const char *domain) {
EVDNS_LOCK(base);
search_postfix_add(base, domain);
EVDNS_UNLOCK(base);
}
| 15,270 |
84,437 | 0 | void sbusfb_fill_var(struct fb_var_screeninfo *var, struct device_node *dp,
int bpp)
{
memset(var, 0, sizeof(*var));
var->xres = of_getintprop_default(dp, "width", 1152);
var->yres = of_getintprop_default(dp, "height", 900);
var->xres_virtual = var->xres;
var->yres_virtual = var->yres;
var->bits_per_pixel... | 15,271 |
114,578 | 0 | scoped_refptr<base::MessageLoopProxy> RenderThreadImpl::GetIOLoopProxy() {
return ChildProcess::current()->io_message_loop_proxy();
}
| 15,272 |
25,721 | 0 | static void store_reg(struct pt_regs *regs, unsigned long val, unsigned long rd)
{
if (rd < 16) {
unsigned long *rd_kern = __fetch_reg_addr_kern(rd, regs);
*rd_kern = val;
} else {
unsigned long __user *rd_user = __fetch_reg_addr_user(rd, regs);
if (test_thread_flag(TIF_32BIT))
__put_user((u32)val, (u32 ... | 15,273 |
152,321 | 0 | explicit FrameURLLoaderFactory(base::WeakPtr<RenderFrameImpl> frame)
: frame_(std::move(frame)) {}
| 15,274 |
84,707 | 0 | static int lo_write_simple(struct loop_device *lo, struct request *rq,
loff_t pos)
{
struct bio_vec bvec;
struct req_iterator iter;
int ret = 0;
rq_for_each_segment(bvec, rq, iter) {
ret = lo_write_bvec(lo->lo_backing_file, &bvec, &pos);
if (ret < 0)
break;
cond_resched();
}
return ret;
}
| 15,275 |
13,867 | 0 | void curlfile_register_class(TSRMLS_D)
{
zend_class_entry ce;
INIT_CLASS_ENTRY( ce, "CURLFile", curlfile_funcs );
curl_CURLFile_class = zend_register_internal_class(&ce TSRMLS_CC);
zend_declare_property_string(curl_CURLFile_class, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC);
zend_declare_property_stri... | 15,276 |
151,633 | 0 | const GURL& ChromePaymentRequestDelegate::GetLastCommittedURL() const {
return web_contents_->GetLastCommittedURL();
}
| 15,277 |
90,135 | 0 | static int FUZ_mallocTests(unsigned seed, double compressibility, unsigned part)
{
(void)seed; (void)compressibility; (void)part;
return 0;
}
| 15,278 |
110,305 | 0 | void HistogramEnumerateOsArch(const std::string& sandbox_isa) {
enum NaClOSArch {
kNaClLinux32 = 0,
kNaClLinux64,
kNaClLinuxArm,
kNaClMac32,
kNaClMac64,
kNaClMacArm,
kNaClWin32,
kNaClWin64,
kNaClWinArm,
kNaClOSArchMax
};
NaClOSArch os_arch = kNaClOSArchMax;
#if NACL_LINUX
... | 15,279 |
10,702 | 0 | Read_CVT( TT_ExecContext exc,
FT_ULong idx )
{
return exc->cvt[idx];
}
| 15,280 |
45,153 | 0 | static int req_ssl_var_lookup(lua_State *L)
{
request_rec *r = ap_lua_check_request_rec(L, 1);
const char *s = luaL_checkstring(L, 2);
const char *res = ap_lua_ssl_val(r->pool, r->server, r->connection, r,
(char *)s);
lua_pushstring(L, res);
return 1;
}
| 15,281 |
96,520 | 0 | static int AppLayerProtoDetectTest09(void)
{
AppLayerProtoDetectUnittestCtxBackup();
AppLayerProtoDetectSetup();
uint8_t l7data[] = {
0x00, 0x00, 0x00, 0x66, 0xfe, 0x53, 0x4d, 0x42,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
... | 15,282 |
67,290 | 0 | struct dentry *d_alloc_cursor(struct dentry * parent)
{
struct dentry *dentry = __d_alloc(parent->d_sb, NULL);
if (dentry) {
dentry->d_flags |= DCACHE_RCUACCESS | DCACHE_DENTRY_CURSOR;
dentry->d_parent = dget(parent);
}
return dentry;
}
| 15,283 |
18,842 | 0 | static int cipso_v4_map_lvl_valid(const struct cipso_v4_doi *doi_def, u8 level)
{
switch (doi_def->type) {
case CIPSO_V4_MAP_PASS:
return 0;
case CIPSO_V4_MAP_TRANS:
if (doi_def->map.std->lvl.cipso[level] < CIPSO_V4_INV_LVL)
return 0;
break;
}
return -EFAULT;
}
| 15,284 |
24,747 | 0 | static void *__slab_alloc(struct kmem_cache *s,
gfp_t gfpflags, int node, void *addr, struct kmem_cache_cpu *c)
{
void **object;
struct page *new;
/* We handle __GFP_ZERO in the caller */
gfpflags &= ~__GFP_ZERO;
if (!c->page)
goto new_slab;
slab_lock(c->page);
if (unlikely(!node_match(c, node)))
goto a... | 15,285 |
15,919 | 0 | std::string ASF_LegacyManager::GetField ( fieldType field )
{
if ( field >= fieldLast ) return std::string();
return fields[field];
}
| 15,286 |
35,276 | 0 | static void net_tx_action(struct softirq_action *h)
{
struct softnet_data *sd = &__get_cpu_var(softnet_data);
if (sd->completion_queue) {
struct sk_buff *clist;
local_irq_disable();
clist = sd->completion_queue;
sd->completion_queue = NULL;
local_irq_enable();
while (clist) {
struct sk_buff *skb = c... | 15,287 |
96,084 | 0 | void logerr(const char *msg) {
if (!arg_debug)
return;
openlog("firejail", LOG_NDELAY | LOG_PID, LOG_USER);
syslog(LOG_ERR, "%s\n", msg);
closelog();
}
| 15,288 |
45,636 | 0 | struct cryptd_ahash *cryptd_alloc_ahash(const char *alg_name,
u32 type, u32 mask)
{
char cryptd_alg_name[CRYPTO_MAX_ALG_NAME];
struct crypto_ahash *tfm;
if (snprintf(cryptd_alg_name, CRYPTO_MAX_ALG_NAME,
"cryptd(%s)", alg_name) >= CRYPTO_MAX_ALG_NAME)
return ERR_PTR(-EINVAL);
tfm = crypto_alloc_ahash... | 15,289 |
160,312 | 0 | void ImageLoader::DecodeRequest::ProcessForTask() {
if (!loader_)
return;
DCHECK_EQ(state_, kPendingMicrotask);
state_ = kPendingLoad;
loader_->DispatchDecodeRequestsIfComplete();
}
| 15,290 |
19,579 | 0 | static void ep_rbtree_insert(struct eventpoll *ep, struct epitem *epi)
{
int kcmp;
struct rb_node **p = &ep->rbr.rb_node, *parent = NULL;
struct epitem *epic;
while (*p) {
parent = *p;
epic = rb_entry(parent, struct epitem, rbn);
kcmp = ep_cmp_ffd(&epi->ffd, &epic->ffd);
if (kcmp > 0)
p = &parent->rb_ri... | 15,291 |
2,357 | 0 | bool ldb_dn_remove_base_components(struct ldb_dn *dn, unsigned int num)
{
unsigned int i;
if ( ! ldb_dn_validate(dn)) {
return false;
}
if (dn->comp_num < num) {
return false;
}
/* free components */
for (i = dn->comp_num - num; i < dn->comp_num; i++) {
LDB_FREE(dn->components[i].name);
LDB_FREE(dn->c... | 15,292 |
72,502 | 0 | int ZEXPORT inflateSyncPoint(strm)
z_streamp strm;
{
struct inflate_state FAR *state;
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
return state->mode == STORED && state->bits == 0;
}
| 15,293 |
103,383 | 0 | void CapturerMac::InvalidateScreen(const gfx::Size& size) {
helper_.InvalidateScreen(size);
}
| 15,294 |
120,995 | 0 | void SetOnReceivedData(
const base::Callback<void(SocketStreamEvent*)>& callback) {
on_received_data_ = callback;
}
| 15,295 |
175,086 | 0 | int SoundPool::run()
{
mRestartLock.lock();
while (!mQuit) {
mCondition.wait(mRestartLock);
ALOGV("awake");
if (mQuit) break;
while (!mStop.empty()) {
SoundChannel* channel;
ALOGV("Getting channel from stop list");
List<SoundChannel* >::iterator iter = mStop.begin();
ch... | 15,296 |
86,869 | 0 | TEE_Result syscall_cryp_obj_close(unsigned long obj)
{
TEE_Result res;
struct tee_ta_session *sess;
struct tee_obj *o;
res = tee_ta_get_current_session(&sess);
if (res != TEE_SUCCESS)
return res;
res = tee_obj_get(to_user_ta_ctx(sess->ctx),
tee_svc_uref_to_vaddr(obj), &o);
if (res != TEE_SUCCESS)
retu... | 15,297 |
160,787 | 0 | int64_t RenderViewImpl::GetSessionStorageNamespaceId() {
CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId);
return session_storage_namespace_id_;
}
| 15,298 |
18,190 | 0 | static GIOStatus irssi_ssl_write(GIOChannel *handle, const gchar *buf, gsize len, gsize *ret, GError **gerr)
{
GIOSSLChannel *chan = (GIOSSLChannel *)handle;
gint ret1, err;
const char *errstr;
ret1 = SSL_write(chan->ssl, (const char *)buf, len);
if(ret1 <= 0)
{
*ret = 0;
err = SSL_get_error(chan->ssl, ret1)... | 15,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.