unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
180,791 | 1 | static int snd_timer_user_tselect(struct file *file,
struct snd_timer_select __user *_tselect)
{
struct snd_timer_user *tu;
struct snd_timer_select tselect;
char str[32];
int err = 0;
tu = file->private_data;
if (tu->timeri) {
snd_timer_close(tu->timeri);
tu->timeri = NULL;
}
if (copy_from_user(&tsel... | 1,100 |
137,766 | 0 | void HeadlessWebContentsImpl::OnNeedsExternalBeginFrames(
bool needs_begin_frames) {
TRACE_EVENT1("headless",
"HeadlessWebContentsImpl::OnNeedsExternalBeginFrames",
"needs_begin_frames", needs_begin_frames);
needs_external_begin_frames_ = needs_begin_frames;
for (int session_id ... | 1,101 |
76,289 | 0 | static int dvd_read_manufact(struct cdrom_device_info *cdi, dvd_struct *s,
struct packet_command *cgc)
{
int ret = 0, size;
u_char *buf;
const struct cdrom_device_ops *cdo = cdi->ops;
size = sizeof(s->manufact.value) + 4;
buf = kmalloc(size, GFP_KERNEL);
if (!buf)
return -ENOMEM;
init_cdrom_command(cgc,... | 1,102 |
83,511 | 0 | void tmx_pretran_unlink_safe(int slotid)
{
if(_tmx_proc_ptran==NULL)
return;
if(_tmx_proc_ptran->linked == 0)
return;
if(_tmx_ptran_table[slotid].plist==NULL) {
_tmx_proc_ptran->prev = _tmx_proc_ptran->next = NULL;
_tmx_proc_ptran->linked = 0;
return;
}
if(_tmx_proc_ptran->prev==NULL) {
_tmx_ptran_tabl... | 1,103 |
54,697 | 0 | static int snd_seq_ioctl_create_queue(struct snd_seq_client *client,
void __user *arg)
{
struct snd_seq_queue_info info;
int result;
struct snd_seq_queue *q;
if (copy_from_user(&info, arg, sizeof(info)))
return -EFAULT;
result = snd_seq_queue_alloc(client->number, info.locked, info.flags);
if (resul... | 1,104 |
59,528 | 0 | xmlParserEntityCheck(xmlParserCtxtPtr ctxt, size_t size,
xmlEntityPtr ent, size_t replacement)
{
size_t consumed = 0;
if ((ctxt == NULL) || (ctxt->options & XML_PARSE_HUGE))
return (0);
if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP)
return (1);
/*
* This may... | 1,105 |
58,811 | 0 | ssize_t generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
struct file *file = iocb->ki_filp;
struct address_space *mapping = file->f_mapping;
struct inode *inode = mapping->host;
ssize_t ret;
BUG_ON(iocb->ki_pos != pos);
mutex_lock(&inode->i_mutex);
ret ... | 1,106 |
2,543 | 0 | lex_accept(JsonLexContext *lex, JsonTokenType token, char **lexeme)
{
if (lex->token_type == token)
{
if (lexeme != NULL)
{
if (lex->token_type == JSON_TOKEN_STRING)
{
if (lex->strval != NULL)
*lexeme = pstrdup(lex->strval->data);
}
else
{
int len = (lex->token_terminator - lex->toke... | 1,107 |
84,848 | 0 | static int compat_do_replace(struct net *net, void __user *user,
unsigned int len)
{
int ret, i, countersize, size64;
struct ebt_table_info *newinfo;
struct ebt_replace tmp;
struct ebt_entries_buf_state state;
void *entries_tmp;
ret = compat_copy_ebt_replace_from_user(&tmp, user, len);
if (ret) {
/* t... | 1,108 |
165,795 | 0 | bool SVGElement::InUseShadowTree() const {
return CorrespondingUseElement();
}
| 1,109 |
39,175 | 0 | nfs_key_timeout_notify(struct file *filp, struct inode *inode)
{
struct nfs_open_context *ctx = nfs_file_open_context(filp);
struct rpc_auth *auth = NFS_SERVER(inode)->client->cl_auth;
return rpcauth_key_timeout_notify(auth, ctx->cred);
}
| 1,110 |
170,592 | 0 | int32_t VolumeGetStereoPosition(EffectContext *pContext, int16_t *position){
LVM_ControlParams_t ActiveParams; /* Current control Parameters */
LVM_ReturnStatus_en LvmStatus = LVM_SUCCESS; /* Function call status */
LVM_INT16 balance;
LvmStatus = LVM_GetControlParameters(pContext->pBundle... | 1,111 |
166,028 | 0 | void ResolvePromise() {
web_request_.RequestSucceeded();
web_request_.Reset();
}
| 1,112 |
161,121 | 0 | void MediaStreamManager::FinalizeGenerateStream(const std::string& label,
DeviceRequest* request) {
DVLOG(1) << "FinalizeGenerateStream label " << label;
DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(request->generate_stream_cb);
MediaStreamDevices audio_devices... | 1,113 |
56,284 | 0 | SAPI_API void sapi_initialize_empty_request(TSRMLS_D)
{
SG(server_context) = NULL;
SG(request_info).request_method = NULL;
SG(request_info).auth_digest = SG(request_info).auth_user = SG(request_info).auth_password = NULL;
SG(request_info).content_type_dup = NULL;
}
| 1,114 |
24,646 | 0 | static void mmtimer_add_list(struct mmtimer *n)
{
int nodeid = n->timer->it.mmtimer.node;
unsigned long expires = n->timer->it.mmtimer.expires;
struct rb_node **link = &timers[nodeid].timer_head.rb_node;
struct rb_node *parent = NULL;
struct mmtimer *x;
/*
* Find the right place in the rbtree:
*/
while (*li... | 1,115 |
75,597 | 0 | static int conf__parse_int(char **token, const char *name, int *value, char *saveptr)
{
*token = strtok_r(NULL, " ", &saveptr);
if(*token){
*value = atoi(*token);
}else{
log__printf(NULL, MOSQ_LOG_ERR, "Error: Empty %s value in configuration.", name);
return MOSQ_ERR_INVAL;
}
return MOSQ_ERR_SUCCESS;
}
| 1,116 |
180,394 | 1 | int xt_compat_check_entry_offsets(const void *base,
unsigned int target_offset,
unsigned int next_offset)
{
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset)
return -EINVAL;
t = (void *)(e + target_offset);
if (t->u.target_size < si... | 1,117 |
146,426 | 0 | bool WebGLRenderingContextBase::ValidateTexFuncFormatAndType(
const char* function_name,
TexImageFunctionType function_type,
GLenum internalformat,
GLenum format,
GLenum type,
GLint level) {
if (!is_web_gl2_formats_types_added_ && IsWebGL2OrHigher()) {
ADD_VALUES_TO_SET(supported_internal_... | 1,118 |
60,668 | 0 | static int sctp_getsockopt_local_auth_chunks(struct sock *sk, int len,
char __user *optval, int __user *optlen)
{
struct sctp_endpoint *ep = sctp_sk(sk)->ep;
struct sctp_authchunks __user *p = (void __user *)optval;
struct sctp_authchunks val;
struct sctp_association *asoc;
struct sctp_chunks_param *ch;
u... | 1,119 |
92,333 | 0 | handleUnknownEncoding(XML_Parser parser, const XML_Char *encodingName)
{
if (parser->m_unknownEncodingHandler) {
XML_Encoding info;
int i;
for (i = 0; i < 256; i++)
info.map[i] = -1;
info.convert = NULL;
info.data = NULL;
info.release = NULL;
if (parser->m_unknownEncodingHandler(pars... | 1,120 |
132,658 | 0 | TestPreferences* BlinkTestRunner::Preferences() {
return &prefs_;
}
| 1,121 |
1,438 | 0 | void ct2msg(const struct nf_conntrack *ct, struct nethdr *n)
{
uint8_t l4proto = nfct_get_attr_u8(ct, ATTR_L4PROTO);
if (nfct_attr_grp_is_set(ct, ATTR_GRP_ORIG_IPV4)) {
ct_build_group(ct, ATTR_GRP_ORIG_IPV4, n, NTA_IPV4,
sizeof(struct nfct_attr_grp_ipv4));
} else if (nfct_attr_grp_is_set(ct, ATTR_GRP_OR... | 1,122 |
122,614 | 0 | bool Extension::CanSpecifyHostPermission(const URLPattern& pattern,
const APIPermissionSet& permissions) const {
if (!pattern.match_all_urls() &&
pattern.MatchesScheme(chrome::kChromeUIScheme)) {
if (pattern.host() == chrome::kChromeUIFaviconHost)
return true;
if (pattern.host() == chrome::kC... | 1,123 |
59,445 | 0 | xmlLoadEntityContent(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
xmlParserInputPtr input;
xmlBufferPtr buf;
int l, c;
int count = 0;
if ((ctxt == NULL) || (entity == NULL) ||
((entity->etype != XML_EXTERNAL_PARAMETER_ENTITY) &&
(entity->etype != XML_EXTERNAL_GENERAL_PARSED_ENTITY)) ||
... | 1,124 |
1,537 | 0 | zcallbeginpage(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
gx_device *dev = gs_currentdevice(igs);
check_type(*op, t_integer);
if ((dev = (*dev_proc(dev, get_page_device))(dev)) != 0) {
int code = (*dev->page_procs.begin_page)(dev, igs);
if (code < 0)
return code;
}
pop(1)... | 1,125 |
12,850 | 0 | const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void)
{
return NULL;
}
| 1,126 |
10,356 | 0 | cff_decoder_init( CFF_Decoder* decoder,
TT_Face face,
CFF_Size size,
CFF_GlyphSlot slot,
FT_Bool hinting,
FT_Render_Mode hint_mode )
{
CFF_Font cff = (CFF_Font)face->extra.data;
... | 1,127 |
29 | 0 | int do_show(FILE *stream, const char *path_p, const struct stat *st,
acl_t acl, acl_t dacl)
{
struct name_list *acl_names = get_list(st, acl),
*first_acl_name = acl_names;
struct name_list *dacl_names = get_list(st, dacl),
*first_dacl_name = dacl_names;
int acl_names... | 1,128 |
176,779 | 0 | status_t Parcel::writeByteVector(const std::vector<uint8_t>& val) {
return writeByteVectorInternal(this, val);
}
| 1,129 |
47,167 | 0 | static void camellia_setup_tail(u32 *subkey, u32 *subL, u32 *subR, int max)
{
u32 dw, tl, tr;
u32 kw4l, kw4r;
/* absorb kw2 to other subkeys */
/* round 2 */
subL[3] ^= subL[1]; subR[3] ^= subR[1];
/* round 4 */
subL[5] ^= subL[1]; subR[5] ^= subR[1];
/* round 6 */
subL[7] ^= subL[1]; subR[7] ^= subR[1];
sub... | 1,130 |
84,960 | 0 | static inline int check_entry_size_and_hooks(struct arpt_entry *e,
struct xt_table_info *newinfo,
const unsigned char *base,
const unsigned char *limit,
const unsigned int *hook_entries,
const unsigned int *underflows,
unsigned int valid_hooks)
{
unsigned int... | 1,131 |
106,871 | 0 | IntPoint RenderBox::flipForWritingMode(const IntPoint& position) const
{
if (!style()->isFlippedBlocksWritingMode())
return position;
return isHorizontalWritingMode() ? IntPoint(position.x(), height() - position.y()) : IntPoint(width() - position.x(), position.y());
}
| 1,132 |
4,195 | 0 | tt_cmap6_get_info( TT_CMap cmap,
TT_CMapInfo *cmap_info )
{
FT_Byte* p = cmap->data + 4;
cmap_info->format = 6;
cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p );
return SFNT_Err_Ok;
}
| 1,133 |
140,907 | 0 | void PresentationConnection::didClose(
WebPresentationConnectionCloseReason reason,
const String& message) {
if (m_state == WebPresentationConnectionState::Closed)
return;
m_state = WebPresentationConnectionState::Closed;
dispatchStateChangeEvent(PresentationConnectionCloseEvent::create(
Event... | 1,134 |
77,025 | 0 | ofpacts_pull_openflow_actions(struct ofpbuf *openflow,
unsigned int actions_len,
enum ofp_version version,
const struct vl_mff_map *vl_mff_map,
uint64_t *ofpacts_tlv_bitmap,
... | 1,135 |
93,696 | 0 | cJSON *cJSON_CreateBool(int b) {cJSON *item=cJSON_New_Item();if(item)item->type=b?cJSON_True:cJSON_False;return item;}
| 1,136 |
20,708 | 0 | static void kvm_add_async_pf_gfn(struct kvm_vcpu *vcpu, gfn_t gfn)
{
u32 key = kvm_async_pf_hash_fn(gfn);
while (vcpu->arch.apf.gfns[key] != ~0)
key = kvm_async_pf_next_probe(key);
vcpu->arch.apf.gfns[key] = gfn;
}
| 1,137 |
139,202 | 0 | void RenderProcessHostImpl::RegisterRendererMainThreadFactory(
RendererMainThreadFactoryFunction create) {
g_renderer_main_thread_factory = create;
}
| 1,138 |
75,981 | 0 | static_addresses_handler(vector_t *strvec)
{
global_data->have_vrrp_config = true;
if (!strvec)
return;
alloc_value_block(alloc_saddress, vector_slot(strvec, 0));
}
| 1,139 |
35,467 | 0 | static bool ieee80211_parse_tx_radiotap(struct sk_buff *skb)
{
struct ieee80211_radiotap_iterator iterator;
struct ieee80211_radiotap_header *rthdr =
(struct ieee80211_radiotap_header *) skb->data;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
int ret = ieee80211_radiotap_iterator_init(&iterator, rthdr,... | 1,140 |
7,838 | 0 | void cpudef_init(void)
{
#if defined(cpudef_setup)
cpudef_setup(); /* parse cpu definitions in target config file */
#endif
}
| 1,141 |
2,901 | 0 | gs_main_interpret(gs_main_instance *minst, ref * pref, int user_errors,
int *pexit_code, ref * perror_object)
{
int code;
/* set interpreter pointer to lib_path */
minst->i_ctx_p->lib_path = &minst->lib_path;
code = gs_interpret(&minst->i_ctx_p, pref,
user_errors, pexit_code, p... | 1,142 |
137,116 | 0 | const QualifiedName& InputType::SubResourceAttributeName() const {
return QualifiedName::Null();
}
| 1,143 |
53,918 | 0 | void ndp_msg_ifindex_set(struct ndp_msg *msg, uint32_t ifindex)
{
msg->ifindex = ifindex;
}
| 1,144 |
87,095 | 0 | CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number)
{
cJSON *number_item = cJSON_CreateNumber(number);
if (add_item_to_object(object, name, number_item, &global_hooks, false))
{
return number_item;
}
cJSON_Delete(number_item);
... | 1,145 |
56,293 | 0 | SAPI_API int sapi_send_headers(TSRMLS_D)
{
int retval;
int ret = FAILURE;
if (SG(headers_sent) || SG(request_info).no_headers || SG(callback_run)) {
return SUCCESS;
}
/* Success-oriented. We set headers_sent to 1 here to avoid an infinite loop
* in case of an error situation.
*/
if (SG(sapi_headers).send... | 1,146 |
66,854 | 0 | static void __ref adjust_range_page_size_mask(struct map_range *mr,
int nr_range)
{
int i;
for (i = 0; i < nr_range; i++) {
if ((page_size_mask & (1<<PG_LEVEL_2M)) &&
!(mr[i].page_size_mask & (1<<PG_LEVEL_2M))) {
unsigned long start = round_down(mr[i].start, PMD_SIZE);
unsigned long end = round... | 1,147 |
111,961 | 0 | syncable::ModelTypeSet MakeSet(syncable::ModelType type) {
return syncable::ModelTypeSet(type);
}
| 1,148 |
21,310 | 0 | struct mempolicy *get_vma_policy(struct task_struct *task,
struct vm_area_struct *vma, unsigned long addr)
{
struct mempolicy *pol = task->mempolicy;
if (vma) {
if (vma->vm_ops && vma->vm_ops->get_policy) {
struct mempolicy *vpol = vma->vm_ops->get_policy(vma,
addr);
if (vpol)
pol = vpol;
} ... | 1,149 |
123,391 | 0 | void RenderWidgetHostViewGuest::RenderViewGone(base::TerminationStatus status,
int error_code) {
Destroy();
}
| 1,150 |
175,841 | 0 | void vp8mt_alloc_temp_buffers(VP8D_COMP *pbi, int width, int prev_mb_rows)
{
VP8_COMMON *const pc = & pbi->common;
int i;
int uv_width;
if (pbi->b_multithreaded_rd)
{
vp8mt_de_alloc_temp_buffers(pbi, prev_mb_rows);
/* our internal buffers are always multiples of 16 */
if ((width & 0xf) != 0)
... | 1,151 |
50,213 | 0 | static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int extended)
{
zval *IM, *EXT = NULL;
gdImagePtr im=NULL;
long col = -1, x = -1, y = -1;
int str_len, fontname_len, i, brect[8];
double ptsize, angle;
char *str = NULL, *fontname = NULL;
char *error = NULL;
int argc = ZEND_NUM_ARGS();
... | 1,152 |
186,521 | 1 | void DataReductionProxySettings::InitDataReductionProxySettings(
PrefService* prefs,
DataReductionProxyIOData* io_data,
std::unique_ptr<DataReductionProxyService> data_reduction_proxy_service) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(prefs);
DCHECK(io_data);
DCHECK(io_data->config());
DCHECK(data_reducti... | 1,153 |
154,975 | 0 | void WebGLRenderingContextBase::PushFrame() {
int width = GetDrawingBuffer()->Size().Width();
int height = GetDrawingBuffer()->Size().Height();
if (PaintRenderingResultsToCanvas(kBackBuffer)) {
if (Host()->GetOrCreateCanvasResourceProvider(kPreferAcceleration)) {
Host()->PushFrame(Host()->ResourceProvid... | 1,154 |
136,442 | 0 | ConversionContext(const PropertyTreeState& layer_state,
const gfx::Vector2dF& layer_offset,
const FloatSize& visual_rect_subpixel_offset,
cc::DisplayItemList& cc_list)
: layer_state_(layer_state),
layer_offset_(layer_offset),
current_tr... | 1,155 |
153,749 | 0 | void GLES2Implementation::InsertEventMarkerEXT(GLsizei length,
const GLchar* marker) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glInsertEventMarkerEXT(" << length
<< ", " << marker << ")");
if (!marker) {
m... | 1,156 |
164,006 | 0 | ServiceWorkerPaymentInstrument::ServiceWorkerPaymentInstrument(
content::BrowserContext* browser_context,
const GURL& top_origin,
const GURL& frame_origin,
const PaymentRequestSpec* spec,
std::unique_ptr<content::StoredPaymentApp> stored_payment_app_info,
PaymentRequestDelegate* payment_request_... | 1,157 |
89,640 | 0 | static int mdio_uevent(struct device *dev, struct kobj_uevent_env *env)
{
int rc;
/* Some devices have extra OF data and an OF-style MODALIAS */
rc = of_device_uevent_modalias(dev, env);
if (rc != -ENODEV)
return rc;
return 0;
}
| 1,158 |
22,494 | 0 | unsigned long nr_iowait(void)
{
unsigned long i, sum = 0;
for_each_possible_cpu(i)
sum += atomic_read(&cpu_rq(i)->nr_iowait);
return sum;
}
| 1,159 |
22,388 | 0 | static inline void cpuacct_charge(struct task_struct *tsk, u64 cputime) {}
| 1,160 |
40,333 | 0 | static struct atalk_route *atrtr_find(struct atalk_addr *target)
{
/*
* we must search through all routes unless we find a
* host route, because some host routes might overlap
* network routes
*/
struct atalk_route *net_route = NULL;
struct atalk_route *r;
read_lock_bh(&atalk_routes_lock);
for (r = atalk_... | 1,161 |
63,688 | 0 | GSList *nicklist_get_same(SERVER_REC *server, const char *nick)
{
GSList *tmp;
GSList *list = NULL;
g_return_val_if_fail(IS_SERVER(server), NULL);
for (tmp = server->channels; tmp != NULL; tmp = tmp->next) {
NICK_REC *nick_rec;
CHANNEL_REC *channel = tmp->data;
for (nick_rec = g_hash_table_lookup(channel->... | 1,162 |
15,183 | 0 | static void _php_image_bw_convert(gdImagePtr im_org, gdIOCtx *out, int threshold)
{
gdImagePtr im_dest;
int white, black;
int color, color_org, median;
int dest_height = gdImageSY(im_org);
int dest_width = gdImageSX(im_org);
int x, y;
TSRMLS_FETCH();
im_dest = gdImageCreate(dest_width, dest_height);
if (im_de... | 1,163 |
131,094 | 0 | static void treatNullAsNullStringStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjectV8Internal::treatNullAsNullStringStringAttrAttributeSetter(jsValue, info);
TRA... | 1,164 |
163,005 | 0 | void Initialize() {
buffer_.reset(new QuicStreamSequencerBuffer(max_capacity_bytes_));
helper_.reset(new QuicStreamSequencerBufferPeer(buffer_.get()));
}
| 1,165 |
148,678 | 0 | void SkiaOutputSurfaceImpl::SwapBuffers(OutputSurfaceFrame frame) {
NOTREACHED();
}
| 1,166 |
112,706 | 0 | void DocumentLoader::stopLoading()
{
RefPtr<Frame> protectFrame(m_frame);
RefPtr<DocumentLoader> protectLoader(this);
bool loading = isLoading();
if (m_committed) {
Document* doc = m_frame->document();
if (loading || doc->parsing())
m_frame->loader()->stopLoadi... | 1,167 |
43,778 | 0 | iakerb_gss_get_mic_iov(OM_uint32 *minor_status, gss_ctx_id_t context_handle,
gss_qop_t qop_req, gss_iov_buffer_desc *iov,
int iov_count)
{
iakerb_ctx_id_t ctx = (iakerb_ctx_id_t)context_handle;
if (ctx->gssc == GSS_C_NO_CONTEXT)
return GSS_S_NO_CONTEXT;
... | 1,168 |
116,868 | 0 | double TestWebKitPlatformSupport::audioHardwareSampleRate() {
return 44100.0;
}
| 1,169 |
97,024 | 0 | static void queue_interrupt(struct fuse_iqueue *fiq, struct fuse_req *req)
{
spin_lock(&fiq->waitq.lock);
if (test_bit(FR_FINISHED, &req->flags)) {
spin_unlock(&fiq->waitq.lock);
return;
}
if (list_empty(&req->intr_entry)) {
list_add_tail(&req->intr_entry, &fiq->interrupts);
wake_up_locked(&fiq->waitq);
}
... | 1,170 |
125,077 | 0 | TestBrowsingInstance(BrowserContext* browser_context, int* delete_counter)
: BrowsingInstance(browser_context),
delete_counter_(delete_counter) {
}
| 1,171 |
70,306 | 0 | OJPEGReadWord(OJPEGState* sp, uint16* word)
{
uint8 m;
if (OJPEGReadByte(sp,&m)==0)
return(0);
*word=(m<<8);
if (OJPEGReadByte(sp,&m)==0)
return(0);
*word|=m;
return(1);
}
| 1,172 |
185,297 | 1 | static SharedMemorySupport DoQuerySharedMemorySupport(Display* dpy) {
int dummy;
Bool pixmaps_supported;
// Query the server's support for XSHM.
if (!XShmQueryVersion(dpy, &dummy, &dummy, &pixmaps_supported))
return SHARED_MEMORY_NONE;
#if defined(OS_FREEBSD)
// On FreeBSD we can't access the shared memory after it wa... | 1,173 |
38,087 | 0 | static int firm_report_tx_done(struct usb_serial_port *port)
{
struct whiteheat_simple close_command;
close_command.port = port->port_number + 1;
return firm_send_command(port, WHITEHEAT_REPORT_TX_DONE,
(__u8 *)&close_command, sizeof(close_command));
}
| 1,174 |
71,200 | 0 | static int kvm_debugfs_release(struct inode *inode, struct file *file)
{
struct kvm_stat_data *stat_data = (struct kvm_stat_data *)
inode->i_private;
simple_attr_release(inode, file);
kvm_put_kvm(stat_data->kvm);
return 0;
}
| 1,175 |
73,540 | 0 | static inline unsigned short ReadProfileMSBShort(unsigned char **p,
size_t *length)
{
unsigned short
value;
if (*length < 2)
return(0);
value=ReadProfileShort(MSBEndian,*p);
(*length)-=2;
*p+=2;
return(value);
}
| 1,176 |
176,640 | 0 | xmlParseEntityValue(xmlParserCtxtPtr ctxt, xmlChar **orig) {
xmlChar *buf = NULL;
int len = 0;
int size = XML_PARSER_BUFFER_SIZE;
int c, l;
xmlChar stop;
xmlChar *ret = NULL;
const xmlChar *cur = NULL;
xmlParserInputPtr input;
if (RAW == '"') stop = '"';
else if (RAW == '\'') stop = '\'';
else {... | 1,177 |
182,407 | 1 | static int jpeg_size(unsigned char* data, unsigned int data_size,
int *width, int *height)
{
int i = 0;
if (i + 3 < data_size && data[i] == 0xFF && data[i+1] == 0xD8 &&
data[i+2] == 0xFF && data[i+3] == 0xE0) {
i += 4;
if(i + 6 < data_size &&
data[i+2] == 'J' && data[i+3] == 'F' && data[i+4] == 'I' &&
data[i+5] == 'F' ... | 1,178 |
159,074 | 0 | void ChromeDownloadManagerDelegate::ReturnNextId(
const content::DownloadIdCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!profile_->IsOffTheRecord());
DCHECK_NE(content::DownloadItem::kInvalidId, next_download_id_);
callback.Run(next_download_id_++);
}
| 1,179 |
61,787 | 0 | static void free_playlist_list(HLSContext *c)
{
int i;
for (i = 0; i < c->n_playlists; i++) {
struct playlist *pls = c->playlists[i];
free_segment_list(pls);
free_init_section_list(pls);
av_freep(&pls->main_streams);
av_freep(&pls->renditions);
av_freep(&pls->id3_... | 1,180 |
160,771 | 0 | static bool DeviceScaleEnsuresTextQuality(float device_scale_factor) {
#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
return true;
#else
return device_scale_factor >= 1.5f;
#endif
}
| 1,181 |
142,499 | 0 | void ShelfLayoutManager::UpdateWorkspaceMask(
wm::WorkspaceWindowState window_state) {
auto* root_window_controller =
RootWindowController::ForWindow(shelf_widget_->GetNativeWindow());
auto* container = root_window_controller->GetContainer(
kShellWindowId_NonLockScreenContainersContainer);
switch ... | 1,182 |
157,060 | 0 | MultibufferDataSource::ReadOperation::~ReadOperation() {
DCHECK(callback_.is_null());
}
| 1,183 |
115,247 | 0 | void OmniboxViewWin::OnKillFocus(HWND focus_wnd) {
if (m_hWnd == focus_wnd) {
SetMsgHandled(false);
return;
}
model_->OnWillKillFocus(focus_wnd);
ClosePopup();
GetSelection(saved_selection_for_focus_change_);
model_->OnKillFocus();
ScopedFreeze freeze(this, GetTextObjectModel());
DefWindowP... | 1,184 |
179,294 | 1 | static void chase_port(struct edgeport_port *port, unsigned long timeout,
int flush)
{
int baud_rate;
struct tty_struct *tty = tty_port_tty_get(&port->port->port);
struct usb_serial *serial = port->port->serial;
wait_queue_t wait;
unsigned long flags;
if (!timeout)
timeout = (HZ * EDGE_CLOSING_WAI... | 1,185 |
53,867 | 0 | acpi_status acpi_os_signal(u32 function, void *info)
{
switch (function) {
case ACPI_SIGNAL_FATAL:
printk(KERN_ERR PREFIX "Fatal opcode executed\n");
break;
case ACPI_SIGNAL_BREAKPOINT:
/*
* AML Breakpoint
* ACPI spec. says to treat it as a NOP unless
* you are debugging. So if/when we integrate
*... | 1,186 |
171,762 | 0 | void btif_dm_get_ble_local_keys(tBTA_DM_BLE_LOCAL_KEY_MASK *p_key_mask, BT_OCTET16 er,
tBTA_BLE_LOCAL_ID_KEYS *p_id_keys)
{
if (ble_local_key_cb.is_er_rcvd )
{
memcpy(&er[0], &ble_local_key_cb.er[0], sizeof(BT_OCTET16));
*p_key_mask |= BTA_BLE_LOCAL_KEY_TYPE_ER;
}
if ... | 1,187 |
183,913 | 1 | bool ParseRequestInfo(const struct mg_request_info* const request_info,
std::string* method,
std::vector<std::string>* path_segments,
DictionaryValue** parameters,
Response* const response) {
*method = request_info->request_method;
if (*method == "HEAD")
*method = "GET";
else if (*method == "PUT")
*method = "POST";
st... | 1,188 |
57,330 | 0 | ZEND_API uint zend_get_executed_lineno(void) /* {{{ */
{
zend_execute_data *ex = EG(current_execute_data);
while (ex && (!ex->func || !ZEND_USER_CODE(ex->func->type))) {
ex = ex->prev_execute_data;
}
if (ex) {
if (EG(exception) && ex->opline->opcode == ZEND_HANDLE_EXCEPTION &&
ex->opline->lineno == 0 && ... | 1,189 |
29,269 | 0 | static int ip_vs_genl_set_cmd(struct sk_buff *skb, struct genl_info *info)
{
struct ip_vs_service *svc = NULL;
struct ip_vs_service_user_kern usvc;
struct ip_vs_dest_user_kern udest;
int ret = 0, cmd;
int need_full_svc = 0, need_full_dest = 0;
cmd = info->genlhdr->cmd;
mutex_lock(&__ip_vs_mutex);
if (cmd == ... | 1,190 |
78,557 | 0 | auth_process_fci(struct sc_card *card, struct sc_file *file,
const unsigned char *buf, size_t buflen)
{
unsigned char type, attr[SC_OBERTHUR_MAX_ATTR_SIZE];
int attr_len = sizeof(attr);
LOG_FUNC_CALLED(card->ctx);
attr_len = sizeof(attr);
if (tlv_get(buf, buflen, 0x82, attr, &attr_len))
LOG_FUNC_RET... | 1,191 |
140,713 | 0 | void GLES2DecoderImpl::DeleteBuffersHelper(
GLsizei n, const GLuint* client_ids) {
for (GLsizei ii = 0; ii < n; ++ii) {
Buffer* buffer = GetBuffer(client_ids[ii]);
if (buffer && !buffer->IsDeleted()) {
buffer->RemoveMappedRange();
state_.vertex_attrib_manager->Unbind(buffer);
if (state_.... | 1,192 |
147,763 | 0 | static void ReflectReflectedNameAttributeTestAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::ToImpl(holder);
V8SetReturnValueFast(info, impl->FastGetAttribute(html_names::kReflectedNameAttributeAttr), impl... | 1,193 |
50,697 | 0 | static inline const char *srpt_sdev_name(struct srpt_device *sdev)
{
return sdev->device->name;
}
| 1,194 |
44,022 | 0 | crm_first_attr(xmlNode * xml)
{
if (xml == NULL) {
return NULL;
}
return xml->properties;
}
| 1,195 |
38,237 | 0 | unsigned int __sk_run_filter(void *ctx, const struct sock_filter_int *insn)
{
u64 stack[MAX_BPF_STACK / sizeof(u64)];
u64 regs[MAX_BPF_REG], tmp;
void *ptr;
int off;
#define K insn->imm
#define A regs[insn->a_reg]
#define X regs[insn->x_reg]
#define R0 regs[0]
#define CONT ({insn++; goto select_insn; })
#defi... | 1,196 |
111,801 | 0 | void SyncBackendHost::HandleConnectionStatusChangeOnFrontendLoop(
sync_api::ConnectionStatus status) {
if (!frontend_)
return;
DCHECK_EQ(MessageLoop::current(), frontend_loop_);
frontend_->OnConnectionStatusChange(status);
}
| 1,197 |
159,051 | 0 | void ContinueCheckingForFileExistence(
content::CheckForFileExistenceCallback callback) {
std::move(callback).Run(false);
}
| 1,198 |
102,738 | 0 | CCLayerTreeHostTestSetNeedsCommit2()
: m_numCommits(0)
, m_numDraws(0)
{
}
| 1,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.