unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
93,115 | 0 | sec_reset_state(void)
{
g_server_rdp_version = 0;
g_sec_encrypt_use_count = 0;
g_sec_decrypt_use_count = 0;
g_licence_issued = 0;
g_licence_error_result = 0;
mcs_reset_state();
}
| 12,500 |
64,935 | 0 | static void iw_set_auto_resizetype(struct iw_context *ctx, int size1, int size2,
int dimension)
{
if(size2==size1 && !ctx->resize_settings[dimension].use_offset &&
!ctx->req.out_true_valid &&
ctx->resize_settings[dimension].translate==0.0)
{
iw_set_resize_alg(ctx, dimension, IW_RESIZETYPE_NULL, 1.0, 0.0, 0.0);... | 12,501 |
139,006 | 0 | DEFINE_TRACE(ImageLoader) {
visitor->trace(m_image);
visitor->trace(m_imageResourceForImageDocument);
visitor->trace(m_element);
}
| 12,502 |
65,813 | 0 | nfsd4_encode_lock_denied(struct xdr_stream *xdr, struct nfsd4_lock_denied *ld)
{
struct xdr_netobj *conf = &ld->ld_owner;
__be32 *p;
again:
p = xdr_reserve_space(xdr, 32 + XDR_LEN(conf->len));
if (!p) {
/*
* Don't fail to return the result just because we can't
* return the conflicting open:
*/
if (co... | 12,503 |
6,573 | 0 | void Smb4KGlobal::openShare( Smb4KShare *share, OpenWith openWith )
{
if ( !share || share->isInaccessible() )
{
return;
}
switch ( openWith )
{
case FileManager:
{
KUrl url;
url.setPath( share->canonicalPath() );
(void) new KRun( url, 0, 0, true );
break;
}
case... | 12,504 |
54,182 | 0 | static void acm_ctrl_irq(struct urb *urb)
{
struct acm *acm = urb->context;
struct usb_cdc_notification *dr = urb->transfer_buffer;
unsigned char *data;
int newctrl;
int difference;
int retval;
int status = urb->status;
switch (status) {
case 0:
/* success */
break;
case -ECONNRESET:
case -ENOENT:
case... | 12,505 |
59,462 | 0 | xmlParseCheckTransition(xmlParserCtxtPtr ctxt, const char *chunk, int size) {
if ((ctxt == NULL) || (chunk == NULL) || (size < 0))
return(-1);
if (ctxt->instate == XML_PARSER_START_TAG) {
if (memchr(chunk, '>', size) != NULL)
return(1);
return(0);
}
if (ctxt->progress... | 12,506 |
19,593 | 0 | static int path_count_inc(int nests)
{
/* Allow an arbitrary number of depth 1 paths */
if (nests == 0)
return 0;
if (++path_count[nests] > path_limits[nests])
return -1;
return 0;
}
| 12,507 |
179,037 | 1 | const char *string_of_NPNVariable(int variable)
{
const char *str;
switch (variable) {
#define _(VAL) case VAL: str = #VAL; break;
_(NPNVxDisplay);
_(NPNVxtAppContext);
_(NPNVnetscapeWindow);
_(NPNVjavascriptEnabledBool);
_(NPNVasdEnabledBool);
_(NPNVisOfflineBool);
_(NPNVserviceManager);
_(NPNVDOMElement)... | 12,508 |
105,082 | 0 | inline Range::Range(PassRefPtr<Document> ownerDocument)
: m_ownerDocument(ownerDocument)
, m_start(m_ownerDocument)
, m_end(m_ownerDocument)
{
#ifndef NDEBUG
rangeCounter.increment();
#endif
m_ownerDocument->attachRange(this);
}
| 12,509 |
177,573 | 0 | virtual ~DatarateTestLarge() {}
| 12,510 |
45,425 | 0 | ecryptfs_init_crypt_stat(struct ecryptfs_crypt_stat *crypt_stat)
{
memset((void *)crypt_stat, 0, sizeof(struct ecryptfs_crypt_stat));
INIT_LIST_HEAD(&crypt_stat->keysig_list);
mutex_init(&crypt_stat->keysig_list_mutex);
mutex_init(&crypt_stat->cs_mutex);
mutex_init(&crypt_stat->cs_tfm_mutex);
mutex_init(&crypt_st... | 12,511 |
22,986 | 0 | static int decode_attr_group(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs_client *clp, uint32_t *gid)
{
uint32_t len;
__be32 *p;
*gid = -2;
if (unlikely(bitmap[1] & (FATTR4_WORD1_OWNER_GROUP - 1U)))
return -EIO;
if (likely(bitmap[1] & FATTR4_WORD1_OWNER_GROUP)) {
READ_BUF(4);
READ32(len);
READ_BUF... | 12,512 |
162,332 | 0 | VideoEncodeAcceleratorClient::VideoEncodeAcceleratorClient(
VideoEncodeAccelerator::Client* client,
mojom::VideoEncodeAcceleratorClientRequest request)
: client_(client), binding_(this, std::move(request)) {
DCHECK(client_);
}
| 12,513 |
150,732 | 0 | ClickEvent() : ui::Event(ui::ET_UNKNOWN, base::TimeTicks(), 0) {}
| 12,514 |
74,960 | 0 | static DWORD WINAPI drdynvc_virtual_channel_client_thread(LPVOID arg)
{
wStream* data;
wMessage message;
UINT error = CHANNEL_RC_OK;
drdynvcPlugin* drdynvc = (drdynvcPlugin*) arg;
if (!drdynvc)
{
ExitThread((DWORD) CHANNEL_RC_BAD_CHANNEL_HANDLE);
return CHANNEL_RC_BAD_CHANNEL_HANDLE;
}
while (1)
{
if (... | 12,515 |
8,104 | 0 | GBool GfxResources::lookupXObject(char *name, Object *obj) {
GfxResources *resPtr;
for (resPtr = this; resPtr; resPtr = resPtr->next) {
if (resPtr->xObjDict.isDict()) {
if (!resPtr->xObjDict.dictLookup(name, obj)->isNull())
return gTrue;
obj->free();
}
}
error(-1, "XObject '%s' is unknown"... | 12,516 |
55,959 | 0 | static int tty_write_lock(struct tty_struct *tty, int ndelay)
{
if (!mutex_trylock(&tty->atomic_write_lock)) {
if (ndelay)
return -EAGAIN;
if (mutex_lock_interruptible(&tty->atomic_write_lock))
return -ERESTARTSYS;
}
return 0;
}
| 12,517 |
3,209 | 0 | zxcheck(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
check_op(1);
make_bool(op, (r_has_attr(ACCESS_REF(op), a_executable) ? 1 : 0));
return 0;
}
| 12,518 |
927 | 0 | void CairoOutputDev::updateCTM(GfxState *state, double m11, double m12,
double m21, double m22,
double m31, double m32) {
cairo_matrix_t matrix, invert_matrix;
matrix.xx = m11;
matrix.yx = m12;
matrix.xy = m21;
matrix.yy = m22;
matrix.x0 = m31;
matrix.y0 = m32;
/* Make sure the matrix is invert... | 12,519 |
118,064 | 0 | bool OneClickSigninHelper::CanOffer(content::WebContents* web_contents,
CanOfferFor can_offer_for,
const std::string& email,
std::string* error_message) {
DCHECK(content::BrowserThread::CurrentlyOn(content::Bro... | 12,520 |
54,088 | 0 | static int inet_netconf_get_devconf(struct sk_buff *in_skb,
struct nlmsghdr *nlh)
{
struct net *net = sock_net(in_skb->sk);
struct nlattr *tb[NETCONFA_MAX+1];
struct netconfmsg *ncm;
struct sk_buff *skb;
struct ipv4_devconf *devconf;
struct in_device *in_dev;
struct net_device *dev;
int ifindex;
int er... | 12,521 |
139,527 | 0 | static bool ExecuteYankAndSelect(LocalFrame& frame,
Event*,
EditorCommandSource,
const String&) {
const String& yank_string = frame.GetEditor().GetKillRing().Yank();
if (DispatchBeforeInputInsertText(
EventT... | 12,522 |
168,299 | 0 | bool BrowserView::HasClientEdge() const {
return frame()->GetFrameView()->HasClientEdge();
}
| 12,523 |
98,445 | 0 | Extension* LoadExtension(const std::string& name,
std::string* error) {
return LoadExtensionWithLocation(name, Extension::INTERNAL, error);
}
| 12,524 |
75,842 | 0 | notify_fifo_script(vector_t *strvec, const char *type, notify_fifo_t *fifo)
{
char *id_str;
if (vector_size(strvec) < 2) {
report_config_error(CONFIG_GENERAL_ERROR, "No %snotify_fifo_script specified", type);
return;
}
if (fifo->script) {
report_config_error(CONFIG_GENERAL_ERROR, "%snotify_fifo_script alrea... | 12,525 |
186,501 | 1 | error::Error GLES2DecoderPassthroughImpl::DoBeginQueryEXT(
GLenum target,
GLuint id,
int32_t sync_shm_id,
uint32_t sync_shm_offset) {
GLuint service_id = GetQueryServiceID(id, &query_id_map_);
QueryInfo* query_info = &query_info_map_[service_id];
scoped_refptr<gpu::Buffer> buffer = GetSharedMemor... | 12,526 |
159,598 | 0 | void Document::UpdateStyleAndLayoutIgnorePendingStylesheets(
Document::RunPostLayoutTasks run_post_layout_tasks) {
UpdateStyleAndLayoutTreeIgnorePendingStylesheets();
UpdateStyleAndLayout();
if (run_post_layout_tasks == kRunPostLayoutTasksSynchronously && View())
View()->FlushAnyPendingPostLayoutTasks();... | 12,527 |
153,254 | 0 | bool DesktopWindowTreeHostX11::IsVisible() const {
return window_mapped_in_client_ || IsMinimized();
}
| 12,528 |
179,415 | 1 | int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len)
{
int rc = X86EMUL_CONTINUE;
int mode = ctxt->mode;
int def_op_bytes, def_ad_bytes, goffset, simd_prefix;
bool op_prefix = false;
bool has_seg_override = false;
struct opcode opcode;
ctxt->memop.type = OP_NONE;
ctxt->memopp = NULL;
ctxt->_eip... | 12,529 |
83,974 | 0 | static void sas_unregister_devs_sas_addr(struct domain_device *parent,
int phy_id, bool last)
{
struct expander_device *ex_dev = &parent->ex_dev;
struct ex_phy *phy = &ex_dev->ex_phy[phy_id];
struct domain_device *child, *n, *found = NULL;
if (last) {
list_for_each_entry_safe(child, n,
&ex_dev->children,... | 12,530 |
58,719 | 0 | void __do_SAK(struct tty_struct *tty)
{
#ifdef TTY_SOFT_SAK
tty_hangup(tty);
#else
struct task_struct *g, *p;
struct pid *session;
int i;
struct file *filp;
struct fdtable *fdt;
if (!tty)
return;
session = tty->session;
tty_ldisc_flush(tty);
tty_driver_flush_buffer(tty);
read_lock(&tasklist_lock);
/*... | 12,531 |
47,881 | 0 | int sk_set_peek_off(struct sock *sk, int val)
{
if (val < 0)
return -EINVAL;
sk->sk_peek_off = val;
return 0;
}
| 12,532 |
88,261 | 0 | epilogProcessor(XML_Parser parser, const char *s, const char *end,
const char **nextPtr) {
parser->m_processor = epilogProcessor;
parser->m_eventPtr = s;
for (;;) {
const char *next = NULL;
int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
parser->m_eventEndPtr = next;
swi... | 12,533 |
177,217 | 0 | size_t ACodec::PortDescription::countBuffers() {
return mBufferIDs.size();
}
| 12,534 |
53,129 | 0 | int ndo_dflt_fdb_add(struct ndmsg *ndm,
struct nlattr *tb[],
struct net_device *dev,
const unsigned char *addr, u16 vid,
u16 flags)
{
int err = -EINVAL;
/* If aging addresses are supported device will need to
* implement its own handler for this.
*/
if (ndm->ndm_state && !(ndm->ndm_s... | 12,535 |
131,597 | 0 | static void perWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
imp->perWorldBindingsVoidMethod();
}
| 12,536 |
168,825 | 0 | bool ExecuteCodeInTabFunction::HasPermission() {
if (Init() == SUCCESS &&
extension_->permissions_data()->HasAPIPermissionForTab(
execute_tab_id_, APIPermission::kTab)) {
return true;
}
return ExtensionFunction::HasPermission();
}
| 12,537 |
59,169 | 0 | static void release_maps(struct bpf_verifier_env *env)
{
int i;
for (i = 0; i < env->used_map_cnt; i++)
bpf_map_put(env->used_maps[i]);
}
| 12,538 |
61,322 | 0 | static void compact_print_str(WriterContext *wctx, const char *key, const char *value)
{
CompactContext *compact = wctx->priv;
AVBPrint buf;
if (wctx->nb_item[wctx->level]) printf("%c", compact->item_sep);
if (!compact->nokey)
printf("%s%s=", wctx->section_pbuf[wctx->level].str, key);
av_bp... | 12,539 |
27,591 | 0 | midi_synth_set_instr(int dev, int channel, int instr_no)
{
int orig_dev = synth_devs[dev]->midi_dev;
if (instr_no < 0 || instr_no > 127)
instr_no = 0;
if (channel < 0 || channel > 15)
return 0;
leave_sysex(dev);
if (!prefix_cmd(orig_dev, 0xc0 | (channel & 0x0f)))
return 0;
midi_outc(orig_dev,... | 12,540 |
10,902 | 0 | ksba_ocsp_get_status (ksba_ocsp_t ocsp, ksba_cert_t cert,
ksba_status_t *r_status,
ksba_isotime_t r_this_update,
ksba_isotime_t r_next_update,
ksba_isotime_t r_revocation_time,
ksba_crl_reason_t *r_reason)
{
... | 12,541 |
82,919 | 0 | static bool check_bytes(const ut8 *buf, ut64 length) {
return buf && length > 4 && memcmp (buf, ELFMAG, SELFMAG) == 0
&& buf[4] != 2;
}
| 12,542 |
113,614 | 0 | bool AccessibilityUIElement::removeNotificationListener()
{
return true;
}
| 12,543 |
74,192 | 0 | free_config_tinker(
config_tree *ptree
)
{
FREE_ATTR_VAL_FIFO(ptree->tinker);
}
| 12,544 |
119,104 | 0 | char *itoa_r(intptr_t i, char *buf, size_t sz, int base, size_t padding) {
size_t n = 1;
if (n > sz)
return NULL;
if (base < 2 || base > 16) {
buf[0] = '\000';
return NULL;
}
char *start = buf;
uintptr_t j = i;
if (i < 0 && base == 10) {
j = -i;
if (++n > sz) {
buf[0] = '\00... | 12,545 |
63,683 | 0 | NICK_REC *nicklist_find(CHANNEL_REC *channel, const char *nick)
{
g_return_val_if_fail(IS_CHANNEL(channel), NULL);
g_return_val_if_fail(nick != NULL, NULL);
return g_hash_table_lookup(channel->nicks, nick);
}
| 12,546 |
130,921 | 0 | static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedActivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
exception... | 12,547 |
81,004 | 0 | static inline int vmcs12_write_any(struct kvm_vcpu *vcpu,
unsigned long field, u64 field_value){
short offset = vmcs_field_to_offset(field);
char *p = ((char *) get_vmcs12(vcpu)) + offset;
if (offset < 0)
return offset;
switch (vmcs_field_width(field)) {
case VMCS_FIELD_WIDTH_U16:
*(u16 *)p = field_val... | 12,548 |
181,107 | 1 | parse_field(netdissect_options *ndo, const char **pptr, int *len)
{
const char *s;
if (*len <= 0 || !pptr || !*pptr)
return NULL;
if (*pptr > (const char *) ndo->ndo_snapend)
return NULL;
s = *pptr;
while (*pptr <= (const char *) ndo->ndo_snapend && *len >= 0 && **pptr) {
(*pptr)++;
(*len)--;
}
(*pptr)++... | 12,549 |
182,140 | 1 | static int crypto_report_one(struct crypto_alg *alg,
struct crypto_user_alg *ualg, struct sk_buff *skb)
{
strlcpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name));
strlcpy(ualg->cru_driver_name, alg->cra_driver_name,
sizeof(ualg->cru_driver_name));
strlcpy(ualg->cru_module_name, module_name(alg->cra_module),
s... | 12,550 |
99,002 | 0 | unsigned int WebGraphicsContext3DDefaultImpl::getPlatformTextureId()
{
return m_texture;
}
| 12,551 |
67,310 | 0 | static void d_lru_add(struct dentry *dentry)
{
D_FLAG_VERIFY(dentry, 0);
dentry->d_flags |= DCACHE_LRU_LIST;
this_cpu_inc(nr_dentry_unused);
WARN_ON_ONCE(!list_lru_add(&dentry->d_sb->s_dentry_lru, &dentry->d_lru));
}
| 12,552 |
63,414 | 0 | static inline int get_rice_ook(GetBitContext *gb, int k)
{
unsigned int x;
x = get_unary(gb, 1, get_bits_left(gb));
if (k)
x = (x << k) | get_bits(gb, k);
return x;
}
| 12,553 |
149,156 | 0 | bool LookupMatchInTopDomains(base::StringPiece skeleton) {
DCHECK_NE(skeleton.back(), '.');
auto labels = base::SplitStringPiece(skeleton, ".", base::KEEP_WHITESPACE,
base::SPLIT_WANT_ALL);
if (labels.size() > kNumberOfLabelsToCheck) {
labels.erase(labels.begin(),
... | 12,554 |
8,688 | 0 | mkalldirs (const char *path)
{
const char *p;
char *t;
struct stat st;
int res;
p = path + strlen (path);
for (; *p != '/' && p != path; p--)
;
/* Don't create if it's just a file. */
if ((p == path) && (*p != '/'))
return 0;
t = strdupdelim (path, p);
/* Check whether the directory exis... | 12,555 |
109,658 | 0 | CSSStyleSheet* Document::elementSheet()
{
if (!m_elemSheet)
m_elemSheet = CSSStyleSheet::createInline(this, m_baseURL);
return m_elemSheet.get();
}
| 12,556 |
83,916 | 0 | vips_foreign_save_dispose( GObject *gobject )
{
VipsForeignSave *save = VIPS_FOREIGN_SAVE( gobject );
VIPS_UNREF( save->ready );
G_OBJECT_CLASS( vips_foreign_save_parent_class )->dispose( gobject );
}
| 12,557 |
37,289 | 0 | static u32 vmx_segment_access_rights(struct kvm_segment *var)
{
u32 ar;
if (var->unusable || !var->present)
ar = 1 << 16;
else {
ar = var->type & 15;
ar |= (var->s & 1) << 4;
ar |= (var->dpl & 3) << 5;
ar |= (var->present & 1) << 7;
ar |= (var->avl & 1) << 12;
ar |= (var->l & 1) << 13;
ar |= (var->d... | 12,558 |
112,709 | 0 | void DocumentLoader::stopLoadingSubresources()
{
cancelAll(m_subresourceLoaders);
}
| 12,559 |
18,454 | 0 | void sigchld_handler(int s) {
int status;
int* i;
pid_t pid;
while((pid=waitpid(-1, &status, WNOHANG)) > 0) {
if(WIFEXITED(status)) {
msg3(LOG_INFO, "Child exited with %d", WEXITSTATUS(status));
}
i=g_hash_table_lookup(children, &pid);
if(!i) {
msg3(LOG_INFO, "SIGCHLD received for an unknown c... | 12,560 |
81,519 | 0 | void tracing_snapshot(void)
{
struct trace_array *tr = &global_trace;
tracing_snapshot_instance(tr);
}
| 12,561 |
68,437 | 0 | static struct sctp_transport *sctp_addr_id2transport(struct sock *sk,
struct sockaddr_storage *addr,
sctp_assoc_t id)
{
struct sctp_association *addr_asoc = NULL, *id_asoc = NULL;
struct sctp_af *af = sctp_get_af_specific(addr->ss_family);
union sctp_addr *laddr = (union sctp_addr *)addr;
stru... | 12,562 |
77,974 | 0 | static TIFFMethodType GetJPEGMethod(Image* image,TIFF *tiff,uint16 photometric,
uint16 bits_per_sample,uint16 samples_per_pixel)
{
#define BUFFER_SIZE 2048
MagickOffsetType
position,
offset;
register size_t
i;
TIFFMethodType
method;
#if defined(TIFF_VERSION_BIG)
uint64
#else
uint32
#endi... | 12,563 |
25,647 | 0 | void perf_callchain_kernel(struct perf_callchain_entry *entry,
struct pt_regs *regs)
{
unsigned long ksp, fp;
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
int graph = 0;
#endif
stack_trace_flush();
perf_callchain_store(entry, regs->tpc);
ksp = regs->u_regs[UREG_I6];
fp = ksp + STACK_BIAS;
do {
struct sparc_sta... | 12,564 |
107,720 | 0 | std::unique_ptr<NavigationState> NavigationState::CreateContentInitiated() {
return base::WrapUnique(new NavigationState(
CommonNavigationParams(), CommitNavigationParams(), base::TimeTicks(),
true, content::mojom::FrameNavigationControl::CommitNavigationCallback(),
content::mojom::NavigationClient:... | 12,565 |
102,035 | 0 | ~GraphicsSurfacePrivate()
{
if (m_glxPixmap)
glXDestroyPixmap(m_display, m_glxPixmap);
m_glxPixmap = 0;
if (m_xPixmap)
XFreePixmap(m_display, m_xPixmap);
m_xPixmap = 0;
if (m_display)
XCloseDisplay(m_display);
m_display = 0;
... | 12,566 |
161,818 | 0 | void PlatformSensorProviderWin::FreeResources() {
StopSensorThread();
}
| 12,567 |
155,965 | 0 | DiceTurnSyncOnHelper::DiceTurnSyncOnHelper(
Profile* profile,
signin_metrics::AccessPoint signin_access_point,
signin_metrics::PromoAction signin_promo_action,
signin_metrics::Reason signin_reason,
const std::string& account_id,
SigninAbortedMode signin_aborted_mode,
std::unique_ptr<Delegate... | 12,568 |
54,728 | 0 | int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table *wait)
{
struct snd_seq_client *client;
client = clientptr(clientid);
if (client == NULL)
return -ENXIO;
if (! snd_seq_write_pool_allocated(client))
return 1;
if (snd_seq_pool_poll_wait(client->pool, file, wait))
return 1;
re... | 12,569 |
172,631 | 0 | void PrintFormatNumber(void * ValuePtr, int Format, int ByteCount)
{
int s,n;
for(n=0;n<16;n++){
switch(Format){
case FMT_SBYTE:
case FMT_BYTE: printf("%02x",*(uchar *)ValuePtr); s=1; break;
case FMT_USHORT: printf("%d",Get16u(ValuePtr)); s=2; break;
case FMT_ULONG:
case FMT_SLONG: printf("%d",Get3... | 12,570 |
54,226 | 0 | static int get_serial_usage(struct acm *acm,
struct serial_icounter_struct __user *count)
{
struct serial_icounter_struct icount;
int rv = 0;
memset(&icount, 0, sizeof(icount));
icount.dsr = acm->iocount.dsr;
icount.rng = acm->iocount.rng;
icount.dcd = acm->iocount.dcd;
icount.frame = acm->iocount.frame;... | 12,571 |
178,127 | 1 | static void vrend_renderer_init_blit_ctx(struct vrend_blitter_ctx *blit_ctx)
{
struct virgl_gl_ctx_param ctx_params;
int i;
if (blit_ctx->initialised) {
vrend_clicbs->make_current(0, blit_ctx->gl_context);
return;
}
ctx_params.shared = true;
ctx_params.major_ver = VREND_GL_VER_MAJOR;... | 12,572 |
668 | 0 | sparse_scan_file_seek (struct tar_sparse_file *file)
{
struct tar_stat_info *st = file->stat_info;
int fd = file->fd;
struct sp_array sp = {0, 0};
off_t offset = 0;
off_t data_offset;
off_t hole_offset;
st->archive_file_size = 0;
for (;;)
{
/* locate first chunk of data */
data_offset ... | 12,573 |
9,487 | 0 | d_to_tv(double d, struct timeval *tv)
{
tv->tv_sec = (long)d;
tv->tv_usec = (d - tv->tv_sec) * 1000000;
}
| 12,574 |
44,836 | 0 | local void write_thread(void *dummy)
{
long seq; /* next sequence number looking for */
struct job *job; /* job pulled and working on */
size_t len; /* input length */
int more; /* true if more chunks to write */
unsigned... | 12,575 |
90,962 | 0 | void CWebServer::Cmd_AddHardware(WebEmSession & session, const request& req, Json::Value &root)
{
if (session.rights != 2)
{
session.reply_status = reply::forbidden;
return; //Only admin user allowed
}
std::string name = CURLEncode::URLDecode(request::findValue(&req, "name"));
std::string se... | 12,576 |
92,169 | 0 | static int modify_raw_packet_qp_sq(struct mlx5_core_dev *dev,
struct mlx5_ib_sq *sq,
int new_state,
const struct mlx5_modify_raw_qp_param *raw_qp_param)
{
struct mlx5_ib_qp *ibqp = sq->base.container_mibqp;
struct mlx5_rate_limit old_rl = ibqp->rl;
struct mlx5_rate_limit new_rl = old_rl;
bool n... | 12,577 |
129,903 | 0 | bool SpeechSynthesis::speaking() const
{
return currentSpeechUtterance();
}
| 12,578 |
8,682 | 0 | char_needs_escaping (const char *p)
{
if (*p == '%')
{
if (c_isxdigit (*(p + 1)) && c_isxdigit (*(p + 2)))
return false;
else
/* Garbled %.. sequence: encode `%'. */
return true;
}
else if (URL_UNSAFE_CHAR (*p) && !URL_RESERVED_CHAR (*p))
return true;
else
retur... | 12,579 |
107,401 | 0 | void Scrollbar::setParent(ScrollView* parentView)
{
if (!parentView && m_overlapsResizer && parent())
parent()->adjustScrollbarsAvoidingResizerCount(-1);
Widget::setParent(parentView);
}
| 12,580 |
72,008 | 0 | static void LogPolygonInfo(const PolygonInfo *polygon_info)
{
register EdgeInfo
*p;
register ssize_t
i,
j;
(void) LogMagickEvent(DrawEvent,GetMagickModule()," begin active-edge");
p=polygon_info->edges;
for (i=0; i < (ssize_t) polygon_info->number_edges; i++)
{
(void) LogMagickEvent(Dra... | 12,581 |
31,494 | 0 | PHP_FUNCTION(radius_acct_open)
{
radius_descriptor *raddesc;
raddesc = emalloc(sizeof(radius_descriptor));
raddesc->radh = rad_acct_open();
if (raddesc->radh != NULL) {
ZEND_REGISTER_RESOURCE(return_value, raddesc, le_radius);
raddesc->id = Z_LVAL_P(return_value);
} else {
RETURN_FALSE;
}
}
| 12,582 |
130,486 | 0 | void GetErrorQuery::Destroy(bool /* have_context */) {
if (!IsDeleted()) {
MarkAsDeleted();
}
}
| 12,583 |
136,671 | 0 | static bool NeedsHistoryItemRestore(FrameLoadType type) {
return type == kFrameLoadTypeBackForward || IsReloadLoadType(type);
}
| 12,584 |
69,500 | 0 | static void rxrpc_destroy(struct key *key)
{
rxrpc_free_token_list(key->payload.data);
}
| 12,585 |
31,704 | 0 | SYSCALL_DEFINE1(sigpending, old_sigset_t __user *, set)
{
return sys_rt_sigpending((sigset_t __user *)set, sizeof(old_sigset_t));
}
| 12,586 |
163,297 | 0 | void BrowserMainLoop::SynchronouslyFlushStartupTasks() {
startup_task_runner_->RunAllTasksNow();
}
| 12,587 |
157,017 | 0 | blink::WebSize WebMediaPlayerMS::VisibleRect() const {
DCHECK(thread_checker_.CalledOnValidThread());
scoped_refptr<media::VideoFrame> video_frame =
compositor_->GetCurrentFrameWithoutUpdatingStatistics();
if (!video_frame)
return blink::WebSize();
const gfx::Rect& visible_rect = video_frame->visible... | 12,588 |
137,411 | 0 | void RenderViewTest::RendererBlinkPlatformImplTestOverride::Shutdown() {
renderer_scheduler_->Shutdown();
blink_platform_impl_->Shutdown();
}
| 12,589 |
104,997 | 0 | sync_api::HttpPostProviderInterface* HttpBridgeFactory::Create() {
HttpBridge* http = new HttpBridge(request_context_getter_);
http->AddRef();
return http;
}
| 12,590 |
154,499 | 0 | void GLES2DecoderPassthroughImpl::EmulatedColorBuffer::Resize(
const gfx::Size& new_size) {
if (size == new_size)
return;
size = new_size;
ScopedTexture2DBindingReset scoped_texture_reset(api);
DCHECK(texture);
DCHECK(texture->target() == GL_TEXTURE_2D);
api->glBindTextureFn(texture->target(), te... | 12,591 |
158,369 | 0 | void RenderWidgetHostImpl::SetScreenOrientationForTesting(
uint16_t angle,
ScreenOrientationValues type) {
screen_orientation_angle_for_testing_ = angle;
screen_orientation_type_for_testing_ = type;
SynchronizeVisualProperties();
}
| 12,592 |
185,711 | 1 | EffectPaintPropertyNode* EffectPaintPropertyNode::Root() {
DEFINE_STATIC_REF(EffectPaintPropertyNode, root,
(EffectPaintPropertyNode::Create(
nullptr, State{TransformPaintPropertyNode::Root(),
ClipPaintPropertyNode::Root()})));
return ... | 12,593 |
97,965 | 0 | void RenderView::OnMessageReceived(const IPC::Message& message) {
WebFrame* main_frame = webview() ? webview()->mainFrame() : NULL;
if (main_frame)
child_process_logging::SetActiveURL(main_frame->url());
if (devtools_client_.get() && devtools_client_->OnMessageReceived(message))
return;
if (devtools_ag... | 12,594 |
115,945 | 0 | void ewk_frame_redirect_requested(Evas_Object* ewkFrame, const char* url)
{
evas_object_smart_callback_call(ewkFrame, "redirect,requested", (void*)url);
}
| 12,595 |
88,950 | 0 | MagickExport Image *StatisticImage(const Image *image,const StatisticType type,
const size_t width,const size_t height,ExceptionInfo *exception)
{
Image
*statistic_image;
statistic_image=StatisticImageChannel(image,DefaultChannels,type,width,
height,exception);
return(statistic_image);
}
| 12,596 |
45,786 | 0 | static int hmac_create(struct crypto_template *tmpl, struct rtattr **tb)
{
struct shash_instance *inst;
struct crypto_alg *alg;
struct shash_alg *salg;
int err;
int ds;
int ss;
err = crypto_check_attr_type(tb, CRYPTO_ALG_TYPE_SHASH);
if (err)
return err;
salg = shash_attr_alg(tb[1], 0, 0);
if (IS_ERR(salg... | 12,597 |
127,932 | 0 | void BrowserViewRenderer::DidDestroyCompositor(
content::SynchronousCompositor* compositor) {
TRACE_EVENT0("android_webview", "BrowserViewRenderer::DidDestroyCompositor");
DCHECK(compositor_);
compositor_->SetIsActive(false);
compositor_ = NULL;
}
| 12,598 |
152,205 | 0 | void RenderFrameImpl::BubbleLogicalScrollInParentFrame(
blink::WebScrollDirection direction,
blink::WebScrollGranularity granularity) {
DCHECK(IsLocalRoot());
DCHECK(!IsMainFrame());
Send(new FrameHostMsg_BubbleLogicalScrollInParentFrame(routing_id_, direction,
... | 12,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.