idx int64 | func string | target int64 |
|---|---|---|
359,671 | DEFUN (clear_ip_bgp_external_soft_in,
clear_ip_bgp_external_soft_in_cmd,
"clear ip bgp external soft in",
CLEAR_STR
IP_STR
BGP_STR
"Clear all external peers\n"
"Soft reconfig\n"
"Soft reconfig inbound update\n")
{
return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UN... | 0 |
386,577 | bool DL_Dxf::processDXFGroup(DL_CreationInterface* creationInterface,
int groupCode, const std::string& groupValue) {
//printf("%d\n", groupCode);
//printf("%s\n", groupValue.c_str());
// Init values on first call
if (firstCall) {
settingValue[0] = '\0';
fi... | 0 |
513,297 | static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
Item ***copy_func, bool modify_item)
{
DBUG_ASSERT(thd == table->in_use);
Field *new_field= item->Item::create_tmp_field(false, table);
if (copy_func &&
(item->is_result_field() ||
... | 0 |
401,495 | static bool crng_init_try_arch(struct crng_state *crng)
{
int i;
bool arch_init = true;
unsigned long rv;
for (i = 4; i < 16; i++) {
if (!arch_get_random_seed_long(&rv) &&
!arch_get_random_long(&rv)) {
rv = random_get_entropy();
arch_init = false;
}
crng->state[i] ^= rv;
}
return arch_init;
... | 0 |
514,315 | bool mysql_multi_update(THD *thd, TABLE_LIST *table_list, List<Item> *fields,
List<Item> *values, COND *conds, ulonglong options,
enum enum_duplicates handle_duplicates,
bool ignore, SELECT_LEX_UNIT *unit,
SELECT_LEX *select... | 0 |
248,311 | DLLIMPORT int cfg_setmulti(cfg_t *cfg, const char *name, unsigned int nvalues, char **values)
{
cfg_opt_t *opt;
if (!cfg || !name || !values) {
errno = EINVAL;
return CFG_FAIL;
}
opt = cfg_getopt(cfg, name);
if (!opt) {
errno = ENOENT;
return CFG_FAIL;
}
return cfg_opt_setmulti(cfg, opt, nvalues, valu... | 0 |
369,936 | static int proc_fd_link(struct dentry *dentry, struct path *path)
{
return proc_fd_info(dentry->d_inode, path, NULL);
} | 0 |
267,952 | R_API RBinSymbol *r_bin_file_add_method(RBinFile *bf, const char *klass, const char *method, int nargs) {
r_return_val_if_fail (bf, NULL);
RBinClass *c = r_bin_file_add_class (bf, klass, NULL, 0);
if (!c) {
eprintf ("Cannot allocate class %s\n", klass);
return NULL;
}
RBinSymbol *sym = __getMethod (bf, klass,... | 0 |
512,551 | Item_func_ifnull::real_op()
{
DBUG_ASSERT(fixed == 1);
double value= args[0]->val_real();
if (!args[0]->null_value)
{
null_value=0;
return value;
}
value= args[1]->val_real();
if ((null_value=args[1]->null_value))
return 0.0;
return value;
} | 0 |
512,423 | void Item_cond_and::mark_as_condition_AND_part(TABLE_LIST *embedding)
{
List_iterator<Item> li(list);
Item *item;
while ((item=li++))
{
item->mark_as_condition_AND_part(embedding);
}
} | 0 |
275,481 | njs_vm_prop_magic16(njs_object_prop_t *prop)
{
return prop->value.data.magic16;
} | 0 |
248,255 | DLLIMPORT int cfg_numopts(cfg_opt_t *opts)
{
int n;
for (n = 0; opts && opts[n].name; n++)
/* do nothing */ ;
return n;
} | 0 |
359,568 | DEFUN (neighbor_filter_list,
neighbor_filter_list_cmd,
NEIGHBOR_CMD2 "filter-list WORD (in|out)",
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Establish BGP filters\n"
"AS path access-list name\n"
"Filter incoming routes\n"
"Filter outgoing routes\n")
{
return peer_aslist_s... | 0 |
488,338 | static inline unsigned long zap_pmd_range(struct mmu_gather *tlb,
struct vm_area_struct *vma, pud_t *pud,
unsigned long addr, unsigned long end,
long *zap_work, struct zap_details *details)
{
pmd_t *pmd;
unsigned long next;
pmd = pmd_offset(pud, addr);
do {
next = pmd_addr_end(addr, end);
if (pmd_n... | 0 |
351,177 | static struct DataStruct * build_index (SHPHandle shp, DBFHandle dbf) {
struct DataStruct *data = malloc (sizeof *data * nShapes);
if (!data) {
fputs("malloc failed!\n", stderr);
exit(EXIT_FAILURE);
}
/* populate array */
for (int i = 0; i < nShapes; i++) {
data[i].value = malloc(sizeof data[0].v... | 0 |
210,961 | static int nft_set_desc_concat_parse(const struct nlattr *attr,
struct nft_set_desc *desc)
{
struct nlattr *tb[NFTA_SET_FIELD_MAX + 1];
u32 len;
int err;
err = nla_parse_nested_deprecated(tb, NFTA_SET_FIELD_MAX, attr,
nft_concat_policy, NULL);
if (err < 0)
return err;
if (!tb[NFTA_SET_FIELD_LE... | 1 |
204,278 | static void build_dirs(char *src, char *dst, size_t src_prefix_len, size_t dst_prefix_len) {
char *p = src + src_prefix_len + 1;
char *q = dst + dst_prefix_len + 1;
char *r = dst + dst_prefix_len;
struct stat s;
bool last = false;
*r = '\0';
for (; !last; p++, q++) {
if (*p == '\0') {
last = true;
}
if ... | 1 |
226,070 | GF_Box *dmed_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_DMEDBox, GF_ISOM_BOX_TYPE_DMED);
return (GF_Box *)tmp;
} | 0 |
372,355 | check_limit(VALUE str, VALUE opt)
{
if (NIL_P(str)) return;
if (SYMBOL_P(str)) str = rb_sym2str(str);
StringValue(str);
size_t slen = RSTRING_LEN(str);
size_t limit = get_limit(opt);
if (slen > limit) {
rb_raise(rb_eArgError,
"string length (%"PRI_SIZE_PREFIX"u) exceeds the limit %"PRI_SIZE... | 0 |
318,958 | test_gui_drop_files(dict_T *args UNUSED)
{
# if defined(HAVE_DROP_FILE)
int row;
int col;
int_u mods;
char_u **fnames;
int count = 0;
typval_T t;
list_T *l;
listitem_T *li;
if (dict_find(args, (char_u *)"files", -1) == NULL
|| dict_find(args, (char_u *)"row", -1) == NULL
... | 0 |
231,003 | argnum_error(mrb_state *mrb, mrb_int num)
{
mrb_value exc;
mrb_value str;
mrb_int argc = mrb->c->ci->n;
if (argc == 15) {
mrb_value args = mrb->c->ci->stack[1];
if (mrb_array_p(args)) {
argc = RARRAY_LEN(args);
}
}
if (argc == 0 && mrb->c->ci->nk != 0 && !mrb_hash_empty_p(mrb, mrb->c->ci-... | 0 |
446,116 | atusb_set_cca_mode(struct ieee802154_hw *hw, const struct wpan_phy_cca *cca)
{
struct atusb *atusb = hw->priv;
u8 val;
/* mapping 802.15.4 to driver spec */
switch (cca->mode) {
case NL802154_CCA_ENERGY:
val = 1;
break;
case NL802154_CCA_CARRIER:
val = 2;
break;
case NL802154_CCA_ENERGY_CARRIER:
switc... | 0 |
349,529 | static int virtbt_add_inbuf(struct virtio_bluetooth *vbt)
{
struct virtqueue *vq = vbt->vqs[VIRTBT_VQ_RX];
struct scatterlist sg[1];
struct sk_buff *skb;
int err;
skb = alloc_skb(1000, GFP_KERNEL);
if (!skb)
return -ENOMEM;
sg_init_one(sg, skb->data, 1000);
err = virtqueue_add_inbuf(vq, sg, 1, skb, GFP_KER... | 0 |
328,916 | R_API ConstJavaValue *U(r_bin_java_resolve_to_const_value)(RBinJavaObj * BIN_OBJ, int idx) {
// TODO XXX FIXME add a size parameter to the str when it is passed in
RBinJavaCPTypeObj *item = NULL, *item2 = NULL;
ConstJavaValue *result = R_NEW0 (ConstJavaValue);
if (!result) {
return NULL;
}
char *class_str = NUL... | 0 |
411,927 | fix_transited_encoding(krb5_context context,
krb5_kdc_configuration *config,
krb5_boolean check_policy,
const TransitedEncoding *tr,
EncTicketPart *et,
const char *client_realm,
const char *server_realm,
const char *tgt_realm)
{
krb5_error_code ret = 0;... | 0 |
412,105 | key_get_es_version(uint8_t version[2])
{
struct es_version {
uint8_t es_version[2];
const char *name;
};
const int num_versions = 2;
struct es_version es_versions[] = {
{{0x00, 0x01}, "X25519-XSalsa20Poly1305"},
{{0x00, 0x02}, "X25519-XChacha20Poly1305"},
};
int ... | 0 |
353,185 | void SplashOutputDev::setSoftMaskFromImageMask(GfxState *state,
Object *ref, Stream *str,
int width, int height,
bool invert,
bool inlineImg, double *baseMatrix) {
const double *ctm;
SplashCoord mat[6];
SplashOutImageMaskData imgMaskData;
Splash *maskSplash;
Spl... | 0 |
339,710 | ZEND_API int zend_shutdown_strtod(void) /* {{{ */
{
destroy_freelist();
#ifdef ZTS
tsrm_mutex_free(dtoa_mutex);
dtoa_mutex = NULL;
tsrm_mutex_free(pow5mult_mutex);
pow5mult_mutex = NULL;
#endif
return 1;
} | 0 |
281,112 | static int __net_init xfrm_statistics_init(struct net *net)
{
return 0;
} | 0 |
197,359 | Status AutoParallel::Initialize(const GrapplerItem& item) {
num_gpus_ = GetNumAvailableGPUs();
LOG(INFO) << "Number of GPUs: " << num_gpus_;
item_ = &item;
graph_ = item.graph;
LOG(INFO) << "Original graph size: " << graph_.node_size();
if (item.fetch.empty()) {
return Status(error::INVALID_ARGUMENT, "N... | 1 |
440,890 | LogClose(enum ExitCode error)
{
if (logFile) {
int msgtype = (error == EXIT_NO_ERROR) ? X_INFO : X_ERROR;
LogMessageVerbSigSafe(msgtype, -1,
"Server terminated %s (%d). Closing log file.\n",
(error == EXIT_NO_ERROR) ? "successfully" : "with error",
err... | 0 |
352,963 | firstComponentNormalize(
slap_mask_t usage,
Syntax *syntax,
MatchingRule *mr,
struct berval *val,
struct berval *normalized,
void *ctx )
{
int rc;
struct berval comp;
ber_len_t len;
if( SLAP_MR_IS_VALUE_OF_ASSERTION_SYNTAX( usage )) {
ber_dupbv_x( normalized, val, ctx );
return LDAP_SUCCESS;
}
if( val... | 0 |
427,240 | static void field (LexState *ls, ConsControl *cc) {
/* field -> listfield | recfield */
switch(ls->t.token) {
case TK_NAME: { /* may be 'listfield' or 'recfield' */
if (luaX_lookahead(ls) != '=') /* expression? */
listfield(ls, cc);
else
recfield(ls, cc);
break;
}
cas... | 0 |
462,265 | PJ_DEF(pj_stun_attr_hdr*) pj_stun_attr_clone( pj_pool_t *pool,
const pj_stun_attr_hdr *attr)
{
const struct attr_desc *adesc;
/* Get the attribute descriptor */
adesc = find_attr_desc(attr->type);
if (adesc) {
return (pj_stun_attr_hdr*) (*adesc->clone_attr)(pool, attr);
} else {
/* Clo... | 0 |
294,434 | c_julian_last_day_of_month(int y, int m)
{
assert(m >= 1 && m <= 12);
return monthtab[c_julian_leap_p(y) ? 1 : 0][m];
} | 0 |
508,372 | Repair_mrg_table_error_handler()
: m_handled_errors(false), m_unhandled_errors(false)
{} | 0 |
248,747 | static void freecookie(struct Cookie *co)
{
free(co->expirestr);
free(co->domain);
free(co->path);
free(co->spath);
free(co->name);
free(co->value);
free(co->maxage);
free(co->version);
free(co);
} | 0 |
359,511 | DEFUN (no_neighbor_route_server_client,
no_neighbor_route_server_client_cmd,
NO_NEIGHBOR_CMD2 "route-server-client",
NO_STR
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Configure a neighbor as Route Server client\n")
{
return peer_rsclient_unset_vty (vty, argv[0], bgp_node_afi(vty),
... | 0 |
386,605 | bool DL_Dxf::handleXRecordData(DL_CreationInterface* creationInterface) {
if (groupCode==105) {
return false;
}
if (groupCode==5) {
creationInterface->addXRecord(groupValue);
return true;
}
if (groupCode==280) {
xRecordValues = true;
return true;
}
... | 0 |
264,295 | static void vnc_listen_read(void *opaque, bool websocket)
{
VncDisplay *vs = opaque;
struct sockaddr_in addr;
socklen_t addrlen = sizeof(addr);
int csock;
/* Catch-up */
graphic_hw_update(NULL);
#ifdef CONFIG_VNC_WS
if (websocket) {
csock = qemu_accept(vs->lwebsock, (struct sockaddr... | 0 |
246,683 | void PrintLiveUsage()
{
u32 i=0;
gf_sys_format_help(helpout, help_flags, "# Live Scene Encoder Options\n"
"The options shall be specified as òpt_name=opt_val.\n"
"Options:\n"
"\n"
);
while (m4b_liveenc_args[i].name) {
GF_GPACArg *arg = (GF_GPACArg *) &m4b_liveenc_args[i];
i++;
gf_sy... | 0 |
374,041 | static void destroy(RBinFile *bf) {
r_coresym_cache_element_free (bf->o->bin_obj);
} | 0 |
277,005 | fiber_eq(mrb_state *mrb, mrb_value self)
{
mrb_value other = mrb_get_arg1(mrb);
if (!mrb_fiber_p(other)) {
return mrb_false_value();
}
return mrb_bool_value(fiber_ptr(self) == fiber_ptr(other));
} | 0 |
387,850 | int InstanceKlass::nof_implementors() const {
assert_lock_strong(Compile_lock);
Klass* k = implementor();
if (k == NULL) {
return 0;
} else if (k != this) {
return 1;
} else {
return 2;
}
} | 0 |
398,497 | RZ_API void rz_bin_dwarf_debug_info_free(RzBinDwarfDebugInfo *inf) {
if (!inf) {
return;
}
for (size_t i = 0; i < inf->count; i++) {
free_comp_unit(&inf->comp_units[i]);
}
ht_up_free(inf->line_info_offset_comp_dir);
ht_up_free(inf->lookup_table);
free(inf->comp_units);
free(inf);
} | 0 |
462,403 | sessActivity(ptcpsess_t *pSess, int *continue_polling)
{
int lenRcv;
int lenBuf;
uchar *peerName;
int lenPeer;
int remsock = 0; /* init just to keep compiler happy... :-( */
sbool bEmitOnClose = 0;
char rcvBuf[128*1024];
DEFiRet;
DBGPRINTF("imptcp: new activity on session socket %d\n", pSess->sock);
while(1... | 0 |
292,240 | inbound_set_all_away_status (server *serv, char *nick, unsigned int status)
{
GSList *list;
session *sess;
list = sess_list;
while (list)
{
sess = list->data;
if (sess->server == serv)
userlist_set_away (sess, nick, status);
list = list->next;
}
} | 0 |
212,165 | static int synic_set_irq(struct kvm_vcpu_hv_synic *synic, u32 sint)
{
struct kvm_vcpu *vcpu = hv_synic_to_vcpu(synic);
struct kvm_lapic_irq irq;
int ret, vector;
if (sint >= ARRAY_SIZE(synic->sint))
return -EINVAL;
vector = synic_get_sint_vector(synic_read_sint(synic, sint));
if (vector < 0)
return -ENOENT;... | 1 |
359,251 | DEFUN (neighbor_attr_unchanged1,
neighbor_attr_unchanged1_cmd,
NEIGHBOR_CMD2 "attribute-unchanged (as-path|next-hop|med)",
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"BGP attribute is propagated unchanged to this neighbor\n"
"As-path attribute\n"
"Nexthop attribute\n"
"Med a... | 0 |
463,044 | comics_document_document_thumbnails_iface_init (EvDocumentThumbnailsInterface *iface)
{
iface->get_thumbnail = comics_document_thumbnails_get_thumbnail;
iface->get_dimensions = comics_document_thumbnails_get_dimensions;
} | 0 |
231,705 | TEST_F(QuicServerTransportTest, TestAckRstStream) {
auto streamId = server->createUnidirectionalStream().value();
auto stream = server->getNonConstConn().streamManager->getStream(streamId);
auto packetNum = rstStreamAndSendPacket(
server->getNonConstConn(),
server->getSocket(),
*stream,
Ge... | 0 |
437,717 | static int cx23888_ir_tx_g_parameters(struct v4l2_subdev *sd,
struct v4l2_subdev_ir_parameters *p)
{
struct cx23888_ir_state *state = to_state(sd);
mutex_lock(&state->tx_params_lock);
memcpy(p, &state->tx_params, sizeof(struct v4l2_subdev_ir_parameters));
mutex_unlock(&state->tx_params_lock);
return 0;
} | 0 |
391,661 | static NTSTATUS mkdir_internal(connection_struct *conn,
struct smb_filename *smb_dname,
uint32 file_attributes)
{
mode_t mode;
char *parent_dir = NULL;
NTSTATUS status;
bool posix_open = false;
bool need_re_stat = false;
uint32_t access_mask = SEC_DIR_ADD_SUBDIR;
if (!CAN_WRITE(conn) || (acc... | 0 |
488,680 | static int __init nonx_setup(char *str)
{
if (!str)
return -EINVAL;
if (!strncmp(str, "on", 2)) {
__supported_pte_mask |= _PAGE_NX;
do_not_nx = 0;
} else if (!strncmp(str, "off", 3)) {
do_not_nx = 1;
__supported_pte_mask &= ~_PAGE_NX;
}
return 0;
} | 0 |
222,504 | Status FunctionLibraryDefinition::AddFunctionDefHelper(
const FunctionDef& fdef, const StackTracesMap& stack_traces, bool* added) {
*added = false;
std::shared_ptr<FunctionDefAndOpRegistration>& entry =
function_defs_[fdef.signature().name()];
if (entry) {
if (!FunctionDefsEqual(entry->fdef, fdef)) ... | 0 |
294,676 | date_s_httpdate(int argc, VALUE *argv, VALUE klass)
{
VALUE str, sg, opt;
rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
switch (argc) {
case 0:
str = rb_str_new2("Mon, 01 Jan -4712 00:00:00 GMT");
case 1:
sg = INT2FIX(DEFAULT_SG);
}
{
int argc2 = 1;
VALUE argv2[2... | 0 |
349,871 | int hw_atl_utils_fw_downld_dwords(struct aq_hw_s *self, u32 a,
u32 *p, u32 cnt)
{
int err = 0;
u32 val;
err = readx_poll_timeout_atomic(hw_atl_sem_ram_get,
self, val, val == 1U,
1U, 10000U);
if (err < 0) {
bool is_locked;
hw_atl_reg_glb_cpu_sem_set(self, 1U, HW_ATL_FW_SM_RAM);
is_locked = h... | 0 |
427,709 | cdf_read_short_sector_chain(const cdf_header_t *h,
const cdf_sat_t *ssat, const cdf_stream_t *sst,
cdf_secid_t sid, size_t len, cdf_stream_t *scn)
{
size_t ss = CDF_SHORT_SEC_SIZE(h), i, j;
scn->sst_tab = NULL;
scn->sst_len = cdf_count_chain(ssat, sid, CDF_SEC_SIZE(h));
scn->sst_dirlen = len;
scn->sst_ss =... | 0 |
218,969 | bool ConstantFolding::IsReductionCandidateForSimplification(
const NodeDef& node, const GraphProperties& properties,
TensorShapeProto* input_tensor_shape, TensorShapeProto* output_tensor_shape,
bool* is_single_element_op) const {
// Get the properties of the input & output tensors and check if they both
... | 0 |
211,594 | static Image *ReadWPGImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
typedef struct
{
size_t FileId;
MagickOffsetType DataOffset;
unsigned int ProductType;
unsigned int FileType;
unsigned char MajorVersion;
unsigned char MinorVersion;
unsigned int EncryptKey;
unsigne... | 1 |
352,976 | int slap_has64( int onoff )
{
if ( onoff < 0 )
return 0;
else
return onoff ? -1 : 0;
} | 0 |
512,518 | void cmp_item_row::store_value(Item *item)
{
DBUG_ENTER("cmp_item_row::store_value");
DBUG_ASSERT(comparators);
DBUG_ASSERT(n == item->cols());
item->bring_value();
item->null_value= 0;
for (uint i=0; i < n; i++)
{
DBUG_ASSERT(comparators[i]);
comparators[i]->store_value(item->element_index(i));
... | 0 |
372,868 | static void irda_getvalue_confirm(int result, __u16 obj_id,
struct ias_value *value, void *priv)
{
struct irda_sock *self;
self = (struct irda_sock *) priv;
if (!self) {
IRDA_WARNING("%s: lost myself!\n", __func__);
return;
}
IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
/* We probably don't need to mak... | 0 |
386,568 | void DL_Dxf::writeAttribute(DL_WriterA& dw,
const DL_AttributeData& data,
const DL_Attributes& attrib) {
dw.entity("ATTRIB");
if (version==DL_VERSION_2000) {
dw.dxfString(100, "AcDbEntity");
}
dw.entityAttributes(attrib);
if (version==DL_VERSION_2000) {... | 0 |
381,861 | int udf_setsize(struct inode *inode, loff_t newsize)
{
int err;
struct udf_inode_info *iinfo;
unsigned int bsize = i_blocksize(inode);
if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
S_ISLNK(inode->i_mode)))
return -EINVAL;
if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
return -EPERM;
iinfo =... | 0 |
238,313 | static int digest_update_from_fd(struct digest *d, int fd,
loff_t start, loff_t size)
{
unsigned char *buf = xmalloc(PAGE_SIZE);
int ret = 0;
if (lseek(fd, start, SEEK_SET) != start) {
perror("lseek");
ret = -errno;
goto out_free;
}
while (size) {
unsigned long now = min_t(typeof(size), PAGE_SIZE, s... | 0 |
247,750 | void disconnect() {
EXPECT_CALL(client_callbacks_, onEvent(Network::ConnectionEvent::LocalClose));
EXPECT_CALL(server_callbacks_, onEvent(Network::ConnectionEvent::RemoteClose))
.WillOnce(Invoke([&](Network::ConnectionEvent) -> void { dispatcher_->exit(); }));
client_connection_->close(Network::C... | 0 |
229,330 | Status EagerExecute(EagerOperation* op, TensorHandle** retvals,
int* num_retvals) {
profiler::TraceMe activity([&] {
return ::tensorflow::profiler::TraceMeEncode(
"EagerExecute",
{{"eager_op", op->Name()}, {"is_func", op->is_function()}});
});
if (!op->Executor().Async()) ... | 0 |
446,060 | TIFFInitLZW(TIFF* tif, int scheme)
{
static const char module[] = "TIFFInitLZW";
assert(scheme == COMPRESSION_LZW);
/*
* Allocate state block so tag methods have storage to record values.
*/
tif->tif_data = (uint8*) _TIFFmalloc(sizeof (LZWCodecState));
if (tif->tif_data == NULL)
goto bad;
DecoderState(tif)-... | 0 |
513,024 | Item_cache_time(THD *thd)
:Item_cache_temporal(thd, &type_handler_time2) { } | 0 |
226,083 | GF_Err npck_box_size(GF_Box *s)
{
s->size += 4;
return GF_OK;
} | 0 |
337,380 | open_buffer(
int read_stdin, // read file from stdin
exarg_T *eap, // for forced 'ff' and 'fenc' or NULL
int flags) // extra flags for readfile()
{
int retval = OK;
bufref_T old_curbuf;
#ifdef FEAT_SYN_HL
long old_tw = curbuf->b_p_tw;
#endif
int read_fifo = FALSE;
// T... | 0 |
400,737 | size_t iov_iter_single_seg_count(const struct iov_iter *i)
{
if (i->nr_segs > 1) {
if (likely(iter_is_iovec(i) || iov_iter_is_kvec(i)))
return min(i->count, i->iov->iov_len - i->iov_offset);
if (iov_iter_is_bvec(i))
return min(i->count, i->bvec->bv_len - i->iov_offset);
}
return i->count;
} | 0 |
409,520 | term_windgoto(int row, int col)
{
OUT_STR(tgoto((char *)T_CM, col, row));
} | 0 |
197,748 | Status TransposeShapeFn(InferenceContext* c) {
ShapeHandle input = c->input(0);
ShapeHandle perm_shape = c->input(1);
const Tensor* perm = c->input_tensor(1);
DimensionHandle perm_elems = c->NumElements(perm_shape);
// If we don't have rank information on the input or value information on
// perm we can't r... | 1 |
234,822 | static void btrfs_close_one_device(struct btrfs_device *device)
{
struct btrfs_fs_devices *fs_devices = device->fs_devices;
if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state) &&
device->devid != BTRFS_DEV_REPLACE_DEVID) {
list_del_init(&device->dev_alloc_list);
fs_devices->rw_devices--;
}
if (te... | 0 |
310,182 | immedhook(ENTRY * ep GCC_UNUSED)
/* write out entries with no use capabilities immediately to save storage */
{
#if !HAVE_BIG_CORE
/*
* This is strictly a core-economy kluge. The really clean way to handle
* compilation is to slurp the whole file into core and then do all the
* name-collision checks... | 0 |
229,254 | void cql_server::response::write_string_list(std::vector<sstring> string_list)
{
write_short(cast_if_fits<uint16_t>(string_list.size()));
for (auto&& s : string_list) {
write_string(s);
}
} | 0 |
489,148 | sctp_disposition_t sctp_sf_sendbeat_8_3(const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_transport *transport = (struct sctp_transport *) arg;
if (asoc->overall_error_count > asoc->max_retrans) {
s... | 0 |
476,137 | static int bos_desc(struct usb_composite_dev *cdev)
{
struct usb_ext_cap_descriptor *usb_ext;
struct usb_dcd_config_params dcd_config_params;
struct usb_bos_descriptor *bos = cdev->req->buf;
unsigned int besl = 0;
bos->bLength = USB_DT_BOS_SIZE;
bos->bDescriptorType = USB_DT_BOS;
bos->wTotalLength = cpu_to_l... | 0 |
366,312 | static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns, bool anon)
{
struct mnt_namespace *new_ns;
struct ucounts *ucounts;
int ret;
ucounts = inc_mnt_namespaces(user_ns);
if (!ucounts)
return ERR_PTR(-ENOSPC);
new_ns = kzalloc(sizeof(struct mnt_namespace), GFP_KERNEL);
if (!new_ns) {
dec... | 0 |
254,738 | njs_typed_array_get_u8(const void *a)
{
return *(const uint8_t *) a;
} | 0 |
473,902 | st_numhash(st_data_t n)
{
return (st_index_t)n;
} | 0 |
344,231 | void luaV_finishOp (lua_State *L) {
CallInfo *ci = L->ci;
StkId base = ci->func + 1;
Instruction inst = *(ci->u.l.savedpc - 1); /* interrupted instruction */
OpCode op = GET_OPCODE(inst);
switch (op) { /* finish its execution */
case OP_MMBIN: case OP_MMBINI: case OP_MMBINK: {
setobjs2s(L, base + ... | 0 |
389,755 | size_t get_default_max_mem_usage(void)
{
size_t total_mem_size = jas_get_total_mem_size();
size_t max_mem;
if (total_mem_size) {
max_mem = 0.90 * total_mem_size;
} else {
max_mem = JAS_DEFAULT_MAX_MEM_USAGE;
}
return max_mem;
} | 0 |
450,326 | static void vnc_connect(VncDisplay *vd, QIOChannelSocket *sioc,
bool skipauth, bool websocket)
{
VncState *vs = g_new0(VncState, 1);
bool first_client = QTAILQ_EMPTY(&vd->clients);
int i;
trace_vnc_client_connect(vs, sioc);
vs->zrle = g_new0(VncZrle, 1);
vs->tight = g_ne... | 0 |
513,108 | longlong Item_func_between::val_int_cmp_datetime()
{
THD *thd= current_thd;
longlong value= args[0]->val_datetime_packed(thd), a, b;
if ((null_value= args[0]->null_value))
return 0;
a= args[1]->val_datetime_packed(thd);
b= args[2]->val_datetime_packed(thd);
return val_int_cmp_int_finalize(value, a, b);
... | 0 |
437,720 | static unsigned int rxclk_rx_s_carrier(struct cx23885_dev *dev,
unsigned int freq,
u16 *divider)
{
*divider = carrier_freq_to_clock_divider(freq);
cx23888_ir_write4(dev, CX23888_IR_RXCLK_REG, *divider);
return clock_divider_to_carrier_freq(*divider);
} | 0 |
437,671 | static RCoreSymCacheElement *parseDragons(RBinFile *bf, RBuffer *buf, int off, int bits, R_OWN char *file_name) {
D eprintf ("Dragons at 0x%x\n", off);
st64 size = r_buf_size (buf);
if (off >= size) {
return NULL;
}
size -= off;
if (!size) {
return NULL;
}
if (size < 32) {
return NULL;
}
ut8 *b = malloc... | 0 |
391,638 | static NTSTATUS fcb_or_dos_open(struct smb_request *req,
connection_struct *conn,
files_struct *fsp_to_dup_into,
const struct smb_filename *smb_fname,
struct file_id id,
uint16 file_pid,
uint64_t vuid,
uint32 access_mask,
uint32 share_access,
uint32 create_options)
{
files_struct *f... | 0 |
513,042 | Item_param *get_item_param() { return this; } | 0 |
236,158 | u32 gpp_read_rgba(GF_BitStream *bs)
{
u8 r, g, b, a;
u32 col;
r = gf_bs_read_u8(bs);
g = gf_bs_read_u8(bs);
b = gf_bs_read_u8(bs);
a = gf_bs_read_u8(bs);
col = a;
col<<=8;
col |= r;
col<<=8;
col |= g;
col<<=8;
col |= b;
return col;
} | 0 |
512,719 | void fix_from_value(Derivation dv, const Metadata metadata)
{
fix_charset_and_length(str_value.charset(), dv, metadata);
} | 0 |
175,693 | NetworkLibraryStubImpl()
: ip_address_("1.1.1.1"),
ethernet_(new EthernetNetwork()),
wifi_(NULL),
cellular_(NULL) {
}
| 0 |
508,318 | bool Locked_tables_list::restore_lock(THD *thd, TABLE_LIST *dst_table_list,
TABLE *table, MYSQL_LOCK *lock)
{
MYSQL_LOCK *merged_lock;
DBUG_ENTER("restore_lock");
DBUG_ASSERT(!strcmp(dst_table_list->table_name, table->s->table_name.str));
/* Ensure we have the memory to ad... | 0 |
336,681 | static void reds_mig_finished(RedsState *reds, int completed)
{
spice_debug("trace");
reds->mig_inprogress = TRUE;
if (reds->src_do_seamless_migrate && completed) {
reds_migrate_channels_seamless(reds);
} else {
reds->main_channel->migrate_src_complete(completed);
}
if (comple... | 0 |
292,187 | CallInfo::CallInfo(Method* resolved_method, Klass* resolved_klass, TRAPS) {
Klass* resolved_method_holder = resolved_method->method_holder();
if (resolved_klass == NULL) { // 2nd argument defaults to holder of 1st
resolved_klass = resolved_method_holder;
}
_resolved_klass = resolved_klass;
_selected_klas... | 0 |
289,305 | static int snd_pcm_oss_format_to(snd_pcm_format_t format)
{
switch (format) {
case SNDRV_PCM_FORMAT_MU_LAW: return AFMT_MU_LAW;
case SNDRV_PCM_FORMAT_A_LAW: return AFMT_A_LAW;
case SNDRV_PCM_FORMAT_IMA_ADPCM: return AFMT_IMA_ADPCM;
case SNDRV_PCM_FORMAT_U8: return AFMT_U8;
case SNDRV_PCM_FORMAT_S16_LE: return AF... | 0 |
273,401 | explicit BlockLSTMOp(OpKernelConstruction* ctx) : OpKernel(ctx) {
if (ctx->HasAttr("forget_bias")) {
OP_REQUIRES_OK(ctx, ctx->GetAttr("forget_bias", &forget_bias_));
} else {
// V2 version does not have "forget_bias" attribute.
forget_bias_ = 0.0;
}
OP_REQUIRES_OK(ctx, ctx->GetAttr("... | 0 |
413,625 | static int core_anal_graph_nodes(RCore *core, RAnalFunction *fcn, int opts, PJ *pj) {
int is_json = opts & R_CORE_ANAL_JSON;
int is_keva = opts & R_CORE_ANAL_KEYVALUE;
int nodes = 0;
Sdb *DB = NULL;
char *pal_jump = palColorFor ("graph.true");
char *pal_fail = palColorFor ("graph.false");
char *pal_trfa = palCol... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.