unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
153,590 | 0 | void GLES2Implementation::CompressedTexImage2D(GLenum target,
GLint level,
GLenum internalformat,
GLsizei width,
GLsizei height,
... | 10,500 |
79,076 | 0 | ssize_t cpu_show_spectre_v2(struct device *dev, struct device_attribute *attr, char *buf)
{
return cpu_show_common(dev, attr, buf, X86_BUG_SPECTRE_V2);
}
| 10,501 |
13,583 | 0 | static HB_Error Load_MarkArray ( HB_MarkArray* ma,
HB_Stream stream )
{
HB_Error error;
HB_UShort n, m, count;
HB_UInt cur_offset, new_offset, base_offset;
HB_MarkRecord* mr;
base_offset = FILE_Pos();
if ( ACCESS_Frame( 2L ) )
return error;
count = ma->MarkCount = ... | 10,502 |
96,246 | 0 | fm_mgr_pm_cfg_query
(
IN p_fm_config_conx_hdlt hdl,
IN fm_mgr_action_t action,
OUT pm_config_t *info,
OUT fm_msg_ret_code_t *ret_code
)
{
p_hsm_com_client_hdl_t client_hdl;
if ( (client_hdl = get_mgr_hdl(hdl,FM_MGR_PM)) != NULL )
{
return fm_... | 10,503 |
180,126 | 1 | PHP_FUNCTION(imageaffinematrixget)
{
double affine[6];
long type;
zval *options = NULL;
zval **tmp;
int res = GD_FALSE, i;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|z", &type, &options) == FAILURE) {
return;
}
switch((gdAffineStandardMatrix)type) {
case GD_AFFINE_TRANSLATE:
case GD_AFFINE... | 10,504 |
183,409 | 1 | void __ip_select_ident(struct iphdr *iph, int segs)
{
static u32 ip_idents_hashrnd __read_mostly;
u32 hash, id;
net_get_random_once(&ip_idents_hashrnd, sizeof(ip_idents_hashrnd));
hash = jhash_3words((__force u32)iph->daddr,
(__force u32)iph->saddr,
iph->protocol,
ip_idents_hashrnd);
id = ip_idents_reserve(has... | 10,505 |
46,676 | 0 | static int xts_aes_decrypt(struct blkcipher_desc *desc,
struct scatterlist *dst, struct scatterlist *src,
unsigned int nbytes)
{
struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
struct blkcipher_walk walk;
if (unlikely(xts_ctx->key_len == 48))
return xts_fallback_decrypt(desc, dst, src,... | 10,506 |
83,498 | 0 | int fixup_bug(struct pt_regs *regs, int trapnr)
{
if (trapnr != X86_TRAP_UD)
return 0;
switch (report_bug(regs->ip, regs)) {
case BUG_TRAP_TYPE_NONE:
case BUG_TRAP_TYPE_BUG:
break;
case BUG_TRAP_TYPE_WARN:
regs->ip += LEN_UD2;
return 1;
}
return 0;
}
| 10,507 |
94,874 | 0 | static void __usbnet_queue_skb(struct sk_buff_head *list,
struct sk_buff *newsk, enum skb_state state)
{
struct skb_data *entry = (struct skb_data *) newsk->cb;
__skb_queue_tail(list, newsk);
entry->state = state;
}
| 10,508 |
132,106 | 0 | bool LayoutBlockFlow::mustSeparateMarginBeforeForChild(const LayoutBox& child) const
{
ASSERT(!child.selfNeedsLayout());
const ComputedStyle& childStyle = child.styleRef();
if (!child.isWritingModeRoot())
return childStyle.marginBeforeCollapse() == MSEPARATE;
if (child.isHorizontalWritingMode() ... | 10,509 |
33,212 | 0 | xfs_buf_get_uncached(
struct xfs_buftarg *target,
size_t numblks,
int flags)
{
unsigned long page_count;
int error, i;
struct xfs_buf *bp;
DEFINE_SINGLE_BUF_MAP(map, XFS_BUF_DADDR_NULL, numblks);
bp = _xfs_buf_alloc(target, &map, 1, 0);
if (unlikely(bp == NULL))
goto fail;
page_count = PAGE_ALIGN(... | 10,510 |
5,621 | 0 | another_hunk (enum diff difftype, bool rev)
{
char *s;
lin context = 0;
size_t chars_read;
char numbuf0[LINENUM_LENGTH_BOUND + 1];
char numbuf1[LINENUM_LENGTH_BOUND + 1];
char numbuf2[LINENUM_LENGTH_BOUND + 1];
char numbuf3[LINENUM_LENGTH_BOUND + 1];
while (p_end >= 0) {
if (p_end == p... | 10,511 |
22,202 | 0 | static int rose_getsockopt(struct socket *sock, int level, int optname,
char __user *optval, int __user *optlen)
{
struct sock *sk = sock->sk;
struct rose_sock *rose = rose_sk(sk);
int val = 0;
int len;
if (level != SOL_ROSE)
return -ENOPROTOOPT;
if (get_user(len, optlen))
return -EFAULT;
if (len < 0)
... | 10,512 |
61,433 | 0 | static int mov_read_enda(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
int little_endian;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams-1];
little_endian = avio_rb16(pb) & 0xFF;
av_log(c->fc, AV_LOG_TRACE, "enda %d\n", little_endian);
if... | 10,513 |
80,604 | 0 | GF_Box *trik_New()
{
ISOM_DECL_BOX_ALLOC(GF_TrickPlayBox, GF_ISOM_BOX_TYPE_TRIK);
return (GF_Box *)tmp;
}
| 10,514 |
77,505 | 0 | ofputil_decode_group_features_reply(const struct ofp_header *oh,
struct ofputil_group_features *features)
{
const struct ofp12_group_features_stats *ogf = ofpmsg_body(oh);
int i;
features->types = ntohl(ogf->types);
features->capabilities = ntohl(ogf->capabilities);
... | 10,515 |
8,778 | 0 | static NOINLINE int send_select(uint32_t xid, uint32_t server, uint32_t requested)
{
struct dhcp_packet packet;
struct in_addr temp_addr;
/*
* RFC 2131 4.3.2 DHCPREQUEST message
* ...
* If the DHCPREQUEST message contains a 'server identifier'
* option, the message is in response to a DHCPOFFER message.
* Other... | 10,516 |
110,413 | 0 | void WebUILoginView::OnLoginPromptVisible() {
if (should_emit_login_prompt_visible_) {
chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->
EmitLoginPromptVisible();
}
OobeUI* oobe_ui = static_cast<OobeUI*>(GetWebUI()->GetController());
oobe_ui->OnLoginPromptVisible();
}
| 10,517 |
143,981 | 0 | png_get_signature(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->signature);
else
return (NULL);
}
| 10,518 |
63,561 | 0 | get_desktop_file_path (GsmXSMPClient *client)
{
SmProp *prop;
char *desktop_file_path = NULL;
char **dirs;
const char *program_name;
/* XSMP clients using eggsmclient defines a special property
* pointing to their respective desktop entry file */
... | 10,519 |
91,731 | 0 | int am_validate_redirect_url(request_rec *r, const char *url)
{
am_dir_cfg_rec *cfg = am_get_dir_cfg(r);
apr_uri_t uri;
int ret;
ret = apr_uri_parse(r->pool, url, &uri);
if (ret != APR_SUCCESS) {
AM_LOG_RERROR(APLOG_MARK, APLOG_ERR, 0, r,
"Invalid redirect URL: %s", ur... | 10,520 |
44,795 | 0 | local void gf2_matrix_square(unsigned long *square, unsigned long *mat)
{
int n;
for (n = 0; n < 32; n++)
square[n] = gf2_matrix_times(mat, mat[n]);
}
| 10,521 |
43,176 | 0 | static int oz_hcd_bus_suspend(struct usb_hcd *hcd)
{
struct oz_hcd *ozhcd;
ozhcd = oz_hcd_private(hcd);
spin_lock_bh(&ozhcd->hcd_lock);
hcd->state = HC_STATE_SUSPENDED;
ozhcd->flags |= OZ_HDC_F_SUSPENDED;
spin_unlock_bh(&ozhcd->hcd_lock);
return 0;
}
| 10,522 |
133,714 | 0 | void XSSAuditor::initForFragment()
{
ASSERT(isMainThread());
ASSERT(m_state == Uninitialized);
m_state = FilteringTokens;
ASSERT(!m_isEnabled);
}
| 10,523 |
28,918 | 0 | static int read_prepare(struct kvm_vcpu *vcpu, void *val, int bytes)
{
if (vcpu->mmio_read_completed) {
trace_kvm_mmio(KVM_TRACE_MMIO_READ, bytes,
vcpu->mmio_fragments[0].gpa, *(u64 *)val);
vcpu->mmio_read_completed = 0;
return 1;
}
return 0;
}
| 10,524 |
44,439 | 0 | static int proc_uptime_read(char *buf, size_t size, off_t offset,
struct fuse_file_info *fi)
{
struct fuse_context *fc = fuse_get_context();
struct file_info *d = (struct file_info *)fi->fh;
long int reaperage = getreaperage(fc->pid);;
unsigned long int busytime = get_reaper_busy(fc->pid), idletime;
char *cache ... | 10,525 |
180,160 | 1 | static void perf_event_reset(struct perf_event *event)
{
(void)perf_event_read(event);
local64_set(&event->count, 0);
perf_event_update_userpage(event);
}
| 10,526 |
144,944 | 0 | void RenderWidgetHostViewAura::OnDisplayAdded(
const display::Display& new_display) {}
| 10,527 |
147,439 | 0 | void V8TestObject::ImplementedAsLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_implementedAsLongAttribute_Getter");
test_object_v8_internal::ImplementedAsLongAttributeAttributeGetter(info);
}
| 10,528 |
156,206 | 0 | WakeUpBudgetPool* RendererSchedulerImpl::GetWakeUpBudgetPoolForTesting() {
return main_thread_only().wake_up_budget_pool;
}
| 10,529 |
96,355 | 0 | VOID NBLSet8021QInfo(PPARANDIS_ADAPTER pContext, PNET_BUFFER_LIST pNBL, PNET_PACKET_INFO pPacketInfo)
{
NDIS_NET_BUFFER_LIST_8021Q_INFO qInfo;
qInfo.Value = NULL;
if (IsPrioritySupported(pContext))
qInfo.TagHeader.UserPriority = pPacketInfo->Vlan.UserPriority;
if (IsVlanSupported(pContext))
... | 10,530 |
138,751 | 0 | void RenderFrameHostImpl::OnDispatchLoad() {
CHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible());
if (!is_active())
return;
RenderFrameProxyHost* proxy =
frame_tree_node()->render_manager()->GetProxyToParent();
if (!proxy) {
bad_message::ReceivedBadMessage(GetProcess(),
... | 10,531 |
12,966 | 0 | ssh_packet_init_compression(struct ssh *ssh)
{
if (!ssh->state->compression_buffer &&
((ssh->state->compression_buffer = sshbuf_new()) == NULL))
return SSH_ERR_ALLOC_FAIL;
return 0;
}
| 10,532 |
97,761 | 0 | xmlXPathParseNameComplex(xmlXPathParserContextPtr ctxt, int qualified) {
xmlChar buf[XML_MAX_NAMELEN + 5];
int len = 0, l;
int c;
/*
* Handler for more complex cases
*/
c = CUR_CHAR(l);
if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */
(c == '[') || (c == ']') |... | 10,533 |
120,067 | 0 | void DateTimeChooserImpl::setValueAndClosePopup(int numValue, const String& stringValue)
{
RefPtr<DateTimeChooserImpl> protector(this);
if (numValue >= 0)
setValue(stringValue);
endChooser();
}
| 10,534 |
129,906 | 0 | void SpeechSynthesis::trace(Visitor* visitor)
{
visitor->trace(m_voiceList);
visitor->trace(m_utteranceQueue);
}
| 10,535 |
18,755 | 0 | void dccp_v4_send_check(struct sock *sk, struct sk_buff *skb)
{
const struct inet_sock *inet = inet_sk(sk);
struct dccp_hdr *dh = dccp_hdr(skb);
dccp_csum_outgoing(skb);
dh->dccph_checksum = dccp_v4_csum_finish(skb,
inet->inet_saddr,
inet->inet_daddr);
}
| 10,536 |
177,361 | 0 | void Tags::SimpleTag::Clear() {
delete[] m_tag_name;
m_tag_name = NULL;
delete[] m_tag_string;
m_tag_string = NULL;
}
| 10,537 |
129,370 | 0 | Framebuffer* GetFramebufferInfoForTarget(GLenum target) {
Framebuffer* framebuffer = NULL;
switch (target) {
case GL_FRAMEBUFFER:
case GL_DRAW_FRAMEBUFFER_EXT:
framebuffer = framebuffer_state_.bound_draw_framebuffer.get();
break;
case GL_READ_FRAMEBUFFER_EXT:
framebuf... | 10,538 |
88,083 | 0 | SMB2_query_acl(const unsigned int xid, struct cifs_tcon *tcon,
u64 persistent_fid, u64 volatile_fid,
void **data, u32 *plen)
{
__u32 additional_info = OWNER_SECINFO | GROUP_SECINFO | DACL_SECINFO;
*plen = 0;
return query_info(xid, tcon, persistent_fid, volatile_fid,
0, SMB2_O_INFO_SECURITY, additional_info... | 10,539 |
93,638 | 0 | nvmet_fc_tgt_queue_free(struct kref *ref)
{
struct nvmet_fc_tgt_queue *queue =
container_of(ref, struct nvmet_fc_tgt_queue, ref);
unsigned long flags;
spin_lock_irqsave(&queue->assoc->tgtport->lock, flags);
queue->assoc->queues[queue->qid] = NULL;
spin_unlock_irqrestore(&queue->assoc->tgtport->lock, flags);
n... | 10,540 |
180,255 | 1 | static void spl_filesystem_object_free_storage(void *object TSRMLS_DC) /* {{{ */
{
spl_filesystem_object *intern = (spl_filesystem_object*)object;
if (intern->oth_handler && intern->oth_handler->dtor) {
intern->oth_handler->dtor(intern TSRMLS_CC);
}
zend_object_std_dtor(&intern->std TSRMLS_CC);
if (intern->_path) ... | 10,541 |
46,492 | 0 | int main(int argc, char *argv[])
{
BN_CTX *ctx;
BIO *out;
char *outfile=NULL;
results = 0;
RAND_seed(rnd_seed, sizeof rnd_seed); /* or BN_generate_prime may fail */
argc--;
argv++;
while (argc >= 1)
{
if (strcmp(*argv,"-results") == 0)
results=1;
else if (strcmp(*argv,"-out") == 0)
{
if (--ar... | 10,542 |
98,650 | 0 | void RenderWidget::OnUpdateVideoAck(int32 video_id) {
}
| 10,543 |
20,929 | 0 | cdf_namecmp(const char *d, const uint16_t *s, size_t l)
{
for (; l--; d++, s++)
if (*d != CDF_TOLE2(*s))
return (unsigned char)*d - CDF_TOLE2(*s);
return 0;
}
| 10,544 |
166,934 | 0 | void BaseAudioContext::PerformCleanupOnMainThread() {
DCHECK(IsMainThread());
GraphAutoLocker locker(this);
if (is_resolving_resume_promises_) {
for (auto& resolver : resume_resolvers_) {
if (context_state_ == kClosed) {
resolver->Reject(DOMException::Create(
kInvalidStateError,
... | 10,545 |
79,524 | 0 | static size_t q_encoder(char *str, const char *buf, size_t buflen, const char *tocode)
{
static const char hex[] = "0123456789ABCDEF";
char *s0 = str;
memcpy(str, "=?", 2);
str += 2;
memcpy(str, tocode, strlen(tocode));
str += strlen(tocode);
memcpy(str, "?Q?", 3);
str += 3;
while (buflen--)
{
... | 10,546 |
100,389 | 0 | void ReceiverReady(IPC::Channel::Sender* sender) {
has_receiver_ = true;
Update(sender);
}
| 10,547 |
107,337 | 0 | void Browser::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterStringPref(prefs::kHomePage,
chrome::kChromeUINewTabURL);
prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true);
prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit, false);
prefs->RegisterBooleanPref(pr... | 10,548 |
11,811 | 0 | remove_component_data_ref (RemoveComponentData *data)
{
data->refcount++;
return data;
}
| 10,549 |
95,167 | 0 | static void cmd_sort(char *tag, int usinguid)
{
int c;
struct sortcrit *sortcrit = NULL;
struct searchargs *searchargs = NULL;
clock_t start = clock();
char mytime[100];
int n;
if (backend_current) {
/* remote mailbox */
const char *cmd = usinguid ? "UID Sort" : "Sort";
... | 10,550 |
63,348 | 0 | gssint_unwrap_aead_iov_shim(gss_mechanism mech,
OM_uint32 *minor_status,
gss_ctx_id_t context_handle,
gss_buffer_t input_message_buffer,
gss_buffer_t input_assoc_buffer,
gss_buffer_t output_payload_buffer,
int *conf_state,
gss_qop_t *qop_state)
{
OM_uint32 statu... | 10,551 |
127,633 | 0 | void UpdateMapping() {
count_ = XGetPointerMapping(ui::GetXDisplay(), map_, arraysize(map_));
}
| 10,552 |
9,574 | 0 | CACHE_LIMITER_FUNC(public) /* {{{ */
{
char buf[MAX_STR + 1];
struct timeval tv;
time_t now;
gettimeofday(&tv, NULL);
now = tv.tv_sec + PS(cache_expire) * 60;
memcpy(buf, EXPIRES, sizeof(EXPIRES) - 1);
strcpy_gmt(buf + sizeof(EXPIRES) - 1, &now);
ADD_HEADER(buf);
snprintf(buf, sizeof(buf) , "Cache-Control: p... | 10,553 |
111,763 | 0 | bool IsRestartNeededToCommitChanges() {
return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
}
| 10,554 |
188,240 | 1 | OMX_ERRORTYPE SoftRaw::internalGetParameter(
OMX_INDEXTYPE index, OMX_PTR params) {
switch (index) {
case OMX_IndexParamAudioPcm:
{
OMX_AUDIO_PARAM_PCMMODETYPE *pcmParams =
(OMX_AUDIO_PARAM_PCMMODETYPE *)params;
if (pcmParams->nPortIndex != 0 && pcmParams->nPortI... | 10,555 |
154,630 | 0 | error::Error GLES2DecoderPassthroughImpl::DoDepthMask(GLboolean flag) {
api()->glDepthMaskFn(flag);
return error::kNoError;
}
| 10,556 |
107,195 | 0 | void AutoFillMetrics::Log(ServerQueryMetric metric) const {
DCHECK(metric < NUM_SERVER_QUERY_METRICS);
UMA_HISTOGRAM_ENUMERATION("AutoFill.ServerQueryResponse", metric,
NUM_SERVER_QUERY_METRICS);
}
| 10,557 |
146,958 | 0 | void WebLocalFrameImpl::DidFinish() {
if (!Client())
return;
if (WebPluginContainerImpl* plugin = GetFrame()->GetWebPluginContainer())
plugin->DidFinishLoading();
Client()->DidFinishLoad();
}
| 10,558 |
78,068 | 0 | const char* CMSEXPORT cmsIT8GetPatchName(cmsHANDLE hIT8, int nPatch, char* buffer)
{
cmsIT8* it8 = (cmsIT8*) hIT8;
TABLE* t;
char* Data;
_cmsAssert(hIT8 != NULL);
t = GetTable(it8);
Data = GetData(it8, nPatch, t->SampleID);
if (!Data) return NULL;
if (!buffer) return Data;
strncp... | 10,559 |
139,654 | 0 | void AudioContext::disposeOutputs(AudioNode& node)
{
ASSERT(isGraphOwner());
ASSERT(isMainThread());
for (unsigned i = 0; i < node.numberOfOutputs(); ++i)
node.output(i)->dispose();
}
| 10,560 |
140,303 | 0 | bool Editor::canPaste() const {
return canEdit();
}
| 10,561 |
19,284 | 0 | static int unix_autobind(struct socket *sock)
{
struct sock *sk = sock->sk;
struct net *net = sock_net(sk);
struct unix_sock *u = unix_sk(sk);
static u32 ordernum = 1;
struct unix_address *addr;
int err;
unsigned int retries = 0;
mutex_lock(&u->readlock);
err = 0;
if (u->addr)
goto out;
err = -ENOMEM;
... | 10,562 |
104,059 | 0 | void GLES2DecoderImpl::DoUniform4iv(
GLint location, GLsizei count, const GLint* value) {
GLenum type = 0;
if (!PrepForSetUniformByLocation(location, "glUniform4iv", &type, &count)) {
return;
}
glUniform4iv(location, count, value);
}
| 10,563 |
64,218 | 0 | static int core_check_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
{
int rv = OK;
while (s) {
if (check_errorlog_dir(ptemp, s) != OK)
rv = !OK;
s = s->next;
}
return rv;
}
| 10,564 |
148,968 | 0 | static int allocateBtreePage(
BtShared *pBt, /* The btree */
MemPage **ppPage, /* Store pointer to the allocated page here */
Pgno *pPgno, /* Store the page number here */
Pgno nearby, /* Search for a page near this one */
u8 eMode /* BTALLOC_EXACT, BTALLOC_LT, o... | 10,565 |
21,653 | 0 | static void sf_markstate(struct ip_mc_list *pmc)
{
struct ip_sf_list *psf;
int mca_xcount = pmc->sfcount[MCAST_EXCLUDE];
for (psf=pmc->sources; psf; psf=psf->sf_next)
if (pmc->sfcount[MCAST_EXCLUDE]) {
psf->sf_oldin = mca_xcount ==
psf->sf_count[MCAST_EXCLUDE] &&
!psf->sf_count[MCAST_INCLUDE];
} else... | 10,566 |
73,271 | 0 | int rxe_mem_init_user(struct rxe_dev *rxe, struct rxe_pd *pd, u64 start,
u64 length, u64 iova, int access, struct ib_udata *udata,
struct rxe_mem *mem)
{
int entry;
struct rxe_map **map;
struct rxe_phys_buf *buf = NULL;
struct ib_umem *umem;
struct scatterlist *sg;
int num_buf;
void *vadd... | 10,567 |
175,557 | 0 | HevcParameterSets::HevcParameterSets()
: mInfo(kInfoNone) {
}
| 10,568 |
54,224 | 0 | static void acm_write_done(struct acm *acm, struct acm_wb *wb)
{
wb->use = 0;
acm->transmitting--;
usb_autopm_put_interface_async(acm->control);
}
| 10,569 |
12,801 | 0 | int SSL_set_session_secret_cb(SSL *s,
int (*tls_session_secret_cb) (SSL *s,
void *secret,
int *secret_len,
STA... | 10,570 |
140,897 | 0 | void PresentationConnection::addedEventListener(
const AtomicString& eventType,
RegisteredEventListener& registeredListener) {
EventTargetWithInlineData::addedEventListener(eventType, registeredListener);
if (eventType == EventTypeNames::connect)
UseCounter::count(getExecutionContext(),
... | 10,571 |
40,849 | 0 | wkbConvPointToShape(wkbObj *w, shapeObj *shape)
{
int type;
lineObj line;
/*endian = */wkbReadChar(w);
type = wkbTypeMap(w,wkbReadInt(w));
if( type != WKB_POINT ) return MS_FAILURE;
if( ! (shape->type == MS_SHAPE_POINT) ) return MS_FAILURE;
line.numpoints = 1;
line.point = msSmallMalloc(sizeof(pointO... | 10,572 |
180,372 | 1 | static void array_cleanup( char* arr[] , int arr_size)
{
int i=0;
for( i=0; i< arr_size; i++ ){
if( arr[i*2] ){
efree( arr[i*2]);
}
}
efree(arr);
}
| 10,573 |
8,227 | 0 | static void v9fs_readdir(void *opaque)
{
int32_t fid;
V9fsFidState *fidp;
ssize_t retval = 0;
size_t offset = 7;
uint64_t initial_offset;
int32_t count;
uint32_t max_count;
V9fsPDU *pdu = opaque;
retval = pdu_unmarshal(pdu, offset, "dqd", &fid,
&initial_of... | 10,574 |
36,531 | 0 | static long snd_disconnect_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{
return -ENODEV;
}
| 10,575 |
182,878 | 1 | static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal)
{
HEVCLocalContext *lc = s->HEVClc;
GetBitContext *gb = &lc->gb;
int ctb_addr_ts, ret;
*gb = nal->gb;
s->nal_unit_type = nal->type;
s->temporal_id = nal->temporal_id;
switch (s->nal_unit_type) {
case HEVC_NAL_VPS:
if (s->avctx->hwaccel ... | 10,576 |
18,770 | 0 | static int dccp_v6_rcv(struct sk_buff *skb)
{
const struct dccp_hdr *dh;
struct sock *sk;
int min_cov;
/* Step 1: Check header basics */
if (dccp_invalid_packet(skb))
goto discard_it;
/* Step 1: If header checksum is incorrect, drop packet and return. */
if (dccp_v6_csum_finish(skb, &ipv6_hdr(skb)->saddr,
... | 10,577 |
62,321 | 0 | mp_fail_print(netdissect_options *ndo,
const u_char *opt, u_int opt_len, u_char flags _U_)
{
if (opt_len != 12)
return 0;
ND_PRINT((ndo, " seq %" PRIu64, EXTRACT_64BITS(opt + 4)));
return 1;
}
| 10,578 |
2,867 | 0 | FontFileInitTable (FontTablePtr table, int size)
{
if (size < 0 || (size > INT32_MAX/sizeof(FontEntryRec)))
return FALSE;
if (size)
{
table->entries = malloc(sizeof(FontEntryRec) * size);
if (!table->entries)
return FALSE;
}
else
table->entries = 0;
table->used = 0;
table->size = si... | 10,579 |
13,779 | 0 | ZEND_API int zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length TSRMLS_DC) /* {{{ */
{
zval *constant;
if (ce->type & ZEND_INTERNAL_CLASS) {
ALLOC_PERMANENT_ZVAL(constant);
ZVAL_STRINGL(constant, zend_strndup(value, value_length)... | 10,580 |
176,573 | 0 | xmlCtxtReadIO(xmlParserCtxtPtr ctxt, xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose, void *ioctx,
const char *URL,
const char *encoding, int options)
{
xmlParserInputBufferPtr input;
xmlParserInputPtr stream;
if (ioread == NULL)
return (NULL);
if (ctxt == NULL)
return (NULL);
... | 10,581 |
20,229 | 0 | static int hugetlbfs_mknod(struct inode *dir,
struct dentry *dentry, umode_t mode, dev_t dev)
{
struct inode *inode;
int error = -ENOSPC;
inode = hugetlbfs_get_inode(dir->i_sb, dir, mode, dev);
if (inode) {
dir->i_ctime = dir->i_mtime = CURRENT_TIME;
d_instantiate(dentry, inode);
dget(dentry); /* Extra co... | 10,582 |
36,591 | 0 | bool extract_sockaddr(char *url, char **sockaddr_url, char **sockaddr_port)
{
char *url_begin, *url_end, *ipv6_begin, *ipv6_end, *port_start = NULL;
char url_address[256], port[6];
int url_len, port_len = 0;
*sockaddr_url = url;
url_begin = strstr(url, "//");
if (!url_begin)
url_begin = url;
else
url_begin ... | 10,583 |
140,870 | 0 | static void domExceptionStackSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
ASSERT(info.Data()->IsObject());
info.Data()->ToObject(info.GetIsolate())->Set(v8AtomicString(info.GetIsolate(), "stack"), value);
}
| 10,584 |
157,174 | 0 | void WebMediaPlayerImpl::ActivateSurfaceLayerForVideo() {
DCHECK(!bridge_);
surface_layer_for_video_enabled_ = true;
if (video_layer_) {
client_->SetCcLayer(nullptr);
video_layer_ = nullptr;
}
bridge_ = std::move(create_bridge_callback_)
.Run(this, compositor_->GetUpdateSubmissionSt... | 10,585 |
72,890 | 0 | static int jpc_siz_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate,
jas_stream_t *in)
{
jpc_siz_t *siz = &ms->parms.siz;
unsigned int i;
uint_fast8_t tmp;
siz->comps = 0;
/* Eliminate compiler warning about unused variables. */
cstate = 0;
if (jpc_getuint16(in, &siz->caps) ||
jpc_getuint32(in, &siz->width) |... | 10,586 |
58,490 | 0 | get_line_from_string(char **lines, int *line_len)
{
int i;
char *z = *lines;
if( z[0] == '\0' ) return NULL;
for (i=0; z[i]; i++)
{
if (z[i] == '\n')
{
if (i > 0 && z[i-1]=='\r')
{ z[i-1] = '\0'; }
else
{ z[i] = '\0'; }
i++;
break;
}
}
/* advance lines on */
*lines... | 10,587 |
100,982 | 0 | void BitmapTextureGL::updateContents(PixelFormat pixelFormat, const IntRect& rect, void* bits)
{
GL_CMD(glBindTexture(GL_TEXTURE_2D, m_id))
#ifdef TEXMAP_OPENGL_ES_2
bool shouldSwizzle = false;
#endif
GLint glFormat = GL_RGBA;
switch (pixelFormat) {
case RGBAFormat:
glFormat = GL_RGBA;
... | 10,588 |
177,726 | 0 | virtual bool DnsResolveEx(const std::string& host,
std::string* ip_address_list) {
dns_resolves_ex.push_back(host);
*ip_address_list = dns_resolve_ex_result;
return !dns_resolve_ex_result.empty();
}
| 10,589 |
10,028 | 0 | Help( void )
{
grEvent dummy_event;
Clear_Display();
grGotoxy( 0, 0 );
grSetMargin( 2, 1 );
grGotobitmap( &bit );
grWriteln( "FreeType Multiple Masters Glyph Viewer - part of the FreeType test suite" );
grLn();
grWriteln( "This program is used to display all glyphs from one or" ... | 10,590 |
9,402 | 0 | const EVP_MD *tls12_get_hash(unsigned char hash_alg)
{
switch (hash_alg) {
# ifndef OPENSSL_NO_SHA
case TLSEXT_hash_sha1:
return EVP_sha1();
# endif
# ifndef OPENSSL_NO_SHA256
case TLSEXT_hash_sha224:
return EVP_sha224();
case TLSEXT_hash_sha256:
return EVP_sha256();
# endif
# i... | 10,591 |
119,391 | 0 | RenderThreadImpl::GetIOMessageLoopProxy() {
return ChildProcess::current()->io_message_loop_proxy();
}
| 10,592 |
159,603 | 0 | String Document::cookie(ExceptionState& exception_state) const {
if (GetSettings() && !GetSettings()->GetCookieEnabled())
return String();
UseCounter::Count(*this, WebFeature::kCookieGet);
if (!GetSecurityOrigin()->CanAccessCookies()) {
if (IsSandboxed(kSandboxOrigin))
exception_state.ThrowSecuri... | 10,593 |
127,246 | 0 | WorkerProcessLauncherTest::~WorkerProcessLauncherTest() {
}
| 10,594 |
41,075 | 0 | struct sk_buff *sock_alloc_send_pskb(struct sock *sk, unsigned long header_len,
unsigned long data_len, int noblock,
int *errcode)
{
struct sk_buff *skb;
gfp_t gfp_mask;
long timeo;
int err;
int npages = (data_len + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
err = -EMSGSIZE;
if (npages > MAX_SKB_FRAGS)
... | 10,595 |
29,364 | 0 | static int vm_stat_get(void *_offset, u64 *val)
{
unsigned offset = (long)_offset;
struct kvm *kvm;
*val = 0;
spin_lock(&kvm_lock);
list_for_each_entry(kvm, &vm_list, vm_list)
*val += *(u32 *)((void *)kvm + offset);
spin_unlock(&kvm_lock);
return 0;
}
| 10,596 |
166,489 | 0 | const PermissionSet* permissions() const { return permissions_.get(); }
| 10,597 |
31,945 | 0 | void __init perf_event_init(void)
{
int ret;
idr_init(&pmu_idr);
perf_event_init_all_cpus();
init_srcu_struct(&pmus_srcu);
perf_pmu_register(&perf_swevent, "software", PERF_TYPE_SOFTWARE);
perf_pmu_register(&perf_cpu_clock, NULL, -1);
perf_pmu_register(&perf_task_clock, NULL, -1);
perf_tp_register();
perf_cp... | 10,598 |
39,252 | 0 | static int convert_context(u32 key,
struct context *c,
void *p)
{
struct convert_context_args *args;
struct context oldc;
struct ocontext *oc;
struct mls_range *range;
struct role_datum *role;
struct type_datum *typdatum;
struct user_datum *usrdatum;
char *s;
u32 len;
int rc = 0;
if (key <= SECI... | 10,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.