unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
26,717 | 0 | static int nl80211_pre_doit(struct genl_ops *ops, struct sk_buff *skb,
struct genl_info *info)
{
struct cfg80211_registered_device *rdev;
struct net_device *dev;
int err;
bool rtnl = ops->internal_flags & NL80211_FLAG_NEED_RTNL;
if (rtnl)
rtnl_lock();
if (ops->internal_flags & NL80211_FLAG_NEED_WIPHY) ... | 1,600 |
32,484 | 0 | static inline u32 calc_crc(unsigned char *buf, int len)
{
u32 reg;
u32 tmp;
int j, k;
reg = 0xffffffff;
for (j = 0; j < len; j++) {
reg ^= buf[j];
for (k = 0; k < 8; k++) {
tmp = reg & 0x01;
reg >>= 1;
if (tmp)
reg ^= 0xedb88320;
}
}
return ~reg;
}
| 1,601 |
54,288 | 0 | SPL_METHOD(SplDoublyLinkedList, offsetUnset)
{
zval *zindex;
zend_long index;
spl_dllist_object *intern;
spl_ptr_llist_element *element;
spl_ptr_llist *llist;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zindex) == FAILURE) {
return;
}
intern = Z_SPLDLLIST_P(getT... | 1,602 |
96,076 | 0 | void flush_stdin(void) {
if (isatty(STDIN_FILENO)) {
int cnt = 0;
ioctl(STDIN_FILENO, FIONREAD, &cnt);
if (cnt) {
if (!arg_quiet)
printf("Warning: removing %d bytes from stdin\n", cnt);
ioctl(STDIN_FILENO, TCFLSH, TCIFLUSH);
}
}
}
| 1,603 |
61,256 | 0 | EXPORTED int mboxlist_createmailboxcheck(const char *name, int mbtype __attribute__((unused)),
const char *partition,
int isadmin, const char *userid,
const struct auth_state *auth_state,
char... | 1,604 |
94,721 | 0 | void gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization)
{
gdIOCtx *out = gdNewFileCtx(outFile);
gdImageWebpCtx(im, out, quantization);
out->gd_free(out);
}
| 1,605 |
7,298 | 0 | hook_get_priority_and_name (const char *name,
int *priority, const char **ptr_name)
{
char *pos, *str_priority, *error;
long number;
if (priority)
*priority = HOOK_PRIORITY_DEFAULT;
if (ptr_name)
*ptr_name = name;
pos = strchr (name, '|');
if (pos)
... | 1,606 |
101,215 | 0 | bool Syncer::ExitRequested() {
base::AutoLock lock(early_exit_requested_lock_);
return early_exit_requested_;
}
| 1,607 |
72,967 | 0 | static int pnm_getsintstr(jas_stream_t *in, int_fast32_t *val)
{
int c;
int s;
int_fast32_t v;
/* Discard any leading whitespace. */
do {
if ((c = pnm_getc(in)) == EOF) {
return -1;
}
} while (isspace(c));
/* Get the number, allowing for a negative sign. */
s = 1;
if (c == '-') {
s = -1;
if ((c = ... | 1,608 |
1,621 | 0 | assegment_normalise (struct assegment *head)
{
struct assegment *seg = head, *pin;
struct assegment *tmp;
if (!head)
return head;
while (seg)
{
pin = seg;
/* Sort values SET segments, for determinism in paths to aid
* creation of hash values / path comparisons
* an... | 1,609 |
4,022 | 0 | GBool DCTStream::readProgressiveDataUnit(DCTHuffTable *dcHuffTable,
DCTHuffTable *acHuffTable,
int *prevDC, int data[64]) {
int run, size, amp, bit, c;
int i, j, k;
i = scanInfo.firstCoeff;
if (i == 0) {
if (scanInfo.ah == 0) {
if ((size = readHuffSym(dcHuffTable)) == 9999) {
return gFal... | 1,610 |
29,685 | 0 | static int read_header(struct pstore *ps, int *new_snapshot)
{
int r;
struct disk_header *dh;
unsigned chunk_size;
int chunk_size_supplied = 1;
char *chunk_err;
/*
* Use default chunk size (or logical_block_size, if larger)
* if none supplied
*/
if (!ps->store->chunk_size) {
ps->store->chunk_size = max(... | 1,611 |
84,478 | 0 | convert_size3(clen_t size)
{
Str tmp = Strnew();
int n;
do {
n = size % 1000;
size /= 1000;
tmp = Sprintf(size ? ",%.3d%s" : "%d%s", n, tmp->ptr);
} while (size);
return tmp->ptr;
}
| 1,612 |
53,475 | 0 | lzss_current_pointer(struct lzss *lzss)
{
return lzss_pointer_for_position(lzss, lzss->position);
}
| 1,613 |
20,136 | 0 | struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)
{
struct sock *newsk;
newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family);
if (newsk != NULL) {
struct sk_filter *filter;
sock_copy(newsk, sk);
/* SANITY */
get_net(sock_net(newsk));
sk_node_init(&newsk->sk_node);
sock_loc... | 1,614 |
112,694 | 0 | const KURL& DocumentLoader::responseURL() const
{
return m_response.url();
}
| 1,615 |
84,528 | 0 | process_mouse(int btn, int x, int y)
{
int delta_x, delta_y, i;
static int press_btn = MOUSE_BTN_RESET, press_x, press_y;
TabBuffer *t;
int ny = -1;
if (nTab > 1 || mouse_action.menu_str)
ny = LastTab->y + 1;
if (btn == MOUSE_BTN_UP) {
switch (press_btn) {
case MOUSE_BTN1_DOWN:
if (pres... | 1,616 |
156,789 | 0 | Element* Document::CreateElement(const QualifiedName& q_name,
const CreateElementFlags flags,
const AtomicString& is) {
CustomElementDefinition* definition = nullptr;
if (flags.IsCustomElementsV1() &&
q_name.NamespaceURI() == HTMLNames::xhtmlNa... | 1,617 |
95,509 | 0 | static qboolean S_AL_BufferEvict( void )
{
int i, oldestBuffer = -1;
int oldestTime = Sys_Milliseconds( );
for( i = 0; i < numSfx; i++ )
{
if( !knownSfx[ i ].filename[ 0 ] )
continue;
if( !knownSfx[ i ].inMemory )
continue;
if( knownSfx[ i ].lastUsedTime < oldestTime )
{
oldestTime = knownSfx[ i... | 1,618 |
142,781 | 0 | WebMediaPlayer::DisplayType HTMLMediaElement::DisplayType() const {
return IsFullscreen() ? WebMediaPlayer::DisplayType::kFullscreen
: WebMediaPlayer::DisplayType::kInline;
}
| 1,619 |
164,656 | 0 | void IndexedDBDatabase::ReportErrorWithDetails(Status status,
const char* message) {
DCHECK(!status.ok());
if (status.IsCorruption()) {
IndexedDBDatabaseError error(blink::kWebIDBDatabaseExceptionUnknownError,
message);
factory_... | 1,620 |
64,269 | 0 | static const char *set_async_filter(cmd_parms *cmd, void *dummy,
const char *arg)
{
core_server_config *conf =
ap_get_core_module_config(cmd->server->module_config);
const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
if (err) {
return ... | 1,621 |
154,040 | 0 | void GLES2DecoderImpl::DoMatrixLoadfCHROMIUM(GLenum matrix_mode,
const volatile GLfloat* matrix) {
DCHECK(matrix_mode == GL_PATH_PROJECTION_CHROMIUM ||
matrix_mode == GL_PATH_MODELVIEW_CHROMIUM);
GLfloat* target_matrix = matrix_mode == GL_PATH_PROJECTION_CHROMI... | 1,622 |
20,154 | 0 | struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size,
int noblock, int *errcode)
{
return sock_alloc_send_pskb(sk, size, 0, noblock, errcode);
}
| 1,623 |
105,021 | 0 | virtual void TearDown() {
ui_loop_.RunAllPending();
io_thread_.Stop();
ui_loop_.RunAllPending();
}
| 1,624 |
188,033 | 1 | SoftMPEG4Encoder::~SoftMPEG4Encoder() {
ALOGV("Destruct SoftMPEG4Encoder");
releaseEncoder();
List<BufferInfo *> &outQueue = getPortQueue(1);
List<BufferInfo *> &inQueue = getPortQueue(0);
CHECK(outQueue.empty());
CHECK(inQueue.empty());
}
| 1,625 |
147,582 | 0 | void V8TestObject::NodeAttributeAttributeSetterCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_nodeAttribute_Setter");
v8::Local<v8::Value> v8_value = info[0];
test_object_v8_internal::NodeAttributeAttributeSetter... | 1,626 |
121,969 | 0 | void AppListController::FreeAnyKeepAliveForView() {
if (keep_alive_)
keep_alive_.reset(NULL);
}
| 1,627 |
42,093 | 0 | mm_answer_keyallowed(int sock, Buffer *m)
{
Key *key;
char *cuser, *chost;
u_char *blob;
u_int bloblen, pubkey_auth_attempt;
enum mm_keytype type = 0;
int allowed = 0;
debug3("%s entering", __func__);
type = buffer_get_int(m);
cuser = buffer_get_string(m, NULL);
chost = buffer_get_string(m, NULL);
blob = b... | 1,628 |
53,940 | 0 | size_t ndp_msg_opt_slladdr_len(struct ndp_msg *msg, int offset)
{
return ETH_ALEN;
}
| 1,629 |
35,037 | 0 | SCTP_STATIC int sctp_setsockopt(struct sock *sk, int level, int optname,
char __user *optval, int optlen)
{
int retval = 0;
SCTP_DEBUG_PRINTK("sctp_setsockopt(sk: %p... optname: %d)\n",
sk, optname);
/* I can hardly begin to describe how wrong this is. This is
* so broken as to be worse than useless. ... | 1,630 |
19,967 | 0 | int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo)
{
struct rpc_task *task;
struct nfs4_get_lease_time_args args;
struct nfs4_get_lease_time_res res = {
.lr_fsinfo = fsinfo,
};
struct nfs4_get_lease_time_data data = {
.args = &args,
.res = &res,
.clp = clp,
};
struct rpc_mess... | 1,631 |
108,726 | 0 | void ChromotingInstance::SetCursorShape(
const protocol::CursorShapeInfo& cursor_shape) {
if (!cursor_shape.has_data() ||
!cursor_shape.has_width() ||
!cursor_shape.has_height() ||
!cursor_shape.has_hotspot_x() ||
!cursor_shape.has_hotspot_y()) {
return;
}
int width = cursor_shape... | 1,632 |
65,659 | 0 | nfsd_inject_forget_client_openowners(struct sockaddr_storage *addr,
size_t addr_size)
{
unsigned int count = 0;
struct nfs4_client *clp;
struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nfsd_net_id);
LIST_HEAD(reaplist);
if (!nfsd_netns_ready(nn))
return count;
spin_lock(&nn->client_... | 1,633 |
173,646 | 0 | bool ATSParser::PTSTimeDeltaEstablished() {
if (mPrograms.isEmpty()) {
return false;
}
return mPrograms.editItemAt(0)->PTSTimeDeltaEstablished();
}
| 1,634 |
5,470 | 0 | static void Ins_SZP2( INS_ARG )
{
switch ( args[0] )
{
case 0:
CUR.zp2 = CUR.twilight;
break;
case 1:
CUR.zp2 = CUR.pts;
break;
default:
CUR.error = TT_Err_Invalid_Reference;
return;
}
CUR.GS.gep2 = (Int)(args[0]);
}
| 1,635 |
144,755 | 0 | void LocalSiteCharacteristicsWebContentsObserver::DidUpdateFaviconURL(
const std::vector<content::FaviconURL>& candidates) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (!first_time_favicon_set_) {
first_time_favicon_set_ = true;
return;
}
MaybeNotifyBackgroundFeatureUsage(
&SiteC... | 1,636 |
116,332 | 0 | QUrl QQuickWebView::url() const
{
Q_D(const QQuickWebView);
return QUrl(d->m_currentUrl);
}
| 1,637 |
77,284 | 0 | ofport_install(struct ofproto *p,
struct netdev *netdev, const struct ofputil_phy_port *pp)
{
const char *netdev_name = netdev_get_name(netdev);
struct ofport *ofport;
int error;
/* Create ofport. */
ofport = p->ofproto_class->port_alloc();
if (!ofport) {
error = ENOMEM;
... | 1,638 |
172,234 | 0 | int uipc_start_main_server_thread(void)
{
uipc_main.running = 1;
if (pthread_create(&uipc_main.tid, (const pthread_attr_t *) NULL, (void*)uipc_read_task, NULL) < 0)
{
BTIF_TRACE_ERROR("uipc_thread_create pthread_create failed:%d", errno);
return -1;
}
return 0;
}
| 1,639 |
93,481 | 0 | static int l_channel_exec (lua_State *L) {
return channel_exec(L, 0, 0);
}
| 1,640 |
146,622 | 0 | bool DrawingBuffer::FinishPrepareTextureMailboxSoftware(
viz::TextureMailbox* out_mailbox,
std::unique_ptr<cc::SingleReleaseCallback>* out_release_callback) {
DCHECK(state_restorer_);
std::unique_ptr<viz::SharedBitmap> bitmap = CreateOrRecycleBitmap();
if (!bitmap)
return false;
{
unsigned char... | 1,641 |
27,870 | 0 | static void fuse_file_put(struct fuse_file *ff)
{
if (atomic_dec_and_test(&ff->count)) {
struct fuse_req *req = ff->reserved_req;
req->end = fuse_release_end;
fuse_request_send_background(ff->fc, req);
kfree(ff);
}
}
| 1,642 |
33,337 | 0 | static int edge_remove_sysfs_attrs(struct usb_serial_port *port)
{
device_remove_file(&port->dev, &dev_attr_uart_mode);
return 0;
}
| 1,643 |
71,285 | 0 | int ahash_mcryptd_digest(struct ahash_request *desc)
{
return crypto_ahash_init(desc) ?: ahash_mcryptd_finup(desc);
}
| 1,644 |
12,410 | 0 | SPL_METHOD(SplObjectStorage, current)
{
spl_SplObjectStorageElement *element;
spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
if (zend_hash_get_current_data_ex(&intern->storage, (void**)&element,... | 1,645 |
65,842 | 0 | static __be32 *read_buf(struct nfsd4_compoundargs *argp, u32 nbytes)
{
/* We want more bytes than seem to be available.
* Maybe we need a new page, maybe we have just run out
*/
unsigned int avail = (char *)argp->end - (char *)argp->p;
__be32 *p;
if (avail + argp->pagelen < nbytes)
return NULL;
if (avail + P... | 1,646 |
30,955 | 0 | static int ptrace_setsiginfo(struct task_struct *child, const siginfo_t *info)
{
unsigned long flags;
int error = -ESRCH;
if (lock_task_sighand(child, &flags)) {
error = -EINVAL;
if (likely(child->last_siginfo != NULL)) {
*child->last_siginfo = *info;
error = 0;
}
unlock_task_sighand(child, &flags);
... | 1,647 |
128,491 | 0 | bool ShellSurface::IsSurfaceSynchronized() const {
return false;
}
| 1,648 |
36,881 | 0 | void iput(struct inode *inode)
{
if (inode) {
BUG_ON(inode->i_state & I_CLEAR);
if (atomic_dec_and_lock(&inode->i_count, &inode->i_lock))
iput_final(inode);
}
}
| 1,649 |
18,540 | 0 | static int check_eofblocks_fl(handle_t *handle, struct inode *inode,
ext4_lblk_t lblk,
struct ext4_ext_path *path,
unsigned int len)
{
int i, depth;
struct ext4_extent_header *eh;
struct ext4_extent *last_ex;
if (!ext4_test_inode_flag(inode, EXT4_INODE_EOFBLOCKS))
return 0;
depth = e... | 1,650 |
41,917 | 0 | static void svm_set_segment(struct kvm_vcpu *vcpu,
struct kvm_segment *var, int seg)
{
struct vcpu_svm *svm = to_svm(vcpu);
struct vmcb_seg *s = svm_seg(vcpu, seg);
s->base = var->base;
s->limit = var->limit;
s->selector = var->selector;
if (var->unusable)
s->attrib = 0;
else {
s->attrib = (var->type... | 1,651 |
85,123 | 0 | static int wm_strcasecmp(const char *s1, const char * s2) {
const char * p1 = s1;
const char * p2 = s2;
char c1, c2;
if (p1 == p2) return 0;
do {
c1 = wm_tolower (*p1++);
c2 = wm_tolower (*p2++);
if (c1 == '\0') break;
} while (c1 == c2);
return (int)(c1 - c2);
}
| 1,652 |
171,157 | 0 | sp<IMediaCodecList> MediaPlayerService::getCodecList() const {
return MediaCodecList::getLocalInstance();
}
| 1,653 |
180,338 | 1 | int socket_create(uint16_t port)
{
int sfd = -1;
int yes = 1;
#ifdef WIN32
WSADATA wsa_data;
if (!wsa_init) {
if (WSAStartup(MAKEWORD(2,2), &wsa_data) != ERROR_SUCCESS) {
fprintf(stderr, "WSAStartup failed!\n");
ExitProcess(-1);
}
wsa_init = 1;
}
#endif
struct sockaddr_in saddr;
if (0 > (sfd = socket(PF_INET, SOCK_STR... | 1,654 |
40,615 | 0 | static void init_prb_bdqc(struct packet_sock *po,
struct packet_ring_buffer *rb,
struct pgv *pg_vec,
union tpacket_req_u *req_u, int tx_ring)
{
struct tpacket_kbdq_core *p1 = &rb->prb_bdqc;
struct tpacket_block_desc *pbd;
memset(p1, 0x0, sizeof(*p1));
p1->knxt_seq_num = 1;
p1->pkbdq = pg_vec;
pbd = (st... | 1,655 |
96,811 | 0 | struct fuse_req *fuse_get_req_for_background(struct fuse_conn *fc,
unsigned npages)
{
return __fuse_get_req(fc, npages, true);
}
| 1,656 |
181,267 | 1 | R_API RConfigNode* r_config_set(RConfig *cfg, const char *name, const char *value) {
RConfigNode *node = NULL;
char *ov = NULL;
ut64 oi;
if (!cfg || STRNULL (name)) {
return NULL;
}
node = r_config_node_get (cfg, name);
if (node) {
if (node->flags & CN_RO) {
eprintf ("(error: '%s' config key is read only)\n", name);
re... | 1,657 |
46,696 | 0 | static void des_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
{
struct s390_des_ctx *ctx = crypto_tfm_ctx(tfm);
crypt_s390_km(KM_DEA_DECRYPT, ctx->key, out, in, DES_BLOCK_SIZE);
}
| 1,658 |
85,625 | 0 | void hns_rcbv2_int_ctrl_hw(struct hnae_queue *q, u32 flag, u32 mask)
{
u32 int_mask_en = !!mask;
if (flag & RCB_INT_FLAG_TX)
dsaf_write_dev(q, RCB_RING_INTMSK_TXWL_REG, int_mask_en);
if (flag & RCB_INT_FLAG_RX)
dsaf_write_dev(q, RCB_RING_INTMSK_RXWL_REG, int_mask_en);
}
| 1,659 |
167,123 | 0 | const std::string& BluetoothSocketListenUsingRfcommFunction::uuid() const {
return params_->uuid;
}
| 1,660 |
22,496 | 0 | unsigned long nr_running(void)
{
unsigned long i, sum = 0;
for_each_online_cpu(i)
sum += cpu_rq(i)->nr_running;
return sum;
}
| 1,661 |
127,596 | 0 | bool GetStringProperty(
XID window, const std::string& property_name, std::string* value) {
Atom type = None;
int format = 0; // size in bits of each item in 'property'
unsigned long num_items = 0;
unsigned char* property = NULL;
int result = GetProperty(window, property_name, 1024,
... | 1,662 |
163,354 | 0 | bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
return is_gpu_memory_buffer_compositor_resources_enabled_;
}
| 1,663 |
113,036 | 0 | FilePath DownloadItemImpl::GetFileNameToReportUser() const {
if (!display_name_.empty())
return display_name_;
return target_path_.BaseName();
}
| 1,664 |
88,505 | 0 | MagickExport MagickBooleanType BlobToFile(char *filename,const void *blob,
const size_t length,ExceptionInfo *exception)
{
int
file;
register size_t
i;
ssize_t
count;
assert(filename != (const char *) NULL);
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",filename);
assert(blob != (... | 1,665 |
42,930 | 0 | static int sctp_v4_cmp_addr(const union sctp_addr *addr1,
const union sctp_addr *addr2)
{
if (addr1->sa.sa_family != addr2->sa.sa_family)
return 0;
if (addr1->v4.sin_port != addr2->v4.sin_port)
return 0;
if (addr1->v4.sin_addr.s_addr != addr2->v4.sin_addr.s_addr)
return 0;
return 1;
}
| 1,666 |
160,803 | 0 | void RenderViewImpl::OnGetRenderedText() {
if (!webview())
return;
if (!webview()->MainFrame()->IsWebLocalFrame())
return;
static const size_t kMaximumMessageSize = 8 * 1024 * 1024;
std::string text =
WebFrameContentDumper::DumpWebViewAsText(webview(), kMaximumMessageSize)
.Utf8();
... | 1,667 |
28,683 | 0 | static ssize_t lbs_highrssi_write(struct file *file, const char __user *userbuf,
size_t count, loff_t *ppos)
{
return lbs_threshold_write(TLV_TYPE_RSSI_HIGH, CMD_SUBSCRIBE_RSSI_HIGH,
file, userbuf, count, ppos);
}
| 1,668 |
63,830 | 0 | make_log_entry( httpd_conn* hc, struct timeval* nowP )
{
char* ru;
char url[305];
char bytes[40];
if ( hc->hs->no_log )
return;
/* This is straight CERN Combined Log Format - the only tweak
** being that if we're using syslog() we leave out the date, because
** syslogd puts it in. Th... | 1,669 |
142,812 | 0 | bool HTMLMediaElement::HasVideo() const {
return GetWebMediaPlayer() && GetWebMediaPlayer()->HasVideo();
}
| 1,670 |
10,564 | 0 | Current_Ppem( TT_ExecContext exc )
{
return exc->tt_metrics.ppem;
}
| 1,671 |
13,173 | 0 | xps_draw_linear_gradient(xps_document *doc, const fz_matrix *ctm, const fz_rect *area,
struct stop *stops, int count,
fz_xml *root, int spread)
{
float x0, y0, x1, y1;
int i, mi, ma;
float dx, dy, x, y, k;
fz_point p1, p2;
fz_matrix inv;
fz_rect local_area = *area;
char *start_point_att = fz_xml_att(root, "St... | 1,672 |
5,681 | 0 | static XHCIStreamContext *xhci_alloc_stream_contexts(unsigned count,
dma_addr_t base)
{
XHCIStreamContext *stctx;
unsigned int i;
stctx = g_new0(XHCIStreamContext, count);
for (i = 0; i < count; i++) {
stctx[i].pctx = base + i * 16;
s... | 1,673 |
100,749 | 0 | xmlParseReference(xmlParserCtxtPtr ctxt) {
xmlEntityPtr ent;
xmlChar *val;
int was_checked;
xmlNodePtr list = NULL;
xmlParserErrors ret = XML_ERR_OK;
if (RAW != '&')
return;
/*
* Simple case of a CharRef
*/
if (NXT(1) == '#') {
int i = 0;
xmlChar out[10];
int hex ... | 1,674 |
101,598 | 0 | void Browser::CloseTabContents(TabContents* contents) {
CloseContents(contents);
}
| 1,675 |
15,249 | 0 | PHP_FUNCTION(link)
{
char *topath, *frompath;
int topath_len, frompath_len;
int ret;
char source_p[MAXPATHLEN];
char dest_p[MAXPATHLEN];
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "pp", &topath, &topath_len, &frompath, &frompath_len) == FAILURE) {
return;
}
if (!expand_filepath(frompath, source_p ... | 1,676 |
170,576 | 0 | int LvmBundle_process(LVM_INT16 *pIn,
LVM_INT16 *pOut,
int frameCount,
EffectContext *pContext){
LVM_ControlParams_t ActiveParams; /* Current control Parameters */
LVM_ReturnStatus_en LvmStatus = LVM_SUCCESS; /* Function call status */
LVM_INT16 ... | 1,677 |
98,472 | 0 | AeroPeekWindow* AeroPeekManager::GetAeroPeekWindow(int tab_id) const {
size_t size = tab_list_.size();
for (std::list<AeroPeekWindow*>::const_iterator i = tab_list_.begin();
i != tab_list_.end(); ++i) {
AeroPeekWindow* window = *i;
if (window->tab_id() == tab_id)
return window;
}
return NUL... | 1,678 |
174,060 | 0 | void WriteOutput(FILE *fid, u8 *data, u32 picSize)
{
if (fid)
fwrite(data, 1, picSize, fid);
}
| 1,679 |
54,647 | 0 | int snd_seq_queue_alloc(int client, int locked, unsigned int info_flags)
{
struct snd_seq_queue *q;
q = queue_new(client, locked);
if (q == NULL)
return -ENOMEM;
q->info_flags = info_flags;
if (queue_list_add(q) < 0) {
queue_delete(q);
return -ENOMEM;
}
snd_seq_queue_use(q->queue, client, 1); /* use this ... | 1,680 |
184,855 | 1 | size_t CancelableFileOperation(Function operation,
HANDLE file,
BufferType* buffer,
size_t length,
WaitableEvent* io_event,
WaitableEvent* cancel_event,
CancelableSyncSocket* socket,
DWORD timeout_in_ms) {
ThreadRestrictions::AssertIOAllowed();
// The buffer must be byte size or the length check won't make much sense.
... | 1,681 |
158,065 | 0 | void LocalFrameClientImpl::DispatchDidChangeIcons(IconType type) {
if (web_frame_->Client()) {
web_frame_->Client()->DidChangeIcon(static_cast<WebIconURL::Type>(type));
}
}
| 1,682 |
26,166 | 0 | static void perf_swevent_del(struct perf_event *event, int flags)
{
hlist_del_rcu(&event->hlist_entry);
}
| 1,683 |
42,685 | 0 | static void load_vmcs12_host_state(struct kvm_vcpu *vcpu,
struct vmcs12 *vmcs12)
{
struct kvm_segment seg;
if (vmcs12->vm_exit_controls & VM_EXIT_LOAD_IA32_EFER)
vcpu->arch.efer = vmcs12->host_ia32_efer;
else if (vmcs12->vm_exit_controls & VM_EXIT_HOST_ADDR_SPACE_SIZE)
vcpu->arch.efer |= (EFER_LMA | EFER... | 1,684 |
751 | 0 | image_draw_decide_cb (int image_id, void *data)
{
return (image_id == GPOINTER_TO_INT (data));
}
| 1,685 |
103,019 | 0 | virtual bool CanCloseTab() const { return true; }
| 1,686 |
113,403 | 0 | void WebProcessProxy::getSharedWorkerProcessConnection(const String& /* url */, const String& /* name */, PassRefPtr<Messages::WebProcessProxy::GetSharedWorkerProcessConnection::DelayedReply>)
{
}
| 1,687 |
170,397 | 0 | static void Region_destructor(JNIEnv* env, jobject, jlong regionHandle) {
SkRegion* region = reinterpret_cast<SkRegion*>(regionHandle);
SkASSERT(region);
delete region;
}
| 1,688 |
177,025 | 0 | status_t InputDispatcher::unregisterInputChannel(const sp<InputChannel>& inputChannel) {
#if DEBUG_REGISTRATION
ALOGD("channel '%s' ~ unregisterInputChannel", inputChannel->getName().string());
#endif
{ // acquire lock
AutoMutex _l(mLock);
status_t status = unregisterInputChannelLocked(inputChannel, false /*no... | 1,689 |
107,881 | 0 | bool WebViewPlugin::initialize(WebPluginContainer* container) {
container_ = container;
if (container_)
old_title_ = container_->element().getAttribute("title");
return true;
}
| 1,690 |
22,276 | 0 | void mmput(struct mm_struct *mm)
{
might_sleep();
if (atomic_dec_and_test(&mm->mm_users)) {
exit_aio(mm);
ksm_exit(mm);
exit_mmap(mm);
set_mm_exe_file(mm, NULL);
if (!list_empty(&mm->mmlist)) {
spin_lock(&mmlist_lock);
list_del(&mm->mmlist);
spin_unlock(&mmlist_lock);
}
put_swap_token(mm);
i... | 1,691 |
108,943 | 0 | void RenderViewImpl::OnImeConfirmComposition(
const string16& text, const ui::Range& replacement_range) {
if (pepper_delegate_.IsPluginFocused()) {
pepper_delegate_.OnImeConfirmComposition(text);
} else {
#if defined(OS_WIN)
if (focused_plugin_id_ >= 0) {
std::set<WebPluginDelegateProxy*>::itera... | 1,692 |
88,086 | 0 | SMB2_query_info_free(struct smb_rqst *rqst)
{
if (rqst && rqst->rq_iov)
cifs_small_buf_release(rqst->rq_iov[0].iov_base); /* request */
}
| 1,693 |
39,913 | 0 | void skb_queue_purge(struct sk_buff_head *list)
{
struct sk_buff *skb;
while ((skb = skb_dequeue(list)) != NULL)
kfree_skb(skb);
}
| 1,694 |
78,051 | 0 | void WriteData(SAVESTREAM* fp, cmsIT8* it8)
{
int i, j;
TABLE* t = GetTable(it8);
if (!t->Data) return;
WriteStr (fp, "BEGIN_DATA\n");
t->nPatches = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_SETS"));
for (i = 0; i < t-> nPatches; i++) {
WriteStr(fp, " ");
... | 1,695 |
153,944 | 0 | void GLES2DecoderImpl::DoApplyScreenSpaceAntialiasingCHROMIUM() {
Framebuffer* bound_framebuffer =
GetFramebufferInfoForTarget(GL_DRAW_FRAMEBUFFER);
if (!bound_framebuffer) {
LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION,
"glApplyScreenSpaceAntialiasingCHROMIUM",
"n... | 1,696 |
28,875 | 0 | int kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
{
unsigned long old_cr0 = kvm_read_cr0(vcpu);
unsigned long update_bits = X86_CR0_PG | X86_CR0_WP |
X86_CR0_CD | X86_CR0_NW;
cr0 |= X86_CR0_ET;
#ifdef CONFIG_X86_64
if (cr0 & 0xffffffff00000000UL)
return 1;
#endif
cr0 &= ~CR0_RESERVED_BITS;
i... | 1,697 |
132,732 | 0 | void ChromotingInstance::HandleSendMouseInputWhenUnfocused() {
input_handler_.set_send_mouse_input_when_unfocused(true);
}
| 1,698 |
139,566 | 0 | static String ValueBackColor(const EditorInternalCommand&,
LocalFrame& frame,
Event*) {
return ValueStyle(frame, CSSPropertyBackgroundColor);
}
| 1,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.