unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
6,407 | 0 | static gboolean on_server_socket_event(GIOChannel* ioc, GIOCondition cond, gpointer user_data)
{
SingleInstData* data = user_data;
if ( cond & (G_IO_IN|G_IO_PRI) )
{
int client_sock = accept(g_io_channel_unix_get_fd(ioc), NULL, 0);
if(client_sock != -1)
{
SingleInstClien... | 11,100 |
12,646 | 0 | eval_expr(uschar **sptr, BOOL decimal, uschar **error, BOOL endket)
{
uschar *s = *sptr;
int_eximarith_t x = eval_op_or(&s, decimal, error);
if (*error == NULL)
{
if (endket)
{
if (*s != ')')
*error = US"expecting closing parenthesis";
else
while (isspace(*(++s)));
}
else if (*s != 0) ... | 11,101 |
60,478 | 0 | R_API void r_flag_item_free(RFlagItem *item) {
if (item) {
free (item->color);
free (item->comment);
free (item->alias);
/* release only one of the two pointers if they are the same */
if (item->name != item->realname) {
free (item->name);
}
free (item->realname);
free (item);
}
}
| 11,102 |
51,728 | 0 | wv_integer_from_opaque(tvbuff_t *tvb, guint32 offset, guint32 data_len)
{
char *str;
switch (data_len) {
case 1:
str = wmem_strdup_printf(wmem_packet_scope(), "WV-CSP Integer: %d",
tvb_get_guint8(tvb, offset));
break;
case 2:
str = wmem_strdup_printf(wmem_packet_scope(), "WV-CSP Integer: %d",
... | 11,103 |
84,580 | 0 | do_internal(char *action, char *data)
{
int i;
for (i = 0; internal_action[i].action; i++) {
if (strcasecmp(internal_action[i].action, action) == 0) {
if (internal_action[i].rout)
internal_action[i].rout(cgistr2tagarg(data));
return;
}
}
}
| 11,104 |
71,797 | 0 | ModuleExport size_t RegisterWEBPImage(void)
{
char
version[MaxTextExtent];
MagickInfo
*entry;
*version='\0';
entry=SetMagickInfo("WEBP");
#if defined(MAGICKCORE_WEBP_DELEGATE)
entry->decoder=(DecodeImageHandler *) ReadWEBPImage;
entry->encoder=(EncodeImageHandler *) WriteWEBPImage;
(void) Format... | 11,105 |
88,461 | 0 | static MagickBooleanType GetTIFFInfo(const ImageInfo *image_info,TIFF *tiff,
TIFFInfo *tiff_info)
{
const char
*option;
MagickStatusType
flags;
uint32
tile_columns,
tile_rows;
assert(tiff_info != (TIFFInfo *) NULL);
(void) memset(tiff_info,0,sizeof(*tiff_info));
option=GetImageOption(im... | 11,106 |
153,005 | 0 | int PDFiumEngine::Form_SetTimer(FPDF_FORMFILLINFO* param,
int elapse,
TimerCallback timer_func) {
PDFiumEngine* engine = static_cast<PDFiumEngine*>(param);
engine->timers_[++engine->next_timer_id_] =
std::pair<int, TimerCallback>(elapse, timer_fu... | 11,107 |
116,086 | 0 | void SyncManager::SyncInternal::HandleCalculateChangesChangeEventFromSyncApi(
const ImmutableWriteTransactionInfo& write_transaction_info,
syncable::BaseTransaction* trans) {
if (!scheduler()) {
return;
}
LOG_IF(WARNING, !ChangeBuffersAreEmpty()) <<
"CALCULATE_CHANGES called with unapplied old ... | 11,108 |
182,402 | 1 | int wasm_dis(WasmOp *op, const unsigned char *buf, int buf_len) {
op->len = 1;
op->op = buf[0];
if (op->op > 0xbf) {
return 1;
}
// add support for extension opcodes (SIMD + atomics)
WasmOpDef *opdef = &opcodes[op->op];
switch (op->op) {
case WASM_OP_TRAP:
case WASM_OP_NOP:
case WASM_OP_ELSE:
case WASM_OP_RETURN:
case ... | 11,109 |
38,521 | 0 | static int cma_save_net_info(struct rdma_cm_id *id, struct rdma_cm_id *listen_id,
struct ib_cm_event *ib_event)
{
struct cma_hdr *hdr;
if ((listen_id->route.addr.src_addr.ss_family == AF_IB) &&
(ib_event->event == IB_CM_REQ_RECEIVED)) {
cma_save_ib_info(id, listen_id, ib_event->param.req_rcvd.primary_... | 11,110 |
181,540 | 1 | static int sctp_wait_for_sndbuf(struct sctp_association *asoc, long *timeo_p,
size_t msg_len)
{
struct sock *sk = asoc->base.sk;
int err = 0;
long current_timeo = *timeo_p;
DEFINE_WAIT(wait);
pr_debug("%s: asoc:%p, timeo:%ld, msg_len:%zu\n", __func__, asoc,
*timeo_p, msg_len);
/* Increment the association's refcnt. ... | 11,111 |
29,652 | 0 | static void sctp_v6_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr)
{
seq_printf(seq, "%pI6 ", &addr->v6.sin6_addr);
}
| 11,112 |
171,543 | 0 | OMX_ERRORTYPE SimpleSoftOMXComponent::useBuffer(
OMX_BUFFERHEADERTYPE **header,
OMX_U32 portIndex,
OMX_PTR appPrivate,
OMX_U32 size,
OMX_U8 *ptr) {
Mutex::Autolock autoLock(mLock);
CHECK_LT(portIndex, mPorts.size());
*header = new OMX_BUFFERHEADERTYPE;
(*header)->nSize = ... | 11,113 |
29,531 | 0 | SYSCALL_DEFINE3(semop, int, semid, struct sembuf __user *, tsops,
unsigned, nsops)
{
return sys_semtimedop(semid, tsops, nsops, NULL);
}
| 11,114 |
122,456 | 0 | void HTMLTextAreaElement::subtreeHasChanged()
{
setChangedSinceLastFormControlChangeEvent(true);
setFormControlValueMatchesRenderer(false);
setNeedsValidityCheck();
if (!focused())
return;
calculateAndAdjustDirectionality();
}
| 11,115 |
20,738 | 0 | int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
{
struct i387_fxsave_struct *fxsave =
&vcpu->arch.guest_fpu.state->fxsave;
memcpy(fxsave->st_space, fpu->fpr, 128);
fxsave->cwd = fpu->fcw;
fxsave->swd = fpu->fsw;
fxsave->twd = fpu->ftwx;
fxsave->fop = fpu->last_opcode;
fxsave->rip ... | 11,116 |
27,171 | 0 | static gboolean rpc_event_dispatch(GSource *source, GSourceFunc callback, gpointer connection)
{
return rpc_dispatch(connection) != RPC_ERROR_CONNECTION_CLOSED;
}
| 11,117 |
74,867 | 0 | static int asf_read_ext_content(AVFormatContext *s, const GUIDParseTable *g)
{
ASFContext *asf = s->priv_data;
AVIOContext *pb = s->pb;
uint64_t size = avio_rl64(pb);
uint16_t nb_desc = avio_rl16(pb);
int i, ret;
for (i = 0; i < nb_desc; i++) {
uint16_t name_len, type, val_len;
... | 11,118 |
50,988 | 0 | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table,
int write, void __user *buffer,
size_t *lenp, loff_t *ppos,
int (*conv)(bool *negp, unsigned long *lvalp, int *valp,
int write, void *data),
void *data)
{
int *i, vleft, first = 1, err = 0;
size_t left;
char *kbuf = NULL,... | 11,119 |
65,615 | 0 | nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
struct nfsd4_open_confirm *oc)
{
__be32 status;
struct nfs4_openowner *oo;
struct nfs4_ol_stateid *stp;
struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
dprintk("NFSD: nfsd4_open_confirm on file %pd\n",
cstate->... | 11,120 |
20 | 0 | static int samldb_prim_group_tester(struct samldb_ctx *ac, uint32_t rid)
{
struct ldb_context *ldb = ldb_module_get_ctx(ac->module);
struct dom_sid *sid;
struct ldb_result *res;
int ret;
const char * const noattrs[] = { NULL };
sid = dom_sid_add_rid(ac, samdb_domain_sid(ldb), rid);
if (sid == NULL) {
return l... | 11,121 |
112,789 | 0 | void PrintPreviewUI::OnFileSelectionCancelled() {
web_ui()->CallJavascriptFunction("fileSelectionCancelled");
}
| 11,122 |
48,594 | 0 | static int vfio_pci_open(void *device_data)
{
struct vfio_pci_device *vdev = device_data;
int ret = 0;
if (!try_module_get(THIS_MODULE))
return -ENODEV;
mutex_lock(&driver_lock);
if (!vdev->refcnt) {
ret = vfio_pci_enable(vdev);
if (ret)
goto error;
vfio_spapr_pci_eeh_open(vdev->pdev);
}
vdev->ref... | 11,123 |
187,754 | 1 | get_control(png_const_structrp png_ptr)
{
/* This just returns the (file*). The chunk and idat control structures
* don't always exist.
*/
struct control *control = png_voidcast(struct control*,
png_get_error_ptr(png_ptr));
return &control->file;
}
| 11,124 |
54,263 | 0 | static void mct_u232_read_int_callback(struct urb *urb)
{
struct usb_serial_port *port = urb->context;
struct mct_u232_private *priv = usb_get_serial_port_data(port);
unsigned char *data = urb->transfer_buffer;
int retval;
int status = urb->status;
unsigned long flags;
switch (status) {
case 0:
/* success */... | 11,125 |
126,623 | 0 | WebContents* TabStripModel::GetActiveWebContents() const {
return GetWebContentsAt(active_index());
}
| 11,126 |
102,743 | 0 | CompositorMockWebGraphicsContext3D() { }
| 11,127 |
40,766 | 0 | static int compat_x25_subscr_ioctl(unsigned int cmd,
struct compat_x25_subscrip_struct __user *x25_subscr32)
{
struct compat_x25_subscrip_struct x25_subscr;
struct x25_neigh *nb;
struct net_device *dev;
int rc = -EINVAL;
rc = -EFAULT;
if (copy_from_user(&x25_subscr, x25_subscr32, sizeof(*x25_subscr32)))
goto... | 11,128 |
161,744 | 0 | PlatformSensorAmbientLightMac::GetDefaultConfiguration() {
PlatformSensorConfiguration default_configuration;
default_configuration.set_frequency(
SensorTraits<SensorType::AMBIENT_LIGHT>::kDefaultFrequency);
return default_configuration;
}
| 11,129 |
187,957 | 1 | int Reverb_command(effect_handle_t self,
uint32_t cmdCode,
uint32_t cmdSize,
void *pCmdData,
uint32_t *replySize,
void *pReplyData){
android::ReverbContext * pContext = (android::ReverbContext *) self;
int retsize;
LVREV_ControlParams_st ActiveParams; /* Current control Parameter... | 11,130 |
46,565 | 0 | int expread(off_t a, char *buf, size_t len, CLIENT *client) {
off_t rdlen, offset;
off_t mapcnt, mapl, maph, pagestart;
if (!(client->server->flags & F_COPYONWRITE))
return(rawexpread_fully(a, buf, len, client));
DEBUG("Asked to read %u bytes at %llu.\n", (unsigned int)len, (unsigned long long)a);
mapl=a/DIFFP... | 11,131 |
88,669 | 0 | static void dwc3_gadget_hibernation_interrupt(struct dwc3 *dwc,
unsigned int evtinfo)
{
unsigned int is_ss = evtinfo & BIT(4);
/*
* WORKAROUND: DWC3 revison 2.20a with hibernation support
* have a known issue which can cause USB CV TD.9.23 to fail
* randomly.
*
* Because of this issue, core could generat... | 11,132 |
79,174 | 0 | static TcpStateQueue *StreamTcp3whsFindSynAckBySynAck(TcpSession *ssn, Packet *p)
{
TcpStateQueue *q = ssn->queue;
TcpStateQueue search;
StreamTcp3whsSynAckToStateQueue(p, &search);
while (q != NULL) {
if (search.flags == q->flags &&
search.wscale == q->wscale &&
search... | 11,133 |
48,426 | 0 | Strfgets(FILE * f)
{
Str s = Strnew();
int c;
while ((c = fgetc(f)) != EOF) {
Strcat_char(s, c);
if (c == '\n')
break;
}
return s;
}
| 11,134 |
43,068 | 0 | static int vhost_scsi_check_false(struct se_portal_group *se_tpg)
{
return 0;
}
| 11,135 |
37,485 | 0 | void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask,
u64 dirty_mask, u64 nx_mask, u64 x_mask)
{
shadow_user_mask = user_mask;
shadow_accessed_mask = accessed_mask;
shadow_dirty_mask = dirty_mask;
shadow_nx_mask = nx_mask;
shadow_x_mask = x_mask;
}
| 11,136 |
61,334 | 0 | static av_cold int flat_init(WriterContext *wctx)
{
FlatContext *flat = wctx->priv;
if (strlen(flat->sep_str) != 1) {
av_log(wctx, AV_LOG_ERROR, "Item separator '%s' specified, but must contain a single character\n",
flat->sep_str);
return AVERROR(EINVAL);
}
flat->sep = f... | 11,137 |
134,010 | 0 | extensions::AppSorting* GetAppSorting(Profile* profile) {
return extensions::ExtensionPrefs::Get(profile)->app_sorting();
}
| 11,138 |
100,385 | 0 | void BrowserRenderProcessHost::OnMessageReceived(const IPC::Message& msg) {
mark_child_process_activity_time();
if (msg.routing_id() == MSG_ROUTING_CONTROL) {
bool msg_is_ok = true;
IPC_BEGIN_MESSAGE_MAP_EX(BrowserRenderProcessHost, msg, msg_is_ok)
IPC_MESSAGE_HANDLER(ViewHostMsg_PageContents, OnPageC... | 11,139 |
37,616 | 0 | static void enter_pmode(struct kvm_vcpu *vcpu)
{
unsigned long flags;
struct vcpu_vmx *vmx = to_vmx(vcpu);
/*
* Update real mode segment cache. It may be not up-to-date if sement
* register was written while vcpu was in a guest mode.
*/
vmx_get_segment(vcpu, &vmx->rmode.segs[VCPU_SREG_ES], VCPU_SREG_ES);
vm... | 11,140 |
103,647 | 0 | SkBitmap* ChromeContentRendererClient::GetSadPluginBitmap() {
return ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_SAD_PLUGIN);
}
| 11,141 |
2,309 | 0 | _PUBLIC_ bool strequal_m(const char *s1, const char *s2)
{
return strcasecmp_m(s1,s2) == 0;
}
| 11,142 |
49,379 | 0 | int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u32 portid,
int flags)
{
return netlink_unicast(net->nfnl, skb, portid, flags);
}
| 11,143 |
160,353 | 0 | int FreeList::bucketIndexForSize(size_t size) {
ASSERT(size > 0);
int index = -1;
while (size) {
size >>= 1;
index++;
}
return index;
}
| 11,144 |
111,565 | 0 | static JSValueRef zoomPageOutCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
notImplemented();
return JSValueMakeUndefined(context);
}
| 11,145 |
76,939 | 0 | format_PUSH_VLAN(const struct ofpact_null *a OVS_UNUSED, struct ds *s)
{
/* XXX 802.1AD case*/
ds_put_format(s, "%spush_vlan:%s%#"PRIx16,
colors.param, colors.end, ETH_TYPE_VLAN_8021Q);
}
| 11,146 |
27,639 | 0 | int tpm_pm_suspend(struct device *dev, pm_message_t pm_state)
{
struct tpm_chip *chip = dev_get_drvdata(dev);
struct tpm_cmd_t cmd;
int rc;
u8 dummy_hash[TPM_DIGEST_SIZE] = { 0 };
if (chip == NULL)
return -ENODEV;
/* for buggy tpm, flush pcrs with extend to selected dummy */
if (tpm_suspend_pcr) {
cmd.hea... | 11,147 |
119,201 | 0 | void XMLHttpRequest::send(ExceptionState& es)
{
send(String(), es);
}
| 11,148 |
108,330 | 0 | unsigned long long Timing::loadEventEnd() const
{
DocumentLoadTiming* timing = documentLoadTiming();
if (!timing)
return 0;
return toIntegerMilliseconds(timing->loadEventEnd);
}
| 11,149 |
38,571 | 0 | static void cleanup_single_sta(struct sta_info *sta)
{
int ac, i;
struct tid_ampdu_tx *tid_tx;
struct ieee80211_sub_if_data *sdata = sta->sdata;
struct ieee80211_local *local = sdata->local;
struct ps_data *ps;
if (test_sta_flag(sta, WLAN_STA_PS_STA)) {
if (sta->sdata->vif.type == NL80211_IFTYPE_AP ||
st... | 11,150 |
62,378 | 0 | bittok2str_nosep(register const struct tok *lp, register const char *fmt,
register u_int v)
{
return (bittok2str_internal(lp, fmt, v, ""));
}
| 11,151 |
124,487 | 0 | void RenderBlock::adjustForColumns(LayoutSize& offset, const LayoutPoint& point) const
{
if (!hasColumns())
return;
ColumnInfo* colInfo = columnInfo();
LayoutUnit logicalLeft = logicalLeftOffsetForContent();
unsigned colCount = columnCount(colInfo);
LayoutUnit colLogicalWidth = colInfo->de... | 11,152 |
84,108 | 0 | void _multi_string_copy_to_wide( SQLWCHAR *out, LPCSTR in, int len )
{
while ( len > 0 && ( in[ 0 ] || in[ 1 ] ))
{
*out = *in;
out++;
in++;
len --;
}
*out++ = 0;
*out++ = 0;
}
| 11,153 |
187,532 | 1 | void CameraSource::signalBufferReturned(MediaBuffer *buffer) {
ALOGV("signalBufferReturned: %p", buffer->data());
Mutex::Autolock autoLock(mLock);
for (List<sp<IMemory> >::iterator it = mFramesBeingEncoded.begin();
it != mFramesBeingEncoded.end(); ++it) {
if ((*it)->pointer() == buffer->d... | 11,154 |
119,405 | 0 | MemoryObserver() {}
| 11,155 |
45,961 | 0 | file_mbswidth(const char *s)
{
#if defined(HAVE_WCHAR_H) && defined(HAVE_MBRTOWC) && defined(HAVE_WCWIDTH)
size_t bytesconsumed, old_n, n, width = 0;
mbstate_t state;
wchar_t nextchar;
(void)memset(&state, 0, sizeof(mbstate_t));
old_n = n = strlen(s);
while (n > 0) {
bytesconsumed = mbrtowc(&nextchar, s, n, &s... | 11,156 |
25,633 | 0 | void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
unsigned long end)
{
unsigned long flags;
unsigned long long match, pteh=0, pteh_epn, pteh_low;
unsigned long tlb;
unsigned int cpu = smp_processor_id();
struct mm_struct *mm;
mm = vma->vm_mm;
if (cpu_context(cpu, mm) == NO_CONTEX... | 11,157 |
165,695 | 0 | std::vector<StringType> TokenizeStringT(
const StringType& str,
typename StringType::value_type delimiter,
bool trim_spaces) {
std::vector<StringType> tokens;
std::basic_istringstream<typename StringType::value_type> buffer(str);
for (StringType token; std::getline(buffer, token, delimiter);) {
if... | 11,158 |
62,956 | 0 | static void fix_rmode_seg(int seg, struct kvm_segment *save)
{
const struct kvm_vmx_segment_field *sf = &kvm_vmx_segment_fields[seg];
struct kvm_segment var = *save;
var.dpl = 0x3;
if (seg == VCPU_SREG_CS)
var.type = 0x3;
if (!emulate_invalid_guest_state) {
var.selector = var.base >> 4;
var.base = var.base... | 11,159 |
94,528 | 0 | static struct l2cap_chan *l2cap_sock_new_connection_cb(struct l2cap_chan *chan)
{
struct sock *sk, *parent = chan->data;
/* Check for backlog size */
if (sk_acceptq_is_full(parent)) {
BT_DBG("backlog full %d", parent->sk_ack_backlog);
return NULL;
}
sk = l2cap_sock_alloc(sock_net(parent), NULL, BTPROTO_L2CAP... | 11,160 |
25,522 | 0 | static void pfault_interrupt(unsigned int ext_int_code,
unsigned int param32, unsigned long param64)
{
struct task_struct *tsk;
__u16 subcode;
pid_t pid;
/*
* Get the external interruption subcode & pfault
* initial/completion signal bit. VM stores this
* in the 'cpu address' field associated with t... | 11,161 |
26,354 | 0 | unsigned long long task_sched_runtime(struct task_struct *p)
{
unsigned long flags;
struct rq *rq;
u64 ns = 0;
rq = task_rq_lock(p, &flags);
ns = p->se.sum_exec_runtime + do_task_delta_exec(p, rq);
task_rq_unlock(rq, p, &flags);
return ns;
}
| 11,162 |
179,636 | 1 | DecodeNumberField(int len, char *str, int fmask,
int *tmask, struct tm * tm, fsec_t *fsec, int *is2digits)
{
char *cp;
/*
* Have a decimal point? Then this is a date or something with a seconds
* field...
*/
if ((cp = strchr(str, '.')) != NULL)
{
#ifdef HAVE_INT64_TIMESTAMP
char fstr[MAXDATELEN + 1];
/*
* OK, w... | 11,163 |
1,982 | 0 | SPICE_GNUC_VISIBLE void spice_server_set_name(SpiceServer *s, const char *name)
{
free(spice_name);
spice_name = spice_strdup(name);
}
| 11,164 |
34,824 | 0 | static int buildid_dir_command_config(const char *var, const char *value,
void *data)
{
struct buildid_dir_config *c = data;
const char *v;
/* same dir for all commands */
if (!prefixcmp(var, "buildid.") && !strcmp(var + 8, "dir")) {
v = perf_config_dirname(var, value);
if (!v)
return -1;
strncp... | 11,165 |
173,613 | 0 | void NuPlayer::GenericSource::setDrmPlaybackStatusIfNeeded(int playbackStatus, int64_t position) {
if (mDecryptHandle != NULL) {
mDrmManagerClient->setPlaybackStatus(mDecryptHandle, playbackStatus, position);
}
mSubtitleTrack.mPackets = new AnotherPacketSource(NULL);
mTimedTextTrack.mPackets = new Ano... | 11,166 |
23,638 | 0 | isdn_net_dial_req(isdn_net_local * lp)
{
/* is there a better error code? */
if (!(ISDN_NET_DIALMODE(*lp) == ISDN_NET_DM_AUTO)) return -EBUSY;
return isdn_net_force_dial_lp(lp);
}
| 11,167 |
65,269 | 0 | __be32 *nfs3svc_decode_fh(__be32 *p, struct svc_fh *fhp)
{
return decode_fh(p, fhp);
}
| 11,168 |
56,089 | 0 | perf_event_mux_interval_ms_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct pmu *pmu = dev_get_drvdata(dev);
int timer, cpu, ret;
ret = kstrtoint(buf, 0, &timer);
if (ret)
return ret;
if (timer < 1)
return -EINVAL;
/* same value, noting to do */
if... | 11,169 |
69,501 | 0 | static void rxrpc_destroy_s(struct key *key)
{
if (key->payload.data) {
crypto_free_blkcipher(key->payload.data);
key->payload.data = NULL;
}
}
| 11,170 |
93,567 | 0 | static int mif6_delete(struct mr6_table *mrt, int vifi, struct list_head *head)
{
struct mif_device *v;
struct net_device *dev;
struct inet6_dev *in6_dev;
if (vifi < 0 || vifi >= mrt->maxvif)
return -EADDRNOTAVAIL;
v = &mrt->vif6_table[vifi];
write_lock_bh(&mrt_lock);
dev = v->dev;
v->dev = NULL;
if (!de... | 11,171 |
145,776 | 0 | static BrotliResult BROTLI_NOINLINE CopyUncompressedBlockToOutput(
size_t* available_out, uint8_t** next_out, size_t* total_out,
BrotliState* s) {
/* State machine */
for (;;) {
switch (s->substate_uncompressed) {
case BROTLI_STATE_UNCOMPRESSED_NONE: {
int nbytes = (int)BrotliGetRemainingB... | 11,172 |
17,514 | 0 | XineramaXvPutImage(ClientPtr client)
{
REQUEST(xvPutImageReq);
PanoramiXRes *draw, *gc, *port;
Bool isRoot;
int result, i, x, y;
REQUEST_AT_LEAST_SIZE(xvPutImageReq);
result = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client,... | 11,173 |
109,386 | 0 | void InspectorResourceAgent::markResourceAsCached(unsigned long identifier)
{
m_frontend->requestServedFromCache(IdentifiersFactory::requestId(identifier));
}
| 11,174 |
57,051 | 0 | static int _nfs4_proc_destroy_clientid(struct nfs_client *clp,
struct rpc_cred *cred)
{
struct rpc_message msg = {
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_DESTROY_CLIENTID],
.rpc_argp = clp,
.rpc_cred = cred,
};
int status;
status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT);
trace_nfs4_d... | 11,175 |
157,248 | 0 | void WebMediaPlayerImpl::OnBecameVisible() {
needs_first_frame_ = !has_first_frame_;
UpdatePlayState();
}
| 11,176 |
78,585 | 0 | pgp_free_blob(pgp_blob_t *blob)
{
if (blob) {
if (blob->parent) {
pgp_blob_t **p;
/* remove blob from list of parent's children */
for (p = &blob->parent->files; *p != NULL && *p != blob; p = &(*p)->next)
;
if (*p == blob)
*p = blob->next;
}
sc_file_free(blob->file);
if (blob->data)
fr... | 11,177 |
45,267 | 0 | static int udf_CS0toNLS(struct nls_table *nls, struct ustr *utf_o,
const struct ustr *ocu_i)
{
const uint8_t *ocu;
uint8_t cmp_id, ocu_len;
int i, len;
ocu_len = ocu_i->u_len;
if (ocu_len == 0) {
memset(utf_o, 0, sizeof(struct ustr));
return 0;
}
cmp_id = ocu_i->u_cmpID;
if (cmp_id != 8 && cmp_id != 1... | 11,178 |
48,390 | 0 | tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){
tsize_t written=0;
char buffer[256];
int buflen=0;
float X_W=0.0;
float Y_W=0.0;
float Z_W=0.0;
float X_R=0.0;
float Y_R=0.0;
float Z_R=0.0;
float X_G=0.0;
float Y_G=0.0;
float Z_G=0.0;
float X_B=0.0;
float Y_B=0.0;
float Z_B=0.0;
float x_w... | 11,179 |
62,562 | 0 | netanalyzer_transparent_if_print(netdissect_options *ndo,
const struct pcap_pkthdr *h,
const u_char *p)
{
/*
* Fail if we don't have enough data for the Hilscher pseudo-header,
* preamble, and SOF.
*/
if (h->len < 12 || h->caplen < 12) {
ND_PRI... | 11,180 |
17,849 | 0 | static int local_chmod(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *credp)
{
char *dirpath = g_path_get_dirname(fs_path->data);
char *name = g_path_get_basename(fs_path->data);
int ret = -1;
int dirfd;
dirfd = local_opendir_nofollow(fs_ctx, dirpath);
if (dirfd == -1) {
goto out;
}
... | 11,181 |
188,486 | 1 | Chapters::Display::~Display()
{
}
| 11,182 |
13,915 | 0 | void RECORD_LAYER_reset_write_sequence(RECORD_LAYER *rl)
{
memset(rl->write_sequence, 0, sizeof(rl->write_sequence));
}
| 11,183 |
170,304 | 0 | void UsbChooserContext::GetDevice(
const std::string& guid,
device::mojom::UsbDeviceRequest device_request,
device::mojom::UsbDeviceClientPtr device_client) {
EnsureConnectionWithDeviceManager();
device_manager_->GetDevice(guid, std::move(device_request),
std::move(device_cl... | 11,184 |
177,219 | 0 | size_t ACodec::countBuffersOwnedByNativeWindow() const {
size_t n = 0;
for (size_t i = 0; i < mBuffers[kPortIndexOutput].size(); ++i) {
const BufferInfo &info = mBuffers[kPortIndexOutput].itemAt(i);
if (info.mStatus == BufferInfo::OWNED_BY_NATIVE_WINDOW) {
++n;
}
}
return n;
}
| 11,185 |
60,804 | 0 | static void reparent_leader(struct task_struct *father, struct task_struct *p,
struct list_head *dead)
{
if (unlikely(p->exit_state == EXIT_DEAD))
return;
/* We don't want people slaying init. */
p->exit_signal = SIGCHLD;
/* If it has exited notify the new parent about this child's death. */
if (!p->ptrace... | 11,186 |
68,104 | 0 | static bool is_class_idx_in_code_classes(RBinDexObj *bin, int class_idx) {
int i;
for (i = 0; i < bin->header.class_size; i++) {
if (class_idx == bin->classes[i].class_id) {
return true;
}
}
return false;
}
| 11,187 |
183,747 | 1 | CCLayerTreeHostTest()
: m_beginning(false)
, m_endWhenBeginReturns(false)
, m_running(false)
, m_timedOut(false)
{
m_webThread = adoptPtr(webKitPlatformSupport()->createThread("CCLayerTreeHostTest"));
WebCompositor::setThread(m_webThread.get());
#if USE(THREADED_COMPOSITING)
m_settings.enableCompositorT... | 11,188 |
43,031 | 0 | static bool is_ereg(u32 reg)
{
return (1 << reg) & (BIT(BPF_REG_5) |
BIT(AUX_REG) |
BIT(BPF_REG_7) |
BIT(BPF_REG_8) |
BIT(BPF_REG_9));
}
| 11,189 |
40,225 | 0 | int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
struct msghdr *msg, size_t len)
{
struct ipv6_txoptions opt_space;
struct udp_sock *up = udp_sk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) msg->msg_name;
struct in6_... | 11,190 |
3,187 | 0 | zsetgray(i_ctx_t * i_ctx_p)
{
os_ptr op = osp; /* required by "push" macro */
float value;
int code;
/* Gather numeric operand value(s) */
code = float_params(op, 1, &value);
if (code < 0)
return code;
/* Clamp numeric operand range(s) */
if (value < 0)
value = 0;
... | 11,191 |
54,714 | 0 | static int snd_seq_ioctl_set_client_info(struct snd_seq_client *client,
void __user *arg)
{
struct snd_seq_client_info client_info;
if (copy_from_user(&client_info, arg, sizeof(client_info)))
return -EFAULT;
/* it is not allowed to set the info fields for an another client */
if (client->number != client_... | 11,192 |
26,978 | 0 | static int do_recv_NotifyData(rpc_message_t *message, void *p_value)
{
int error;
uint64_t id;
if ((error = rpc_message_recv_uint64(message, &id)) < 0)
return error;
if (sizeof(void *) == 4 && ((uint32_t)(id >> 32)) != 0) {
npw_printf("ERROR: 64-bit viewers in 32-bit wrappers are not supported\n");
abort()... | 11,193 |
168,567 | 0 | static int unsupported_set_interface_altsetting(int sub_api, struct libusb_device_handle *dev_handle, int iface, int altsetting) {
PRINT_UNSUPPORTED_API(set_interface_altsetting);
}
| 11,194 |
38,700 | 0 | static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ath_buf *bf, *lastbf, *bf_held = NULL;
struct list_head bf_head;
struct ath_desc *ds;
struct ath_tx_status ts;
int status;
ath_dbg(common, QUEUE, "tx q... | 11,195 |
65,695 | 0 | static void revoke_delegation(struct nfs4_delegation *dp)
{
struct nfs4_client *clp = dp->dl_stid.sc_client;
WARN_ON(!list_empty(&dp->dl_recall_lru));
put_clnt_odstate(dp->dl_clnt_odstate);
nfs4_put_deleg_lease(dp->dl_stid.sc_file);
if (clp->cl_minorversion == 0)
nfs4_put_stid(&dp->dl_stid);
else {
dp->dl_... | 11,196 |
92,370 | 0 | storeAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata,
const char *ptr, const char *end,
STRING_POOL *pool)
{
enum XML_Error result = appendAttributeValue(parser, enc, isCdata, ptr,
end, pool);
if (result)
... | 11,197 |
64,551 | 0 | int _yr_emit_inst_arg_uint16(
RE_EMIT_CONTEXT* emit_context,
uint8_t opcode,
uint16_t argument,
uint8_t** instruction_addr,
uint16_t** argument_addr,
size_t* code_size)
{
FAIL_ON_ERROR(yr_arena_write_data(
emit_context->arena,
&opcode,
sizeof(uint8_t),
(void**) instruct... | 11,198 |
79,657 | 0 | R_API void U(add_method_infos_to_sdb)(RBinJavaObj * bin) {
/*
*** Experimental and May Change ***
Add Mehtod information to an Array
the key for this info variable depenedent on addr, method ordinal, etc.
Key 1, mapping to method key:
java.<file_offset> = <method_key>
Key 2, basic code information
<method_key>.... | 11,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.