idx int64 | func string | target int64 |
|---|---|---|
198,198 | void DoCompute(OpKernelContext* c) {
core::RefCountPtr<Var> v;
OP_REQUIRES_OK(c, LookupResource(c, HandleFromInput(c, 0), &v));
Tensor* params = v->tensor();
const Tensor& indices = c->input(1);
const Tensor& updates = c->input(2);
// Check that rank(updates.shape) = rank(indices.shape + para... | 1 |
434,089 | ex_previous(exarg_T *eap)
{
// If past the last one already, go to the last one.
if (curwin->w_arg_idx - (int)eap->line2 >= ARGCOUNT)
do_argfile(eap, ARGCOUNT - 1);
else
do_argfile(eap, curwin->w_arg_idx - (int)eap->line2);
} | 0 |
374,046 | static SymbolsMetadata parseMetadata(RBuffer *buf, int off) {
SymbolsMetadata sm = { 0 };
ut8 b[0x100] = { 0 };
(void)r_buf_read_at (buf, off, b, sizeof (b));
sm.addr = off;
sm.cputype = r_read_le32 (b);
sm.arch = typeString (sm.cputype, &sm.bits);
// eprintf ("0x%08x cputype 0x%x -> %s\n", 0x40, sm.cputype, ... | 0 |
522,334 | int GmfWriteByteFlow(int64_t MshIdx, char *BytTab, int NmbByt)
{
int i, PadWrd = 0, *WrdTab = (int *)BytTab, NmbWrd = NmbByt / WrdSiz;
// Add an extra padding word at the end if needed
if(NmbByt > NmbWrd * 4)
PadWrd = 1;
// Create the keyword with the number of words, not bytes
if(!GmfSetKwd(MshI... | 0 |
267,355 | append_env (const char *arg)
{
exec_options.env = realloc (exec_options.env, (exec_options.env_size + 2) * sizeof (*exec_options.env));
if (exec_options.env == NULL)
error (EXIT_FAILURE, errno, "cannot allocate memory");
exec_options.env[exec_options.env_size + 1] = NULL;
exec_options.env[exec_options.env_s... | 0 |
509,524 | void _ma_report_progress(HA_CHECK *param, ulonglong progress,
ulonglong max_progress)
{
thd_progress_report((THD*)param->thd,
progress + max_progress * param->stage,
max_progress * param->max_stage);
} | 0 |
512,457 | const Type_handler *type_handler() const { return &type_handler_row; } | 0 |
248,289 | static char *strdup(const char *str)
{
size_t len;
char *dup;
len = strlen(str) + 1;
dup = calloc(len, sizeof(char));
if (!dup)
return NULL;
memcpy(dup, str, len);
return dup;
} | 0 |
409,503 | term_color(char_u *s, int n)
{
char buf[20];
int i = *s == CSI ? 1 : 2;
// index in s[] just after <Esc>[ or CSI
// Special handling of 16 colors, because termcap can't handle it
// Also accept "\e[3%dm" for TERMINFO, it is sometimes used
// Also accept CSI instead of <Esc>[
if (n >= 8 && t_... | 0 |
220,811 | SaturatingRoundingMultiplyByPOTParam(
gemmlowp::FixedPoint<tRawType, tIntegerBits> a, int exponent) {
return gemmlowp::FixedPoint<tRawType, tIntegerBits>::FromRaw(
SaturatingRoundingMultiplyByPOTParam(a.raw(), exponent));
} | 0 |
225,817 | GF_Err stdp_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 entry;
GF_DegradationPriorityBox *ptr = (GF_DegradationPriorityBox *)s;
/*out-of-order stdp, assume no padding at the end and take the entire remaining data for entries*/
if (!ptr->nb_entries) ptr->nb_entries = (u32) ptr->size / 2;
else if (ptr->nb_entries >... | 0 |
336,557 | void reds_on_client_seamless_migrate_complete(RedsState *reds, RedClient *client)
{
spice_debug("trace");
if (!reds_find_client(reds, client)) {
spice_debug("client no longer exists");
return;
}
client->get_main()->migrate_dst_complete();
} | 0 |
195,954 | static pj_status_t parse_query(pj_dns_parsed_query *q, pj_pool_t *pool,
const pj_uint8_t *pkt, const pj_uint8_t *start,
const pj_uint8_t *max, int *parsed_len)
{
const pj_uint8_t *p = start;
int name_len, name_part_len;
pj_status_t status;
/* Get the length of the name */
status... | 1 |
437,312 | compile_string_raw_node(StrNode* sn, regex_t* reg)
{
if (sn->end <= sn->s)
return 0;
return add_compile_string(sn->s, 1 /* sb */, (int )(sn->end - sn->s), reg, 0);
} | 0 |
101,692 | void WebProcessProxy::pageVisibilityChanged(WebKit::WebPageProxy *page)
{
#if PLATFORM(MAC)
if (pageIsProcessSuppressible(page))
m_processSuppressiblePages.add(page->pageID());
else
m_processSuppressiblePages.remove(page->pageID());
updateProcessSuppressionState();
#else
UNUSED_PARAM(pag... | 0 |
509,532 | int ha_maria::update_row(const uchar * old_data, const uchar * new_data)
{
CHECK_UNTIL_WE_FULLY_IMPLEMENTED_VERSIONING("UPDATE in WRITE CONCURRENT");
return maria_update(file, old_data, new_data);
} | 0 |
247,714 | const std::string& expectedLocalSubject() const { return expected_local_subject_; } | 0 |
387,775 | jmethodID InstanceKlass::jmethod_id_or_null(Method* method) {
size_t idnum = (size_t)method->method_idnum();
jmethodID* jmeths = methods_jmethod_ids_acquire();
size_t length; // length assigned as debugging crumb
jmethodID id = NULL;
if (jmeths != NULL && ... | 0 |
489,139 | static int sctp_sf_check_restart_addrs(const struct sctp_association *new_asoc,
const struct sctp_association *asoc,
struct sctp_chunk *init,
sctp_cmd_seq_t *commands)
{
struct sctp_transport *new_addr, *addr;
int found;
/* Implementor's Guide - Sectin 5.2.2
* ...
* Before respo... | 0 |
216,767 | static int smtp_command_parse_parameters(struct smtp_command_parser *parser)
{
const unsigned char *p, *mp;
uoff_t max_size = (parser->auth_response ?
parser->limits.max_auth_size :
parser->limits.max_parameters_size);
/* We assume parameters to match textstr (HT, SP, Printable US-ASCII).
For command parame... | 1 |
390,542 | _XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev,
xkbSetCompatMapReq *req, char* data, BOOL dryRun)
{
XkbSrvInfoPtr xkbi;
XkbDescPtr xkb;
XkbCompatMapPtr compat;
int nGroups;
unsigned i,bit;
xkbi = dev->key->xkbInfo;
xkb = xk... | 0 |
226,192 |
GF_Err dac3_box_size(GF_Box *s)
{
GF_AC3ConfigBox *ptr = (GF_AC3ConfigBox *)s;
if (ptr->cfg.is_ec3) {
u32 i;
s->size += 2;
for (i=0; i<ptr->cfg.nb_streams; i++) {
s->size += 3;
if (ptr->cfg.streams[i].nb_dep_sub)
s->size += 1;
}
} else {
s->size += 3;
}
return GF_OK; | 0 |
414,927 | xmlXPathCmpNodesExt(xmlNodePtr node1, xmlNodePtr node2) {
int depth1, depth2;
int misc = 0, precedence1 = 0, precedence2 = 0;
xmlNodePtr miscNode1 = NULL, miscNode2 = NULL;
xmlNodePtr cur, root;
long l1, l2;
if ((node1 == NULL) || (node2 == NULL))
return(-2);
if (node1 == node2)
return(0... | 0 |
300,808 | static void tipc_data_ready(struct sock *sk)
{
struct socket_wq *wq;
rcu_read_lock();
wq = rcu_dereference(sk->sk_wq);
if (skwq_has_sleeper(wq))
wake_up_interruptible_sync_poll(&wq->wait, EPOLLIN |
EPOLLRDNORM | EPOLLRDBAND);
rcu_read_unlock();
} | 0 |
359,546 | DEFUN (no_bgp_always_compare_med,
no_bgp_always_compare_med_cmd,
"no bgp always-compare-med",
NO_STR
"BGP specific commands\n"
"Allow comparing MED from different neighbors\n")
{
struct bgp *bgp;
bgp = vty->index;
bgp_flag_unset (bgp, BGP_FLAG_ALWAYS_COMPARE_MED);
return CMD_... | 0 |
236,190 | GF_Err tbox_box_size(GF_Box *s)
{
s->size += 8;
return GF_OK;
} | 0 |
482,541 | addForwardPassRule(TranslationTableOffset ruleOffset, TranslationTableRule *rule,
TranslationTableHeader *table) {
TranslationTableOffset *forPassRule;
switch (rule->opcode) {
case CTO_Correct:
forPassRule = &table->forPassRules[0];
break;
case CTO_Context:
forPassRule = &table->forPassRules[1];
break;
c... | 0 |
335,104 | static int skcipher_recvmsg_nokey(struct kiocb *unused, struct socket *sock,
struct msghdr *msg, size_t ignored, int flags)
{
int err;
err = skcipher_check_key(sock);
if (err)
return err;
return skcipher_recvmsg(NULL, sock, msg, ignored, flags);
} | 0 |
248,275 | DLLIMPORT int cfg_setnfloat(cfg_t *cfg, const char *name, double value, unsigned int index)
{
cfg_opt_t *opt;
opt = cfg_getopt(cfg, name);
if (opt && opt->validcb2 && (*opt->validcb2)(cfg, opt, (void *)&value) != 0)
return CFG_FAIL;
return cfg_opt_setnfloat(opt, value, index);
} | 0 |
437,346 | compile_length_option_node(EnclosureNode* node, regex_t* reg)
{
int tlen;
OnigOptionType prev = reg->options;
reg->options = node->o.options;
tlen = compile_length_tree(NODE_ENCLOSURE_BODY(node), reg);
reg->options = prev;
return tlen;
} | 0 |
513,038 | bool Item_in_optimizer::eval_not_null_tables(void *opt_arg)
{
not_null_tables_cache= 0;
if (is_top_level_item())
{
/*
It is possible to determine NULL-rejectedness of the left arguments
of IN only if it is a top-level predicate.
*/
not_null_tables_cache= args[0]->not_null_tables();
}
r... | 0 |
508,306 | void close_tables_for_reopen(THD *thd, TABLE_LIST **tables,
const MDL_savepoint &start_of_statement_svp)
{
TABLE_LIST *first_not_own_table= thd->lex->first_not_own_table();
TABLE_LIST *tmp;
/*
If table list consists only from tables from prelocking set, table list
for new att... | 0 |
240,274 | write_reg_contents_lst(
int name,
char_u **strings,
int maxlen UNUSED,
int must_append,
int yank_type,
long block_len)
{
yankreg_T *old_y_previous, *old_y_current;
if (name == '/' || name == '=')
{
char_u *s;
if (strings[0] == NULL)
s = (char_u *)"";
else if (strings[1... | 0 |
274,757 | void ntfs_attr_close(ntfs_attr *na)
{
if (!na)
return;
if (NAttrNonResident(na) && na->rl)
free(na->rl);
/* Don't release if using an internal constant. */
if (na->name != AT_UNNAMED && na->name != NTFS_INDEX_I30
&& na->name != STREAM_SDS)
free(na->name);
free(na);
} | 0 |
221,497 | regenerate_ld_cache (GPtrArray *base_argv_array,
GArray *base_fd_array,
GFile *app_id_dir,
const char *checksum,
GFile *runtime_files,
gboolean generate_ld_so_conf,
... | 0 |
359,294 | DEFUN (no_neighbor_unsuppress_map,
no_neighbor_unsuppress_map_cmd,
NO_NEIGHBOR_CMD2 "unsuppress-map WORD",
NO_STR
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Route-map to selectively unsuppress suppressed routes\n"
"Name of route map\n")
{
return peer_unsuppress_map_unset_vty (vt... | 0 |
221,679 | int Socket::loopChunk(int timeout) // reads chunks and sends back until 0 len chunk or timeout
{
char buff[32000];
int tot_size = 0;
int csize = 1;
while (csize > 0) {
csize = readChunk(buff,32000, timeout);
if (csize == 0) // end chunk
{
if (!writeChunkTrailer... | 0 |
242,964 | int mbedtls_ssl_check_record( mbedtls_ssl_context const *ssl,
unsigned char *buf,
size_t buflen )
{
int ret = 0;
MBEDTLS_SSL_DEBUG_MSG( 1, ( "=> mbedtls_ssl_check_record" ) );
MBEDTLS_SSL_DEBUG_BUF( 3, "record buffer", buf, buflen );
/* We don... | 0 |
413,667 | static void function_rename(RFlag *flags, RAnalFunction *fcn) {
const char *locname = "loc.";
const size_t locsize = strlen (locname);
char *fcnname = fcn->name;
if (strncmp (fcn->name, locname, locsize) == 0) {
const char *fcnpfx, *restofname;
RFlagItem *f;
fcn->type = R_ANAL_FCN_TYPE_FCN;
fcnpfx = r_ana... | 0 |
214,336 | static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs)
{
struct pfkey_sock *pfk = pfkey_sk(sk);
struct sk_buff *supp_skb;
if (hdr->sadb_msg_satype > SADB_SATYPE_MAX)
return -EINVAL;
if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC) {
if (pfk->register... | 1 |
292,170 | void LinkResolver::check_method_accessability(Klass* ref_klass,
Klass* resolved_klass,
Klass* sel_klass,
const methodHandle& sel_method,
... | 0 |
225,495 | Status MutableGraphView::SwapRegularFaninsByPorts(absl::string_view node_name,
int from_port, int to_port) {
auto error_status = [node_name, from_port, to_port](absl::string_view msg) {
string params = absl::Substitute("node_name='$0', from_port=$1, to_port=$2",
... | 0 |
312,563 | vgr_process_files(
win_T *wp,
qf_info_T *qi,
vgr_args_T *cmd_args,
int *redraw_for_dummy,
buf_T **first_match_buf,
char_u **target_dir)
{
int status = FAIL;
int_u save_qfid = qf_get_curlist(qi)->qf_id;
time_t seconds = 0;
char_u *fname;
int fi;
buf_T *buf;
int duplicate_name = F... | 0 |
261,238 | int wm_SemLock(wm_Sem *s){
dispatch_semaphore_wait(*s, DISPATCH_TIME_FOREVER);
return 0;
} | 0 |
197,621 | void Compute(OpKernelContext* const context) override {
// node_id_range
const Tensor* node_id_range_t;
OP_REQUIRES_OK(context, context->input("node_id_range", &node_id_range_t));
const auto node_id_range = node_id_range_t->vec<int32>();
const int32_t node_id_first = node_id_range(0); // inclusiv... | 1 |
507,765 | int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
{
if (r == NULL || s == NULL)
return 0;
BN_clear_free(sig->r);
BN_clear_free(sig->s);
sig->r = r;
sig->s = s;
return 1;
} | 0 |
333,545 | int gdTransformAffineCopy(gdImagePtr dst,
int dst_x, int dst_y,
const gdImagePtr src,
gdRectPtr src_region,
const double affine[6])
{
int c1x,c1y,c2x,c2y;
int backclip = 0;
int backup_clipx1, backup_clipy1, backup_clipx2, backup_clipy2;
register int x, y, src_offset_x, src_offset_y;
double inv[6];
... | 0 |
237,818 | static int acurite_590tx_decode(r_device *decoder, bitbuffer_t *bitbuffer)
{
data_t *data;
uint8_t *b;
int row;
int sensor_id; // the sensor ID - basically a random number that gets reset whenever the battery is removed
int battery_ok; // the battery status: 1 is good, 0 is low
int channel;
... | 0 |
244,321 | GF_Err saio_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_SampleAuxiliaryInfoOffsetBox *ptr = (GF_SampleAuxiliaryInfoOffsetBox *) s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
if (ptr->flags & 1) {
gf_bs_write_u32(bs, ptr->aux_info_type);
gf_bs_write_u32(bs, ptr-... | 0 |
299,910 | readconf_one_rewrite(uschar *p, int *existflags, BOOL isglobal)
{
rewrite_rule *next = store_get(sizeof(rewrite_rule));
next->next = NULL;
next->key = string_dequote(&p);
while (isspace(*p)) p++;
if (*p == 0)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN,
"missing rewrite replacement string");
next->flags = 0;
next... | 0 |
326,090 | bt_regexec_both(
char_u *line,
colnr_T col, // column to start looking for match
proftime_T *tm, // timeout limit or NULL
int *timed_out) // flag set on timeout or NULL
{
bt_regprog_T *prog;
char_u *s;
long retval = 0L;
// Create "regstack" and "backpos" if they are not al... | 0 |
198,004 | void Compute(OpKernelContext* context) override {
// boxes: [batch_size, num_anchors, q, 4]
const Tensor& boxes = context->input(0);
// scores: [batch_size, num_anchors, num_classes]
const Tensor& scores = context->input(1);
OP_REQUIRES(
context, (boxes.dim_size(0) == scores.dim_size(0)),
... | 1 |
90,145 | virtual NetworkIPConfigVector GetIPConfigs(const std::string& device_path,
std::string* hardware_address) {
hardware_address->clear();
return NetworkIPConfigVector();
}
| 0 |
265,437 | int sqfs_exists(const char *filename)
{
struct fs_dir_stream *dirsp = NULL;
struct squashfs_dir_stream *dirs;
char *dir, *file;
struct fs_dirent *dent;
int ret;
sqfs_split_path(&file, &dir, filename);
/*
* sqfs_opendir will uncompress inode and directory tables, and will
* return a pointer to the directory ... | 0 |
312,517 | qf_clean_dir_stack(struct dir_stack_T **stackptr)
{
struct dir_stack_T *ds_ptr;
while ((ds_ptr = *stackptr) != NULL)
{
*stackptr = (*stackptr)->next;
vim_free(ds_ptr->dirname);
vim_free(ds_ptr);
}
} | 0 |
294,467 | time_to_date(VALUE self)
{
VALUE y, nth, ret;
int ry, m, d;
y = f_year(self);
m = FIX2INT(f_mon(self));
d = FIX2INT(f_mday(self));
decode_year(y, -1, &nth, &ry);
ret = d_simple_new_internal(cDate,
nth, 0,
GREGORIAN,
ry, m, d,
HAVE_CIVIL);
{
get_d1(ret);
set_sg(dat, D... | 0 |
247,135 | GF_Filter *gf_fs_get_filter(GF_FilterSession *session, u32 idx)
{
return session ? gf_list_get(session->filters, idx) : NULL;
} | 0 |
314,503 | PJ_DEF(pj_status_t) pjmedia_sdp_validate(const pjmedia_sdp_session *sdp)
{
return pjmedia_sdp_validate2(sdp, PJ_TRUE);
} | 0 |
405,410 | static inline bool xfrm_policy_mark_match(const struct xfrm_mark *mark,
struct xfrm_policy *pol)
{
return mark->v == pol->mark.v && mark->m == pol->mark.m;
} | 0 |
476,118 | void composite_suspend(struct usb_gadget *gadget)
{
struct usb_composite_dev *cdev = get_gadget_data(gadget);
struct usb_function *f;
/* REVISIT: should we have config level
* suspend/resume callbacks?
*/
DBG(cdev, "suspend\n");
if (cdev->config) {
list_for_each_entry(f, &cdev->config->functions, list) {
... | 0 |
473,901 | utf32le_code_to_mbc(OnigCodePoint code, UChar *buf,
OnigEncoding enc ARG_UNUSED)
{
UChar* p = buf;
*p++ = (UChar ) (code & 0xff);
*p++ = (UChar )((code & 0xff00) >> 8);
*p++ = (UChar )((code & 0xff0000) >>16);
*p++ = (UChar )((code & 0xff000000) >>24);
return 4;
} | 0 |
224,744 | GF_Err meta_box_write(GF_Box *s, GF_BitStream *bs)
{
return gf_isom_full_box_write(s, bs);
} | 0 |
337,848 | struct sctp_chunk *sctp_make_strreset_req(
const struct sctp_association *asoc,
__u16 stream_num, __be16 *stream_list,
bool out, bool in)
{
__u16 stream_len = stream_num * sizeof(__u16);
struct sctp_strreset_outreq outreq;
struct sctp_strreset_inreq inreq;
struct sctp_chunk *retval;
__u16 outlen, in... | 0 |
310,111 | ClrUpdate(NCURSES_SP_DCL0)
{
TR(TRACE_UPDATE, (T_CALLED("ClrUpdate")));
if (0 != SP_PARM) {
int i;
NCURSES_CH_T blank = ClrBlank(NCURSES_SP_ARGx StdScreen(SP_PARM));
int nonempty = min(screen_lines(SP_PARM),
NewScreen(SP_PARM)->_maxy + 1);
ClearScreen(NCURSES_SP_ARGx blank);
TR(TRACE_UPDATE, ("upda... | 0 |
317,125 | static int selinux_vm_enough_memory(struct mm_struct *mm, long pages)
{
int rc, cap_sys_admin = 0;
rc = cred_has_capability(current_cred(), CAP_SYS_ADMIN,
CAP_OPT_NOAUDIT, true);
if (rc == 0)
cap_sys_admin = 1;
return cap_sys_admin;
} | 0 |
308,189 | static void fastrpc_unmap_dma_buf(struct dma_buf_attachment *attach,
struct sg_table *table,
enum dma_data_direction dir)
{
dma_unmap_sg(attach->dev, table->sgl, table->nents, dir);
} | 0 |
338,147 | bool WasmBinaryBuilder::maybeVisitSIMDShift(Expression*& out, uint32_t code) {
SIMDShift* curr;
switch (code) {
case BinaryConsts::I8x16Shl:
curr = allocator.alloc<SIMDShift>();
curr->op = ShlVecI8x16;
break;
case BinaryConsts::I8x16ShrS:
curr = allocator.alloc<SIMDShift>();
cu... | 0 |
244,266 | GF_Err gitn_box_size(GF_Box *s)
{
u32 i;
GroupIdToNameBox *ptr = (GroupIdToNameBox *)s;
ptr->size += 2;
for (i=0; i<ptr->nb_entries; i++) {
ptr->size += 5;
if (ptr->entries[i].name) ptr->size += strlen(ptr->entries[i].name);
}
return GF_OK;
} | 0 |
242,997 | static size_t ssl_get_maximum_datagram_size( mbedtls_ssl_context const *ssl )
{
size_t mtu = mbedtls_ssl_get_current_mtu( ssl );
#if defined(MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH)
size_t out_buf_len = ssl->out_buf_len;
#else
size_t out_buf_len = MBEDTLS_SSL_OUT_BUFFER_LEN;
#endif
if( mtu != 0 && mtu < out... | 0 |
386,529 | void DL_Dxf::writeXLine(DL_WriterA& dw,
const DL_XLineData& data,
const DL_Attributes& attrib) {
dw.entity("XLINE");
if (version==DL_VERSION_2000) {
dw.dxfString(100, "AcDbEntity");
}
dw.entityAttributes(attrib);
if (version==DL_VERSION_2000) {
... | 0 |
326,593 | check_symlinks(struct archive_write_disk *a)
{
struct archive_string error_string;
int error_number;
int rc;
archive_string_init(&error_string);
rc = check_symlinks_fsobj(a->name, &error_number, &error_string,
a->flags, 0);
if (rc != ARCHIVE_OK) {
archive_set_error(&a->archive, error_number, "%s",
er... | 0 |
226,144 |
GF_Err trak_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
u32 i;
GF_TrackBox *ptr = (GF_TrackBox *)s;
e = gf_isom_box_array_read(s, bs);
if (e) return e;
e = gf_isom_check_sample_desc(ptr);
if (e) return e;
if (!ptr->Header) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Missing TrackHeaderBox\n"... | 0 |
211,113 | 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->... | 1 |
293,939 | ex_retab(exarg_T *eap)
{
linenr_T lnum;
int got_tab = FALSE;
long num_spaces = 0;
long num_tabs;
long len;
long col;
long vcol;
long start_col = 0; // For start of white-space string
long start_vcol = 0; // For start of white-space string
long old_len;
char_u *ptr;
cha... | 0 |
261,187 | static int MqttClient_HandlePacket(MqttClient* client,
MqttPacketType packet_type, void *packet_obj, int timeout_ms)
{
int rc = MQTT_CODE_SUCCESS;
MqttQoS packet_qos = MQTT_QOS_0;
word16 packet_id = 0;
if (client == NULL || packet_obj == NULL) {
return MQTT_CODE_ERROR_BAD_ARG;
}
sw... | 0 |
448,553 | struct bgp_notify bgp_notify_decapsulate_hard_reset(struct bgp_notify *notify)
{
struct bgp_notify bn = {};
bn.code = notify->raw_data[0];
bn.subcode = notify->raw_data[1];
bn.length = notify->length - 2;
bn.raw_data = XMALLOC(MTYPE_BGP_NOTIFICATION, bn.length);
memcpy(bn.raw_data, notify->raw_data + 2, bn.leng... | 0 |
211,103 | _fr_window_ask_overwrite_dialog (OverwriteData *odata)
{
if ((odata->edata->overwrite == FR_OVERWRITE_ASK) && (odata->current_file != NULL)) {
const char *base_name;
GFile *destination;
base_name = _g_path_get_relative_basename ((char *) odata->current_file->data, odata->edata->base_dir, odata->edata->junk... | 1 |
326,119 | regmatch(
char_u *scan, // Current node.
proftime_T *tm UNUSED, // timeout limit or NULL
int *timed_out UNUSED) // flag set on timeout or NULL
{
char_u *next; // Next node.
int op;
int c;
regitem_T *rp;
int no;
int status; // one of the RA_ values:
#ifdef FEAT_RELTIME
int tm_... | 0 |
196,611 | static int setup_config(int type)
{
int rv;
rv = read_config(cl.configfile, type);
if (rv < 0)
goto out;
if (is_auth_req()) {
rv = read_authkey();
if (rv < 0)
goto out;
#if HAVE_LIBGCRYPT
if (!gcry_check_version(NULL)) {
log_error("gcry_check_version");
rv = -ENOENT;
goto out;
}
gcry_contr... | 1 |
500,088 | print_krb5_data(char *label, krb5_data *kdata)
{
int i;
printf("%s[%d] ", label, kdata->length);
for (i=0; i < (int)kdata->length; i++)
{
if (0 && isprint((int) kdata->data[i]))
printf( "%c ", kdata->data[i]);
else
printf( "%02x ", (unsig... | 0 |
220,415 | mrb_ary_new(mrb_state *mrb)
{
return mrb_ary_new_capa(mrb, 0);
} | 0 |
253,575 | static int smb3_simple_fallocate_write_range(unsigned int xid,
struct cifs_tcon *tcon,
struct cifsFileInfo *cfile,
loff_t off, loff_t len,
char *buf)
{
struct cifs_io_parms io_parms = {0};
int nbytes;
int rc = 0;
struct kvec iov[2];
io_parms.netfid = cfile->fid.netfid;
io_... | 0 |
234,767 | static bool is_block_group_to_copy(struct btrfs_fs_info *fs_info, u64 logical)
{
struct btrfs_block_group *cache;
bool ret;
/* Non zoned filesystem does not use "to_copy" flag */
if (!btrfs_is_zoned(fs_info))
return false;
cache = btrfs_lookup_block_group(fs_info, logical);
spin_lock(&cache->lock);
ret = ca... | 0 |
281,668 | fill_input_buffer (j_decompress_ptr cinfo)
{
#ifndef LIBRAW_NOTHREADS
#define jpeg_buffer tls->jpeg_buffer
#else
static uchar jpeg_buffer[4096];
#endif
size_t nbytes;
nbytes = fread (jpeg_buffer, 1, 4096, ifp);
swab (jpeg_buffer, jpeg_buffer, nbytes);
cinfo->src->next_input_byte = jpeg_buffer;
cinfo->src->... | 0 |
261,394 | static inline int decode_mpm_idx(thread_context* tctx)
{
logtrace(LogSlice,"# mpm_idx (TU:2)\n");
int mpm = decode_CABAC_TU_bypass(&tctx->cabac_decoder, 2);
logtrace(LogSlice,"> mpm_idx = %d\n",mpm);
logtrace(LogSymbols,"$1 mpm_idx=%d\n",mpm);
return mpm;
} | 0 |
234,770 | static int btrfs_open_one_device(struct btrfs_fs_devices *fs_devices,
struct btrfs_device *device, fmode_t flags,
void *holder)
{
struct request_queue *q;
struct block_device *bdev;
struct btrfs_super_block *disk_super;
u64 devid;
int ret;
if (device->bdev)
return -EINVAL;
if (!device->name)
return -E... | 0 |
139,237 | void OverlayWindowViews::OnNativeWidgetMove() {
if (is_initialized_)
UpdateControlsVisibility(false);
window_bounds_ = GetBounds();
#if defined(OS_CHROMEOS)
WindowQuadrant quadrant = GetCurrentWindowQuadrant(GetBounds(), controller_);
close_controls_view_->SetPosition(GetBounds().size(), quadrant);
resi... | 0 |
247,732 | TEST_P(SslReadBufferLimitTest, SomeLimit) {
readBufferLimitTest(32 * 1024, 32 * 1024, 256 * 1024, 1, false);
} | 0 |
452,986 | static int nft_fwd_neigh_dump(struct sk_buff *skb, const struct nft_expr *expr)
{
struct nft_fwd_neigh *priv = nft_expr_priv(expr);
if (nft_dump_register(skb, NFTA_FWD_SREG_DEV, priv->sreg_dev) ||
nft_dump_register(skb, NFTA_FWD_SREG_ADDR, priv->sreg_addr) ||
nla_put_be32(skb, NFTA_FWD_NFPROTO, htonl(priv-... | 0 |
310,180 | drv_initpair(TERMINAL_CONTROL_BLOCK * TCB, int pair, int f, int b)
{
SCREEN *sp;
AssertTCB();
SetSP();
if ((initialize_pair != NULL) && InPalette(f) && InPalette(b)) {
const color_t *tp = InfoOf(sp).defaultPalette;
TR(TRACE_ATTRS,
("initializing pair: pair = %d, fg=(%d,%d,%d), bg=(%d,%d,%d)",
... | 0 |
272,334 | make_context_specific(cms_context *cms, int ctxt, SECItem *encoded,
SECItem *original)
{
void *rv;
ContextSpecificSequence[0].kind = SEC_ASN1_EXPLICIT |
SEC_ASN1_CONTEXT_SPECIFIC | ctxt;
rv = SEC_ASN1EncodeItem(cms->arena, encoded, original,
ContextSpecificSequence);
if (rv == NULL)
cnreterr(-1, cm... | 0 |
357,667 | bool SQInstance::GetMetaMethod(SQVM* SQ_UNUSED_ARG(v),SQMetaMethod mm,SQObjectPtr &res)
{
if(sq_type(_class->_metamethods[mm]) != OT_NULL) {
res = _class->_metamethods[mm];
return true;
}
return false;
} | 0 |
309,869 | load_term(void)
{
(void) setupterm(tname, STDOUT_FILENO, NULL);
} | 0 |
483,495 | u64 efi_mem_attributes(unsigned long phys_addr)
{
efi_memory_desc_t *md;
if (!efi_enabled(EFI_MEMMAP))
return 0;
for_each_efi_memory_desc(md) {
if ((md->phys_addr <= phys_addr) &&
(phys_addr < (md->phys_addr +
(md->num_pages << EFI_PAGE_SHIFT))))
return md->attribute;
}
return 0;
} | 0 |
294,518 | d_lite_amjd(VALUE self)
{
get_d1(self);
return m_amjd(dat);
} | 0 |
344,737 | monotime_double(void)
{
struct timespec ts;
monotime_ts(&ts);
return ts.tv_sec + ((double)ts.tv_nsec / 1000000000);
} | 0 |
389,688 | tv_get_number(typval_T *varp)
{
int error = FALSE;
return tv_get_number_chk(varp, &error); // return 0L on error
} | 0 |
512,646 | cmp_item *cmp_item_datetime::make_same()
{
return new cmp_item_datetime();
} | 0 |
225,688 |
GF_Err trgt_box_size(GF_Box *s)
{
GF_TrackGroupBox *ptr = (GF_TrackGroupBox *)s;
ptr->size+= 4;
return GF_OK; | 0 |
281,663 | void CLASS redcine_load_raw()
{
#ifndef NO_JASPER
int c, row, col;
jas_stream_t *in;
jas_image_t *jimg;
jas_matrix_t *jmat;
jas_seqent_t *data;
ushort *img, *pix;
jas_init();
#ifndef LIBRAW_LIBRARY_BUILD
in = jas_stream_fopen (ifname, "rb");
#else
in = (jas_stream_t*)ifp->make_jas_stream();
if(!in)... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.