idx int64 | func string | target int64 |
|---|---|---|
448,316 | SProcXkbGetNames(ClientPtr client)
{
REQUEST(xkbGetNamesReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xkbGetNamesReq);
swaps(&stuff->deviceSpec);
swapl(&stuff->which);
return ProcXkbGetNames(client);
} | 0 |
236,785 | void Document::setWindowAttributeEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, DOMWrapperWorld* isolatedWorld)
{
DOMWindow* domWindow = this->domWindow();
if (!domWindow)
return;
domWindow->setAttributeEventListener(eventType, listener, isolatedWorld);
}
| 0 |
372,360 | cmsHPROFILE CMSEXPORT cmsCreateLab2ProfileTHR(cmsContext ContextID, const cmsCIExyY* WhitePoint)
{
cmsHPROFILE hProfile;
cmsPipeline* LUT = NULL;
hProfile = cmsCreateRGBProfileTHR(ContextID, WhitePoint == NULL ? cmsD50_xyY() : WhitePoint, NULL, NULL);
if (hProfile == NULL) return NULL;
cmsSetProfi... | 0 |
215,925 | Tab* TabStrip::FindTabForEvent(const gfx::Point& point) {
DCHECK(touch_layout_);
int active_tab_index = touch_layout_->active_index();
Tab* tab = FindTabForEventFrom(point, active_tab_index, -1);
return tab ? tab : FindTabForEventFrom(point, active_tab_index + 1, 1);
}
| 0 |
408,251 | static void __uprobe_unregister(struct uprobe *uprobe, struct uprobe_consumer *uc)
{
int err;
if (WARN_ON(!consumer_del(uprobe, uc)))
return;
err = register_for_each_vma(uprobe, NULL);
/* TODO : cant unregister? schedule a worker thread */
if (!uprobe->consumers && !err)
delete_uprobe(uprobe);
} | 0 |
389,247 | test_HaveKeyIncorrect(void)
{
const keyid_t KEYNO = 2;
TEST_ASSERT_FALSE(auth_havekey(KEYNO));
TEST_ASSERT_FALSE(authhavekey(KEYNO));
return;
} | 0 |
399,286 | */
void mpvio_info(Vio *vio, MYSQL_PLUGIN_VIO_INFO *info)
{
memset(info, 0, sizeof(*info));
switch (vio->type) {
case VIO_TYPE_TCPIP:
info->protocol= MYSQL_VIO_TCP;
info->socket= vio_fd(vio);
return;
case VIO_TYPE_SOCKET:
info->protocol= MYSQL_VIO_SOCKET;
info->socket= vio_fd(vio);
retur... | 0 |
53,873 | static void __iommu_free_atomic(struct device *dev, void *cpu_addr,
dma_addr_t handle, size_t size)
{
__iommu_remove_mapping(dev, handle, size);
__free_from_pool(cpu_addr, size);
} | 0 |
337,646 | static inline int64_t get_sector_offset(BlockDriverState *bs,
int64_t sector_num, int write)
{
BDRVVPCState *s = bs->opaque;
uint64_t offset = sector_num * 512;
uint64_t bitmap_offset, block_offset;
uint32_t pagetable_index, pageentry_index;
pagetable_index = offset / s->block_size;
... | 1 |
375,818 | static void vmstate_subsection_save(QEMUFile *f, const VMStateDescription *vmsd,
void *opaque)
{
const VMStateSubsection *sub = vmsd->subsections;
while (sub && sub->needed) {
if (sub->needed(opaque)) {
const VMStateDescription *vmsd = sub->vmsd;
... | 0 |
59,376 | static void nfs4_free_pages(struct page **pages, size_t size)
{
int i;
if (!pages)
return;
for (i = 0; i < size; i++) {
if (!pages[i])
break;
__free_page(pages[i]);
}
kfree(pages);
} | 0 |
149,584 | _Pickler_Write(PicklerObject *self, const char *s, Py_ssize_t data_len)
{
Py_ssize_t i, n, required;
char *buffer;
int need_new_frame;
assert(s != NULL);
need_new_frame = (self->framing && self->frame_start == -1);
if (need_new_frame)
n = data_len + FRAME_HEADER_SIZE;
else
... | 0 |
161,562 | STATIC void
S_reginsert(pTHX_ RExC_state_t *pRExC_state, const U8 op,
const regnode_offset operand, const U32 depth)
{
regnode *src;
regnode *dst;
regnode *place;
const int offset = regarglen[(U8)op];
const int size = NODE_STEP_REGNODE + offset;
GET_RE_DEBUG_FLAGS_DECL;
PE... | 0 |
32,921 | char *charset_client2fs(const char * const string)
{
char *output = NULL, *output_;
size_t inlen, outlen, outlen_;
inlen = strlen(string);
outlen_ = outlen = inlen * (size_t) 4U + (size_t) 1U;
if (outlen <= inlen ||
(output_ = output = calloc(outlen, (size_t) 1U)) == NULL) {
die... | 0 |
490,922 | static void free_filters(filter_rule *ent)
{
while (ent) {
filter_rule *next = ent->next;
free_filter(ent);
ent = next;
}
} | 0 |
119,744 | SYSCALL_DEFINE2(rename, const char __user *, oldname, const char __user *, newname)
{
return sys_renameat2(AT_FDCWD, oldname, AT_FDCWD, newname, 0);
} | 0 |
243,381 | void OmniboxViewViews::ExecuteCommand(int command_id, int event_flags) {
DestroyTouchSelection();
switch (command_id) {
case IDC_PASTE_AND_GO:
model()->PasteAndGo(GetClipboardText());
return;
case IDS_SHOW_URL:
model()->Unelide(true /* exit_query_in_omnibox */);
return;
case IDC_... | 0 |
75,804 | GF_Err gf_isom_remove_edits(GF_ISOFile *movie, u32 trackNumber)
{
GF_Err e;
GF_TrackBox *trak;
trak = gf_isom_get_track_from_file(movie, trackNumber);
if (!trak) return GF_BAD_PARAM;
e = CanAccessMovie(movie, GF_ISOM_OPEN_WRITE);
if (e) return e;
if (!trak->editBox || !trak->editBox->editList) return GF_OK;
... | 0 |
32,853 | void Filter::setDecoderFilterCallbacks(Http::StreamDecoderFilterCallbacks& callbacks) {
callbacks_ = &callbacks;
// As the decoder filter only pushes back via watermarks once data has reached
// it, it can latch the current buffer limit and does not need to update the
// limit if another filter increases it.
... | 0 |
253,898 | std::string GetFileNameFromCD(const std::string& header,
const std::string& referrer_charset) {
std::string decoded;
std::string param_value = GetHeaderParamValue(header, "filename*",
QuoteRule::KEEP_OUTER_QUOTES);
if (!param_value.empt... | 0 |
522,075 | Field *Type_handler_blob_common::make_conversion_table_field(TABLE *table,
uint metadata,
const Field *target)
const
{
uint pack_length= m... | 0 |
516,438 | static int test_gf2m_modinv(void)
{
BIGNUM *a = NULL, *b[2] = {NULL, NULL}, *c = NULL, *d = NULL;
int i, j, st = 0;
if (!TEST_ptr(a = BN_new())
|| !TEST_ptr(b[0] = BN_new())
|| !TEST_ptr(b[1] = BN_new())
|| !TEST_ptr(c = BN_new())
|| !TEST_ptr(d = BN_new()))
... | 0 |
279,505 | void FramebufferManager::CreateFramebuffer(
GLuint client_id, GLuint service_id) {
std::pair<FramebufferMap::iterator, bool> result =
framebuffers_.insert(
std::make_pair(
client_id,
scoped_refptr<Framebuffer>(
new Framebuffer(this, service_id))));
D... | 0 |
494,486 | CURLcode Curl_unencode_write(struct Curl_easy *data,
struct contenc_writer *writer,
const char *buf, size_t nbytes)
{
(void) data;
(void) writer;
(void) buf;
(void) nbytes;
return CURLE_NOT_BUILT_IN;
} | 0 |
176,433 | static void monitor_worker_process(int child_pid, const debugger_request_t& request) {
struct timespec timeout = {.tv_sec = 10, .tv_nsec = 0 };
if (should_attach_gdb(request)) {
timeout.tv_sec = INT_MAX;
}
sigset_t signal_set;
sigemptyset(&signal_set);
sigaddset(&signal_set, SIGCHLD);
bool kill_worker = ... | 0 |
91,849 | int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){
Table *pSelTab; /* A fake table from which we get the result set */
Select *pSel; /* Copy of the SELECT that implements the view */
int nErr = 0; /* Number of errors encountered */
int n; /* Temporarily holds the number of cursors... | 0 |
50,669 | encode_attr_2(
Slapi_PBlock *pb,
BerElement *ber,
Slapi_Entry *e,
Slapi_ValueSet *vs,
int attrsonly,
const char *attribute_type,
const char *returned_type)
{
char *attrs[2] = {NULL, NULL};
Slapi_Value *v;
int i = slapi_valueset_first_value(vs, &v);
if (i == -1) {
re... | 0 |
368,904 | string_strcasestr (const char *string, const char *search)
{
int length_search;
length_search = utf8_strlen (search);
if (!string || !search || (length_search == 0))
return NULL;
while (string[0])
{
if (string_strncasecmp (string, search, length_search) == 0)
return (c... | 0 |
309,681 | const char* BrowserRootView::GetClassName() const {
return kViewClassName;
}
| 0 |
99,531 | MagickExport MagickBooleanType GetMultilineTypeMetrics(Image *image,
const DrawInfo *draw_info,TypeMetric *metrics)
{
char
**textlist;
DrawInfo
*annotate_info;
MagickBooleanType
status;
register ssize_t
i;
TypeMetric
extent;
assert(image != (Image *) NULL);
assert(image->signatu... | 0 |
76,278 | void __perf_event_task_sched_out(struct task_struct *task,
struct task_struct *next)
{
int ctxn;
if (__this_cpu_read(perf_sched_cb_usages))
perf_pmu_sched_task(task, next, false);
if (atomic_read(&nr_switch_events))
perf_event_switch(task, next, false);
for_each_task_context_nr(ctxn)
perf_event_contex... | 0 |
354,189 | Type_handler_decimal_result::make_num_distinct_aggregator_field(
MEM_ROOT *mem_root,
const Item *item)
const
{
DBUG_ASSERT(item->decimals ... | 1 |
196,384 | MSG_PROCESS_RETURN tls_process_new_session_ticket(SSL *s, PACKET *pkt)
{
int al;
unsigned int ticklen;
unsigned long ticket_lifetime_hint;
if (!PACKET_get_net_4(pkt, &ticket_lifetime_hint)
|| !PACKET_get_net_2(pkt, &ticklen)
|| PACKET_remaining(pkt) != ticklen) {
al = SSL_AD_DEC... | 0 |
404,737 | static ssize_t raw_preadv(struct bdev *bdev, struct iovec *iov, int iovcnt, off_t offset)
{
return preadv(bdev->fd, iov, iovcnt, offset);
} | 0 |
312,789 | void RenderFrameHostImpl::FlushNetworkAndNavigationInterfacesForTesting() {
DCHECK(network_service_connection_error_handler_holder_);
network_service_connection_error_handler_holder_.FlushForTesting();
if (!navigation_control_)
GetNavigationControl();
DCHECK(navigation_control_);
navigation_control_.Flus... | 0 |
54,284 | WC_INLINE static int fp_mul_comba_mulx(fp_int *A, fp_int *B, fp_int *C)
{
int ix, iy, iz, pa;
fp_int *dst;
#ifndef WOLFSSL_SMALL_STACK
fp_int tmp[1];
#else
fp_int *tmp;
#endif
/* Variables used but not seen by cppcheck. */
(void)ix; (void)iy; (void)iz;
#ifdef WOLFSSL_SMALL_STACK
... | 0 |
125,872 | static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortLong(uint32 value)
{
if (value>0xFFFF)
return(TIFFReadDirEntryErrRange);
else
return(TIFFReadDirEntryErrOk);
} | 0 |
226,093 | LayoutUnit RenderBox::containingBlockAvailableLineWidth() const
{
RenderBlock* cb = containingBlock();
if (cb->isRenderBlockFlow())
return toRenderBlockFlow(cb)->availableLogicalWidthForLine(logicalTop(), false, availableLogicalHeight(IncludeMarginBorderPadding));
return 0;
}
| 0 |
113,733 | static u32 filter_rcv(struct sock *sk, struct sk_buff *buf)
{
struct socket *sock = sk->sk_socket;
struct tipc_msg *msg = buf_msg(buf);
unsigned int limit = rcvbuf_limit(sk, buf);
u32 res = TIPC_OK;
/* Reject message if it is wrong sort of message for socket */
if (msg_type(msg) > TIPC_DIRECT_MSG)
return TIPC_... | 0 |
133,322 | GF_EXPORT
void gf_isom_box_del(GF_Box *a)
{
GF_List *child_boxes;
const struct box_registry_entry *a_box_registry;
if (!a) return;
child_boxes = a->child_boxes;
a->child_boxes = NULL;
a_box_registry = a->registry;
if (!a_box_registry) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Delete invalid box t... | 0 |
215,632 | bool ContentSecurityPolicy::IsActive() const {
return !policies_.IsEmpty();
}
| 0 |
4,429 | int imap_exec(struct ImapAccountData *adata, const char *cmdstr, ImapCmdFlags flags)
{
int rc;
rc = cmd_start(adata, cmdstr, flags);
if (rc < 0)
{
cmd_handle_fatal(adata);
return IMAP_EXEC_FATAL;
}
if (flags & IMAP_CMD_QUEUE)
return IMAP_EXEC_SUCCESS;
if ((flags & IMAP_CMD_POLL) && (C_ImapP... | 1 |
195,969 | explicit MultiPartResponseClient(WebPluginResourceClient* resource_client)
: resource_client_(resource_client) {
Clear();
}
| 0 |
252,552 | status_t BnSoundTriggerHwService::onTransact(
uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
{
switch(code) {
case LIST_MODULES: {
CHECK_INTERFACE(ISoundTriggerHwService, data, reply);
unsigned int numModulesReq = data.readInt32();
if (numModulesReq >... | 0 |
485,358 | peer_default_originate_set_vty (struct vty *vty, const char *peer_str,
afi_t afi, safi_t safi,
const char *rmap, int set)
{
int ret;
struct peer *peer;
peer = peer_and_group_lookup_vty (vty, peer_str);
if (! peer)
return CMD_WARNING;
if (... | 0 |
511,855 | static void test_json_append_escaped(void)
{
string_t *str = t_str_new(32);
test_begin("json_append_escaped()");
json_append_escaped(str, "\b\f\r\n\t\"\\\001\002-\xC3\xA4\xf0\x90\x90\xb7\xff");
test_assert(strcmp(str_c(str), "\\b\\f\\r\\n\\t\\\"\\\\\\u0001\\u0002-\\u00e4\\ud801\\udc37" UNICODE_REPLACEMENT_CHAR_UTF... | 0 |
330,227 | static int tta_get_unary(GetBitContext *gb)
{
int ret = 0;
// count ones
while(get_bits1(gb))
ret++;
return ret;
}
| 0 |
445,732 | char *getusername_malloc(void) {
const char *e;
e = secure_getenv("USER");
if (e)
return strdup(e);
return uid_to_name(getuid());
} | 0 |
294,427 | static unsigned zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in,
size_t insize, const LodePNGCompressSettings* settings)
{
if (!settings->custom_zlib) return 87; /*no custom zlib function provided */
return settings->custom_zlib(out, outsize, in, insize, set... | 0 |
157,741 | lldpd_get_lsb_release() {
static char release[1024];
char *const command[] = { "lsb_release", "-s", "-d", NULL };
int pid, status, devnull, count;
int pipefd[2];
log_debug("localchassis", "grab LSB release");
if (pipe(pipefd)) {
log_warn("localchassis", "unable to get a pair of pipes");
return NULL;
}
pi... | 0 |
283,154 | newimage(Image *image)
{
memset(image, 0, sizeof *image);
}
| 0 |
206,268 | void PrintWebViewHelper::PrintPreviewContext::FinalizePrintReadyDocument() {
DCHECK(IsRendering());
base::TimeTicks begin_time = base::TimeTicks::Now();
metafile_->FinishDocument();
if (print_ready_metafile_page_count_ <= 0) {
NOTREACHED();
return;
}
UMA_HISTOGRAM_MEDIUM_TIMES("PrintPreview.Rende... | 0 |
235,428 | static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjectV8Internal::methodWithSequenceArgMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
| 0 |
372,711 | void CLASS fuji_load_raw()
{
#ifndef LIBRAW_LIBRARY_BUILD
ushort *pixel;
int wide, row, col, r, c;
fseek (ifp, (top_margin*raw_width + left_margin) * 2, SEEK_CUR);
wide = fuji_width << !fuji_layout;
pixel = (ushort *) calloc (wide, sizeof *pixel);
merror (pixel, "fuji_load_raw()");
for (row=0; row < raw_... | 0 |
441,513 | static __always_inline void __vma_unlink_common(struct mm_struct *mm,
struct vm_area_struct *vma,
struct vm_area_struct *ignore)
{
vma_rb_erase_ignore(vma, &mm->mm_rb, ignore);
__vma_unlink_list(mm, vma);
/* Kill the cache */
vmacache_invalidate(mm);
} | 0 |
260,340 | flatpak_proxy_client_get_policy (FlatpakProxyClient *client, const char *source)
{
if (source == NULL)
return FLATPAK_POLICY_TALK; /* All clients can talk to the bus itself */
if (source[0] == ':')
return GPOINTER_TO_UINT (g_hash_table_lookup (client->unique_id_policy, source));
return flatpak_proxy_get... | 0 |
71,723 | QString Utility::Substring(int start_index, int end_index, const QString &string)
{
return string.mid(start_index, end_index - start_index);
} | 0 |
270,237 | void rds_conn_shutdown(struct rds_connection *conn)
{
/* shut it down unless it's down already */
if (!rds_conn_transition(conn, RDS_CONN_DOWN, RDS_CONN_DOWN)) {
/*
* Quiesce the connection mgmt handlers before we start tearing
* things down. We don't hold the mutex for the entire
* duration of the shutdow... | 0 |
397,455 | static CharDriverState *qemu_chr_open_pipe(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
Error **errp)
{
ChardevHostdev *opts = backend->u.pipe.data;
const char *filena... | 0 |
412,938 | PHP_FUNCTION(ldap_dn2ufn)
{
char *dn, *ufn;
int dn_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &dn, &dn_len) != SUCCESS) {
return;
}
ufn = ldap_dn2ufn(dn);
if (ufn != NULL) {
RETVAL_STRING(ufn, 1);
#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS
ldap_memfree(ufn... | 0 |
45,440 | static int mxf_read_strong_ref_array(AVIOContext *pb, UID **refs, int *count)
{
*count = avio_rb32(pb);
*refs = av_calloc(*count, sizeof(UID));
if (!*refs) {
*count = 0;
return AVERROR(ENOMEM);
}
avio_skip(pb, 4); /* useless size of objects, always 16 according to specs */
avio_r... | 0 |
280,978 | LayoutUnit RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logicalWidth, bool includeMaxWidth) const
{
LayoutUnit minLogicalWidth = computeReplacedLogicalWidthUsing(style()->logicalMinWidth());
LayoutUnit maxLogicalWidth = !includeMaxWidth || style()->logicalMaxWidth().isUndefined() ? log... | 0 |
364,176 | rfbSendRectEncodingTight(rfbClientPtr cl,
int x,
int y,
int w,
int h)
{
int nMaxRows;
uint32_t colorValue;
int dx, dy, dw, dh;
int x_best, y_best, w_best, h_best;
char *fbptr;
rfbSendUpdateBuf(cl... | 0 |
336,896 | static void trigger_prot_fault(CPUS390XState *env, target_ulong vaddr,
uint64_t mode)
{
CPUState *cs = CPU(s390_env_get_cpu(env));
int ilen = ILEN_LATER_INC;
int bits = trans_bits(env, mode) | 4;
DPRINTF("%s: vaddr=%016" PRIx64 " bits=%d\n", __func__, vaddr, bits);... | 0 |
410,768 | static void bans_show_channel(IRC_CHANNEL_REC *channel, IRC_SERVER_REC *server)
{
GSList *tmp;
int counter;
if (channel->banlist == NULL) {
printformat(server, channel->visible_name,
MSGLEVEL_CLIENTNOTICE,
IRCTXT_NO_BANS, channel->visible_name);
return;
}
/* show bans.. */
counte... | 0 |
472,024 | stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg *j, stbi__huffman *h)
{
unsigned int temp;
int c,k;
if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);
// look at the top FAST_BITS and determine what symbol ID it is,
// if the code is <= FAST_BITS
c = (j->code_buffer >> (32 - FAST_BITS)) & ... | 0 |
69,078 | static struct fsnotify_event *inotify_merge(struct list_head *list,
struct fsnotify_event *event)
{
struct fsnotify_event_holder *last_holder;
struct fsnotify_event *last_event;
/* and the list better be locked by something too */
spin_lock(&event->lock);
last_holder = list_entry(list->prev, struct fsno... | 0 |
429,994 | int64_t get_next_session_id() {
auto session_id = next_session_id_;
if (next_session_id_ == std::numeric_limits<int64_t>::max()) {
next_session_id_ = 1;
} else {
++next_session_id_;
}
return session_id;
} | 0 |
270,590 | int cil_gen_ibpkeycon(__attribute__((unused)) struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node)
{
enum cil_syntax syntax[] = {
CIL_SYN_STRING,
CIL_SYN_STRING,
CIL_SYN_STRING | CIL_SYN_LIST,
CIL_SYN_STRING | CIL_SYN_LIST,
CIL_SYN_END
};
int syntax_len = sizeof(syntax) /... | 0 |
3,765 | SYSCALL_DEFINE2(timerfd_create, int, clockid, int, flags)
{
int ufd;
struct timerfd_ctx *ctx;
/* Check the TFD_* constants for consistency. */
BUILD_BUG_ON(TFD_CLOEXEC != O_CLOEXEC);
BUILD_BUG_ON(TFD_NONBLOCK != O_NONBLOCK);
if ((flags & ~TFD_CREATE_FLAGS) ||
(clockid != CLOCK_MONOTONIC &&
clockid !... | 1 |
111,184 | extend_parse_config(const char *token, char *cptr)
{
netsnmp_extend *extension;
char exec_name[STRMAX];
char exec_name2[STRMAX]; /* For use with UCD execFix directive */
char exec_command[STRMAX];
oid oid_buf[MAX_OID_LEN];
size_t oid_len;
extend_registration_block *eptr;
int flags;... | 0 |
388,687 | int smb_vfs_call_removexattr(struct vfs_handle_struct *handle,
const char *path, const char *name)
{
VFS_FIND(removexattr);
return handle->fns->removexattr_fn(handle, path, name);
} | 0 |
202,012 | void Com_EndRedirect( void ) {
if ( rd_flush ) {
rd_flush( rd_buffer );
}
rd_buffer = NULL;
rd_buffersize = 0;
rd_flush = NULL;
}
| 0 |
486,493 | static void v9fs_getattr(void *opaque)
{
int32_t fid;
size_t offset = 7;
ssize_t retval = 0;
struct stat stbuf;
V9fsFidState *fidp;
uint64_t request_mask;
V9fsStatDotl v9stat_dotl;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
retval = pdu_unmarshal(pdu, offset, "dq", &fid, &req... | 0 |
488,227 | static inline void ok_jpg_idct_1d_col_16(const int16_t *in, int *out) {
static const int out_shift = 8;
int t0, t1, t2;
int p0, p1, p2, p3, p4, p5, p6, p7;
int q0, q1, q2, q3, q4, q5, q6, q7;
for (int x = 0; x < 8; x++) {
// Quick check to avoid mults
if (in[1] == 0 && in[2] == 0 &... | 0 |
247,333 | void ExpandableContainerView::DetailsView::AddDetail(
const base::string16& detail) {
layout_->StartRowWithPadding(0, 0,
0, views::kRelatedControlSmallVerticalSpacing);
views::Label* detail_label =
new views::Label(PrepareForDisplay(detail, false));
detail_label->SetMultiL... | 0 |
366,792 | static int smack_inode_getattr(struct vfsmount *mnt, struct dentry *dentry)
{
struct smk_audit_info ad;
smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_FS);
smk_ad_setfield_u_fs_path_dentry(&ad, dentry);
smk_ad_setfield_u_fs_path_mnt(&ad, mnt);
return smk_curacc(smk_of_inode(dentry->d_inode), MAY_READ, &ad);
} | 0 |
328,049 | static void timerblock_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
timerblock *tb = (timerblock *)opaque;
int64_t old;
switch (addr) {
case 0: /* Load */
tb->load = value;
/* Fall through. */
case 4: /* Counter.... | 0 |
283,199 | bool FeatureInfo::IsWebGL2OrES3OrHigherContext() const {
return IsWebGL2OrES3OrHigherContextType(context_type_);
}
| 0 |
426,944 | adv_error adv_png_read_iend(adv_fz* f, const unsigned char* data, unsigned data_size, unsigned type)
{
if (type == ADV_PNG_CN_IEND)
return 0;
/* ancillary bit. bit 5 of first byte. 0 (uppercase) = critical, 1 (lowercase) = ancillary. */
if ((type & 0x20000000) == 0) {
char buf[4];
be_uint32_write(buf, type);
... | 0 |
164,907 | void Document::didUpdateSecurityOrigin()
{
if (!m_frame)
return;
m_frame->script().updateSecurityOrigin(getSecurityOrigin());
}
| 0 |
164,215 | void CSoundFile::FrequencyToTranspose(MODINSTRUMENT *psmp)
{
int f2t = FrequencyToTranspose(psmp->nC4Speed);
int transp = f2t >> 7;
int ftune = f2t & 0x7F;
if (ftune > 80)
{
transp++;
ftune -= 128;
}
if (transp > 127) transp = 127;
if (transp < -127) transp = -127;
psmp->RelativeTone = transp;
psmp->nFine... | 0 |
313,909 | UtilityServiceFactory::UtilityServiceFactory()
: network_registry_(base::MakeUnique<service_manager::BinderRegistry>()) {}
| 0 |
304,353 | static void recalloc_sock(struct pool *pool, size_t len)
{
size_t old, new;
old = strlen(pool->sockbuf);
new = old + len + 1;
if (new < pool->sockbuf_size)
return;
new = new + (RBUFSIZE - (new % RBUFSIZE));
applog(LOG_DEBUG, "Recallocing pool sockbuf to %lu", (unsigned long)new);
pool->sockbuf = realloc(pool-... | 0 |
48,220 | static int tipc_getsockopt(struct socket *sock, int lvl, int opt,
char __user *ov, int __user *ol)
{
struct sock *sk = sock->sk;
struct tipc_sock *tsk = tipc_sk(sk);
struct tipc_service_range seq;
int len, scope;
u32 value;
int res;
if ((lvl == IPPROTO_TCP) && (sock->type == SOCK_STREAM))
return put_use... | 0 |
225,983 | void rfc_send_nsc(tRFC_MCB* p_mcb) {
uint8_t* p_data;
BT_HDR* p_buf = (BT_HDR*)osi_malloc(RFCOMM_CMD_BUF_SIZE);
p_buf->offset = L2CAP_MIN_OFFSET + RFCOMM_CTRL_FRAME_LEN;
p_data = (uint8_t*)(p_buf + 1) + p_buf->offset;
*p_data++ = RFCOMM_EA | RFCOMM_I_CR(false) | RFCOMM_MX_NSC;
*p_data++ = RFCOMM_EA | (RFCOMM... | 0 |
394,900 | static _Bool have_gcrypt (void) /* {{{ */
{
static _Bool result = 0;
static _Bool need_init = 1;
if (!need_init)
return (result);
need_init = 0;
#if HAVE_LIBGCRYPT
# if GCRYPT_VERSION_NUMBER < 0x010600
if (gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread))
return (0);
# endif
if (!gcry... | 0 |
108,745 | void tja1100DumpPhyReg(NetInterface *interface)
{
uint8_t i;
//Loop through PHY registers
for(i = 0; i < 32; i++)
{
//Display current PHY register
TRACE_DEBUG("%02" PRIu8 ": 0x%04" PRIX16 "\r\n", i,
tja1100ReadPhyReg(interface, i));
}
//Terminate with a line feed
TRACE_DEBUG(... | 0 |
16,961 | static void parse_palette_segment ( AVCodecContext * avctx , const uint8_t * buf , int buf_size ) {
PGSSubContext * ctx = avctx -> priv_data ;
const uint8_t * buf_end = buf + buf_size ;
const uint8_t * cm = ff_cropTbl + MAX_NEG_CROP ;
int color_id ;
int y , cb , cr , alpha ;
int r , g , b , r_add , g_add , b_add ... | 0 |
10,077 | static inline int btif_hl_select_close_connected(void){
char sig_on = btif_hl_signal_select_close_connected;
BTIF_TRACE_DEBUG("btif_hl_select_close_connected");
return send(signal_fds[1], &sig_on, sizeof(sig_on), 0);
}
| 1 |
67,288 | int rad_packet_send(struct rad_packet_t *pack, int fd, struct sockaddr_in *addr)
{
int n;
clock_gettime(CLOCK_MONOTONIC, &pack->tv);
while (1) {
if (addr)
n = sendto(fd, pack->buf, pack->len, 0, addr, sizeof(*addr));
else
n = write(fd, pack->buf, pack->len);
if (n < 0) {
if (errno == EINTR)
cont... | 0 |
146,482 | file_cookies(const char *s) /* I - Cookie string or NULL */
{
if (s)
strlcpy(cookies, s, sizeof(cookies));
else
cookies[0] = '\0';
} | 0 |
177,842 | void InspectorAgentRegistry::discardAgents()
{
for (size_t i = 0; i < m_agents.size(); i++)
m_agents[i]->discardAgent();
}
| 0 |
184,199 | int ssl3_get_record(SSL *s)
{
int ssl_major, ssl_minor, al;
int enc_err, n, i, ret = -1;
SSL3_RECORD *rr;
SSL3_BUFFER *rbuf;
SSL_SESSION *sess;
unsigned char *p;
unsigned char md[EVP_MAX_MD_SIZE];
short version;
unsigned mac_size;
unsigned int num_recs = 0;
unsigned int max_r... | 0 |
258,600 | static void dtap_bcc_setup ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len ) {
guint32 curr_offset ;
guint32 consumed ;
guint curr_len ;
curr_offset = offset ;
curr_len = len ;
ELEM_MAND_V ( GSM_A_PDU_TYPE_DTAP , DE_BCC_CALL_REF , "(Broadcast identity)" ) ;
ELEM_OPT_TL... | 0 |
506,182 | int dtls1_connect(SSL *s)
{
BUF_MEM *buf=NULL;
unsigned long Time=(unsigned long)time(NULL);
void (*cb)(const SSL *ssl,int type,int val)=NULL;
int ret= -1;
int new_state,state,skip=0;
#ifndef OPENSSL_NO_SCTP
unsigned char sctpauthkey[64];
char labelbuffer[sizeof(DTLS1_SCTP_AUTH_LABEL)];
#endif
RAND_add(&Time,... | 0 |
95,881 | void kernel_sigaction(int sig, __sighandler_t action)
{
spin_lock_irq(¤t->sighand->siglock);
current->sighand->action[sig - 1].sa.sa_handler = action;
if (action == SIG_IGN) {
sigset_t mask;
sigemptyset(&mask);
sigaddset(&mask, sig);
flush_sigqueue_mask(&mask, ¤t->signal->shared_pending);
flu... | 0 |
345,623 | 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 |
160,768 | int accept_conn(AsyncConnectionRef conn) {
Mutex::Locker l(lock);
auto it = conns.find(conn->peer_addr);
if (it != conns.end()) {
AsyncConnectionRef existing = it->second;
// lazy delete, see "deleted_conns"
// If conn already in, we will return 0
Mutex::Locker l(deleted_lock);
... | 0 |
268,763 | static int mincore_hugetlb(pte_t *pte, unsigned long hmask, unsigned long addr,
unsigned long end, struct mm_walk *walk)
{
#ifdef CONFIG_HUGETLB_PAGE
unsigned char present;
unsigned char *vec = walk->private;
/*
* Hugepages under user process are always in RAM and never
* swapped out, but theoretically it ne... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.