idx int64 | func string | target int64 |
|---|---|---|
96,956 | void encode(ArgumentEncoder* encoder, CFDictionaryRef dictionary)
{
CFIndex size = CFDictionaryGetCount(dictionary);
Vector<CFTypeRef, 32> keys(size);
Vector<CFTypeRef, 32> values(size);
CFDictionaryGetKeysAndValues(dictionary, keys.data(), values.data());
encoder->encodeUInt64(size);
for... | 0 |
398,513 | RZ_API RzBinDwarfLineInfo *rz_bin_dwarf_parse_line(RzBinFile *binfile, RZ_NULLABLE RzBinDwarfDebugInfo *info, RzBinDwarfLineInfoMask mask) {
rz_return_val_if_fail(binfile, NULL);
RzBinSection *section = getsection(binfile, "debug_line");
if (!section) {
return NULL;
}
ut64 len = section->size;
if (len < 1) {
... | 0 |
387,645 | static int read_user_tlv(struct snd_kcontrol *kctl, unsigned int __user *buf,
unsigned int size)
{
struct user_element *ue = kctl->private_data;
if (ue->tlv_data_size == 0 || ue->tlv_data == NULL)
return -ENXIO;
if (size < ue->tlv_data_size)
return -ENOSPC;
if (copy_to_user(buf, ue->tlv_data, ue->tlv_dat... | 0 |
227,025 | IRC_PROTOCOL_CALLBACK(topic)
{
char *pos_topic, *old_topic_color, *topic_color;
struct t_irc_channel *ptr_channel;
struct t_irc_nick *ptr_nick;
struct t_gui_buffer *ptr_buffer;
IRC_PROTOCOL_MIN_ARGS(3);
if (!irc_channel_is_channel (server, argv[2]))
{
weechat_printf (server->buffer... | 0 |
247,699 | TEST_P(SslReadBufferLimitTest, SmallReadsIntoSameSlice) {
// write_size * num_writes must be large enough to cause buffer reserving fragmentation,
// but smaller than one reservation so the expected slice to be 1.
const uint32_t write_size = 1;
const uint32_t num_writes = 12 * 1024;
const uint32_t read_buffer... | 0 |
238,609 | static void scalar32_min_max_xor(struct bpf_reg_state *dst_reg,
struct bpf_reg_state *src_reg)
{
bool src_known = tnum_subreg_is_const(src_reg->var_off);
bool dst_known = tnum_subreg_is_const(dst_reg->var_off);
struct tnum var32_off = tnum_subreg(dst_reg->var_off);
s32 smin_val = src_reg->s32_min_value;
if (... | 0 |
195,296 | void publish(Topic *iterator, size_t start, size_t stop, std::string_view topic, std::pair<std::string_view, std::string_view> message) {
/* If we already have 64 triggered topics make sure to drain it here */
if (numTriggeredTopics == 64) {
drain();
}
/* Iterate over al... | 1 |
472,123 | int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param)
{
struct cgroup_fs_context *ctx = cgroup_fc2context(fc);
struct cgroup_subsys *ss;
struct fs_parse_result result;
int opt, i;
opt = fs_parse(fc, cgroup1_fs_parameters, param, &result);
if (opt == -ENOPARAM) {
if (strcmp(param->key, "sou... | 0 |
513,208 | static void plugin_variables_deinit(struct st_plugin_int *plugin)
{
for (sys_var *var= plugin->system_vars; var; var= var->next)
(*var->test_load)= FALSE;
mysql_del_sys_var_chain(plugin->system_vars);
} | 0 |
292,234 | inbound_foundip (session *sess, char *ip, const message_tags_data *tags_data)
{
struct hostent *HostAddr;
HostAddr = gethostbyname (ip);
if (HostAddr)
{
prefs.dcc_ip = ((struct in_addr *) HostAddr->h_addr)->s_addr;
EMIT_SIGNAL_TIMESTAMP (XP_TE_FOUNDIP, sess->server->server_session,
inet_ntoa (*((str... | 0 |
442,796 | convert_to_network(char *buffer, size_t length)
{
CURLcode rc;
/* translate from the host encoding to the network encoding */
char *input_ptr, *output_ptr;
size_t in_bytes, out_bytes;
/* open an iconv conversion descriptor if necessary */
if(outbound_cd == (iconv_t)-1) {
outbound_cd = iconv_open(CURL_... | 0 |
215,400 | int hfsplus_block_allocate(struct super_block *sb, u32 size, u32 offset, u32 *max)
{
struct page *page;
struct address_space *mapping;
__be32 *pptr, *curr, *end;
u32 mask, start, len, n;
__be32 val;
int i;
len = *max;
if (!len)
return size;
dprint(DBG_BITMAP, "block_allocate: %u,%u,%u\n", size, offset, len... | 1 |
230,973 | eval_under(mrb_state *mrb, mrb_value self, mrb_value blk, struct RClass *c)
{
struct RProc *p;
mrb_callinfo *ci;
int nregs;
check_block(mrb, blk);
ci = mrb->c->ci;
if (ci->cci == CINFO_DIRECT) {
return mrb_yield_with_class(mrb, blk, 1, &self, self, c);
}
ci->u.target_class = c;
p = mrb_proc_ptr(b... | 0 |
318,773 | drill_add_drill_hole (gerbv_image_t *image, drill_state_t *state,
gerbv_drill_stats_t *stats, gerbv_net_t *curr_net)
{
gerbv_render_size_t *bbox;
double r;
/* Add one to drill stats for the current tool */
drill_stats_increment_drill_counter(image->drill_stats->drill_list,
state->current_tool);... | 0 |
500,640 | int sftp_dir_eof(sftp_dir dir) {
return dir->eof;
} | 0 |
197,318 | void Compute(OpKernelContext* ctx) override {
const Tensor& handle = ctx->input(0);
const string& name = handle.scalar<tstring>()();
auto session_state = ctx->session_state();
OP_REQUIRES(ctx, session_state != nullptr,
errors::FailedPrecondition(
"DeleteSessionTenso... | 1 |
369,301 |
static int io_sqe_buffers_register(struct io_ring_ctx *ctx, void __user *arg,
unsigned int nr_args, u64 __user *tags)
{
struct page *last_hpage = NULL;
struct io_rsrc_data *data;
int i, ret;
struct iovec iov;
if (ctx->user_bufs)
return -EBUSY;
if (!nr_args || nr_args > IORING_MAX_REG_BUFFERS)
return ... | 0 |
234,817 | static void btrfs_report_missing_device(struct btrfs_fs_info *fs_info,
u64 devid, u8 *uuid, bool error)
{
if (error)
btrfs_err_rl(fs_info, "devid %llu uuid %pU is missing",
devid, uuid);
else
btrfs_warn_rl(fs_info, "devid %llu uuid %pU is missing",
devid, uuid);
} | 0 |
462,302 | status_end_id_list(stream * s)
{ /* HACK: we know that there's at least one character in the buffer. */
if (*s->cursor.w.ptr != '\n')
stputs(s, "\"\r\n");
} | 0 |
509,478 | bool ha_maria::is_changed() const
{
return file->state->changed;
} | 0 |
196,817 | njs_array_convert_to_slow_array(njs_vm_t *vm, njs_array_t *array)
{
uint32_t i, length;
njs_value_t index, value;
njs_object_prop_t *prop;
njs_set_array(&value, array);
array->object.fast_array = 0;
length = array->length;
for (i = 0; i < length; i++) {
if (njs_i... | 1 |
261,988 | static void free_bundle_hash_entry(void *freethis)
{
struct connectbundle *b = (struct connectbundle *) freethis;
bundle_destroy(b);
} | 0 |
218,809 | MagickExport void XProgressMonitorWidget(Display *display,XWindows *windows,
const char *task,const MagickOffsetType offset,const MagickSizeType span)
{
unsigned int
width;
XEvent
event;
assert(display != (Display *) NULL);
assert(windows != (XWindows *) NULL);
assert(task != (const char *) NULL);... | 0 |
269,503 | static MagickBooleanType DecodeLabImage(Image *image,ExceptionInfo *exception)
{
CacheView
*image_view;
MagickBooleanType
status;
ssize_t
y;
status=MagickTrue;
image_view=AcquireAuthenticCacheView(image,exception);
for (y=0; y < (ssize_t) image->rows; y++)
{
Quantum
*magick_restri... | 0 |
489,215 | int hfsplus_find_cat(struct super_block *sb, u32 cnid,
struct hfs_find_data *fd)
{
hfsplus_cat_entry tmp;
int err;
u16 type;
hfsplus_cat_build_key(sb, fd->search_key, cnid, NULL);
err = hfs_brec_read(fd, &tmp, sizeof(hfsplus_cat_entry));
if (err)
return err;
type = be16_to_cpu(tmp.type);
if (type != ... | 0 |
289,241 | static int snd_pcm_oss_nonblock(struct file * file)
{
spin_lock(&file->f_lock);
file->f_flags |= O_NONBLOCK;
spin_unlock(&file->f_lock);
return 0;
} | 0 |
231,694 | void deliverDataWithoutErrorCheck(
Buf data,
bool writes = true,
folly::SocketAddress* peer = nullptr) {
data->coalesce();
server->onNetworkData(
peer == nullptr ? clientAddr : *peer,
NetworkData(std::move(data), Clock::now()));
if (writes) {
loopForWrites();
}
... | 0 |
231,650 | TEST_P(
QuicServerTransportPendingDataTest,
TestNoCipherProcessPendingOneRttData) {
server->getNonConstConn().qLogger =
std::make_shared<quic::FileQLogger>(VantagePoint::Server);
recvClientHello();
auto data = IOBuf::copyBuffer("bad data");
StreamId streamId = 2;
// Write packet with zero rtt ke... | 0 |
301,343 | static int vfswrap_kernel_flock(vfs_handle_struct *handle, files_struct *fsp,
uint32 share_mode, uint32 access_mask)
{
START_PROFILE(syscall_kernel_flock);
kernel_flock(fsp->fh->fd, share_mode, access_mask);
END_PROFILE(syscall_kernel_flock);
return 0;
} | 0 |
402,669 | long verbosity(void)
{
if (!verbose)
return 0;
return *verbose;
} | 0 |
500,671 | static sftp_attributes sftp_xstat(sftp_session sftp, const char *path,
int param) {
sftp_status_message status = NULL;
sftp_message msg = NULL;
ssh_string pathstr;
ssh_buffer buffer;
uint32_t id;
buffer = ssh_buffer_new();
if (buffer == NULL) {
ssh_set_error_oom(sftp->session);
return NULL;
... | 0 |
508,383 | Locked_tables_list::init_locked_tables(THD *thd)
{
DBUG_ASSERT(thd->locked_tables_mode == LTM_NONE);
DBUG_ASSERT(m_locked_tables == NULL);
DBUG_ASSERT(m_reopen_array == NULL);
DBUG_ASSERT(m_locked_tables_count == 0);
for (TABLE *table= thd->open_tables; table;
table= table->next, m_locked_tables_count... | 0 |
267,864 | void SingleFromSingle(const size_t xsize,
const pixel_type* const JXL_RESTRICT row_in,
const float factor, Image3F* decoded, size_t c, size_t y,
Rect& rect) {
JXL_DASSERT(xsize <= rect.xsize());
const HWY_FULL(float) df;
const Rebind<pixel_type, HW... | 0 |
339,717 | static double ratio (Bigint *a, Bigint *b)
{
_double da, db;
int k, ka, kb;
value(da) = b2d(a, &ka);
value(db) = b2d(b, &kb);
#ifdef Pack_32
k = ka - kb + 32*(a->wds - b->wds);
#else
k = ka - kb + 16*(a->wds - b->wds);
#endif
#ifdef IBM
if (k > 0) {
word0(da) += (k >> 2)*Exp_msk1;
if (k &= 3) {
da *= 1 <... | 0 |
267,867 | void RgbFromSingle(const size_t xsize,
const pixel_type* const JXL_RESTRICT row_in,
const float factor, Image3F* decoded, size_t /*c*/, size_t y,
Rect& rect) {
JXL_DASSERT(xsize <= rect.xsize());
const HWY_FULL(float) df;
const Rebind<pixel_type, HWY_FULL(f... | 0 |
244,078 | GF_Err stvi_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_StereoVideoBox *ptr = (GF_StereoVideoBox *)s;
ISOM_DECREASE_SIZE(ptr, 12);
gf_bs_read_int(bs, 30);
ptr->single_view_allowed = gf_bs_read_int(bs, 2);
ptr->stereo_scheme = gf_bs_read_u32(bs);
ptr->sit_len = gf_bs_read_u32(bs);
ISOM_DECREASE_SIZE(ptr, ptr->sit... | 0 |
512,251 | bool Arg_comparator::set_cmp_func_real()
{
if ((((*a)->result_type() == DECIMAL_RESULT && !(*a)->const_item() &&
(*b)->result_type() == STRING_RESULT && (*b)->const_item()) ||
((*b)->result_type() == DECIMAL_RESULT && !(*b)->const_item() &&
(*a)->result_type() == STRING_RESULT && (*a)->const_... | 0 |
502,712 | int SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx,
unsigned int sid_ctx_len)
{
if (sid_ctx_len > SSL_MAX_SID_CTX_LENGTH) {
SSLerr(SSL_F_SSL_SESSION_SET1_ID_CONTEXT,
SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG);
return 0;
}
s... | 0 |
328,895 | R_API RBinJavaField *r_bin_java_get_method_code_attribute_with_addr(RBinJavaObj *bin, ut64 addr) {
RListIter *iter = NULL, *iter_tmp = NULL;
RBinJavaField *fm_type, *res = NULL;
if (!bin && R_BIN_JAVA_GLOBAL_BIN) {
bin = R_BIN_JAVA_GLOBAL_BIN;
}
if (!bin) {
eprintf ("Attempting to analyse function when the R_B... | 0 |
512,989 | const my_decimal *const_ptr_my_decimal() const { return &decimal_value; } | 0 |
211,845 | static Image *ReadTIFFImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
#define MaxPixelChannels 32
#define ThrowTIFFException(severity,message) \
{ \
if (pixel_info != (MemoryInfo *) NULL) \
pixel_info=RelinquishVirtualMemory(pixel_info); \
if (quantum_info != (QuantumInfo *) NULL) \
quantu... | 1 |
386,509 | void DL_Dxf::addSolid(DL_CreationInterface* creationInterface) {
DL_SolidData sd;
for (int k = 0; k < 4; k++) {
sd.x[k] = getRealValue(10 + k, 0.0);
sd.y[k] = getRealValue(20 + k, 0.0);
sd.z[k] = getRealValue(30 + k, 0.0);
}
creationInterface->addSolid(sd);
} | 0 |
445,894 | file_list_drag_begin (GtkWidget *widget,
GdkDragContext *context,
gpointer data)
{
FrWindow *window = data;
debug (DEBUG_INFO, "::DragBegin -->\n");
if (window->priv->activity_ref > 0)
return FALSE;
_g_clear_object (&window->priv->drag_destination_folder);
g_free (wind... | 0 |
246,719 | static u32 do_import_sub()
{
/* We import the subtitle file,
i.e. we parse it and store the content as samples of a 3GPP Timed Text track in an ISO file,
possibly for later export (e.g. when converting SRT to TTXT, ...) */
#ifndef GPAC_DISABLE_MEDIA_IMPORT
GF_Err e;
GF_MediaImporter import;
/* Prepare the i... | 0 |
232,329 | static GF_Err gf_isom_parse_movie_boxes_internal(GF_ISOFile *mov, u32 *boxType, u64 *bytesMissing, Bool progressive_mode)
{
GF_Box *a;
u64 totSize, mdat_end=0;
GF_Err e = GF_OK;
#ifndef GPAC_DISABLE_ISOM_FRAGMENTS
if (mov->single_moof_mode && mov->single_moof_state == 2) {
return e;
}
/*restart from where we ... | 0 |
263,483 | static void sco_recv_frame(struct sco_conn *conn, struct sk_buff *skb)
{
struct sock *sk;
sco_conn_lock(conn);
sk = conn->sk;
sco_conn_unlock(conn);
if (!sk)
goto drop;
BT_DBG("sk %p len %u", sk, skb->len);
if (sk->sk_state != BT_CONNECTED)
goto drop;
if (!sock_queue_rcv_skb(sk, skb))
return;
drop:
... | 0 |
386,513 | void DL_Dxf::addLayer(DL_CreationInterface* creationInterface) {
// correct some invalid attributes for layers:
attrib = creationInterface->getAttributes();
if (attrib.getColor()==256 || attrib.getColor()==0) {
attrib.setColor(7);
}
if (attrib.getWidth()<0) {
attrib.setWidth(1);
... | 0 |
398,493 | static inline RzBinDwarfLocList *create_loc_list(ut64 offset) {
RzBinDwarfLocList *list = RZ_NEW0(RzBinDwarfLocList);
if (list) {
list->list = rz_list_new();
list->offset = offset;
}
return list;
} | 0 |
226,249 |
void dfla_box_del(GF_Box *s)
{
GF_FLACConfigBox *ptr = (GF_FLACConfigBox *) s;
if (ptr->data) gf_free(ptr->data);
gf_free(ptr); | 0 |
459,171 | static void tcf_proto_destroy(struct tcf_proto *tp, bool rtnl_held,
bool sig_destroy, struct netlink_ext_ack *extack)
{
tp->ops->destroy(tp, rtnl_held, extack);
if (sig_destroy)
tcf_proto_signal_destroyed(tp->chain, tp);
tcf_chain_put(tp->chain);
module_put(tp->ops->owner);
kfree_rcu(tp, rcu);
} | 0 |
224,156 | Status check_index_ordering(const Tensor& indices) {
if (indices.NumElements() == 0) {
return errors::InvalidArgument("Indices are empty");
}
auto findices = indices.flat<int>();
for (std::size_t i = 0; i < findices.dimension(0) - 1; ++i) {
if (findices(i) < findices(i + 1)) {
co... | 0 |
210,278 | void qemu_ram_free(struct uc_struct *uc, RAMBlock *block)
{
if (!block) {
return;
}
//if (block->host) {
// ram_block_notify_remove(block->host, block->max_length);
//}
QLIST_REMOVE(block, next);
uc->ram_list.mru_block = NULL;
/* Write list before version */
//smp_wmb();... | 1 |
500,679 | int buffer_add_attributes(ssh_buffer buffer, sftp_attributes attr) {
uint32_t flags = (attr ? attr->flags : 0);
flags &= (SSH_FILEXFER_ATTR_SIZE | SSH_FILEXFER_ATTR_UIDGID |
SSH_FILEXFER_ATTR_PERMISSIONS | SSH_FILEXFER_ATTR_ACMODTIME);
if (buffer_add_u32(buffer, htonl(flags)) < 0) {
return -1;
}
... | 0 |
301,410 | static ssize_t vfswrap_pwrite(vfs_handle_struct *handle, files_struct *fsp, const void *data,
size_t n, off_t offset)
{
ssize_t result;
#if defined(HAVE_PWRITE) || defined(HAVE_PRWITE64)
START_PROFILE_BYTES(syscall_pwrite, n);
result = sys_pwrite(fsp->fh->fd, data, n, offset);
END_PROFILE(syscall_pwrite);
if ... | 0 |
301,359 | static int vfswrap_chmod(vfs_handle_struct *handle, const char *path, mode_t mode)
{
int result;
START_PROFILE(syscall_chmod);
/*
* We need to do this due to the fact that the default POSIX ACL
* chmod modifies the ACL *mask* for the group owner, not the
* group owner bits directly. JRA.
*/
{
int save... | 0 |
353,164 | static void splashOutBlendHardLight(SplashColorPtr src, SplashColorPtr dest,
SplashColorPtr blend, SplashColorMode cm) {
int i;
#ifdef SPLASH_CMYK
if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) {
for (i = 0; i < splashColorModeNComps[cm]; ++i) {
dest[i] = 255 - dest[i];
src[i] = 255... | 0 |
229,155 | static void guest_reset(VirtIOSerial *vser)
{
VirtIOSerialPort *port;
VirtIOSerialPortClass *vsc;
QTAILQ_FOREACH(port, &vser->ports, next) {
vsc = VIRTIO_SERIAL_PORT_GET_CLASS(port);
if (port->guest_connected) {
port->guest_connected = false;
if (vsc->set_guest_conne... | 0 |
316,999 | static int selinux_bpf(int cmd, union bpf_attr *attr,
unsigned int size)
{
u32 sid = current_sid();
int ret;
switch (cmd) {
case BPF_MAP_CREATE:
ret = avc_has_perm(&selinux_state,
sid, sid, SECCLASS_BPF, BPF__MAP_CREATE,
NULL);
break;
case BPF_PROG_LOAD:
ret = avc_has_perm(&selinux_st... | 0 |
225,974 |
GF_Box *dOps_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_OpusSpecificBox, GF_ISOM_BOX_TYPE_DOPS);
return (GF_Box *)tmp; | 0 |
226,388 | void pmax_box_del(GF_Box *s)
{
gf_free((GF_PMAXBox *)s);
} | 0 |
369,215 | static int io_rw_init_file(struct io_kiocb *req, fmode_t mode)
{
struct kiocb *kiocb = &req->rw.kiocb;
struct io_ring_ctx *ctx = req->ctx;
struct file *file = req->file;
int ret;
if (unlikely(!file || !(file->f_mode & mode)))
return -EBADF;
if (!io_req_ffs_set(req))
req->flags |= io_file_get_flags(file) << ... | 0 |
247,566 | TEST_P(SslSocketTest, RevokedCertificate) {
const std::string server_ctx_yaml = R"EOF(
common_tls_context:
tls_certificates:
certificate_chain:
filename: "{{ test_rundir }}/test/extensions/transport_sockets/tls/test_data/unittest_cert.pem"
private_key:
filename: "{{ test_rundir }}/t... | 0 |
400,122 | TerminalClient::TerminalClient(shared_ptr<SocketHandler> _socketHandler,
shared_ptr<SocketHandler> _pipeSocketHandler,
const SocketEndpoint& _socketEndpoint,
const string& id, const string& passkey,
... | 0 |
317,297 | static int selinux_shm_associate(struct kern_ipc_perm *shp, int shmflg)
{
struct ipc_security_struct *isec;
struct common_audit_data ad;
u32 sid = current_sid();
isec = selinux_ipc(shp);
ad.type = LSM_AUDIT_DATA_IPC;
ad.u.ipc_id = shp->key;
return avc_has_perm(&selinux_state,
sid, isec->sid, SECCLASS_S... | 0 |
391,626 | static ssize_t remove_slot_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
return sprintf(buf, "0\n");
} | 0 |
241,059 | static int create_lockfile(void)
{
int rv, fd;
fd = -1;
rv = _lockfile(O_CREAT | O_WRONLY, &fd, NULL);
if (fd == -1) {
log_error("lockfile %s open error %d: %s",
cl.lockfile, rv, strerror(rv));
return -1;
}
if (rv < 0) {
log_error("lockfile %s setlk error %d: %s",
cl.lockfile, rv, strerror(rv));
... | 0 |
359,250 | DEFUN (no_neighbor_route_reflector_client,
no_neighbor_route_reflector_client_cmd,
NO_NEIGHBOR_CMD2 "route-reflector-client",
NO_STR
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Configure a neighbor as Route Reflector client\n")
{
return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi... | 0 |
249,985 | GF_Err DoFullInterleave(MovieWriter *mw, GF_List *writers, GF_BitStream *bs, u8 Emulation, u64 StartOffset)
{
u32 i, tracksDone;
TrackWriter *tmp, *curWriter, *prevWriter;
GF_Err e;
u64 DTS, DTStmp, TStmp;
s64 res;
u32 descIndex, sampSize, chunkNumber;
u16 curGroupID, curTrackPriority;
Bool forceNewChunk, writ... | 0 |
299,318 | static MagickBooleanType WriteMATImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
char
MATLAB_HDR[0x80];
MagickBooleanType
status;
MagickOffsetType
scene;
size_t
imageListLength;
struct tm
local_time;
time_t
current_time;
/*
Open output image ... | 0 |
343,225 | static void displayrate(const char *word, off_t size,
const double started,
const char * const name, int up)
{
double ended;
double t;
double speed;
char speedstring[64];
ended = get_usec_time();
t = ended - started;
if (t > 0.0 && size > (of... | 0 |
225,470 | bool IsTensorIdPortValid(const TensorId& tensor_id) {
return tensor_id.index() >= Graph::kControlSlot;
} | 0 |
230,978 | mrb_protect_error(mrb_state *mrb, mrb_protect_error_func *body, void *userdata, mrb_bool *error)
{
struct mrb_jmpbuf *prev_jmp = mrb->jmp;
struct mrb_jmpbuf c_jmp;
mrb_value result = mrb_nil_value();
int ai = mrb_gc_arena_save(mrb);
const struct mrb_context *c = mrb->c;
ptrdiff_t ci_index = c->ci - c->cibas... | 0 |
195,264 | static void compile_xclass_matchingpath(compiler_common *common, PCRE2_SPTR cc, jump_list **backtracks)
{
DEFINE_COMPILER;
jump_list *found = NULL;
jump_list **list = (cc[0] & XCL_NOT) == 0 ? &found : backtracks;
sljit_uw c, charoffset, max = 256, min = READ_CHAR_MAX;
struct sljit_jump *jump = NULL;
PCRE2_SPTR ccbegin;... | 1 |
226,224 |
GF_Box *mvcg_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_MultiviewGroupBox, GF_ISOM_BOX_TYPE_MVCG);
return (GF_Box *)tmp; | 0 |
209,026 | virNodeDeviceGetMdevTypesCaps(const char *sysfspath,
virMediatedDeviceTypePtr **mdev_types,
size_t *nmdev_types)
{
virMediatedDeviceTypePtr *types = NULL;
size_t ntypes = 0;
size_t i;
/* this could be a refresh, so clear out the old data */
... | 1 |
308,184 | static int fastrpc_map_find(struct fastrpc_user *fl, int fd,
struct fastrpc_map **ppmap)
{
struct fastrpc_map *map = NULL;
mutex_lock(&fl->mutex);
list_for_each_entry(map, &fl->maps, node) {
if (map->fd == fd) {
fastrpc_map_get(map);
*ppmap = map;
mutex_unlock(&fl->mutex);
return 0;
}
}
mut... | 0 |
477,299 | static void tipc_crypto_rcv_complete(struct net *net, struct tipc_aead *aead,
struct tipc_bearer *b,
struct sk_buff **skb, int err)
{
struct tipc_skb_cb *skb_cb = TIPC_SKB_CB(*skb);
struct tipc_crypto *rx = aead->crypto;
struct tipc_aead *tmp = NULL;
struct tipc_ehdr *ehdr;
struct tipc_node *n;
... | 0 |
181,940 | void OverlayWindowViews::ButtonPressed(views::Button* sender,
const ui::Event& event) {
if (sender == close_controls_view_.get())
controller_->Close(true /* should_pause_video */,
true /* should_reset_pip_player */);
if (sender == play_pause_contro... | 0 |
369,915 | static struct dentry *proc_base_instantiate(struct inode *dir,
struct dentry *dentry, struct task_struct *task, const void *ptr)
{
const struct pid_entry *p = ptr;
struct inode *inode;
struct proc_inode *ei;
struct dentry *error;
/* Allocate the inode */
error = ERR_PTR(-ENOMEM);
inode = new_inode(dir->i_sb);
... | 0 |
230,968 | stack_extend_alloc(mrb_state *mrb, mrb_int room)
{
mrb_value *oldbase = mrb->c->stbase;
mrb_value *newstack;
size_t oldsize = mrb->c->stend - mrb->c->stbase;
size_t size = oldsize;
size_t off = mrb->c->ci->stack ? mrb->c->stend - mrb->c->ci->stack : 0;
if (off > size) size = off;
#ifdef MRB_STACK_EXTEND_DO... | 0 |
411,924 | sort_version_list(smartlist_t *versions, int remove_duplicates)
{
smartlist_sort(versions, _compare_tor_version_str_ptr);
if (remove_duplicates)
smartlist_uniq(versions, _compare_tor_version_str_ptr, _tor_free);
} | 0 |
417,127 | mp_sint32 PlayerGeneric::startPlaying(XModule* module,
bool repeat/* = false*/,
mp_uint32 startPosition/* = 0*/,
mp_uint32 startRow/* = 0*/,
mp_sint32 numChannels/* = -1*/,
const mp_ubyte* customPanningTable/* = NULL*/,
bool idle/* = false*/,
... | 0 |
224,489 | static GF_Err txtin_setup_ttxt(GF_Filter *filter, GF_TXTIn *ctx)
{
GF_Err e;
u32 j, k, ID, OCR_ES_ID;
u64 file_size;
GF_XMLNode *root, *ext;
GF_PropertyValue *dcd;
ctx->parser = gf_xml_dom_new();
e = gf_xml_dom_parse(ctx->parser, ctx->file_name, ttxt_dom_progress, ctx);
if (e) {
GF_LOG(GF_LOG_ERROR, GF_LOG_P... | 0 |
358,127 | sonmp_decode(struct lldpd *cfg, char *frame, int s,
struct lldpd_hardware *hardware,
struct lldpd_chassis **newchassis, struct lldpd_port **newport)
{
const u_int8_t mcastaddr[] = SONMP_MULTICAST_ADDR;
struct lldpd_chassis *chassis;
struct lldpd_port *port;
struct lldpd_mgmt *mgmt;
int length, i;
u_int8_t... | 0 |
450,363 | static void zrle_choose_palette_rle(VncState *vs, int w, int h,
VncPalette *palette, int bpp_out,
int runs, int single_pixels,
int zywrle_level,
bool *use_rle, bool *use_palett... | 0 |
198,169 | TfLiteTensor* GetVariableInput(TfLiteContext* context, const TfLiteNode* node,
int index) {
TfLiteTensor* tensor = GetMutableInput(context, node, index);
return tensor->is_variable ? tensor : nullptr;
} | 1 |
440,883 | AuditPrefix(void)
{
time_t tm;
char *autime, *s;
char *tmpBuf;
int len;
time(&tm);
autime = ctime(&tm);
if ((s = strchr(autime, '\n')))
*s = '\0';
len = strlen(AUDIT_PREFIX) + strlen(autime) + 10 + 1;
tmpBuf = malloc(len);
if (!tmpBuf)
return NULL;
snprintf(t... | 0 |
237,828 | static int acurite_986_decode(r_device *decoder, bitbuffer_t *bitbuffer)
{
int const browlen = 5;
uint8_t *bb, sensor_num, status, crc, crcc;
uint8_t br[8];
int8_t tempf; // Raw Temp is 8 bit signed Fahrenheit
uint16_t sensor_id, valid_cnt = 0;
char sensor_type;
char *channel_str;
int ba... | 0 |
294,631 | date_s_valid_commercial_p(int argc, VALUE *argv, VALUE klass)
{
VALUE vy, vw, vd, vsg;
VALUE argv2[4];
rb_scan_args(argc, argv, "31", &vy, &vw, &vd, &vsg);
RETURN_FALSE_UNLESS_NUMERIC(vy);
RETURN_FALSE_UNLESS_NUMERIC(vw);
RETURN_FALSE_UNLESS_NUMERIC(vd);
argv2[0] = vy;
argv2[1] = vw;
... | 0 |
297,211 | PHP_MINIT_FUNCTION(exif)
{
REGISTER_INI_ENTRIES();
if (zend_hash_exists(&module_registry, "mbstring", sizeof("mbstring"))) {
REGISTER_LONG_CONSTANT("EXIF_USE_MBSTRING", 1, CONST_CS | CONST_PERSISTENT);
} else {
REGISTER_LONG_CONSTANT("EXIF_USE_MBSTRING", 0, CONST_CS | CONST_PERSISTENT);
}
return SUCCESS;
} | 0 |
379,321 | apply_cmdmod(cmdmod_T *cmod)
{
#ifdef HAVE_SANDBOX
if ((cmod->cmod_flags & CMOD_SANDBOX) && !cmod->cmod_did_sandbox)
{
++sandbox;
cmod->cmod_did_sandbox = TRUE;
}
#endif
if (cmod->cmod_verbose > 0)
{
if (cmod->cmod_verbose_save == 0)
cmod->cmod_verbose_save = p_verbose + 1;
p_verbose = cmod... | 0 |
263,506 | static void sco_sock_set_timer(struct sock *sk, long timeout)
{
if (!sco_pi(sk)->conn)
return;
BT_DBG("sock %p state %d timeout %ld", sk, sk->sk_state, timeout);
cancel_delayed_work(&sco_pi(sk)->conn->timeout_work);
schedule_delayed_work(&sco_pi(sk)->conn->timeout_work, timeout);
} | 0 |
333,074 | nfa_regtry(
nfa_regprog_T *prog,
colnr_T col,
proftime_T *tm UNUSED, // timeout limit or NULL
int *timed_out UNUSED) // flag set on timeout or NULL
{
int i;
regsubs_T subs, m;
nfa_state_T *start = prog->start;
int result;
#ifdef ENABLE_LOG
FILE *f;
#endif
rex.in... | 0 |
482,643 | static inline struct net *xt_net(const struct xt_action_param *par)
{
return par->state->net;
} | 0 |
326,091 | regcomp_start(
char_u *expr,
int re_flags) // see vim_regcomp()
{
initchr(expr);
if (re_flags & RE_MAGIC)
reg_magic = MAGIC_ON;
else
reg_magic = MAGIC_OFF;
reg_string = (re_flags & RE_STRING);
reg_strict = (re_flags & RE_STRICT);
get_cpo_flags();
num_complex_braces = 0;
r... | 0 |
312,393 | qf_parse_fmt_e(regmatch_T *rmp, int midx, qffields_T *fields)
{
if (rmp->startp[midx] == NULL)
return QF_FAIL;
fields->end_lnum = atol((char *)rmp->startp[midx]);
return QF_OK;
} | 0 |
293,539 | PJ_DEF(void) pj_cis_add_range(pj_cis_t *cis, int cstart, int cend)
{
/* Can not set zero. This is the requirement of the parser. */
pj_assert(cstart > 0);
while (cstart != cend) {
PJ_CIS_SET(cis, cstart);
++cstart;
}
} | 0 |
513,060 | virtual ~Item_const() {} | 0 |
254,901 | DocumentSource::GetModPathsReturn GroupFromFirstDocumentTransformation::getModifiedPaths() const {
// Replaces the entire root, so all paths are modified.
return {DocumentSource::GetModPathsReturn::Type::kAllPaths, std::set<std::string>{}, {}};
} | 0 |
252,311 | inline void wenc14(unsigned short a, unsigned short b, unsigned short &l,
unsigned short &h) {
short as = static_cast<short>(a);
short bs = static_cast<short>(b);
short ms = (as + bs) >> 1;
short ds = as - bs;
l = static_cast<unsigned short>(ms);
h = static_cast<unsigned short>(ds);
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.