unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
29,701 | 0 | void *av_malloc(size_t size)
{
void *ptr = NULL;
#if CONFIG_MEMALIGN_HACK
long diff;
#endif
/* let's disallow possible ambiguous cases */
if (size > (max_alloc_size - 32))
return NULL;
#if CONFIG_MEMALIGN_HACK
ptr = malloc(size + ALIGN);
if (!ptr)
return ptr;
diff ... | 15,100 |
37,839 | 0 | static void svm_disable_lbrv(struct vcpu_svm *svm)
{
u32 *msrpm = svm->msrpm;
svm->vmcb->control.lbr_ctl = 0;
set_msr_interception(msrpm, MSR_IA32_LASTBRANCHFROMIP, 0, 0);
set_msr_interception(msrpm, MSR_IA32_LASTBRANCHTOIP, 0, 0);
set_msr_interception(msrpm, MSR_IA32_LASTINTFROMIP, 0, 0);
set_msr_interception(m... | 15,101 |
187,747 | 1 | BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, BOOL alpha)
{
png_struct *png_ptr = NULL;
png_info *info_ptr = NULL;
png_byte *png_pixels = NULL;
png_byte **row_pointers = NULL;
png_byte *pix_ptr = NULL;
png_uint_32 row_bytes;
char type_token[16];
cha... | 15,102 |
125,563 | 0 | bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message,
bool* message_was_ok) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP_EX(RenderMessageFilter, message, *message_was_ok)
#if defined(OS_WIN)
IPC_MESSAGE_HANDLER(ViewHostMsg_PreCacheFontCharacters,
... | 15,103 |
121,183 | 0 | static inline bool isRFC2616TokenCharacter(UChar ch)
{
return isASCII(ch) && ch > ' ' && ch != '"' && ch != '(' && ch != ')' && ch != ',' && ch != '/' && (ch < ':' || ch > '@') && (ch < '[' || ch > ']') && ch != '{' && ch != '}' && ch != 0x7f;
}
| 15,104 |
128,124 | 0 | CastDetailedView::CastDetailedView(SystemTrayItem* owner,
CastConfigDelegate* cast_config_delegate,
user::LoginStatus login)
: TrayDetailsView(owner),
cast_config_delegate_(cast_config_delegate),
login_(login),
options_(nullptr)... | 15,105 |
173,810 | 0 | SoftG711::~SoftG711() {
}
| 15,106 |
23,332 | 0 | static int decode_sessionid(struct xdr_stream *xdr, struct nfs4_sessionid *sid)
{
return decode_opaque_fixed(xdr, sid->data, NFS4_MAX_SESSIONID_LEN);
}
| 15,107 |
179,160 | 1 | static inline int ip6_ufo_append_data(struct sock *sk,
int getfrag(void *from, char *to, int offset, int len,
int odd, struct sk_buff *skb),
void *from, int length, int hh_len, int fragheaderlen,
int transhdrlen, int mtu,unsigned int flags,
struct rt6_info *rt)
{
struct sk_buff *skb;
int err;
/* There is support for ... | 15,108 |
129,034 | 0 | void writeNumber(double number)
{
append(NumberTag);
doWriteNumber(number);
}
| 15,109 |
113,325 | 0 | media::StatisticsCB NewStatisticsCB() {
return base::Bind(&media::MockStatisticsCB::OnStatistics,
base::Unretained(&statistics_cb_object_));
}
| 15,110 |
58,660 | 0 | BOOL security_fips_encrypt(BYTE* data, int length, rdpRdp* rdp)
{
crypto_des3_encrypt(rdp->fips_encrypt, length, data, data);
rdp->encrypt_use_count++;
return TRUE;
}
| 15,111 |
58,161 | 0 | void hrtick_start(struct rq *rq, u64 delay)
{
struct hrtimer *timer = &rq->hrtick_timer;
ktime_t time = ktime_add_ns(timer->base->get_time(), delay);
hrtimer_set_expires(timer, time);
if (rq == this_rq()) {
__hrtick_restart(rq);
} else if (!rq->hrtick_csd_pending) {
__smp_call_function_single(cpu_of(rq), &rq... | 15,112 |
167,523 | 0 | void WebMediaPlayerImpl::MaybeSendOverlayInfoToDecoder() {
if (!provide_overlay_info_cb_)
return;
if (overlay_mode_ == OverlayMode::kUseAndroidOverlay) {
if (overlay_routing_token_is_pending_)
return;
overlay_info_.routing_token = overlay_routing_token_;
}
if (decoder_requires_restart_for_o... | 15,113 |
55,487 | 0 | static void build_group_mask(struct sched_domain *sd, struct sched_group *sg)
{
const struct cpumask *span = sched_domain_span(sd);
struct sd_data *sdd = sd->private;
struct sched_domain *sibling;
int i;
for_each_cpu(i, span) {
sibling = *per_cpu_ptr(sdd->sd, i);
if (!cpumask_test_cpu(i, sched_domain_span(sib... | 15,114 |
88,895 | 0 | static inline MagickBooleanType IsPathWritable(const char *path)
{
if (IsPathAccessible(path) == MagickFalse)
return(MagickFalse);
if (access_utf8(path,W_OK) != 0)
return(MagickFalse);
return(MagickTrue);
}
| 15,115 |
4,230 | 0 | XFreeFontPath (char **list)
{
if (list != NULL) {
Xfree (list[0]-1);
Xfree (list);
}
return 1;
}
| 15,116 |
7,177 | 0 | static unsigned char constant_time_eq_8(unsigned char a, unsigned char b)
{
unsigned c = a ^ b;
c--;
return DUPLICATE_MSB_TO_ALL_8(c);
}
| 15,117 |
15,868 | 0 | static void work_around_broken_dhclient(struct virtio_net_hdr *hdr,
uint8_t *buf, size_t size)
{
if ((hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) && /* missing csum */
(size > 27 && size < 1500) && /* normal sized MTU */
(buf[12] == 0x08 && buf[13] == 0x00) && /... | 15,118 |
77,671 | 0 | ofputil_pull_bands(struct ofpbuf *msg, size_t len, uint16_t *n_bands,
struct ofpbuf *bands)
{
const struct ofp13_meter_band_header *ombh;
struct ofputil_meter_band *mb;
uint16_t n = 0;
ombh = ofpbuf_try_pull(msg, len);
if (!ombh) {
return OFPERR_OFPBRC_BAD_LEN;
}
... | 15,119 |
166,905 | 0 | void Performance::clearMarks(const String& mark_name) {
if (!user_timing_)
user_timing_ = UserTiming::Create(*this);
user_timing_->ClearMarks(mark_name);
}
| 15,120 |
54,009 | 0 | static int ims_pcu_get_info(struct ims_pcu *pcu)
{
int error;
error = ims_pcu_execute_query(pcu, GET_INFO);
if (error) {
dev_err(pcu->dev,
"GET_INFO command failed, error: %d\n", error);
return error;
}
memcpy(pcu->part_number,
&pcu->cmd_buf[IMS_PCU_INFO_PART_OFFSET],
sizeof(pcu->part_numb... | 15,121 |
168,798 | 0 | void WebContentsImpl::RendererUnresponsive(
RenderWidgetHostImpl* render_widget_host) {
for (auto& observer : observers_)
observer.OnRendererUnresponsive(render_widget_host->GetProcess());
if (ShouldIgnoreUnresponsiveRenderer())
return;
if (!render_widget_host->renderer_initialized())
return;
... | 15,122 |
158,565 | 0 | WebString WebLocalFrameImpl::Prompt(const WebString& message,
const WebString& default_value) {
DCHECK(GetFrame());
ScriptState* script_state = ToScriptStateForMainWorld(GetFrame());
DCHECK(script_state);
return GetFrame()->DomWindow()->prompt(script_state, message, default_v... | 15,123 |
143,259 | 0 | void Document::setBody(HTMLElement* prpNewBody, ExceptionState& exceptionState)
{
HTMLElement* newBody = prpNewBody;
if (!newBody) {
exceptionState.throwDOMException(HierarchyRequestError, ExceptionMessages::argumentNullOrIncorrectType(1, "HTMLElement"));
return;
}
if (!documentElement(... | 15,124 |
97,036 | 0 | void ip_rt_send_redirect(struct sk_buff *skb)
{
struct rtable *rt = skb_rtable(skb);
struct in_device *in_dev;
struct inet_peer *peer;
struct net *net;
int log_martians;
rcu_read_lock();
in_dev = __in_dev_get_rcu(rt->dst.dev);
if (!in_dev || !IN_DEV_TX_REDIRECTS(in_dev)) {
rcu_read_unlock();
return;
}
lo... | 15,125 |
118,918 | 0 | gfx::Rect WebContentsImpl::GetRootWindowResizerRect() const {
if (delegate_)
return delegate_->GetRootWindowResizerRect();
return gfx::Rect();
}
| 15,126 |
86,790 | 0 | _tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
{
return (0);
}
| 15,127 |
161,428 | 0 | Response ServiceWorkerHandler::Unregister(const std::string& scope_url) {
if (!enabled_)
return CreateDomainNotEnabledErrorResponse();
if (!context_)
return CreateContextErrorResponse();
context_->UnregisterServiceWorker(GURL(scope_url), base::Bind(&ResultNoOp));
return Response::OK();
}
| 15,128 |
179,176 | 1 | static int filter_frame(AVFilterLink *inlink, AVFrame *in)
{
AVFilterContext *ctx = inlink->dst;
LutContext *s = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
AVFrame *out;
uint8_t *inrow, *outrow, *inrow0, *outrow0;
int i, j, plane, direct = 0;
if (av_frame_is_writable(in)) {
direct = 1;
out = in;
} else {
out ... | 15,129 |
185,159 | 1 | void RenderBlock::styleWillChange(StyleDifference diff, const RenderStyle& newStyle)
{
RenderStyle* oldStyle = style();
setReplaced(newStyle.isDisplayInlineType());
if (oldStyle && parent() && diff == StyleDifferenceLayout && oldStyle->position() != newStyle.position()) {
if (newStyle.position() == StaticPosition... | 15,130 |
45,429 | 0 | static int ecryptfs_process_flags(struct ecryptfs_crypt_stat *crypt_stat,
char *page_virt, int *bytes_read)
{
int rc = 0;
int i;
u32 flags;
flags = get_unaligned_be32(page_virt);
for (i = 0; i < ((sizeof(ecryptfs_flag_map)
/ sizeof(struct ecryptfs_flag_map_elem))); i++)
if (flags & ecryptfs_flag_map[... | 15,131 |
22,554 | 0 | static __init int sched_init_debug(void)
{
debugfs_create_file("sched_features", 0644, NULL, NULL,
&sched_feat_fops);
return 0;
}
| 15,132 |
127,272 | 0 | static bool isCharsetSpecifyingNode(Node* node)
{
if (!node->isHTMLElement())
return false;
HTMLElement* element = toHTMLElement(node);
if (!element->hasTagName(HTMLNames::metaTag))
return false;
HTMLMetaCharsetParser::AttributeList attributes;
if (element->hasAttributes()) {
... | 15,133 |
82,872 | 0 | static char *_time_stamp_to_str(ut32 timeStamp) {
#ifdef _MSC_VER
time_t rawtime;
struct tm *tminfo;
rawtime = (time_t)timeStamp;
tminfo = localtime (&rawtime);
return r_str_trim (strdup (asctime (tminfo)));
#else
struct my_timezone {
int tz_minuteswest; /* minutes west of Greenwich */
int tz_dsttime; ... | 15,134 |
118,672 | 0 | Browser* InProcessBrowserTest::CreateBrowser(Profile* profile) {
Browser* browser = new Browser(
Browser::CreateParams(profile, chrome::GetActiveDesktop()));
AddBlankTabAndShow(browser);
return browser;
}
| 15,135 |
99,199 | 0 | void V8DOMWrapper::setDOMWrapper(v8::Handle<v8::Object> object, int type, void* cptr)
{
ASSERT(object->InternalFieldCount() >= 2);
object->SetPointerInInternalField(V8Custom::kDOMWrapperObjectIndex, cptr);
object->SetInternalField(V8Custom::kDOMWrapperTypeIndex, v8::Integer::New(type));
}
| 15,136 |
109,525 | 0 | void PrintWebViewHelper::OnPrintForSystemDialog() {
WebKit::WebFrame* frame = print_preview_context_.frame();
if (!frame) {
NOTREACHED();
return;
}
Print(frame, print_preview_context_.node());
}
| 15,137 |
140,045 | 0 | WebLayer* HTMLMediaElement::platformLayer() const {
return m_webLayer;
}
| 15,138 |
91,972 | 0 | int __init blk_dev_init(void)
{
BUILD_BUG_ON(REQ_OP_LAST >= (1 << REQ_OP_BITS));
BUILD_BUG_ON(REQ_OP_BITS + REQ_FLAG_BITS > 8 *
FIELD_SIZEOF(struct request, cmd_flags));
BUILD_BUG_ON(REQ_OP_BITS + REQ_FLAG_BITS > 8 *
FIELD_SIZEOF(struct bio, bi_opf));
/* used for unplugging and affects IO latency/throughput ... | 15,139 |
104,498 | 0 | CrosMock::CrosMock()
: loader_(NULL),
mock_cryptohome_library_(NULL),
mock_network_library_(NULL),
mock_power_library_(NULL),
mock_screen_lock_library_(NULL),
mock_speech_synthesis_library_(NULL),
mock_touchpad_library_(NULL) {
}
| 15,140 |
63,015 | 0 | static bool page_address_valid(struct kvm_vcpu *vcpu, gpa_t gpa)
{
return PAGE_ALIGNED(gpa) && !(gpa >> cpuid_maxphyaddr(vcpu));
}
| 15,141 |
8,500 | 0 | DWORD CSoundFile::TransposeToFrequency(int transp, int ftune)
{
return (DWORD)(8363*pow(2.0, (transp*128+ftune)/(1536)));
#ifdef MSC_VER
const float _fbase = 8363;
const float _factor = 1.0f/(12.0f*128.0f);
int result;
DWORD freq;
transp = (transp << 7) + ftune;
_asm {
fild transp
fld _factor
fmulp st(1), s... | 15,142 |
161,100 | 0 | void MediaStreamManager::CancelRequest(int render_process_id,
int render_frame_id,
int page_request_id) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
for (const LabeledDeviceRequest& labeled_request : requests_) {
DeviceRequest* const req... | 15,143 |
142,380 | 0 | base::FilePath GetDriveDataDirectory() {
return profile()->GetPath().Append("drive/v1");
}
| 15,144 |
15,560 | 0 | check_follow_cname(char **namep, const char *cname)
{
int i;
struct allowed_cname *rule;
if (*cname == '\0' || options.num_permitted_cnames == 0 ||
strcmp(*namep, cname) == 0)
return 0;
if (options.canonicalize_hostname == SSH_CANONICALISE_NO)
return 0;
/*
* Don't attempt to canonicalize names that wil... | 15,145 |
1,663 | 0 | gs_pattern1_uses_base_space(const gs_pattern_template_t *ptemp)
{
return ((const gs_pattern1_template_t *)ptemp)->PaintType == 2;
}
| 15,146 |
106,360 | 0 | void SyncBackendHost::StartConfiguration(Callback0::Type* callback) {
core_thread_.message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
core_.get(),&SyncBackendHost::Core::DoStartConfiguration, callback));
}
| 15,147 |
22,303 | 0 | static void __hrtick_start(void *arg)
{
struct rq *rq = arg;
raw_spin_lock(&rq->lock);
hrtimer_restart(&rq->hrtick_timer);
rq->hrtick_csd_pending = 0;
raw_spin_unlock(&rq->lock);
}
| 15,148 |
184,077 | 1 | WebInputEvent* CreateWebInputEvent(const PP_InputEvent& event) {
scoped_ptr<WebInputEvent> web_input_event;
switch (event.type) {
case PP_INPUTEVENT_TYPE_UNDEFINED:
return NULL;
case PP_INPUTEVENT_TYPE_MOUSEDOWN:
case PP_INPUTEVENT_TYPE_MOUSEUP:
case PP_INPUTEVENT_TYPE_MOUSEMOVE:
case PP... | 15,149 |
108,430 | 0 | void ChromeRenderMessageFilter::OnFPS(int routing_id, float fps) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(
&ChromeRenderMessageFilter::OnFPS, this,
routing_id, fps));
return;
}
base::P... | 15,150 |
170,932 | 0 | void vp9_free_postproc_buffers(VP9_COMMON *cm) {
#if CONFIG_VP9_POSTPROC
vpx_free_frame_buffer(&cm->post_proc_buffer);
vpx_free_frame_buffer(&cm->post_proc_buffer_int);
#else
(void)cm;
#endif
}
| 15,151 |
118,892 | 0 | RenderWidgetHostView* WebContentsImpl::GetFullscreenRenderWidgetHostView()
const {
RenderWidgetHost* const widget_host =
RenderWidgetHostImpl::FromID(GetRenderProcessHost()->GetID(),
GetFullscreenWidgetRoutingID());
return widget_host ? widget_host->GetView() : NULL;
}
| 15,152 |
57,530 | 0 | int ext4_meta_trans_blocks(struct inode *inode, int nrblocks, int chunk)
{
ext4_group_t groups, ngroups = ext4_get_groups_count(inode->i_sb);
int gdpblocks;
int idxblocks;
int ret = 0;
/*
* How many index blocks need to touch to modify nrblocks?
* The "Chunk" flag indicating whether the nrblocks is
* physic... | 15,153 |
61,554 | 0 | static int nsv_read_header(AVFormatContext *s)
{
NSVContext *nsv = s->priv_data;
int i, err;
nsv->state = NSV_UNSYNC;
nsv->ahead[0].data = nsv->ahead[1].data = NULL;
for (i = 0; i < NSV_MAX_RESYNC_TRIES; i++) {
if (nsv_resync(s) < 0)
return -1;
if (nsv->state == NSV_FOU... | 15,154 |
171,998 | 0 | void lbl_destroy()
{
pthread_mutex_destroy(&(device.lbllock));
}
| 15,155 |
20,214 | 0 | hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
unsigned long len, unsigned long pgoff, unsigned long flags)
{
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
unsigned long start_addr;
struct hstate *h = hstate_file(file);
if (len & ~huge_page_mask(h))
return -EINVAL;
if (len... | 15,156 |
152,405 | 0 | void RenderFrameImpl::MarkInitiatorAsRequiringSeparateURLLoaderFactory(
const url::Origin& initiator_origin,
network::mojom::URLLoaderFactoryPtr url_loader_factory) {
DCHECK(base::FeatureList::IsEnabled(network::features::kNetworkService));
GetLoaderFactoryBundle();
auto factory_bundle = std::make_unique... | 15,157 |
159,509 | 0 | void Pack<WebGLImageConversion::kDataFormatRGB16F,
WebGLImageConversion::kAlphaDoNothing,
float,
uint16_t>(const float* source,
uint16_t* destination,
unsigned pixels_per_row) {
for (unsigned i = 0; i < pixels_per_row; ++i) {
destination[0] = C... | 15,158 |
78,363 | 0 | static int entersafe_write_rsa_key_factor(sc_card_t *card,
u8 key_id,u8 usage,
u8 factor,
sc_pkcs15_bignum_t data)
{
int r;
sc_apdu_t apdu;
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
{/* MSE */
u8 sbuff[4];
sbuff[0]=0x84;
sbuff[1]=0x02;
sbuff[2]=key_id;
sbu... | 15,159 |
53,214 | 0 | static int proc_bulk_compat(struct usb_dev_state *ps,
struct usbdevfs_bulktransfer32 __user *p32)
{
struct usbdevfs_bulktransfer __user *p;
compat_uint_t n;
compat_caddr_t addr;
p = compat_alloc_user_space(sizeof(*p));
if (get_user(n, &p32->ep) || put_user(n, &p->ep) ||
get_user(n, &p32->len) || put_user... | 15,160 |
87,637 | 0 | LIBOPENMPT_MODPLUG_API ModPlugNote* ModPlug_GetPattern(ModPlugFile* file, int pattern, unsigned int* numrows)
{
int c;
int r;
int numr;
int numc;
ModPlugNote note;
if(!file) return NULL;
if(numrows){
*numrows = openmpt_module_get_pattern_num_rows(file->mod,pattern);
}
if(pattern<0||pattern>=openmpt_module_g... | 15,161 |
180,601 | 1 | char *path_name(const struct name_path *path, const char *name)
{
const struct name_path *p;
char *n, *m;
int nlen = strlen(name);
int len = nlen + 1;
for (p = path; p; p = p->up) {
if (p->elem_len)
len += p->elem_len + 1;
}
n = xmalloc(len);
m = n + len - (nlen + 1);
strcpy(m, name);
for (p = path; p; p = p->up) {
i... | 15,162 |
18,668 | 0 | int kernel_sock_shutdown(struct socket *sock, enum sock_shutdown_cmd how)
{
return sock->ops->shutdown(sock, how);
}
| 15,163 |
84,017 | 0 | GF_Err gf_isom_linf_write_entry(void *entry, GF_BitStream *bs)
{
GF_LHVCLayerInformation* ptr = (GF_LHVCLayerInformation *)entry;
u32 i, count;
if (!ptr) return GF_OK;
gf_bs_write_int(bs, 0, 2);
count=gf_list_count(ptr->num_layers_in_track);
gf_bs_write_int(bs, count, 6);
for (i = 0; i < count; i++) {
LHVCLay... | 15,164 |
152,876 | 0 | ImageBitmap::ImageBitmap(HTMLVideoElement* video,
Optional<IntRect> cropRect,
Document* document,
const ImageBitmapOptions& options) {
IntSize playerSize;
if (video->webMediaPlayer())
playerSize = video->webMediaPlayer()->naturalSize();
... | 15,165 |
35,673 | 0 | getu64(int swap, uint64_t value)
{
union {
uint64_t ui;
char c[8];
} retval, tmpval;
if (swap) {
tmpval.ui = value;
retval.c[0] = tmpval.c[7];
retval.c[1] = tmpval.c[6];
retval.c[2] = tmpval.c[5];
retval.c[3] = tmpval.c[4];
retval.c[4] = tmpval.c[3];
retval.c[5] = tmpval.c[2];
retval.c[6] = tmp... | 15,166 |
64,524 | 0 | MagickExport Image *NewMagickImage(const ImageInfo *image_info,
const size_t width,const size_t height,const MagickPixelPacket *background)
{
CacheView
*image_view;
ExceptionInfo
*exception;
Image
*image;
ssize_t
y;
MagickBooleanType
status;
assert(image_info != (const ImageInfo *... | 15,167 |
38,103 | 0 | static int whiteheat_port_remove(struct usb_serial_port *port)
{
struct whiteheat_private *info;
info = usb_get_serial_port_data(port);
kfree(info);
return 0;
}
| 15,168 |
176,306 | 0 | static bool HasEntryImpl(Isolate* isolate, FixedArrayBase* backing_store,
uint32_t entry) {
return !BackingStore::cast(backing_store)->is_the_hole(isolate, entry);
}
| 15,169 |
2,950 | 0 | pdf14_fill_path(gx_device *dev, const gs_gstate *pgs,
gx_path *ppath, const gx_fill_params *params,
const gx_drawing_color *pdcolor,
const gx_clip_path *pcpath)
{
gs_gstate new_pgs = *pgs;
int code;
gs_pattern2_instance_t *pins... | 15,170 |
150,609 | 0 | void DataReductionProxyIOData::SetInt64Pref(const std::string& pref_path,
int64_t value) {
DCHECK(io_task_runner_->BelongsToCurrentThread());
ui_task_runner_->PostTask(
FROM_HERE, base::BindOnce(&DataReductionProxyService::SetInt64Pref,
... | 15,171 |
19,283 | 0 | static int unix_accept(struct socket *sock, struct socket *newsock, int flags)
{
struct sock *sk = sock->sk;
struct sock *tsk;
struct sk_buff *skb;
int err;
err = -EOPNOTSUPP;
if (sock->type != SOCK_STREAM && sock->type != SOCK_SEQPACKET)
goto out;
err = -EINVAL;
if (sk->sk_state != TCP_LISTEN)
goto out;
... | 15,172 |
90,310 | 0 | megasas_clear_intr_xscale(struct megasas_instance *instance)
{
u32 status;
u32 mfiStatus = 0;
struct megasas_register_set __iomem *regs;
regs = instance->reg_set;
/*
* Check if it is our interrupt
*/
status = readl(®s->outbound_intr_status);
if (status & MFI_OB_INTR_STATUS_MASK)
mfiStatus = MFI_INTR_F... | 15,173 |
170,716 | 0 | OMX_ERRORTYPE OMXNodeInstance::OnFillBufferDone(
OMX_IN OMX_HANDLETYPE /* hComponent */,
OMX_IN OMX_PTR pAppData,
OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) {
OMXNodeInstance *instance = static_cast<OMXNodeInstance *>(pAppData);
if (instance->mDying) {
return OMX_ErrorNone;
}
return instance->ow... | 15,174 |
80,573 | 0 | GF_Err trak_Read(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
u32 i;
GF_TrackBox *ptr = (GF_TrackBox *)s;
e = gf_isom_box_array_read(s, bs, trak_AddBox);
if (e) return e;
gf_isom_check_sample_desc(ptr);
if (!ptr->Header) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Missing TrackHeaderBox\n"));
return G... | 15,175 |
59,490 | 0 | xmlParseExternalEntity(xmlDocPtr doc, xmlSAXHandlerPtr sax, void *user_data,
int depth, const xmlChar *URL, const xmlChar *ID, xmlNodePtr *lst) {
return(xmlParseExternalEntityPrivate(doc, NULL, sax, user_data, depth, URL,
ID, lst));
}
| 15,176 |
103,846 | 0 | void RenderView::OnWasHidden() {
RenderWidget::OnWasHidden();
if (webview()) {
webview()->settings()->setMinimumTimerInterval(
webkit_glue::kBackgroundTabTimerInterval);
webview()->setVisibilityState(visibilityState(), false);
}
#if defined(OS_MACOSX)
std::set<WebPluginDelegateProxy*>::iterato... | 15,177 |
5,940 | 0 | static void ohci_set_hub_status(OHCIState *ohci, uint32_t val)
{
uint32_t old_state;
old_state = ohci->rhstatus;
/* write 1 to clear OCIC */
if (val & OHCI_RHS_OCIC)
ohci->rhstatus &= ~OHCI_RHS_OCIC;
if (val & OHCI_RHS_LPS) {
int i;
for (i = 0; i < ohci->num_ports; i++)
... | 15,178 |
19,368 | 0 | static void efx_fini_channels(struct efx_nic *efx)
{
struct efx_channel *channel;
struct efx_tx_queue *tx_queue;
struct efx_rx_queue *rx_queue;
int rc;
EFX_ASSERT_RESET_SERIALISED(efx);
BUG_ON(efx->port_enabled);
rc = efx_nic_flush_queues(efx);
if (rc && EFX_WORKAROUND_7803(efx)) {
/* Schedule a reset to re... | 15,179 |
188,375 | 1 | const SeekHead* Segment::GetSeekHead() const
{
return m_pSeekHead;
}
| 15,180 |
144,230 | 0 | views::View* LockContentsView::TestApi::dev_channel_info() const {
return view_->dev_channel_info_;
}
| 15,181 |
58,036 | 0 | static void nft_trans_destroy(struct nft_trans *trans)
{
list_del(&trans->list);
kfree(trans);
}
| 15,182 |
144,918 | 0 | ui::TextInputClient* RenderWidgetHostViewAura::GetTextInputClient() {
return this;
}
| 15,183 |
93,961 | 0 | xfs_map_trim_size(
struct inode *inode,
sector_t iblock,
struct buffer_head *bh_result,
struct xfs_bmbt_irec *imap,
xfs_off_t offset,
ssize_t size)
{
xfs_off_t mapping_size;
mapping_size = imap->br_startoff + imap->br_blockcount - iblock;
mapping_size <<= inode->i_blkbits;
ASSERT(mapping_size > 0);
i... | 15,184 |
182,554 | 1 | int create_flush_cmd_control(struct f2fs_sb_info *sbi)
{
dev_t dev = sbi->sb->s_bdev->bd_dev;
struct flush_cmd_control *fcc;
int err = 0;
if (SM_I(sbi)->fcc_info) {
fcc = SM_I(sbi)->fcc_info;
goto init_thread;
}
fcc = kzalloc(sizeof(struct flush_cmd_control), GFP_KERNEL);
if (!fcc)
return -ENOMEM;
atomi... | 15,185 |
57,037 | 0 | static int _nfs4_do_open_reclaim(struct nfs_open_context *ctx, struct nfs4_state *state)
{
struct nfs_delegation *delegation;
struct nfs4_opendata *opendata;
fmode_t delegation_type = 0;
int status;
opendata = nfs4_open_recoverdata_alloc(ctx, state,
NFS4_OPEN_CLAIM_PREVIOUS);
if (IS_ERR(opendata))
return PT... | 15,186 |
137,060 | 0 | FileList* InputType::Files() {
return nullptr;
}
| 15,187 |
19,149 | 0 | static void tcp_v6_reqsk_destructor(struct request_sock *req)
{
kfree_skb(inet6_rsk(req)->pktopts);
}
| 15,188 |
21,990 | 0 | raptor_option_get_count(void)
{
return RAPTOR_OPTION_LAST + 1;
}
| 15,189 |
127,423 | 0 | void FileAPIMessageFilter::DidGetMetadata(
int request_id,
base::PlatformFileError result,
const base::PlatformFileInfo& info,
const FilePath& platform_path) {
if (result == base::PLATFORM_FILE_OK)
Send(new FileSystemMsg_DidReadMetadata(request_id, info, platform_path));
else
Send(new FileSy... | 15,190 |
143,176 | 0 | bool Document::dispatchBeforeUnloadEvent(ChromeClient& chromeClient, bool isReload, bool& didAllowNavigation)
{
if (!m_domWindow)
return true;
if (!body())
return true;
if (processingBeforeUnload())
return false;
BeforeUnloadEvent* beforeUnloadEvent = BeforeUnloadEvent::create... | 15,191 |
79,362 | 0 | static int mov_write_int8_metadata(AVFormatContext *s, AVIOContext *pb,
const char *name, const char *tag,
int len)
{
AVDictionaryEntry *t = NULL;
uint8_t num;
int size = 24 + len;
if (len != 1 && len != 4)
return -1;
if... | 15,192 |
4,161 | 0 | IdentityFunction::IdentityFunction() {
int i;
m = funcMaxInputs;
n = funcMaxOutputs;
for (i = 0; i < funcMaxInputs; ++i) {
domain[i][0] = 0;
domain[i][1] = 1;
}
hasRange = gFalse;
}
| 15,193 |
130,445 | 0 | StartupTimeBomb::~StartupTimeBomb() {
DCHECK(this == g_startup_timebomb_);
DCHECK_EQ(thread_id_, base::PlatformThread::CurrentId());
if (startup_watchdog_)
Disarm();
g_startup_timebomb_ = nullptr;
}
| 15,194 |
97,245 | 0 | void WebFrameLoaderClient::updateGlobalHistoryRedirectLinks() {
}
| 15,195 |
179,121 | 1 | static int vapic_enter(struct kvm_vcpu *vcpu)
{
struct kvm_lapic *apic = vcpu->arch.apic;
struct page *page;
if (!apic || !apic->vapic_addr)
return 0;
page = gfn_to_page(vcpu->kvm, apic->vapic_addr >> PAGE_SHIFT);
if (is_error_page(page))
return -EFAULT;
vcpu->arch.apic->vapic_page = page;
return 0;
}
| 15,196 |
185,940 | 1 | void TypingCommand::insertText(Document& document,
const String& text,
Options options,
TextCompositionType composition,
const bool isIncrementalInsertion) {
LocalFrame* frame = document.frame();
DCHECK(frame);
if (!text.isEmpty())
document.frame()->spellChecker().updateMarkersForWordsAffectedByEditing(
isSpaceOrNewli... | 15,197 |
163,080 | 0 | struct tm* localtime_override(const time_t* timep) {
if (g_am_zygote_or_renderer) {
static struct tm time_struct;
static char timezone_string[64];
ProxyLocaltimeCallToBrowser(*timep, &time_struct, timezone_string,
sizeof(timezone_string));
return &time_struct;
}
CH... | 15,198 |
4,855 | 0 | LastEventTimeToggleResetAll(Bool state)
{
DeviceIntPtr dev;
nt_list_for_each_entry(dev, inputInfo.devices, next) {
LastEventTimeToggleResetFlag(dev->id, FALSE);
}
LastEventTimeToggleResetFlag(XIAllDevices, FALSE);
LastEventTimeToggleResetFlag(XIAllMasterDevices, FALSE);
}
| 15,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.