unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
52,935 | 0 | void qib_device_remove(struct qib_devdata *dd)
{
qib_user_remove(dd);
qib_diag_remove(dd);
}
| 18,100 |
115,401 | 0 | void InjectedBundlePage::didReachApplicationCacheOriginQuota(WKBundlePageRef page, WKSecurityOriginRef origin, int64_t totalBytesNeeded, const void* clientInfo)
{
static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didReachApplicationCacheOriginQuota(origin, totalBytesNeeded);
}
| 18,101 |
146,665 | 0 | void PageInfoBubbleView::DidStartNavigation(content::NavigationHandle* handle) {
GetWidget()->Close();
}
| 18,102 |
2,170 | 0 | void red_channel_pipes_new_add_tail(RedChannel *channel, new_pipe_item_t creator, void *data)
{
red_channel_pipes_create_batch(channel, creator, data,
red_channel_client_pipe_add_tail_no_push);
}
| 18,103 |
108,510 | 0 | void QuotaManager::GetUsageAndQuotaForEviction(
const GetUsageAndQuotaForEvictionCallback& callback) {
DCHECK(io_thread_->BelongsToCurrentThread());
GetUsageAndQuotaInternal(
GURL(), kStorageTypeTemporary, true /* global */, callback);
}
| 18,104 |
25,849 | 0 | static struct p4_event_bind *p4_config_get_bind(u64 config)
{
unsigned int evnt = p4_config_unpack_event(config);
struct p4_event_bind *bind = NULL;
if (evnt < ARRAY_SIZE(p4_event_bind_map))
bind = &p4_event_bind_map[evnt];
return bind;
}
| 18,105 |
83,496 | 0 | do_trap_no_signal(struct task_struct *tsk, int trapnr, char *str,
struct pt_regs *regs, long error_code)
{
if (v8086_mode(regs)) {
/*
* Traps 0, 1, 3, 4, and 5 should be forwarded to vm86.
* On nmi (interrupt 2), do_trap should not be called.
*/
if (trapnr < X86_TRAP_UD) {
if (!handle_vm86_trap((st... | 18,106 |
179,061 | 1 | static int inotify_release(struct inode *ignored, struct file *file)
{
struct fsnotify_group *group = file->private_data;
struct user_struct *user = group->inotify_data.user;
pr_debug("%s: group=%p\n", __func__, group);
fsnotify_clear_marks_by_group(group);
/* free this group, matching get was inotify_init->fsnotif... | 18,107 |
94,833 | 0 | MagickExport ImageInfo *DestroyImageInfo(ImageInfo *image_info)
{
assert(image_info != (ImageInfo *) NULL);
assert(image_info->signature == MagickCoreSignature);
if (image_info->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
image_info->filename);
if (image_info->size !... | 18,108 |
34,456 | 0 | static noinline int may_destroy_subvol(struct btrfs_root *root)
{
struct btrfs_path *path;
struct btrfs_key key;
int ret;
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;
key.objectid = root->root_key.objectid;
key.type = BTRFS_ROOT_REF_KEY;
key.offset = (u64)-1;
ret = btrfs_search_slot(NULL, root->f... | 18,109 |
3,627 | 0 | static int rsa_cms_decrypt(CMS_RecipientInfo *ri)
{
EVP_PKEY_CTX *pkctx;
X509_ALGOR *cmsalg;
int nid;
int rv = -1;
unsigned char *label = NULL;
int labellen = 0;
const EVP_MD *mgf1md = NULL, *md = NULL;
RSA_OAEP_PARAMS *oaep;
X509_ALGOR *maskHash;
pkctx = CMS_RecipientInfo_get0_p... | 18,110 |
143,561 | 0 | void OomInterventionTabHelper::DeclineIntervention() {
RecordInterventionUserDecision(false);
ResetInterfaces();
intervention_state_ = InterventionState::DECLINED;
if (decider_) {
DCHECK(!web_contents()->GetBrowserContext()->IsOffTheRecord());
const std::string& host = web_contents()->GetVisibleURL().h... | 18,111 |
11,009 | 0 | PHP_MINFO_FUNCTION(bcmath)
{
php_info_print_table_start();
php_info_print_table_row(2, "BCMath support", "enabled");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
}
| 18,112 |
13,918 | 0 | void SSL_CTX_set_default_read_buffer_len(SSL_CTX *ctx, size_t len)
{
ctx->default_read_buf_len = len;
}
| 18,113 |
83,522 | 0 | BOOL nsc_context_reset(NSC_CONTEXT* context, UINT32 width, UINT32 height)
{
if (!context)
return FALSE;
context->width = width;
context->height = height;
return TRUE;
}
| 18,114 |
32,581 | 0 | static int tg3_halt_cpu(struct tg3 *tp, u32 offset)
{
int i;
BUG_ON(offset == TX_CPU_BASE && tg3_flag(tp, 5705_PLUS));
if (tg3_asic_rev(tp) == ASIC_REV_5906) {
u32 val = tr32(GRC_VCPU_EXT_CTRL);
tw32(GRC_VCPU_EXT_CTRL, val | GRC_VCPU_EXT_CTRL_HALT_CPU);
return 0;
}
if (offset == RX_CPU_BASE) {
for (i = ... | 18,115 |
36,986 | 0 | static struct vmcs *alloc_vmcs(void)
{
return alloc_vmcs_cpu(raw_smp_processor_id());
}
| 18,116 |
2,049 | 0 | prune_bounding_set(void)
{
int i, rc = 0;
static int bounding_set_cleared;
if (bounding_set_cleared)
return 0;
for (i = 0; i <= CAP_LAST_CAP && rc == 0; ++i)
rc = prctl(PR_CAPBSET_DROP, i);
if (rc != 0) {
fprintf(stderr, "Unable to clear capability bounding set: %d\n", rc);
return EX_SYSERR;
}
++boun... | 18,117 |
17,619 | 0 | SProcRenderCreateSolidFill(ClientPtr client)
{
REQUEST(xRenderCreateSolidFillReq);
REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq);
swaps(&stuff->length);
swapl(&stuff->pid);
swaps(&stuff->color.alpha);
swaps(&stuff->color.red);
swaps(&stuff->color.green);
swaps(&stuff->color.blue);
... | 18,118 |
89,440 | 0 | static int nfc_genl_dump_devices(struct sk_buff *skb,
struct netlink_callback *cb)
{
struct class_dev_iter *iter = (struct class_dev_iter *) cb->args[0];
struct nfc_dev *dev = (struct nfc_dev *) cb->args[1];
bool first_call = false;
if (!iter) {
first_call = true;
iter = kmalloc(sizeof(struct class_dev_it... | 18,119 |
150,242 | 0 | WindowStateType TabletModeWindowState::GetType() const {
return current_state_type_;
}
| 18,120 |
95,144 | 0 | static void cmd_getacl(const char *tag, const char *name)
{
int r, access;
char *acl;
char *rights, *nextid;
char *freeme = NULL;
mbentry_t *mbentry = NULL;
char *intname = mboxname_from_external(name, &imapd_namespace, imapd_userid);
r = mlookup(tag, name, intname, &mbentry);
if (r ==... | 18,121 |
138,478 | 0 | void HTMLScriptRunner::executeScriptsWaitingForLoad(Resource* resource)
{
ASSERT(!isExecutingScript());
ASSERT(hasParserBlockingScript());
ASSERT_UNUSED(resource, m_parserBlockingScript.resource() == resource);
ASSERT(m_parserBlockingScript.isReady());
executeParsingBlockingScripts();
}
| 18,122 |
36,505 | 0 | card_number_show_attr(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct snd_card *card = container_of(dev, struct snd_card, card_dev);
return snprintf(buf, PAGE_SIZE, "%i\n", card->number);
}
| 18,123 |
58,345 | 0 | static void null_restart(char mode, const char *cmd)
{
}
| 18,124 |
48,848 | 0 | void net_disable_timestamp(void)
{
#ifdef HAVE_JUMP_LABEL
if (in_interrupt()) {
atomic_inc(&netstamp_needed_deferred);
return;
}
#endif
static_key_slow_dec(&netstamp_needed);
}
| 18,125 |
69,302 | 0 | void ssl_set_sig_mask(uint32_t *pmask_a, SSL *s, int op)
{
const unsigned char *sigalgs;
size_t i, sigalgslen;
int have_rsa = 0, have_dsa = 0, have_ecdsa = 0;
/*
* Now go through all signature algorithms seeing if we support any for
* RSA, DSA, ECDSA. Do this for all versions not just TLS 1.2.... | 18,126 |
52,044 | 0 | dissect_spoolss_relstrarray(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, dcerpc_info *di, guint8 *drep, int hf_index,
int struct_start, char **data)
{
proto_item *item;
proto_tree *subtree;
guint32 relstr_offset, relstr_start/*, relstr_end, relstr_len*/;
char *text;
item = proto_... | 18,127 |
63,477 | 0 | YR_OBJECT* yr_object_lookup_field(
YR_OBJECT* object,
const char* field_name)
{
YR_STRUCTURE_MEMBER* member;
assert(object != NULL);
assert(object->type == OBJECT_TYPE_STRUCTURE);
member = object_as_structure(object)->members;
while (member != NULL)
{
if (strcmp(member->object->identifier, fi... | 18,128 |
76,623 | 0 | static void put_object_name(struct fsck_options *options, struct object *obj,
const char *fmt, ...)
{
va_list ap;
struct strbuf buf = STRBUF_INIT;
char *existing;
if (!options->object_names)
return;
existing = lookup_decoration(options->object_names, obj);
if (existing)
return;
va_start(ap, fmt);
strbuf_v... | 18,129 |
105,439 | 0 | WebKitLoadStatus webkit_web_view_get_load_status(WebKitWebView* webView)
{
g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), WEBKIT_LOAD_FINISHED);
WebKitWebViewPrivate* priv = webView->priv;
return priv->loadStatus;
}
| 18,130 |
40,318 | 0 | static int atalk_rcv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *pt, struct net_device *orig_dev)
{
struct ddpehdr *ddp;
struct sock *sock;
struct atalk_iface *atif;
struct sockaddr_at tosat;
int origlen;
__u16 len_hops;
if (!net_eq(dev_net(dev), &init_net))
goto drop;
/* Don't m... | 18,131 |
181,528 | 1 | checked_xcalloc (size_t num, size_t size)
{
alloc_limit_assert ("checked_xcalloc", (num *size));
return xcalloc (num, size);
}
| 18,132 |
87,910 | 0 | static bool fm10k_alloc_mapped_page(struct fm10k_ring *rx_ring,
struct fm10k_rx_buffer *bi)
{
struct page *page = bi->page;
dma_addr_t dma;
/* Only page will be NULL if buffer was consumed */
if (likely(page))
return true;
/* alloc new page for storage */
page = dev_alloc_page();
if (unlikely(!page))... | 18,133 |
107,000 | 0 | void QQuickWebView::goBack()
{
Q_D(QQuickWebView);
d->webPageProxy->goBack();
}
| 18,134 |
181,162 | 1 | static int prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12,
bool from_vmentry, u32 *entry_failure_code)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
u32 exec_control, vmcs12_exec_ctrl;
vmcs_write16(GUEST_ES_SELECTOR, vmcs12->guest_es_selector);
vmcs_write16(GUEST_CS_SELECTOR, vmcs12->guest_cs_selector);... | 18,135 |
116,393 | 0 | GURL ChromeContentRendererClient::GetNaClContentHandlerURL(
const std::string& actual_mime_type,
const webkit::WebPluginInfo& plugin) {
const char* kNaClPluginManifestAttribute = "nacl";
string16 nacl_attr = ASCIIToUTF16(kNaClPluginManifestAttribute);
for (size_t i = 0; i < plugin.mime_types.size(); ++i) ... | 18,136 |
3,506 | 0 | irc_server_recv_cb (void *data, int fd)
{
struct t_irc_server *server;
static char buffer[4096 + 2];
int num_read;
/* make C compiler happy */
(void) fd;
server = (struct t_irc_server *)data;
if (!server)
return WEECHAT_RC_ERROR;
#ifdef HAVE_GNUTLS
if (server-... | 18,137 |
67,230 | 0 | static int brcmf_cfg80211_sched_scan_stop(struct wiphy *wiphy,
struct net_device *ndev, u64 reqid)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(ndev);
brcmf_dbg(SCAN, "enter\n");
brcmf_pno_stop_sched_scan(ifp, reqid);
if (cfg->int_escan_map)
brcmf_notify_esc... | 18,138 |
22,845 | 0 | static int _nfs4_proc_lookupfh(struct nfs_server *server, const struct nfs_fh *dirfh,
const struct qstr *name, struct nfs_fh *fhandle,
struct nfs_fattr *fattr)
{
int status;
struct nfs4_lookup_arg args = {
.bitmask = server->attr_bitmask,
.dir_fh = dirfh,
.name = name,
};
struct nfs4_lookup_res re... | 18,139 |
154,621 | 0 | error::Error GLES2DecoderPassthroughImpl::DoDeleteRenderbuffers(
GLsizei n,
const volatile GLuint* renderbuffers) {
if (n < 0) {
InsertError(GL_INVALID_VALUE, "n cannot be negative.");
return error::kNoError;
}
return DeleteHelper(n, renderbuffers, &resources_->renderbuffer_id_map,
... | 18,140 |
5,472 | 0 | static Bool Ins_SxVTL( EXEC_OPS Int aIdx1,
Int aIdx2,
Int aOpc,
TT_UnitVector* Vec )
{
Long A, B, C;
if ( BOUNDS( aIdx1, CUR.zp2.n_points ) ||
BOUNDS(... | 18,141 |
140,400 | 0 | void TypingCommand::insertLineBreak(EditingState* editingState) {
if (!canAppendNewLineFeedToSelection(endingSelection()))
return;
applyCommandToComposite(InsertLineBreakCommand::create(document()),
editingState);
if (editingState->isAborted())
return;
typingAddedToOpenCommand... | 18,142 |
10,534 | 0 | static int parse_timeout(const char *target)
{
QemuOptsList *list;
QemuOpts *opts;
const char *timeout;
list = qemu_find_opts("iscsi");
if (list) {
opts = qemu_opts_find(list, target);
if (!opts) {
opts = QTAILQ_FIRST(&list->head);
}
if (opts) {
... | 18,143 |
5,210 | 0 | static void _close_pgsql_plink(zend_resource *rsrc)
{
PGconn *link = (PGconn *)rsrc->ptr;
PGresult *res;
while ((res = PQgetResult(link))) {
PQclear(res);
}
PQfinish(link);
PGG(num_persistent)--;
PGG(num_links)--;
}
| 18,144 |
43,209 | 0 | static struct oz_urb_link *oz_uncancel_urb(struct oz_hcd *ozhcd,
struct urb *urb)
{
struct oz_urb_link *urbl;
list_for_each_entry(urbl, &ozhcd->urb_cancel_list, link) {
if (urb == urbl->urb) {
list_del_init(&urbl->link);
return urbl;
}
}
return NULL;
}
| 18,145 |
36,004 | 0 | small_smb2_init(__le16 smb2_command, struct cifs_tcon *tcon,
void **request_buf)
{
int rc = 0;
rc = smb2_reconnect(smb2_command, tcon);
if (rc)
return rc;
/* BB eventually switch this to SMB2 specific small buf size */
*request_buf = cifs_small_buf_get();
if (*request_buf == NULL) {
/* BB should we add a ... | 18,146 |
73 | 0 | static long timelib_parse_tz_cor(char **ptr)
{
char *begin = *ptr, *end;
long tmp;
while (isdigit(**ptr) || **ptr == ':') {
++*ptr;
}
end = *ptr;
switch (end - begin) {
case 1:
case 2:
return HOUR(strtol(begin, NULL, 10));
break;
case 3:
case 4:
if (begin[1] == ':') {
tmp = HOUR(strtol(be... | 18,147 |
147,302 | 0 | void V8TestObject::CustomGetterLongAttributeAttributeSetterCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_customGetterLongAttribute_Setter");
v8::Local<v8::Value> v8_value = info[0];
test_object_v8_internal::Cust... | 18,148 |
101,599 | 0 | void Browser::CloseWindow() {
UserMetrics::RecordAction(UserMetricsAction("CloseWindow"));
window_->Close();
}
| 18,149 |
129,607 | 0 | AffineTransform LayoutSVGViewportContainer::viewportTransform() const
{
ASSERT(element());
if (isSVGSVGElement(*element())) {
SVGSVGElement* svg = toSVGSVGElement(element());
return svg->viewBoxToViewTransform(m_viewport.width(), m_viewport.height());
}
return AffineTransform();
}
| 18,150 |
101,232 | 0 | std::string GetUpdatesResponseString(
const sync_pb::GetUpdatesResponse& response) {
std::string output;
output.append("GetUpdatesResponse:\n");
for (int i = 0; i < response.entries_size(); i++) {
output.append(SyncerProtoUtil::SyncEntityDebugString(response.entries(i)));
output.append("\n");
}
re... | 18,151 |
60,721 | 0 | static ssize_t tower_read (struct file *file, char __user *buffer, size_t count, loff_t *ppos)
{
struct lego_usb_tower *dev;
size_t bytes_to_read;
int i;
int retval = 0;
unsigned long timeout = 0;
dev = file->private_data;
/* lock this object */
if (mutex_lock_interruptible(&dev->lock)) {
retval = -ERESTART... | 18,152 |
163,247 | 0 | int will_process_called() { return will_process_called_; }
| 18,153 |
171,640 | 0 | static int calc_audiotime(struct a2dp_config cfg, int bytes)
{
int chan_count = popcount(cfg.channel_flags);
ASSERTC(cfg.format == AUDIO_FORMAT_PCM_16_BIT,
"unsupported sample sz", cfg.format);
return bytes*(1000000/(chan_count*2))/cfg.rate;
}
| 18,154 |
93,835 | 0 | virDomainInterfaceStats(virDomainPtr dom, const char *path,
virDomainInterfaceStatsPtr stats, size_t size)
{
virConnectPtr conn;
virDomainInterfaceStatsStruct stats2 = { -1, -1, -1, -1,
-1, -1, -1, -1 };
VIR_DOMAIN_DEBUG(dom, "path=%s, st... | 18,155 |
83,327 | 0 | void CSoundFile::PortamentoFineMPT(ModChannel* pChn, int param)
{
if(m_PlayState.m_nTickCount == 0)
pChn->nOldFinePortaUpDown = 0;
const int tickParam = static_cast<int>((m_PlayState.m_nTickCount + 1.0) * param / m_PlayState.m_nMusicSpeed);
pChn->m_PortamentoFineSteps += (param >= 0) ? tickParam - pChn->nOldFine... | 18,156 |
180,886 | 1 | construct_command_line(struct manager_ctx *manager, struct server *server)
{
static char cmd[BUF_SIZE];
char *method = manager->method;
int i;
build_config(working_dir, server);
if (server->method) method = server->method;
memset(cmd, 0, BUF_SIZE);
snprintf(cmd, BUF_SIZE,
"%s -m %s --manager-... | 18,157 |
43,179 | 0 | static void oz_hcd_complete_set_config(struct oz_port *port, struct urb *urb,
u8 rcode, u8 config_num)
{
int rc = 0;
struct usb_hcd *hcd = port->ozhcd->hcd;
if (rcode == 0) {
port->config_num = config_num;
oz_clean_endpoints_for_config(hcd, port);
if (oz_build_endpoints_for_config(hcd, port,
&urb->dev->c... | 18,158 |
76,878 | 0 | encode_POP_QUEUE(const struct ofpact_null *null OVS_UNUSED,
enum ofp_version ofp_version OVS_UNUSED, struct ofpbuf *out)
{
put_NXAST_POP_QUEUE(out);
}
| 18,159 |
149,906 | 0 | bool LayerTreeHostImpl::CanDraw() const {
if (!compositor_frame_sink_) {
TRACE_EVENT_INSTANT0("cc",
"LayerTreeHostImpl::CanDraw no CompositorFrameSink",
TRACE_EVENT_SCOPE_THREAD);
return false;
}
if (active_tree_->LayerListIsEmpty()) {
TRACE_EVENT_IN... | 18,160 |
55,338 | 0 | static int atl2_set_mac(struct net_device *netdev, void *p)
{
struct atl2_adapter *adapter = netdev_priv(netdev);
struct sockaddr *addr = p;
if (!is_valid_ether_addr(addr->sa_data))
return -EADDRNOTAVAIL;
if (netif_running(netdev))
return -EBUSY;
memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
m... | 18,161 |
28,106 | 0 | av_cold void avpriv_dsputil_init(DSPContext *c, AVCodecContext *avctx)
{
ff_dsputil_init(c, avctx);
}
| 18,162 |
178,054 | 1 | apprentice_load(struct magic_set *ms, const char *fn, int action)
{
int errs = 0;
uint32_t i, j;
size_t files = 0, maxfiles = 0;
char **filearr = NULL;
struct stat st;
struct magic_map *map;
struct magic_entry_set mset[MAGIC_SETS];
php_stream *dir;
php_stream_dirent d;
TSRMLS_FETCH();
memset(mset, 0, sizeof(mset));
m... | 18,163 |
27,486 | 0 | static int ipgre_fill_info(struct sk_buff *skb, const struct net_device *dev)
{
struct ip_tunnel *t = netdev_priv(dev);
struct ip_tunnel_parm *p = &t->parms;
NLA_PUT_U32(skb, IFLA_GRE_LINK, p->link);
NLA_PUT_BE16(skb, IFLA_GRE_IFLAGS, p->i_flags);
NLA_PUT_BE16(skb, IFLA_GRE_OFLAGS, p->o_flags);
NLA_PUT_BE32(skb,... | 18,164 |
70,406 | 0 | static jpc_dec_cp_t *jpc_dec_cp_create(uint_fast16_t numcomps)
{
jpc_dec_cp_t *cp;
jpc_dec_ccp_t *ccp;
int compno;
if (!(cp = jas_malloc(sizeof(jpc_dec_cp_t)))) {
return 0;
}
cp->flags = 0;
cp->numcomps = numcomps;
cp->prgord = 0;
cp->numlyrs = 0;
cp->mctid = 0;
cp->csty = 0;
if (!(cp->ccps = jas_alloc2(... | 18,165 |
91,559 | 0 | static int kvm_dev_ioctl_create_vm(unsigned long type)
{
int r;
struct kvm *kvm;
struct file *file;
kvm = kvm_create_vm(type);
if (IS_ERR(kvm))
return PTR_ERR(kvm);
#ifdef CONFIG_KVM_MMIO
r = kvm_coalesced_mmio_init(kvm);
if (r < 0)
goto put_kvm;
#endif
r = get_unused_fd_flags(O_CLOEXEC);
if (r < 0)
got... | 18,166 |
43,642 | 0 | struct file *do_file_open_root(struct dentry *dentry, struct vfsmount *mnt,
const char *name, const struct open_flags *op)
{
struct nameidata nd;
struct file *file;
struct filename *filename;
int flags = op->lookup_flags | LOOKUP_ROOT;
nd.root.mnt = mnt;
nd.root.dentry = dentry;
if (d_is_symlink(dentry) && o... | 18,167 |
174,678 | 0 | WORD32 ih264d_do_mmco_buffer(dpb_commands_t *ps_dpb_cmds,
dpb_manager_t *ps_dpb_mgr,
UWORD8 u1_numRef_frames_for_seq, /*!< num_ref_frames from active SeqParSet*/
UWORD32 u4_cur_pic_num,
UWORD32 u2_u4_max_pic_num_minus1,
... | 18,168 |
36,621 | 0 | static bool setup_stratum_socket(struct pool *pool)
{
struct addrinfo servinfobase, *servinfo, *hints, *p;
char *sockaddr_url, *sockaddr_port;
int sockd;
int ret;
mutex_lock(&pool->stratum_lock);
pool->stratum_active = false;
if (pool->sock) {
/* FIXME: change to LOG_DEBUG if issue #88 resolved */
applog(LO... | 18,169 |
58,565 | 0 | static int transport_read_nonblocking(rdpTransport* transport)
{
int status;
status = transport_read(transport, transport->ReceiveBuffer);
if (status <= 0)
return status;
Stream_Seek(transport->ReceiveBuffer, status);
return status;
}
| 18,170 |
41,061 | 0 | static int encrypt_and_sign_nss_2_2 (
struct crypto_instance *instance,
const unsigned char *buf_in,
const size_t buf_in_len,
unsigned char *buf_out,
size_t *buf_out_len)
{
if (encrypt_nss(instance,
buf_in, buf_in_len,
buf_out + sizeof(struct crypto_config_header), buf_out_len) < 0) {
return -1;
}
*buf... | 18,171 |
27,992 | 0 | static void decode_refpass(Jpeg2000T1Context *t1, int width, int height,
int bpno)
{
int phalf, nhalf;
int y0, x, y;
phalf = 1 << (bpno - 1);
nhalf = -phalf;
for (y0 = 0; y0 < height; y0 += 4)
for (x = 0; x < width; x++)
for (y = y0; y < height && y <... | 18,172 |
42,772 | 0 | static int vmx_update_pi_irte(struct kvm *kvm, unsigned int host_irq,
uint32_t guest_irq, bool set)
{
struct kvm_kernel_irq_routing_entry *e;
struct kvm_irq_routing_table *irq_rt;
struct kvm_lapic_irq irq;
struct kvm_vcpu *vcpu;
struct vcpu_data vcpu_info;
int idx, ret = -EINVAL;
if (!kvm_arch_has_assi... | 18,173 |
116,414 | 0 | ChromeContentRendererClient::~ChromeContentRendererClient() {
}
| 18,174 |
95,490 | 0 | void Com_TouchMemory( void ) {
int start, end;
int i, j;
int sum;
memblock_t *block;
Z_CheckHeap();
start = Sys_Milliseconds();
sum = 0;
j = hunk_low.permanent >> 2;
for ( i = 0 ; i < j ; i+=64 ) { // only need to touch each page
sum += ((int *)s_hunkData)[i];
}
i = ( s_hunkTotal - hunk_high.perm... | 18,175 |
90,751 | 0 | static int read_quant_matrix_ext(MpegEncContext *s, GetBitContext *gb)
{
int i, j, v;
if (get_bits1(gb)) {
if (get_bits_left(gb) < 64*8)
return AVERROR_INVALIDDATA;
/* intra_quantiser_matrix */
for (i = 0; i < 64; i++) {
v = get_bits(gb, 8);
j = s->id... | 18,176 |
41,023 | 0 | cmsBool OptimizeByResampling(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
{
cmsPipeline* Src = NULL;
cmsPipeline* Dest = NULL;
cmsStage* mpe;
cmsStage* CLUT;
cmsStage *KeepPreLin = NULL, *KeepPostLin = NULL;
int... | 18,177 |
116,689 | 0 | void RenderViewImpl::exitFullscreen() {
exitFullScreen();
}
| 18,178 |
52,724 | 0 | static void snd_timer_user_copy_id(struct snd_timer_id *id, struct snd_timer *timer)
{
id->dev_class = timer->tmr_class;
id->dev_sclass = SNDRV_TIMER_SCLASS_NONE;
id->card = timer->card ? timer->card->number : -1;
id->device = timer->tmr_device;
id->subdevice = timer->tmr_subdevice;
}
| 18,179 |
106,835 | 0 | LayoutUnit RenderBox::computeBorderBoxLogicalHeight(LayoutUnit height) const
{
LayoutUnit bordersPlusPadding = borderAndPaddingLogicalHeight();
if (style()->boxSizing() == CONTENT_BOX)
return height + bordersPlusPadding;
return max(height, bordersPlusPadding);
}
| 18,180 |
96,804 | 0 | static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe,
size_t len, unsigned int flags)
{
int total, ret;
int page_nr = 0;
struct pipe_buffer *bufs;
struct fuse_copy_state cs;
struct fuse_dev *fud = fuse_get_dev(in);
if (!fud)
return -EPERM;
bufs = kvm... | 18,181 |
66,356 | 0 | static AddressParts gen_lea_modrm_0(CPUX86State *env, DisasContext *s,
int modrm)
{
int def_seg, base, index, scale, mod, rm;
target_long disp;
bool havesib;
def_seg = R_DS;
index = -1;
scale = 0;
disp = 0;
mod = (modrm >> 6) & 3;
rm = modrm & 7;... | 18,182 |
40,056 | 0 | int kvm_dev_ioctl_check_extension(long ext)
{
int r;
switch (ext) {
case KVM_CAP_IRQCHIP:
case KVM_CAP_HLT:
case KVM_CAP_MMU_SHADOW_CACHE_CONTROL:
case KVM_CAP_SET_TSS_ADDR:
case KVM_CAP_EXT_CPUID:
case KVM_CAP_EXT_EMUL_CPUID:
case KVM_CAP_CLOCKSOURCE:
case KVM_CAP_PIT:
case KVM_CAP_NOP_IO_DELAY:
case KVM_... | 18,183 |
102,932 | 0 | void DefaultTabHandler::TabDetachedAt(TabContentsWrapper* contents, int index) {
delegate_->AsBrowser()->TabDetachedAt(contents, index);
}
| 18,184 |
6,633 | 0 | static int zgetfilename(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
uint fnlen;
gs_const_string pfname;
stream *s;
byte *sbody;
int code;
check_ostack(1);
check_read_type(*op, t_file);
s = (op)->value.pfile;
code = sfilename(s, &pfname);
if (code < 0) {
pfname.size = 0;
... | 18,185 |
90,054 | 0 | static U32 ZSTD_equivalentCParams(ZSTD_compressionParameters cParams1,
ZSTD_compressionParameters cParams2)
{
return (cParams1.hashLog == cParams2.hashLog)
& (cParams1.chainLog == cParams2.chainLog)
& (cParams1.strategy == cParams2.strategy) /* opt parser space... | 18,186 |
77,730 | 0 | parse_oxms(struct ofpbuf *payload, bool loose,
struct mf_bitmap *exactp, struct mf_bitmap *maskedp)
{
struct mf_bitmap exact = MF_BITMAP_INITIALIZER;
struct mf_bitmap masked = MF_BITMAP_INITIALIZER;
while (payload->size > 0) {
const struct mf_field *field;
enum ofperr error;
... | 18,187 |
59,191 | 0 | static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env,
struct bpf_insn *insn,
const struct bpf_reg_state *ptr_reg,
const struct bpf_reg_state *off_reg)
{
struct bpf_reg_state *regs = cur_regs(env), *dst_reg;
bool known = tnum_is_const(off_reg->var_off);
s64 smin_val = off_reg->smin_val... | 18,188 |
92,763 | 0 | static void update_numa_stats(struct numa_stats *ns, int nid)
{
int cpu;
memset(ns, 0, sizeof(*ns));
for_each_cpu(cpu, cpumask_of_node(nid)) {
struct rq *rq = cpu_rq(cpu);
ns->load += weighted_cpuload(rq);
ns->compute_capacity += capacity_of(cpu);
}
}
| 18,189 |
75,423 | 0 | static int opfxch(RAsm *a, ut8 *data, const Opcode *op) {
int l = 0;
switch (op->operands_count) {
case 0:
data[l++] = 0xd9;
data[l++] = 0xc9;
break;
case 1:
if (op->operands[0].type & OT_FPUREG & ~OT_REGALL) {
data[l++] = 0xd9;
data[l++] = 0xc8 | op->operands[0].reg;
} else {
return -1;
}
br... | 18,190 |
15,656 | 0 | static void tsc210x_write(TSC210xState *s, uint16_t value)
{
/*
* This is a two-state state machine for reading
* command and data every second time.
*/
if (!s->state) {
s->command = value >> 15;
s->page = (value >> 11) & 0x0f;
s->offset = (value >> 5) & 0x3f;
s->s... | 18,191 |
54,802 | 0 | static void snd_usbmidi_raw_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
snd_usbmidi_input_data(ep, 0, buffer, buffer_length);
}
| 18,192 |
185,370 | 1 | bool LayoutSVGTransformableContainer::calculateLocalTransform()
{
SVGGraphicsElement* element = toSVGGraphicsElement(this->element());
ASSERT(element);
// If we're either the layoutObject for a <use> element, or for any <g> element inside the shadow
// tree, that was created during the use/symbol/svg expansion in SVGU... | 18,193 |
160,472 | 0 | void RenderFrameHostImpl::OnShowPopup(
const FrameHostMsg_ShowPopup_Params& params) {
RenderViewHostDelegateView* view =
render_view_host_->delegate_->GetDelegateView();
if (view) {
gfx::Point original_point(params.bounds.x(), params.bounds.y());
gfx::Point transformed_point =
static_cas... | 18,194 |
96,515 | 0 | static int AppLayerProtoDetectTest04(void)
{
AppLayerProtoDetectUnittestCtxBackup();
AppLayerProtoDetectSetup();
uint8_t l7data[] = "HTTP/1.1 200 OK\r\nServer: Apache/1.0\r\n\r\n";
const char *buf;
int r = 0;
Flow f;
AppProto pm_results[ALPROTO_MAX];
AppLayerProtoDetectThreadCtx *alpd_t... | 18,195 |
32,381 | 0 | static inline void mnt_dec_writers(struct mount *mnt)
{
#ifdef CONFIG_SMP
this_cpu_dec(mnt->mnt_pcp->mnt_writers);
#else
mnt->mnt_writers--;
#endif
}
| 18,196 |
161,987 | 0 | explicit PdfCompositorTestService(const std::string& creator)
: PdfCompositorService(creator) {}
| 18,197 |
93,212 | 0 | METHODDEF(JDIMENSION)
get_text_rgb_cmyk_row(j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
/* This version is for reading text-format PPM files with any maxval and
converting to CMYK */
{
ppm_source_ptr source = (ppm_source_ptr)sinfo;
FILE *infile = source->pub.input_file;
register JSAMPROW ptr;
register JSAM... | 18,198 |
79,492 | 0 | static int get_description(struct NntpData *nntp_data, char *wildmat, char *msg)
{
char buf[STRING];
char *cmd = NULL;
/* get newsgroup description, if possible */
struct NntpServer *nserv = nntp_data->nserv;
if (!wildmat)
wildmat = nntp_data->group;
if (nserv->hasLIST_NEWSGROUPS)
cmd = "LIST NEWSG... | 18,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.