unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
96,964 | 0 | static int gup_pud_range(p4d_t p4d, unsigned long addr, unsigned long end,
int write, struct page **pages, int *nr)
{
unsigned long next;
pud_t *pudp;
pudp = pud_offset(&p4d, addr);
do {
pud_t pud = READ_ONCE(*pudp);
next = pud_addr_end(addr, end);
if (pud_none(pud))
return 0;
if (unlikely(pud_huge... | 4,300 |
141,986 | 0 | void AutofillExternalDelegate::OnCreditCardScanned(const CreditCard& card) {
manager_->FillCreditCardForm(query_id_, query_form_, query_field_, card,
base::string16());
}
| 4,301 |
147,691 | 0 | static void PerWorldBindingsRuntimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
TestObject* impl = V8TestObject::ToImpl(info.Holder());
impl->perWorldBindingsRuntimeEnabledVoidMethod();
}
| 4,302 |
112,707 | 0 | void DocumentLoader::stopLoadingForPolicyChange()
{
ResourceError error = interruptedForPolicyChangeError();
error.setIsCancellation(true);
cancelMainResourceLoad(error);
}
| 4,303 |
108,744 | 0 | int32_t PPB_ImageData_Impl::GetSharedMemory(int* handle, uint32_t* byte_count) {
return backend_->GetSharedMemory(handle, byte_count);
}
| 4,304 |
83,602 | 0 | static BOOL update_send_pointer_new(rdpContext* context,
const POINTER_NEW_UPDATE* pointer_new)
{
wStream* s;
rdpRdp* rdp = context->rdp;
BOOL ret = FALSE;
s = fastpath_update_pdu_init(rdp->fastpath);
if (!s)
return FALSE;
if (!Stream_EnsureRemainingCapacity(s, 16))
goto ... | 4,305 |
19,031 | 0 | int tcp_v4_md5_do_add(struct sock *sk, __be32 addr,
u8 *newkey, u8 newkeylen)
{
/* Add Key to the list */
struct tcp_md5sig_key *key;
struct tcp_sock *tp = tcp_sk(sk);
struct tcp4_md5sig_key *keys;
key = tcp_v4_md5_do_lookup(sk, addr);
if (key) {
/* Pre-existing entry - just update that one. */
kfree... | 4,306 |
116,506 | 0 | void ExtensionDevToolsClientHost::SendMessageToBackend(
SendCommandDebuggerFunction* function,
const std::string& method,
Value* params) {
DictionaryValue protocol_request;
int request_id = ++last_request_id_;
pending_requests_[request_id] = function;
protocol_request.SetInteger("id", request_id);
... | 4,307 |
84,518 | 0 | moveTab(TabBuffer * t, TabBuffer * t2, int right)
{
if (t2 == NO_TABBUFFER)
t2 = FirstTab;
if (!t || !t2 || t == t2 || t == NO_TABBUFFER)
return;
if (t->prevTab) {
if (t->nextTab)
t->nextTab->prevTab = t->prevTab;
else
LastTab = t->prevTab;
t->prevTab->nextTab = t->nextTab;
}
else {
... | 4,308 |
88,167 | 0 | static int hci_uart_tty_open(struct tty_struct *tty)
{
struct hci_uart *hu;
BT_DBG("tty %p", tty);
/* Error if the tty has no write op instead of leaving an exploitable
* hole
*/
if (tty->ops->write == NULL)
return -EOPNOTSUPP;
hu = kzalloc(sizeof(struct hci_uart), GFP_KERNEL);
if (!hu) {
BT_ERR("Can't... | 4,309 |
44,204 | 0 | int ssl3_send_client_certificate(SSL *s)
{
X509 *x509 = NULL;
EVP_PKEY *pkey = NULL;
int i;
if (s->state == SSL3_ST_CW_CERT_A) {
/* Let cert callback update client certificates if required */
if (s->cert->cert_cb) {
i = s->cert->cert_cb(s, s->cert->cert_cb_arg);
... | 4,310 |
86,317 | 0 | static struct page *__alloc_buddy_huge_page(struct hstate *h, gfp_t gfp_mask,
int nid, nodemask_t *nmask)
{
struct page *page;
unsigned int r_nid;
if (hstate_is_gigantic(h))
return NULL;
/*
* Assume we will successfully allocate the surplus page to
* prevent racing processes from causing the surplus to ex... | 4,311 |
25,966 | 0 | static void __perf_event_mark_enabled(struct perf_event *event,
struct perf_event_context *ctx)
{
struct perf_event *sub;
u64 tstamp = perf_event_time(event);
event->state = PERF_EVENT_STATE_INACTIVE;
event->tstamp_enabled = tstamp - event->total_time_enabled;
list_for_each_entry(sub, &event->sibling_list, g... | 4,312 |
1,829 | 0 | static void async_read_handler(int fd, int event, void *data)
{
AsyncRead *obj = (AsyncRead *)data;
for (;;) {
int n = obj->end - obj->now;
spice_assert(n > 0);
n = reds_stream_read(obj->stream, obj->now, n);
if (n <= 0) {
if (n < 0) {
switch (errno)... | 4,313 |
55,958 | 0 | static ssize_t tty_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
struct tty_struct *tty = file_tty(file);
struct tty_ldisc *ld;
ssize_t ret;
if (tty_paranoia_check(tty, file_inode(file), "tty_write"))
return -EIO;
if (!tty || !tty->ops->write ||
(test_bit(TTY_IO_ERROR, ... | 4,314 |
50,673 | 0 | static void srpt_mad_recv_handler(struct ib_mad_agent *mad_agent,
struct ib_mad_send_buf *send_buf,
struct ib_mad_recv_wc *mad_wc)
{
struct srpt_port *sport = (struct srpt_port *)mad_agent->context;
struct ib_ah *ah;
struct ib_mad_send_buf *rsp;
struct ib_dm_mad *dm_mad;
if (!mad_wc || !mad_wc->recv_b... | 4,315 |
32,827 | 0 | static int sg_build_iovec(sg_io_hdr_t __user *sgio, void __user *dxferp, u16 iovec_count)
{
sg_iovec_t __user *iov = (sg_iovec_t __user *) (sgio + 1);
sg_iovec32_t __user *iov32 = dxferp;
int i;
for (i = 0; i < iovec_count; i++) {
u32 base, len;
if (get_user(base, &iov32[i].iov_base) ||
get_user(len, &i... | 4,316 |
156,665 | 0 | void GetTouchActionsForChild(
RenderWidgetHostInputEventRouter* router,
RenderWidgetHostViewBase* rwhv_root,
RenderWidgetHostViewBase* rwhv_child,
const gfx::Point& event_position,
base::Optional<cc::TouchAction>& effective_touch_action,
base::Optional<cc::TouchAction>& whitelisted... | 4,317 |
1,100 | 0 | GfxTilingPattern *GfxTilingPattern::parse(Object *patObj) {
GfxTilingPattern *pat;
Dict *dict;
int paintTypeA, tilingTypeA;
double bboxA[4], matrixA[6];
double xStepA, yStepA;
Object resDictA;
Object obj1, obj2;
int i;
if (!patObj->isStream()) {
return NULL;
}
dict = patObj->streamGetDict();
... | 4,318 |
148,583 | 0 | void WebContentsImpl::UpdateDeviceScaleFactor(double device_scale_factor) {
SendPageMessage(
new PageMsg_SetDeviceScaleFactor(MSG_ROUTING_NONE, device_scale_factor));
}
| 4,319 |
156,652 | 0 | void FocusFrame(FrameTreeNode* frame) {
FrameFocusedObserver focus_observer(frame->current_frame_host());
SimulateMouseClick(frame->current_frame_host()->GetRenderWidgetHost(), 1, 1);
focus_observer.Wait();
}
| 4,320 |
184,668 | 1 | xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
int what, xmlChar end, xmlChar end2, xmlChar end3) {
xmlChar *buffer = NULL;
int buffer_size = 0;
xmlChar *current = NULL;
xmlChar *rep = NULL;
const xmlChar *last;
xmlEntityPtr ent;
int c,l;
int nbchars = 0;
if ((ctxt == NULL) || (str ==... | 4,321 |
24,364 | 0 | void __jbd2_journal_refile_buffer(struct journal_head *jh)
{
int was_dirty, jlist;
struct buffer_head *bh = jh2bh(jh);
J_ASSERT_JH(jh, jbd_is_locked_bh_state(bh));
if (jh->b_transaction)
assert_spin_locked(&jh->b_transaction->t_journal->j_list_lock);
/* If the buffer is now unused, just drop it. */
if (jh->b_... | 4,322 |
53,092 | 0 | static int check_reg_arg(struct reg_state *regs, u32 regno,
enum reg_arg_type t)
{
if (regno >= MAX_BPF_REG) {
verbose("R%d is invalid\n", regno);
return -EINVAL;
}
if (t == SRC_OP) {
/* check whether register used as source operand can be read */
if (regs[regno].type == NOT_INIT) {
verbose("R%d !rea... | 4,323 |
68,093 | 0 | static char *dex_method_name(RBinDexObj *bin, int idx) {
if (idx < 0 || idx >= bin->header.method_size) {
return NULL;
}
int cid = bin->methods[idx].class_id;
if (cid < 0 || cid >= bin->header.strings_size) {
return NULL;
}
int tid = bin->methods[idx].name_id;
if (tid < 0 || tid >= bin->header.strings_size) ... | 4,324 |
32,659 | 0 | static int tg3_phy_init(struct tg3 *tp)
{
struct phy_device *phydev;
if (tp->phy_flags & TG3_PHYFLG_IS_CONNECTED)
return 0;
/* Bring the PHY back to a known state. */
tg3_bmcr_reset(tp);
phydev = tp->mdio_bus->phy_map[TG3_PHY_MII_ADDR];
/* Attach the MAC to the PHY. */
phydev = phy_connect(tp->dev, dev_nam... | 4,325 |
111,265 | 0 | void WebPagePrivate::onPluginStopBackgroundPlay(PluginView* plugin, const char* windowUniquePrefix)
{
m_client->onPluginStopBackgroundPlay();
}
| 4,326 |
53,510 | 0 | get_time_t_max(void)
{
#if defined(TIME_T_MAX)
return TIME_T_MAX;
#else
/* ISO C allows time_t to be a floating-point type,
but POSIX requires an integer type. The following
should work on any system that follows the POSIX
conventions. */
if (((time_t)0) < ((time_t)-1)) {
/* Time_t is unsigned */
re... | 4,327 |
136,951 | 0 | void HTMLInputElement::ResetImpl() {
if (input_type_->GetValueMode() == ValueMode::kValue) {
SetNonDirtyValue(DefaultValue());
SetNeedsValidityCheck();
} else if (input_type_->GetValueMode() == ValueMode::kFilename) {
SetNonDirtyValue(String());
SetNeedsValidityCheck();
}
setChecked(hasAttribut... | 4,328 |
47,103 | 0 | int crypto_aes_expand_key(struct crypto_aes_ctx *ctx, const u8 *in_key,
unsigned int key_len)
{
const __le32 *key = (const __le32 *)in_key;
u32 i, t, u, v, w, j;
if (key_len != AES_KEYSIZE_128 && key_len != AES_KEYSIZE_192 &&
key_len != AES_KEYSIZE_256)
return -EINVAL;
ctx->key_length = key_len;
ctx->key... | 4,329 |
140,310 | 0 | EditorClient& Editor::client() const {
if (Page* page = frame().page())
return page->editorClient();
return emptyEditorClient();
}
| 4,330 |
108,496 | 0 | bool DumpQuotaTableOnDBThread(QuotaDatabase* database) {
DCHECK(database);
return database->DumpQuotaTable(
new TableCallback(base::Bind(&DumpQuotaTableHelper::AppendEntry,
base::Unretained(this))));
}
| 4,331 |
53,476 | 0 | lzss_emit_literal(struct rar *rar, uint8_t literal)
{
*lzss_current_pointer(&rar->lzss) = literal;
rar->lzss.position++;
}
| 4,332 |
810 | 0 | poppler_page_transition_free (PopplerPageTransition *transition)
{
g_free (transition);
}
| 4,333 |
38,503 | 0 | static struct rdma_id_private *cma_new_udp_id(struct rdma_cm_id *listen_id,
struct ib_cm_event *ib_event)
{
struct rdma_id_private *id_priv;
struct rdma_cm_id *id;
int ret;
id = rdma_create_id(listen_id->event_handler, listen_id->context,
listen_id->ps, IB_QPT_UD);
if (IS_ERR(id))
return NULL;... | 4,334 |
116,883 | 0 | TestWebKitPlatformSupport::databaseOpenFile(
const WebKit::WebString& vfs_file_name, int desired_flags) {
return SimpleDatabaseSystem::GetInstance()->OpenFile(
vfs_file_name, desired_flags);
}
| 4,335 |
109,926 | 0 | ~GpuMainThread() {
Stop();
}
| 4,336 |
133,382 | 0 | WindowTreeHostManager::~WindowTreeHostManager() {}
| 4,337 |
179,867 | 1 | static unsigned int stack_maxrandom_size(void)
{
unsigned int max = 0;
if ((current->flags & PF_RANDOMIZE) &&
!(current->personality & ADDR_NO_RANDOMIZE)) {
max = ((-1U) & STACK_RND_MASK) << PAGE_SHIFT;
}
return max;
}
| 4,338 |
123,531 | 0 | void SavePackage::DoSavingProcess() {
if (save_type_ == SAVE_PAGE_TYPE_AS_COMPLETE_HTML) {
SaveItem* save_item = NULL;
if (waiting_item_queue_.size()) {
DCHECK(wait_state_ == NET_FILES);
save_item = waiting_item_queue_.front();
if (save_item->save_source() != SaveFileCreateInfo::SAVE_FILE_FR... | 4,339 |
65,657 | 0 | nfsd_inject_forget_client_delegations(struct sockaddr_storage *addr,
size_t addr_size)
{
u64 count = 0;
struct nfs4_client *clp;
struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nfsd_net_id);
LIST_HEAD(reaplist);
if (!nfsd_netns_ready(nn))
return count;
spin_lock(&nn->client_lock);
... | 4,340 |
125,637 | 0 | void RenderViewHostImpl::NotifyTimezoneChange() {
Send(new ViewMsg_TimezoneChange(GetRoutingID()));
}
| 4,341 |
59,227 | 0 | _kdc_make_anonymous_principalname (PrincipalName *pn)
{
pn->name_type = KRB5_NT_PRINCIPAL;
pn->name_string.len = 1;
pn->name_string.val = malloc(sizeof(*pn->name_string.val));
if (pn->name_string.val == NULL)
return ENOMEM;
pn->name_string.val[0] = strdup("anonymous");
if (pn->name_string.val[0... | 4,342 |
176,741 | 0 | status_t Parcel::readChar(char16_t *pArg) const
{
int32_t tmp;
status_t ret = readInt32(&tmp);
*pArg = char16_t(tmp);
return ret;
}
| 4,343 |
48,375 | 0 | tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){
tsize_t written=0;
char buffer[32];
int buflen=0;
buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number);
check_snprintf_ret((T2P*)NULL, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen );
written += t2pWriteF... | 4,344 |
27,527 | 0 | static void inotify_freeing_mark(struct fsnotify_mark *fsn_mark, struct fsnotify_group *group)
{
inotify_ignored_and_remove_idr(fsn_mark, group);
}
| 4,345 |
142,951 | 0 | double HTMLMediaElement::currentTime() const {
if (default_playback_start_position_)
return default_playback_start_position_;
if (seeking_) {
BLINK_MEDIA_LOG << "currentTime(" << (void*)this
<< ") - seeking, returning " << last_seek_time_;
return last_seek_time_;
}
return Offic... | 4,346 |
52,352 | 0 | get_entries(struct net *net, struct ip6t_get_entries __user *uptr,
const int *len)
{
int ret;
struct ip6t_get_entries get;
struct xt_table *t;
if (*len < sizeof(get)) {
duprintf("get_entries: %u < %zu\n", *len, sizeof(get));
return -EINVAL;
}
if (copy_from_user(&get, uptr, sizeof(get)) != 0)
return -E... | 4,347 |
39,545 | 0 | set_conf_from_info(struct fst_card_info *card, struct fst_port_info *port,
struct fstioc_info *info)
{
int err;
unsigned char my_framing;
/* Set things according to the user set valid flags
* Several of the old options have been invalidated/replaced by the
* generic hdlc package.
*/
err = 0;
if (info... | 4,348 |
28,189 | 0 | static void vector_clipf_c_opposite_sign(float *dst, const float *src, float *min, float *max, int len){
int i;
uint32_t mini = *(uint32_t*)min;
uint32_t maxi = *(uint32_t*)max;
uint32_t maxisign = maxi ^ (1U<<31);
uint32_t *dsti = (uint32_t*)dst;
const uint32_t *srci = (const uint32_t*)src;
... | 4,349 |
28,844 | 0 | void kvm_arch_register_noncoherent_dma(struct kvm *kvm)
{
atomic_inc(&kvm->arch.noncoherent_dma_count);
}
| 4,350 |
5,413 | 0 | static void Ins_MPPEM( INS_ARG )
{
args[0] = CURRENT_Ppem();
DBG_PRINT1(" %d", args[0]);
}
| 4,351 |
186,537 | 1 | Compositor::Compositor(const viz::FrameSinkId& frame_sink_id,
ui::ContextFactory* context_factory,
ui::ContextFactoryPrivate* context_factory_private,
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
bool enable_surface_synchronization,
bool enable_pixel_canvas,
bool external_begin_frames_enabled,
bool force_so... | 4,352 |
115,488 | 0 | WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef, WKBundleFrameRef frame, uint64_t identifier, WKURLRequestRef request, WKURLResponseRef response)
{
if (InjectedBundle::shared().isTestRunning()
&& InjectedBundle::shared().testRunner()->shouldDumpResourceLoadCallbacks()) {
... | 4,353 |
22,788 | 0 | static void nfs_destroy_inodecache(void)
{
kmem_cache_destroy(nfs_inode_cachep);
}
| 4,354 |
118,636 | 0 | void QuitIOLoop() {
fake_io_thread_completion_.Signal();
content::RunMessageLoop();
}
| 4,355 |
103,761 | 0 | void RenderThread::RemoveRoute(int32 routing_id) {
widget_count_--;
return ChildThread::RemoveRoute(routing_id);
}
| 4,356 |
145,550 | 0 | VirtualAuthenticator::VirtualAuthenticator(
::device::FidoTransportProtocol transport)
: transport_(transport),
unique_id_(base::GenerateGUID()),
state_(base::MakeRefCounted<::device::VirtualFidoDevice::State>()) {}
| 4,357 |
43,495 | 0 | static int xts_aesni_setkey(struct crypto_tfm *tfm, const u8 *key,
unsigned int keylen)
{
struct aesni_xts_ctx *ctx = crypto_tfm_ctx(tfm);
u32 *flags = &tfm->crt_flags;
int err;
/* key consists of keys of equal size concatenated, therefore
* the length must be even
*/
if (keylen % 2) {
*flags |= CRYP... | 4,358 |
119,298 | 0 | void TranslateInfoBarDelegate::InfoBarDismissed() {
if (step_ != translate::TRANSLATE_STEP_BEFORE_TRANSLATE)
return;
TranslationDeclined();
UMA_HISTOGRAM_BOOLEAN("Translate.DeclineTranslateCloseInfobar", true);
}
| 4,359 |
161,769 | 0 | void PlatformSensorFusion::StopSensor() {
for (const auto& pair : source_sensors_)
pair.second->StopListening(this);
fusion_algorithm_->Reset();
}
| 4,360 |
10,320 | 0 | gray_sweep( RAS_ARG_ const FT_Bitmap* target )
{
int yindex;
FT_UNUSED( target );
if ( ras.num_cells == 0 )
return;
ras.num_gray_spans = 0;
FT_TRACE7(( "gray_sweep: start\n" ));
for ( yindex = 0; yindex < ras.ycount; yindex++ )
{
PCell cell = ras.ycells[yindex];
... | 4,361 |
53,496 | 0 | read_next_symbol(struct archive_read *a, struct huffman_code *code)
{
unsigned char bit;
unsigned int bits;
int length, value, node;
struct rar *rar;
struct rar_br *br;
if (!code->table)
{
if (make_table(a, code) != (ARCHIVE_OK))
return -1;
}
rar = (struct rar *)(a->format->data);
br = &... | 4,362 |
105,423 | 0 | static gboolean webkit_web_view_focus_in_event(GtkWidget* widget, GdkEventFocus* event)
{
GtkWidget* toplevel = gtk_widget_get_toplevel(widget);
if (gtk_widget_is_toplevel(toplevel) && gtk_window_has_toplevel_focus(GTK_WINDOW(toplevel))) {
WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
FocusC... | 4,363 |
70,965 | 0 | void Type_Chromaticity_Free(struct _cms_typehandler_struct* self, void* Ptr)
{
_cmsFree(self ->ContextID, Ptr);
}
| 4,364 |
6,476 | 0 | ECPKPARAMETERS *ec_asn1_group2pkparameters(const EC_GROUP *group,
ECPKPARAMETERS *params)
{
int ok = 1, tmp;
ECPKPARAMETERS *ret = params;
if (ret == NULL) {
if ((ret = ECPKPARAMETERS_new()) == NULL) {
ECerr(EC_F_EC_ASN1_GROUP2PKPARAMETERS, ERR... | 4,365 |
138,561 | 0 | LogoServiceFactory* LogoServiceFactory::GetInstance() {
return base::Singleton<LogoServiceFactory>::get();
}
| 4,366 |
164,914 | 0 | void ResourceDispatcherHostImpl::BlockRequestsForRoute(
const GlobalFrameRoutingId& global_routing_id) {
DCHECK(io_thread_task_runner_->BelongsToCurrentThread());
DCHECK(blocked_loaders_map_.find(global_routing_id) ==
blocked_loaders_map_.end())
<< "BlockRequestsForRoute called multiple time for... | 4,367 |
155,650 | 0 | bool AuthenticatorSheetModelBase::IsActivityIndicatorVisible() const {
return false;
}
| 4,368 |
149,405 | 0 | bool ContentSecurityPolicy::allowFormAction(
const KURL& url,
RedirectStatus redirectStatus,
SecurityViolationReportingPolicy reportingPolicy) const {
return isAllowedByAll<&CSPDirectiveList::allowFormAction>(
m_policies, url, redirectStatus, reportingPolicy);
}
| 4,369 |
100,300 | 0 | bool CellularNetwork::StartActivation() const {
if (!EnsureCrosLoaded())
return false;
return ActivateCellularModem(service_path_.c_str(), NULL);
}
| 4,370 |
43,606 | 0 | AP_DECLARE(int) ap_run_sub_req(request_rec *r)
{
int retval = DECLINED;
/* Run the quick handler if the subrequest is not a dirent or file
* subrequest
*/
if (!(r->filename && r->finfo.filetype != APR_NOFILE)) {
retval = ap_run_quick_handler(r, 0);
}
if (retval != OK) {
ret... | 4,371 |
73,792 | 0 | void test_parserComplete() {
int retval;
/* alice's maintained packet */
bzrtpPacket_t *alice_Hello, *alice_HelloFromBob, *alice_HelloACK, *alice_HelloACKFromBob;
/* bob's maintained packet */
bzrtpPacket_t *bob_Hello, *bob_HelloFromAlice, *bob_HelloACK, *bob_HelloACKFromAlice;
/* Create zrtp Context */
bzrtpCo... | 4,372 |
174,737 | 0 | static int vol_prc_lib_get_descriptor(const effect_uuid_t *uuid,
effect_descriptor_t *descriptor)
{
int i = 0;
ALOGV("%s Called ", __func__);
if (lib_init() != 0) {
return init_status;
}
if (descriptor == NULL || uuid == NULL) {
ALOGE("%s: %s is NULL", __func__, (descriptor == NULL) ? "descriptor" : ... | 4,373 |
177,713 | 0 | int equalizer_get_num_presets(equalizer_context_t *context __unused)
{
ALOGV("%s: presets_num: %d", __func__,
sizeof(equalizer_preset_names)/sizeof(char *));
return sizeof(equalizer_preset_names)/sizeof(char *);
}
| 4,374 |
56,732 | 0 | static int check_ports_changed(struct usb_hub *hub)
{
int port1;
for (port1 = 1; port1 <= hub->hdev->maxchild; ++port1) {
u16 portstatus, portchange;
int status;
status = hub_port_status(hub, port1, &portstatus, &portchange);
if (!status && portchange)
return 1;
}
return 0;
}
| 4,375 |
58,057 | 0 | static void cuse_fc_release(struct fuse_conn *fc)
{
struct cuse_conn *cc = fc_to_cc(fc);
kfree_rcu(cc, fc.rcu);
}
| 4,376 |
4,982 | 0 | qtdemux_tree_get_sibling_by_type (GNode * node, guint32 fourcc)
{
GNode *child;
guint8 *buffer;
guint32 child_fourcc;
for (child = g_node_next_sibling (node); child;
child = g_node_next_sibling (child)) {
buffer = (guint8 *) child->data;
child_fourcc = QT_FOURCC (buffer + 4);
if (child_four... | 4,377 |
70,945 | 0 | cmsBool Read8bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut, int nChannels)
{
cmsUInt8Number* Temp = NULL;
int i, j;
cmsToneCurve* Tables[cmsMAXCHANNELS];
if (nChannels > cmsMAXCHANNELS) return FALSE;
if (nChannels <= 0) return FALSE;
memset(Tables, 0, sizeof(Tables));
... | 4,378 |
28,778 | 0 | void kvm_lapic_init(void)
{
/* do not patch jump label more than once per second */
jump_label_rate_limit(&apic_hw_disabled, HZ);
jump_label_rate_limit(&apic_sw_disabled, HZ);
}
| 4,379 |
169,470 | 0 | int AddressFlagsToNetAddressAttributes(int flags) {
int result = 0;
if (flags & IN6_IFF_TEMPORARY) {
result |= IP_ADDRESS_ATTRIBUTE_TEMPORARY;
}
if (flags & IN6_IFF_DEPRECATED) {
result |= IP_ADDRESS_ATTRIBUTE_DEPRECATED;
}
if (flags & IN6_IFF_ANYCAST) {
result |= IP_ADDRESS_ATTRIBUTE_ANYCAST;
... | 4,380 |
63,832 | 0 | name_compare( a, b )
char** a;
char** b;
{
return strcmp( *a, *b );
}
| 4,381 |
123,358 | 0 | RenderWidgetHostViewGuest::AllocateFakePluginWindowHandle(
bool opaque, bool root) {
NOTIMPLEMENTED();
return 0;
}
| 4,382 |
19,263 | 0 | int netlink_unregister_notifier(struct notifier_block *nb)
{
return atomic_notifier_chain_unregister(&netlink_chain, nb);
}
| 4,383 |
154,513 | 0 | void GLES2DecoderPassthroughImpl::RestoreProgramBindings() const {}
| 4,384 |
81,144 | 0 | COMPAT_SYSCALL_DEFINE4(clock_nanosleep, clockid_t, which_clock, int, flags,
struct compat_timespec __user *, rqtp,
struct compat_timespec __user *, rmtp)
{
const struct k_clock *kc = clockid_to_kclock(which_clock);
struct timespec64 t;
if (!kc)
return -EINVAL;
if (!kc->nsleep)
return -ENANOSL... | 4,385 |
112,905 | 0 | void GDataCache::SetMountedStateOnUIThread(
const FilePath& file_path,
bool to_mount,
const SetMountedStateCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
base::PlatformFileError* error =
new base::PlatformFileError(base::PLATFORM_FILE_OK);
FilePath* cache_file_path... | 4,386 |
28,018 | 0 | static int pix_fmt_match(enum AVPixelFormat pix_fmt, int components,
int bpc, uint32_t log2_chroma_wh, int pal8)
{
int match = 1;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
if (desc->nb_components != components) {
return 0;
}
switch (components)... | 4,387 |
167,024 | 0 | bool NavigationControllerImpl::RendererDidNavigate(
RenderFrameHostImpl* rfh,
const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
LoadCommittedDetails* details,
bool is_same_document_navigation,
NavigationHandleImpl* navigation_handle) {
is_initial_navigation_ = false;
bool overriding_u... | 4,388 |
99,423 | 0 | Channel::ChannelImpl::ChannelImpl(const std::string& channel_id, Mode mode,
Listener* listener)
: mode_(mode),
is_blocked_on_write_(false),
message_send_bytes_written_(0),
uses_fifo_(CommandLine::ForCurrentProcess()->HasSwitch(
switches::kIPCU... | 4,389 |
112,274 | 0 | void ChromeRenderMessageFilter::OnGetExtensionMessageBundleOnFileThread(
const FilePath& extension_path,
const std::string& extension_id,
const std::string& default_locale,
IPC::Message* reply_msg) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
scoped_ptr<ExtensionMessageBundle::Substit... | 4,390 |
8,864 | 0 | static inline bool vrend_format_can_sample(enum virgl_formats format)
{
return tex_conv_table[format].bindings & VREND_BIND_SAMPLER;
}
| 4,391 |
161,479 | 0 | bool IsAttachedTo(const std::string& target_id) {
return agent_host_->GetId() == target_id;
}
| 4,392 |
29,203 | 0 | static void nfs4_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_read_data *data)
{
if (nfs4_setup_sequence(NFS_SERVER(data->header->inode),
&data->args.seq_args,
&data->res.seq_res,
task))
return;
rpc_call_start(task);
}
| 4,393 |
38,278 | 0 | void user_shm_unlock(size_t size, struct user_struct *user)
{
spin_lock(&shmlock_user_lock);
user->locked_shm -= (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
spin_unlock(&shmlock_user_lock);
free_uid(user);
}
| 4,394 |
62,895 | 0 | int kvm_arm_sys_reg_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
{
const struct sys_reg_desc *r;
void __user *uaddr = (void __user *)(unsigned long)reg->addr;
if ((reg->id & KVM_REG_ARM_COPROC_MASK) == KVM_REG_ARM_DEMUX)
return demux_c15_set(reg->id, uaddr);
if (KVM_REG_SIZE(reg->id) != sizeof(... | 4,395 |
166,813 | 0 | void Insert() {
Object* obj = Object::Create();
Container container;
{
ExpectWriteBarrierFires scope(ThreadState::Current(), {obj});
container.insert(obj);
}
}
| 4,396 |
151,650 | 0 | void Browser::ActiveTabChanged(WebContents* old_contents,
WebContents* new_contents,
int index,
int reason) {
content::RecordAction(UserMetricsAction("ActiveTabChanged"));
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_T... | 4,397 |
83,541 | 0 | static BOOL gdi_Glyph_EndDraw(rdpContext* context, INT32 x, INT32 y,
INT32 width, INT32 height, UINT32 bgcolor, UINT32 fgcolor)
{
rdpGdi* gdi;
if (!context || !context->gdi)
return FALSE;
gdi = context->gdi;
if (!gdi->drawing || !gdi->drawing->hdc)
return FALSE;
gdi_SetNullCli... | 4,398 |
110,526 | 0 | void GLES2DecoderImpl::DoVertexAttrib3f(
GLuint index, GLfloat v0, GLfloat v1, GLfloat v2) {
VertexAttribManager::VertexAttribInfo* info =
vertex_attrib_manager_->GetVertexAttribInfo(index);
if (!info) {
SetGLError(GL_INVALID_VALUE, "glVertexAttrib3f", "index out of range");
return;
}
VertexAt... | 4,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.