idx int64 | func string | target int64 |
|---|---|---|
513,104 | uint decimal_scale() const
{
return type_handler()->Item_decimal_scale(this);
} | 0 |
432,307 | static inline void flatview_ref(FlatView *view)
{
view->ref++;
} | 0 |
301,433 | static SMB_ACL_T vfswrap_sys_acl_get_file(vfs_handle_struct *handle,
const char *path_p,
SMB_ACL_TYPE_T type,
TALLOC_CTX *mem_ctx)
{
return sys_acl_get_file(handle, path_p, type, mem_ctx);
} | 0 |
254,719 | njs_typed_array_compare_i8(const void *a, const void *b, void *c)
{
return *((const int8_t *) a) - *((const int8_t *) b);
} | 0 |
275,474 | njs_vm_memory_error(njs_vm_t *vm)
{
njs_memory_error_set(vm, &vm->retval);
} | 0 |
279,933 | ex_write(exarg_T *eap)
{
if (eap->cmdidx == CMD_saveas)
{
// :saveas does not take a range, uses all lines.
eap->line1 = 1;
eap->line2 = curbuf->b_ml.ml_line_count;
}
if (eap->usefilter) // input lines to shell command
do_bang(1, eap, FALSE, TRUE, FALSE);
else
(void)do_write(eap);
} | 0 |
393,522 | static SQInteger base_print(HSQUIRRELVM v)
{
const SQChar *str;
if(SQ_SUCCEEDED(sq_tostring(v,2)))
{
if(SQ_SUCCEEDED(sq_getstring(v,-1,&str))) {
if(_ss(v)->_printfunc) _ss(v)->_printfunc(v,_SC("%s"),str);
return 0;
}
}
return SQ_ERROR;
} | 0 |
242,608 | Status Peek(std::size_t index, Tuple* tuple) {
std::unique_lock<std::mutex> lock(mu_);
// Wait if the requested index is not available
non_empty_cond_var_.wait(
lock, [index, this]() { return index < this->buf_.size(); });
// Place tensors in the output tuple
for (const auto& tensor : bu... | 0 |
233,820 | static int decode_atari_image_paletted(deark *c, struct atari_img_decode_data *adata)
{
i64 i, j;
i64 plane;
i64 rowspan;
u8 b;
u32 v;
i64 planespan;
i64 ncolors;
planespan = 2*((adata->w+15)/16);
rowspan = planespan*adata->bpp;
if(adata->ncolors>0)
ncolors = adata->ncolors;
else
ncolors = ((i64)1)<<ada... | 0 |
462,432 | static rsRetVal startupUXSrv(ptcpsrv_t *pSrv) {
DEFiRet;
int sock;
int sockflags;
struct sockaddr_un local;
uchar *path = pSrv->path == NULL ? UCHAR_CONSTANT("") : pSrv->path;
DBGPRINTF("imptcp: creating listen unix socket at %s\n", path);
sock = socket(AF_UNIX, SOCK_STREAM, 0);
if(sock < 0) {
errmsg.LogErr... | 0 |
196,993 | Status DecodeImageAPNG(Span<const uint8_t> bytes, ThreadPool* pool,
CodecInOut* io) {
Reader r;
unsigned int id, i, j, w, h, w0, h0, x0, y0;
unsigned int delay_num, delay_den, dop, bop, rowbytes, imagesize;
unsigned char sig[8];
png_structp png_ptr;
png_infop info_ptr;
CHUNK chunk;
... | 1 |
198,282 | void ReshapeSparseTensor(OpKernelContext *context,
const Tensor &input_indices_in,
const Tensor &input_shape_in,
const Tensor &target_shape_in, int output_indices_idx,
int output_shape_idx) {
OP_REQUIRES(context, Tenso... | 1 |
343,243 | void dostru(const char *arg)
{
if (arg == NULL || !*arg) {
addreply_noformat(501, MSG_MISSING_ARG);
} else if (strcasecmp(arg, "F")) {
addreply_noformat(504, MSG_STRU_FAILURE);
} else {
addreply_noformat(200, "F OK");
}
} | 0 |
221,407 | static bool nested_svm_vmrun_msrpm(struct vcpu_svm *svm)
{
/*
* This function merges the msr permission bitmaps of kvm and the
* nested vmcb. It is optimized in that it only merges the parts where
* the kvm msr permission bitmap may contain zero bits
*/
int i;
if (!(vmcb_is_intercept(&svm->nested.ctl, INTER... | 0 |
509,477 | static enum data_file_type maria_row_type(HA_CREATE_INFO *info)
{
if (info->transactional == HA_CHOICE_YES)
return BLOCK_RECORD;
switch (info->row_type) {
case ROW_TYPE_FIXED: return STATIC_RECORD;
case ROW_TYPE_DYNAMIC: return DYNAMIC_RECORD;
default: return BLOCK_RECORD;
}
} | 0 |
252,317 | static bool DecompressPiz(unsigned char *outPtr, const unsigned char *inPtr,
size_t tmpBufSize, size_t inLen, int num_channels,
const EXRChannelInfo *channels, int data_width,
int num_lines) {
if (inLen == tmpBufSize) {
// Data is not c... | 0 |
224,236 | static int _find_sm_by_from_vaddr_cb(void *incoming, void *in, void *user) {
RIOSubMap *bd = (RIOSubMap *)incoming, *sm = (RIOSubMap *)in;
if (r_io_submap_from (bd) < r_io_submap_from (sm)) {
return -1;
}
if (r_io_submap_from (bd) > r_io_submap_from (sm)) {
return 1;
}
return 0;
} | 0 |
231,795 | Buf recvEncryptedStream(
StreamId streamId,
folly::IOBuf& data,
uint64_t offset = 0,
bool eof = false) {
PacketNum packetNum = clientNextAppDataPacketNum++;
auto packetData = packetToBuf(createStreamPacket(
clientConnectionId.value_or(getTestConnectionId()),
*server->ge... | 0 |
446,427 | static cache_accel_t *read_cache_accel(RzBuffer *cache_buf, cache_hdr_t *hdr, cache_map_t *maps) {
if (!cache_buf || !hdr || !hdr->accelerateInfoSize || !hdr->accelerateInfoAddr) {
return NULL;
}
ut64 offset = va2pa(hdr->accelerateInfoAddr, hdr->mappingCount, maps, cache_buf, 0, NULL, NULL);
if (!offset) {
ret... | 0 |
344,245 | lua_Integer luaV_mod (lua_State *L, lua_Integer m, lua_Integer n) {
if (l_unlikely(l_castS2U(n) + 1u <= 1u)) { /* special cases: -1 or 0 */
if (n == 0)
luaG_runerror(L, "attempt to perform 'n%%0'");
return 0; /* m % -1 == 0; avoid overflow with 0x80000...%-1 */
}
else {
lua_Integer r = m % n;... | 0 |
229,172 | static void virtio_serial_post_load_timer_cb(void *opaque)
{
uint32_t i;
VirtIOSerial *s = VIRTIO_SERIAL(opaque);
VirtIOSerialPort *port;
uint8_t host_connected;
VirtIOSerialPortClass *vsc;
if (!s->post_load) {
return;
}
for (i = 0 ; i < s->post_load->nr_active_ports; ++i) {
... | 0 |
402,591 | generate_name(cms_context *cms, SECItem *der, CERTName *certname)
{
void *marka = PORT_ArenaMark(cms->arena);
CERTRDN **rdns = certname->rdns;
CERTRDN *rdn;
int num_items = 0;
int rc = 0;
while (rdns && (rdn = *rdns++) != NULL) {
CERTAVA **avas = rdn->avas;
CERTAVA *ava;
while (avas && (ava = *avas++) != ... | 0 |
459,154 | tcf_get_next_chain(struct tcf_block *block, struct tcf_chain *chain)
{
struct tcf_chain *chain_next = __tcf_get_next_chain(block, chain);
if (chain)
tcf_chain_put(chain);
return chain_next;
} | 0 |
484,782 | static int setup_netfront(struct xenbus_device *dev,
struct netfront_queue *queue, unsigned int feature_split_evtchn)
{
struct xen_netif_tx_sring *txs;
struct xen_netif_rx_sring *rxs;
int err;
queue->tx_ring_ref = INVALID_GRANT_REF;
queue->rx_ring_ref = INVALID_GRANT_REF;
queue->rx.sring = NULL;
queue->tx.sr... | 0 |
231,789 | TEST_F(QuicServerTransportTest, RecvStopSendingFrameAfterReset) {
server->getNonConstConn().ackStates.appDataAckState.nextPacketNum = 3;
std::array<std::string, 4> words = {
"Hey Bob, this is Alice, for real.",
"What message did I send you last time?",
"You don't sound like Alice",
"You are ... | 0 |
486,830 | static uint64_t gem_read(void *opaque, hwaddr offset, unsigned size)
{
CadenceGEMState *s;
uint32_t retval;
s = (CadenceGEMState *)opaque;
offset >>= 2;
retval = s->regs[offset];
DB_PRINT("offset: 0x%04x read: 0x%08x\n", (unsigned)offset*4, retval);
switch (offset) {
case GEM_ISR:
... | 0 |
301,018 | pcxcmyk_print_page(gx_device_printer * pdev, gp_file * file)
{
pcx_header header;
header = pcx_header_prototype;
header.version = 2;
header.bpp = 4;
header.nplanes = 1;
/* Fill the palette appropriately. */
memcpy((byte *) header.palette, pcx_cmyk_palette,
sizeof(pcx_cmyk_palette... | 0 |
247,122 | void gf_fs_del(GF_FilterSession *fsess)
{
assert(fsess);
gf_fs_stop(fsess);
GF_LOG(GF_LOG_DEBUG, GF_LOG_FILTER, ("Session destroy begin\n"));
if (fsess->parsed_args) {
while (gf_list_count(fsess->parsed_args)) {
GF_FSArgItem *ai = gf_list_pop_back(fsess->parsed_args);
gf_free(ai->argname);
gf_free(ai);... | 0 |
411,918 | tor_version_parse(const char *s, tor_version_t *out)
{
char *eos=NULL;
const char *cp=NULL;
/* Format is:
* "Tor " ? NUM dot NUM dot NUM [ ( pre | rc | dot ) NUM [ - tag ] ]
*/
tor_assert(s);
tor_assert(out);
memset(out, 0, sizeof(tor_version_t));
if (!strcasecmpstart(s, "Tor "))
s += 4;
... | 0 |
484,065 | START_TEST(SecureChannel_sendSymmetricMessage_modeNone) {
// initialize dummy message
UA_ReadRequest dummyMessage;
UA_ReadRequest_init(&dummyMessage);
UA_DataType dummyType = UA_TYPES[UA_TYPES_READREQUEST];
testChannel.securityMode = UA_MESSAGESECURITYMODE_NONE;
UA_StatusCode retval = UA_Secur... | 0 |
366,186 | static inline struct hlist_head *mp_hash(struct dentry *dentry)
{
unsigned long tmp = ((unsigned long)dentry / L1_CACHE_BYTES);
tmp = tmp + (tmp >> mp_hash_shift);
return &mountpoint_hashtable[tmp & mp_hash_mask];
} | 0 |
389,551 | xmlCtxtReadIO(xmlParserCtxtPtr ctxt, xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose, void *ioctx,
const char *URL,
const char *encoding, int options)
{
xmlParserInputBufferPtr input;
xmlParserInputPtr stream;
if (ioread == NULL)
return (NULL);
if (... | 0 |
436,109 | __must_hold(&req->ctx->completion_lock)
{
bool posted = false;
if (likely(req->flags & REQ_F_LINK_TIMEOUT))
posted = io_kill_linked_timeout(req);
if (unlikely((req->flags & REQ_F_FAIL) &&
!(req->flags & REQ_F_HARDLINK))) {
posted |= (req->link != NULL);
io_fail_links(req);
}
return posted;
} | 0 |
432,221 | static void flatview_simplify(FlatView *view)
{
unsigned i, j;
i = 0;
while (i < view->nr) {
j = i + 1;
while (j < view->nr
&& can_merge(&view->ranges[j-1], &view->ranges[j])) {
int128_addto(&view->ranges[i].addr.size, view->ranges[j].addr.size);
++j;
... | 0 |
301,427 | static ssize_t vfswrap_pread(vfs_handle_struct *handle, files_struct *fsp, void *data,
size_t n, off_t offset)
{
ssize_t result;
#if defined(HAVE_PREAD) || defined(HAVE_PREAD64)
START_PROFILE_BYTES(syscall_pread, n);
result = sys_pread(fsp->fh->fd, data, n, offset);
END_PROFILE(syscall_pread);
if (result == -... | 0 |
326,087 | regatom(int *flagp)
{
char_u *ret;
int flags;
int c;
char_u *p;
int extra = 0;
int save_prev_at_start = prev_at_start;
*flagp = WORST; // Tentatively.
c = getchr();
switch (c)
{
case Magic('^'):
ret = regnode(BOL);
break;
case Magic('... | 0 |
301,409 | static bool vfswrap_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp)
{
return false;
} | 0 |
424,927 | static ssize_t iwl_dbgfs_monitor_data_read(struct file *file,
char __user *user_buf,
size_t count, loff_t *ppos)
{
struct iwl_trans *trans = file->private_data;
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
void *cpu_addr = (void *)trans->dbg.fw_mon[0].block, *curr_buf;
struct... | 0 |
246,742 | static u64 do_size_top_boxes(char *inName, char *compress_top_boxes, u32 mode)
{
FILE *in;
u64 top_size = 0;
Bool do_all = GF_FALSE;
GF_BitStream *bs_in;
if (!compress_top_boxes) return GF_BAD_PARAM;
if (!strcmp(compress_top_boxes, "all") || !strcmp(compress_top_boxes, "*") || !strcmp(compress_top_boxes, "@"))
... | 0 |
513,328 | uint check_join_cache_usage(JOIN_TAB *tab,
ulonglong options,
uint no_jbuf_after,
uint table_index,
JOIN_TAB *prev_tab)
{
Cost_estimate cost;
uint flags= 0;
ha_rows rows= 0;
uint bufsz= 4096;
JOIN_C... | 0 |
437,405 | vhost_user_set_vring_num(struct virtio_net **pdev,
struct VhostUserMsg *msg,
int main_fd __rte_unused)
{
struct virtio_net *dev = *pdev;
struct vhost_virtqueue *vq = dev->virtqueue[msg->payload.state.index];
vq->size = msg->payload.state.num;
/* VIRTIO 1.0, 2.4 Virtqueues says:
*
* Queue Size value is... | 0 |
500,647 | unsigned long sftp_tell(sftp_file file) {
return (unsigned long)file->offset;
} | 0 |
278,280 | preprocs_left(void)
{
return
(curbuf->b_p_si && !curbuf->b_p_cin) ||
(curbuf->b_p_cin && in_cinkeys('#', ' ', TRUE)
&& curbuf->b_ind_hash_comment == 0)
;
} | 0 |
455,398 | xfs_icache_inode_is_allocated(
struct xfs_mount *mp,
struct xfs_trans *tp,
xfs_ino_t ino,
bool *inuse)
{
struct xfs_inode *ip;
int error;
error = xfs_iget(mp, tp, ino, XFS_IGET_INCORE, 0, &ip);
if (error)
return error;
*inuse = !!(VFS_I(ip)->i_mode);
IRELE(ip);
return 0;
} | 0 |
225,097 | void RemoveDescriptionsFromOpDef(OpDef* op_def) {
RemoveNonDeprecationDescriptionsFromOpDef(op_def);
if (op_def->has_deprecation()) {
op_def->mutable_deprecation()->clear_explanation();
}
} | 0 |
252,351 | mz_bool mz_zip_writer_init(mz_zip_archive *pZip, mz_uint64 existing_size) {
if ((!pZip) || (pZip->m_pState) || (!pZip->m_pWrite) ||
(pZip->m_zip_mode != MZ_ZIP_MODE_INVALID))
return MZ_FALSE;
if (pZip->m_file_offset_alignment) {
// Ensure user specified file offset alignment is a power of 2.
if (... | 0 |
223,439 | static PCRE2_SPTR SLJIT_FUNC do_script_run_utf(PCRE2_SPTR ptr, PCRE2_SPTR endptr)
{
if (PRIV(script_run)(ptr, endptr, TRUE))
return endptr;
return NULL;
} | 0 |
359,446 | zlog_rotate (struct zlog *zl)
{
int level;
if (zl == NULL)
zl = zlog_default;
if (zl->fp)
fclose (zl->fp);
zl->fp = NULL;
logfile_fd = -1;
level = zl->maxlvl[ZLOG_DEST_FILE];
zl->maxlvl[ZLOG_DEST_FILE] = ZLOG_DISABLED;
if (zl->filename)
{
mode_t oldumask;
int save_errno;
... | 0 |
380,958 | ins_pagedown(void)
{
pos_T tpos;
undisplay_dollar();
if (mod_mask & MOD_MASK_CTRL)
{
// <C-PageDown>: tab page forward
if (first_tabpage->tp_next != NULL)
{
start_arrow(&curwin->w_cursor);
goto_tabpage(0);
}
return;
}
tpos = curwin->w_cursor;
if (onepage(FORWARD, 1L) == OK)... | 0 |
238,638 | static int check_ptr_to_btf_access(struct bpf_verifier_env *env,
struct bpf_reg_state *regs,
int regno, int off, int size,
enum bpf_access_type atype,
int value_regno)
{
struct bpf_reg_state *reg = regs + regno;
const struct btf_type *t = btf_type_by_id(reg->btf, reg->btf_id);
const char ... | 0 |
230,143 | json_t * user_auth_scheme_module_trigger(struct config_module * config, const struct _u_request * http_request, const char * username, json_t * j_scheme_trigger, void * cls) {
UNUSED(j_scheme_trigger);
json_t * j_return = NULL, * j_session = config->glewlwyd_module_callback_check_user_session(config, http_request, ... | 0 |
314,533 | PJ_DEF(pj_status_t) pjmedia_sdp_parse( pj_pool_t *pool,
char *buf, pj_size_t len,
pjmedia_sdp_session **p_sdp)
{
pj_scanner scanner;
pjmedia_sdp_session *session;
pjmedia_sdp_media *media = NULL;
pjmedia_sdp_attr *attr;
pjmedia_sdp_conn *conn;
pjmedia_sdp_bandw *bandw;
... | 0 |
446,096 | static void atusb_disconnect(struct usb_interface *interface)
{
struct atusb *atusb = usb_get_intfdata(interface);
dev_dbg(&atusb->usb_dev->dev, "%s\n", __func__);
atusb->shutdown = 1;
cancel_delayed_work_sync(&atusb->work);
usb_kill_anchored_urbs(&atusb->rx_urbs);
atusb_free_urbs(atusb);
usb_kill_urb(atusb->... | 0 |
90,133 | virtual void EnableOfflineMode(bool enable) {}
| 0 |
521,455 | bool ZipFile::Builder::writeToStream (OutputStream& target, double* const progress) const
{
auto fileStart = target.getPosition();
for (int i = 0; i < items.size(); ++i)
{
if (progress != nullptr)
*progress = (i + 0.5) / items.size();
if (! items.getUnchecked (i)->writ... | 0 |
292,167 | void LinkResolver::runtime_resolve_virtual_method(CallInfo& result,
const methodHandle& resolved_method,
Klass* resolved_klass,
Handle recv,
... | 0 |
336,623 | void reds_enable_mm_time(RedsState *reds)
{
reds->mm_time_enabled = TRUE;
reds->mm_time_latency = MM_TIME_DELTA;
reds_send_mm_time(reds);
} | 0 |
369,404 | static inline void io_get_task_refs(int nr)
{
struct io_uring_task *tctx = current->io_uring;
tctx->cached_refs -= nr;
if (unlikely(tctx->cached_refs < 0))
io_task_refs_refill(tctx);
} | 0 |
247,729 | TEST_P(SslSocketTest, TestTransportSocketCallback) {
// Make MockTransportSocketCallbacks.
Network::MockIoHandle io_handle;
NiceMock<Network::MockTransportSocketCallbacks> callbacks;
ON_CALL(callbacks, ioHandle()).WillByDefault(ReturnRef(io_handle));
// Make SslSocket.
testing::NiceMock<Server::Configurati... | 0 |
259,156 | static int mov_read_tfdt(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
MOVFragment *frag = &c->fragment;
AVStream *st = NULL;
MOVStreamContext *sc;
int version, i;
MOVFragmentStreamInfo * frag_stream_info;
int64_t base_media_decode_time;
for (i = 0; i < c->fc->nb_streams; i++) {
i... | 0 |
415,194 | cmd_checkpin (assuan_context_t ctx, char *line)
{
ctrl_t ctrl = assuan_get_pointer (ctx);
int rc;
char *idstr;
if ( IS_LOCKED (ctrl) )
return gpg_error (GPG_ERR_LOCKED);
if ((rc = open_card (ctrl, NULL)))
return rc;
if (!ctrl->app_ctx)
return gpg_error (GPG_ERR_UNSUPPORTED_OPERATION);
/* W... | 0 |
508,412 | mark_common_columns(THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2,
List<String> *using_fields, uint *found_using_fields)
{
Field_iterator_table_ref it_1, it_2;
Natural_join_column *nj_col_1, *nj_col_2;
Query_arena *arena, backup;
bool result= TRUE;
bool first_outer_loop= TRUE;... | 0 |
445,942 | notify_action_open_archive_cb (NotifyNotification *notification,
char *action,
gpointer user_data)
{
NotifyData *notify_data = user_data;
FrWindow *window = notify_data->window;
GtkWidget *new_window;
new_window = fr_window_new ();
gtk_widget_show (new_window);
fr_... | 0 |
205,838 | get_one_sourceline(source_cookie_T *sp)
{
garray_T ga;
int len;
int c;
char_u *buf;
#ifdef USE_CRNL
int has_cr; // CR-LF found
#endif
int have_read = FALSE;
// use a growarray to store the sourced line
ga_init2(&ga, 1, 250);
// Loop until there is a finished line (or end... | 1 |
221,130 | GF_Err gf_odf_ac3_config_parse(u8 *dsi, u32 dsi_len, Bool is_ec3, GF_AC3Config *cfg)
{
GF_BitStream *bs;
GF_Err e;
if (!cfg || !dsi) return GF_BAD_PARAM;
bs = gf_bs_new(dsi, dsi_len, GF_BITSTREAM_READ);
e = gf_odf_ac3_config_parse_bs(bs, is_ec3, cfg);
gf_bs_del(bs);
return e;
} | 0 |
222,490 | const NameInfoItem* GetItemOrNull(const string& name) const {
return gtl::FindOrNull(index_, name);
} | 0 |
428,226 | CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
va_list param)
{
char *argptr;
CURLcode result = CURLE_OK;
long arg;
#ifndef CURL_DISABLE_HTTP
curl_off_t bigsize;
#endif
switch(option) {
case CURLOPT_DNS_CACHE_TIMEOUT:
data->set.dns_cache_timeout = va_arg(param,... | 0 |
90,805 | void QuotaManager::RegisterClient(QuotaClient* client) {
DCHECK(io_thread_->BelongsToCurrentThread());
DCHECK(!database_.get());
clients_.push_back(client);
}
| 0 |
432,251 | static void test_mem_protect_map_ptr(void)
{
uc_engine *uc;
uint64_t val = 0x114514;
uint8_t *data1 = NULL;
uint8_t *data2 = NULL;
uint64_t mem;
data1 = calloc(sizeof(*data1), 0x4000);
data2 = calloc(sizeof(*data2), 0x2000);
OK(uc_open(UC_ARCH_X86, UC_MODE_64, &uc));
OK(uc_mem_map... | 0 |
369,402 |
static inline void io_poll_execute(struct io_kiocb *req, int res, int events)
{
if (io_poll_get_ownership(req))
__io_poll_execute(req, res, events); | 0 |
226,273 |
void lsr1_box_del(GF_Box *s)
{
GF_LASeRSampleEntryBox *ptr = (GF_LASeRSampleEntryBox *)s;
if (ptr == NULL) return;
gf_isom_sample_entry_predestroy((GF_SampleEntryBox *)s);
if (ptr->slc) gf_odf_desc_del((GF_Descriptor *)ptr->slc);
gf_free(ptr); | 0 |
270,766 | static int write_env_passwd(unsigned char *sum, size_t length)
{
int fd;
unsigned char c;
int ret = 0;
if (!sum && length < 1)
return -EINVAL;
fd = open(PASSWD_DIR, O_RDONLY);
if (fd < 0)
mkdir(PASSWD_DIR, 644);
close(fd);
fd = open(PASSWD_FILE, O_WRONLY | O_CREAT, 600);
if (fd < 0)
return fd;
do... | 0 |
225,932 | GF_Err gnrm_box_size(GF_Box *s)
{
GF_GenericSampleEntryBox *ptr = (GF_GenericSampleEntryBox *)s;
s->type = GF_ISOM_BOX_TYPE_GNRM;
ptr->size += 8+ptr->data_size;
return GF_OK;
} | 0 |
241,043 | int main(int argc, char *argv[], char *envp[])
{
int rv;
const char *cp;
#ifdef LOGGING_LIBQB
enum qb_log_target_slot i;
#endif
init_set_proc_title(argc, argv, envp);
get_time(&start_time);
memset(&cl, 0, sizeof(cl));
strncpy(cl.configfile,
BOOTH_DEFAULT_CONF, BOOTH_PATH_LEN - 1);
cl.lockfile[0] = 0;
debu... | 0 |
224,567 | Status AvgPoolGradShape(shape_inference::InferenceContext* c) {
ShapeHandle s;
TF_RETURN_IF_ERROR(c->MakeShapeFromShapeTensor(0, &s));
TF_RETURN_IF_ERROR(c->WithRank(s, 4, &s));
c->set_output(0, s);
return Status::OK();
} | 0 |
270,776 | int password(unsigned char *passwd, size_t length, int flags, int timeout)
{
unsigned char *buf = passwd;
int pos = 0;
unsigned char ch;
uint64_t start;
if (!passwd)
return -EINVAL;
start = get_time_ns();
do {
if (tstc()) {
ch = getchar();
switch (ch) {
case '\r':
case '\n':
*buf = '\0';
... | 0 |
213,589 | process_button(struct parsed_tag *tag)
{
Str tmp = NULL;
char *p, *q, *r, *qq = "";
int qlen, v;
if (cur_form_id < 0) {
char *s = "<form_int method=internal action=none>";
tmp = process_form(parse_tag(&s, TRUE));
}
if (tmp == NULL)
tmp = Strnew();
p = "submit";
par... | 1 |
445,949 | fr_window_free_batch_data (FrWindow *window)
{
GList *scan;
for (scan = window->priv->batch_action_list; scan; scan = scan->next) {
FrBatchAction *adata = scan->data;
if ((adata->data != NULL) && (adata->free_func != NULL))
(*adata->free_func) (adata->data);
g_free (adata);
}
g_list_free (window->priv->... | 0 |
289,326 | static int _snd_pcm_hw_param_mask(struct snd_pcm_hw_params *params,
snd_pcm_hw_param_t var,
const struct snd_mask *val)
{
int changed;
changed = snd_mask_refine(hw_param_mask(params, var), val);
if (changed > 0) {
params->cmask |= 1 << var;
params->rmask |= 1 << var;
}
return changed;
} | 0 |
218,992 | Status ConstantFolding::FoldMergeNode(NodeDef* node, GraphDef* output_graph) {
// Merge nodes are special, in the sense that they execute as soon as one of
// their input is ready. We can therefore fold a merge node iff it has at
// least one constant input without control dependency.
// We still need to ensure... | 0 |
301,369 | static uint64_t vfswrap_get_alloc_size(vfs_handle_struct *handle,
struct files_struct *fsp,
const SMB_STRUCT_STAT *sbuf)
{
uint64_t result;
START_PROFILE(syscall_get_alloc_size);
if(S_ISDIR(sbuf->st_ex_mode)) {
result = 0;
goto out;
}
#if defined(HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_... | 0 |
512,722 | static int cmp_decimal(void *cmp_arg, my_decimal *a, my_decimal *b)
{
/*
We need call of fixing buffer pointer, because fast sort just copy
decimal buffers in memory and pointers left pointing on old buffer place
*/
a->fix_buffer_pointer();
b->fix_buffer_pointer();
return my_decimal_cmp(a, b);
} | 0 |
390,533 | XkbWriteGeomOverlay(char *wire,XkbOverlayPtr ol,Bool swap)
{
register int r;
XkbOverlayRowPtr row;
xkbOverlayWireDesc * olWire;
olWire= (xkbOverlayWireDesc *)wire;
olWire->name= ol->name;
olWire->nRows= ol->num_rows;
if (swap) {
register int n;
swapl(&olWire->name,n);
}
wire= (char *)&olWire[1];
... | 0 |
336,588 | static int do_spice_init(RedsState *reds, SpiceCoreInterface *core_interface)
{
spice_debug("starting %s", VERSION);
if (core_interface->base.major_version != SPICE_INTERFACE_CORE_MAJOR) {
spice_warning("bad core interface version");
goto err;
}
reds->core = core_interface_adapter;
... | 0 |
512,930 | void in_timestamp::value_to_item(uint pos, Item *item)
{
const Timestamp_or_zero_datetime &buff= (((Timestamp_or_zero_datetime*) base)[pos]);
static_cast<Item_timestamp_literal*>(item)->set_value(buff);
} | 0 |
359,306 | DEFUN (bgp_redistribute_ipv4_metric,
bgp_redistribute_ipv4_metric_cmd,
"redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>",
"Redistribute information from another routing protocol\n"
"Connected\n"
"Kernel routes\n"
"Open Shurtest Path First (OSPF)\n"
... | 0 |
300,791 | static int tipc_send_group_unicast(struct socket *sock, struct msghdr *m,
int dlen, long timeout)
{
struct sock *sk = sock->sk;
struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name;
int blks = tsk_blocks(GROUP_H_SIZE + dlen);
struct tipc_sock *tsk = tipc_sk(sk);
struct net *net = sock_net(sk);
struct t... | 0 |
473,973 | onig_vsnprintf_with_pattern(UChar buf[], int bufsize, OnigEncoding enc,
UChar* pat, UChar* pat_end, const UChar *fmt, va_list args)
{
size_t need;
int n, len;
UChar *p, *s, *bp;
UChar bs[6];
n = xvsnprintf((char* )buf, bufsize, (const char* )fmt, args);
need = (pat_end - pat) * ... | 0 |
353,002 | serialNumberAndIssuerSerialNormalize(
slap_mask_t usage,
Syntax *syntax,
MatchingRule *mr,
struct berval *in,
struct berval *out,
void *ctx )
{
struct berval i, ni = BER_BVNULL,
sn, sn2 = BER_BVNULL, sn3 = BER_BVNULL,
i_sn, i_sn2 = BER_BVNULL, i_sn3 = BER_BVNULL;
char sbuf2[SLAP_SN_BUFLEN], i_sbuf2[SLAP_SN_... | 0 |
489,154 | sctp_disposition_t sctp_sf_do_9_1_abort(const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
if (!sctp_vtag_verify_either(chunk, asoc))
return sctp_sf_pdiscard(ep, asoc, type, arg, ... | 0 |
437,363 | setup_call(Node* node, ScanEnv* env, int state)
{
int r;
switch (NODE_TYPE(node)) {
case NODE_LIST:
case NODE_ALT:
do {
r = setup_call(NODE_CAR(node), env, state);
} while (r == 0 && IS_NOT_NULL(node = NODE_CDR(node)));
break;
case NODE_QUANT:
if (QUANT_(node)->upper == 0)
state ... | 0 |
238,608 | static void __mark_reg32_known(struct bpf_reg_state *reg, u64 imm)
{
reg->var_off = tnum_const_subreg(reg->var_off, imm);
reg->s32_min_value = (s32)imm;
reg->s32_max_value = (s32)imm;
reg->u32_min_value = (u32)imm;
reg->u32_max_value = (u32)imm;
} | 0 |
462,301 | status_symbol_sets(stream * s, pcl_state_t * pcs, pcl_data_storage_t storage)
{
gs_const_string key;
void *value;
pl_dict_enum_t denum;
ushort *idlist;
int nid;
if (storage == 0)
return 0; /* no "currently selected" symbol set */
/* Note carefully the meaning of this ... | 0 |
231,045 | BaseType_t xQueuePeekFromISR( QueueHandle_t xQueue,
void * const pvBuffer )
{
BaseType_t xReturn;
UBaseType_t uxSavedInterruptStatus;
int8_t * pcOriginalReadPosition;
Queue_t * const pxQueue = xQueue;
configASSERT( pxQueue );
configASSERT( !( ( pvBuffer ==... | 0 |
265,047 | set_colour_code(char *str, char **var)
{
char *keyseq;
int len;
zsfree(*var);
keyseq = getkeystring(str, &len, GETKEYS_BINDKEY, NULL);
*var = metafy(keyseq, len, META_DUP);
} | 0 |
294,559 | jd_utc_to_local(int jd, int df, int of)
{
df += of;
if (df < 0)
jd -= 1;
else if (df >= DAY_IN_SECONDS)
jd += 1;
return jd;
} | 0 |
162,322 | bool decode(ArgumentDecoder* decoder, RetainPtr<CFURLRef>& result)
{
RetainPtr<CFURLRef> baseURL;
bool hasBaseURL;
if (!decoder->decodeBool(hasBaseURL))
return false;
if (hasBaseURL) {
if (!decode(decoder, baseURL))
return false;
}
RetainPtr<CFStringRef> string;
... | 0 |
517,433 | static char *get_service_status(Output_Type type, Service_T s, char *buf, int buflen) {
ASSERT(s);
ASSERT(buf);
if (s->monitor == Monitor_Not || s->monitor & Monitor_Init) {
get_monitoring_status(type, s, buf, buflen);
} else if (s->error == 0) {
snprintf(... | 0 |
513,197 | plugin_ref plugin_lock_by_name(THD *thd, const LEX_STRING *name, int type)
{
LEX *lex= thd ? thd->lex : 0;
plugin_ref rc= NULL;
st_plugin_int *plugin;
DBUG_ENTER("plugin_lock_by_name");
mysql_mutex_lock(&LOCK_plugin);
if ((plugin= plugin_find_internal(name, type)))
rc= intern_plugin_lock(lex, plugin_int... | 0 |
259,288 | static int64_t get_frag_time(AVFormatContext *s, AVStream *dst_st,
MOVFragmentIndex *frag_index, int index)
{
MOVFragmentStreamInfo * frag_stream_info;
MOVStreamContext *sc = dst_st->priv_data;
int64_t timestamp;
int i, j;
// If the stream is referenced by any sidx, lim... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.