idx int64 | func string | target int64 |
|---|---|---|
274,727 | static double arc_length(double dia, double angle)
{
return M_PI*dia*(angle/360.0);
} | 0 |
263,515 | static void sco_sock_clear_timer(struct sock *sk)
{
if (!sco_pi(sk)->conn)
return;
BT_DBG("sock %p state %d", sk, sk->sk_state);
cancel_delayed_work(&sco_pi(sk)->conn->timeout_work);
} | 0 |
390,540 | _XkbCheckTypeName(Atom name,int typeNdx)
{
char * str;
str= NameForAtom(name);
if ((strcmp(str,"ONE_LEVEL")==0)||(strcmp(str,"TWO_LEVEL")==0)||
(strcmp(str,"ALPHABETIC")==0)||(strcmp(str,"KEYPAD")==0))
return False;
return True;
} | 0 |
265,460 | static int sqfs_join(char **strings, char *dest, int start, int end,
char separator)
{
int i, offset = 0;
for (i = start; i < end; i++) {
strcpy(dest + offset, strings[i]);
offset += strlen(strings[i]);
if (i < end - 1)
dest[offset++] = separator;
}
return offset;
} | 0 |
254,893 | intrusive_ptr<DocumentSource> DocumentSourceGroup::createFromBson(
BSONElement elem, const intrusive_ptr<ExpressionContext>& pExpCtx) {
uassert(15947, "a group's fields must be specified in an object", elem.type() == Object);
intrusive_ptr<DocumentSourceGroup> pGroup(new DocumentSourceGroup(pExpCtx));
... | 0 |
512,335 | virtual longlong val_int_unsigned_typecast()
{
return cast_to_int_type_handler()->Item_val_int_unsigned_typecast(this);
} | 0 |
267,837 | vm_run_module (ecma_module_t *module_p) /**< module to be executed */
{
const ecma_value_t module_init_result = ecma_module_initialize (module_p);
if (ECMA_IS_VALUE_ERROR (module_init_result))
{
return module_init_result;
}
vm_frame_ctx_shared_t shared;
shared.bytecode_header_p = module_p->u.compiled_... | 0 |
225,947 | GF_Err mehd_box_size(GF_Box *s)
{
GF_MovieExtendsHeaderBox *ptr = (GF_MovieExtendsHeaderBox *)s;
ptr->version = (ptr->fragment_duration>0xFFFFFFFF) ? 1 : 0;
s->size += (ptr->version == 1) ? 8 : 4;
return GF_OK;
} | 0 |
336,559 | static int reds_agent_state_restore(RedsState *reds, SpiceMigrateDataMain *mig_data)
{
RedCharDeviceVDIPort *agent_dev = reds->agent_dev.get();
uint32_t chunk_header_remaining;
agent_dev->priv->vdi_chunk_header = mig_data->agent2client.chunk_header;
spice_assert(mig_data->agent2client.chunk_header_size... | 0 |
248,758 | static char *get_netscape_format(const struct Cookie *co)
{
return aprintf(
"%s" /* httponly preamble */
"%s%s\t" /* domain */
"%s\t" /* tailmatch */
"%s\t" /* path */
"%s\t" /* secure */
"%" CURL_FORMAT_CURL_OFF_T "\t" /* expires */
"%s\t" /* name */
"%s", /* value */... | 0 |
448,927 | int ZEXPORT inflateResetKeep(strm)
z_streamp strm;
{
struct inflate_state FAR *state;
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
strm->total_in = strm->total_out = state->total = 0;
strm->msg = Z_NULL;
if (state->wrap) /* to suppo... | 0 |
252,379 | int mz_inflateInit(mz_streamp pStream) {
return mz_inflateInit2(pStream, MZ_DEFAULT_WINDOW_BITS);
} | 0 |
486,833 | static void gem_register_types(void)
{
type_register_static(&gem_info);
} | 0 |
246,731 | static GF_Err do_track_act()
{
u32 j;
for (j=0; j<nb_track_act; j++) {
u32 i;
GF_Err e = GF_OK;
TrackAction *tka = &tracks[j];
u32 track = tka->trackID ? gf_isom_get_track_by_id(file, tka->trackID) : 0;
timescale = gf_isom_get_timescale(file);
switch (tka->act_type) {
case TRAC_ACTION_REM_TRACK:
e =... | 0 |
487,609 | asmlinkage long sys_getgroups(int gidsetsize, gid_t __user *grouplist)
{
int i = 0;
/*
* SMP: Nobody else can change our grouplist. Thus we are
* safe.
*/
if (gidsetsize < 0)
return -EINVAL;
/* no need to grab task_lock here; it cannot change */
i = current->group_info->ngroups;
if (gidsetsize) {
if ... | 0 |
225,735 | GF_Err stco_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 entries;
GF_ChunkOffsetBox *ptr = (GF_ChunkOffsetBox *)s;
ISOM_DECREASE_SIZE(ptr, 4);
ptr->nb_entries = gf_bs_read_u32(bs);
if (ptr->nb_entries > ptr->size / 4 || (u64)ptr->nb_entries > (u64)SIZE_MAX/sizeof(u32)) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("... | 0 |
281,099 | void xfrm_garbage_collect(struct net *net)
{
flow_cache_flush(net);
} | 0 |
244,136 | GF_Err trep_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_TrackExtensionPropertiesBox *ptr = (GF_TrackExtensionPropertiesBox *) s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u32(bs, ptr->trackID);
return GF_OK;
} | 0 |
247,632 | bool DefaultCertValidator::verifyCertificateHashList(
X509* cert, const std::vector<std::vector<uint8_t>>& expected_hashes) {
std::vector<uint8_t> computed_hash(SHA256_DIGEST_LENGTH);
unsigned int n;
X509_digest(cert, EVP_sha256(), computed_hash.data(), &n);
RELEASE_ASSERT(n == computed_hash.size(), "");
... | 0 |
390,549 | _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq *req, char* values)
{
XkbSrvInfoPtr xkbi;
XkbDescPtr xkb;
int error;
int nTypes = 0, nActions;
CARD8 mapWidths[XkbMaxLegalKeyCode + 1];
CARD16 symsPerKey[Xk... | 0 |
359,286 | DEFUN (neighbor_local_as,
neighbor_local_as_cmd,
NEIGHBOR_CMD2 "local-as <1-65535>",
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Specify a local-as number\n"
"AS number used as local AS\n")
{
struct peer *peer;
int ret;
peer = peer_and_group_lookup_vty (vty, argv[0]);
if (! peer)... | 0 |
294,652 | m_real_jd(union DateData *x)
{
VALUE nth, rjd;
int jd;
nth = m_nth(x);
jd = m_jd(x);
encode_jd(nth, jd, &rjd);
return rjd;
} | 0 |
245,725 | static long get_content_length (orderedmap hashofheaders)
{
char *data;
long content_length = -1;
data = orderedmap_find (hashofheaders, "content-length");
if (data)
content_length = atol (data);
return content_length;
} | 0 |
466,104 | static int em_and(struct x86_emulate_ctxt *ctxt)
{
emulate_2op_SrcV(ctxt, "and");
return X86EMUL_CONTINUE;
} | 0 |
210,378 | xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
const xmlChar **URI, int *tlen) {
const xmlChar *localname;
const xmlChar *prefix;
const xmlChar *attname;
const xmlChar *aprefix;
const xmlChar *nsname;
xmlChar *attvalue;
const xmlChar **atts = ctxt->atts;
... | 1 |
346,450 | source_level(void *cookie)
{
return ((source_cookie_T *)cookie)->level;
} | 0 |
256,441 | PJ_DEF(pj_status_t) pjmedia_rtcp_fb_parse_rpsi(
const void *buf,
pj_size_t length,
pjmedia_rtcp_fb_rpsi *rpsi)
{
pjmedia_rtcp_fb_common *hdr = (pjmedia_rtcp_fb_common*) buf;
pj_uint8_t *p;
pj_uint8_t padlen;
pj_size_t rpsi_len;
PJ_ASSERT_RETURN(buf && rpsi, PJ_EINVAL);
PJ_ASSERT_... | 0 |
442,806 | static CURLcode main_init(void)
{
#ifdef DJGPP
/* stop stat() wasting time */
_djstat_flags |= _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE;
#endif
return curl_global_init(CURL_GLOBAL_DEFAULT);
} | 0 |
459,099 | static struct tcf_proto *tcf_chain_tp_find(struct tcf_chain *chain,
struct tcf_chain_info *chain_info,
u32 protocol, u32 prio,
bool prio_allocate)
{
struct tcf_proto **pprev;
struct tcf_proto *tp;
/* Check the chain for existence of proto-tcf with this priority */
for (pprev = &chain->filte... | 0 |
405,693 | static void xemaclite_aligned_write(void *src_ptr, u32 *dest_ptr,
unsigned length)
{
u32 align_buffer;
u32 *to_u32_ptr;
u16 *from_u16_ptr, *to_u16_ptr;
to_u32_ptr = dest_ptr;
from_u16_ptr = src_ptr;
align_buffer = 0;
for (; length > 3; length -= 4) {
to_u16_ptr = (u16 *)&align_buffer;
*to_u16_ptr++... | 0 |
369,185 | static int io_fallocate_prep(struct io_kiocb *req,
const struct io_uring_sqe *sqe)
{
if (sqe->ioprio || sqe->buf_index || sqe->rw_flags ||
sqe->splice_fd_in)
return -EINVAL;
if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL))
return -EINVAL;
req->sync.off = READ_ONCE(sqe->off);
req->sync.len = RE... | 0 |
338,084 | bool WasmBinaryBuilder::maybeVisitAtomicFence(Expression*& out, uint8_t code) {
if (code != BinaryConsts::AtomicFence) {
return false;
}
auto* curr = allocator.alloc<AtomicFence>();
BYN_TRACE("zz node: AtomicFence\n");
curr->order = getU32LEB();
curr->finalize();
out = curr;
return true;
} | 0 |
226,960 | IRC_PROTOCOL_CALLBACK(numeric)
{
char *pos_args;
IRC_PROTOCOL_MIN_ARGS(3);
if (irc_server_strcasecmp (server, server->nick, argv[2]) == 0)
{
pos_args = (argc > 3) ?
((argv_eol[3][0] == ':') ? argv_eol[3] + 1 : argv_eol[3]) : NULL;
}
else
{
pos_args = (argv_eol[2... | 0 |
328,915 | R_API ut64 r_bin_java_parse_methods(RBinJavaObj *bin, const ut64 offset, const ut8 *buf, const ut64 len) {
int i = 0;
ut64 adv = 0;
RBinJavaField *method;
const ut8 *fm_buf = buf + offset;
r_list_free (bin->methods_list);
bin->methods_list = r_list_newf (r_bin_java_fmtype_free);
if (offset + 2 >= len) {
retur... | 0 |
218,750 | static MagickBooleanType ReadPSDChannelZip(Image *image,const size_t channels,
const ssize_t type,const PSDCompressionType compression,
const size_t compact_size,ExceptionInfo *exception)
{
MagickBooleanType
status;
unsigned char
*p;
size_t
count,
length,
packet_size,
row_size;
ss... | 0 |
359,544 | zlog (struct zlog *zl, int priority, const char *format, ...)
{
va_list args;
va_start(args, format);
vzlog (zl, priority, format, args);
va_end (args);
} | 0 |
446,055 | LZWEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
{
register LZWCodecState *sp = EncoderState(tif);
register long fcode;
register hash_t *hp;
register int h, c;
hcode_t ent;
long disp;
long incount, outcount, checkpoint;
unsigned long nextdata;
long nextbits;
int free_ent, maxcode, nbits;
uint8* ... | 0 |
343,287 | static int _dlmap_remap(DLHandler * const dlhandler)
{
size_t min_dlmap_size;
off_t remaining;
if (dlhandler->map_data != NULL) {
if (dlhandler->cur_pos >= dlhandler->dlmap_pos &&
dlhandler->cur_pos + dlhandler->chunk_size <=
dlhandler->dlmap_pos + (off_t) dlhandler->dlmap_s... | 0 |
450,824 | static void st21nfca_se_activation_timeout(struct timer_list *t)
{
struct st21nfca_hci_info *info = from_timer(info, t,
se_info.se_active_timer);
info->se_info.se_active = false;
complete(&info->se_info.req_completion);
} | 0 |
317,076 | static int selinux_ismaclabel(const char *name)
{
return (strcmp(name, XATTR_SELINUX_SUFFIX) == 0);
} | 0 |
195,341 | int64_t OpLevelCostEstimator::CalculateOutputSize(const OpInfo& op_info,
bool* found_unknown_shapes) {
int64_t total_output_size = 0;
// Use float as default for calculations.
for (const auto& output : op_info.outputs()) {
DataType dt = output.dtype();
con... | 1 |
252,353 | static void CompressZip(unsigned char *dst,
tinyexr::tinyexr_uint64 &compressedSize,
const unsigned char *src, unsigned long src_size) {
std::vector<unsigned char> tmpBuf(src_size);
//
// Apply EXR-specific? postprocess. Grabbed from OpenEXR's
// ImfZipCompressor... | 0 |
371,188 | ut64 get_code_object_addr(RzBinPycObj *pyc, RzBuffer *buffer, ut32 magic) {
pyc->magic_int = magic;
pyc_object *co = get_code_object(pyc, buffer);
ut64 result = 0;
if (!co) {
return 0;
}
pyc_code_object *cobj = co->data;
result = cobj->start_offset;
free_object(co);
return result;
} | 0 |
273,892 | static void handle_CDUP(ctrl_t *ctrl, char *path)
{
handle_CWD(ctrl, "..");
} | 0 |
248,316 | static int cfg_print_pff_indent(cfg_t *cfg, FILE *fp,
cfg_print_filter_func_t fb_pff, int indent)
{
int i, result = CFG_SUCCESS;
for (i = 0; cfg->opts[i].name; i++) {
cfg_print_filter_func_t pff = cfg->pff ? cfg->pff : fb_pff;
if (pff && pff(cfg, &cfg->opts[i]))
continue;
result += cfg_opt_print_pff_ind... | 0 |
309,871 | _nc_cookie_init(SCREEN *sp)
{
bool support_cookies = USE_XMC_SUPPORT;
TERMINAL_CONTROL_BLOCK *TCB = (TERMINAL_CONTROL_BLOCK *) (sp->_term);
if (sp == 0 || !ENSURE_TINFO(sp))
return;
#if USE_XMC_SUPPORT
/*
* If we have no magic-cookie support compiled-in, or if it is suppressed
* in the envi... | 0 |
219,917 | static void ReorderSDP(char *sdp_text, Bool is_movie_sdp)
{
char *cur;
GF_List *lines = gf_list_new();
cur = sdp_text;
while (cur) {
char b;
char *st = strstr(cur, "\r\n");
assert(st);
st += 2;
if (!st[0]) {
AddSDPLine(lines, gf_strdup(cur), is_movie_sdp);
break;
}
b = st[0];
st[0] = 0;
AddS... | 0 |
273,059 | net_evhttp_bind(struct evhttp *evhttp, short unsigned port, const char *log_service_name)
{
const char *bind_address;
bool v6_enabled;
int ret;
bind_address = cfg_getstr(cfg_getsec(cfg, "general"), "bind_address");
if (bind_address)
evhttp_bind_socket(evhttp, bind_address, port);
// For Linux, we coul... | 0 |
462,228 | PJ_DEF(pj_status_t) pj_stun_msg_add_errcode_attr(pj_pool_t *pool,
pj_stun_msg *msg,
int err_code,
const pj_str_t *err_reason)
{
pj_stun_errcode_attr *err_attr = NULL;
pj_status_t status;
status = pj_stun_errcode_attr_create(pool, err_code, err_reason,
&err_attr);
if (status !... | 0 |
366,308 | static void mount_setattr_commit(struct mount_kattr *kattr,
struct mount *mnt, struct mount *last,
int err)
{
struct mount *m = mnt;
do {
if (!err) {
unsigned int flags;
do_idmap_mount(kattr, m);
flags = recalc_flags(kattr, m);
WRITE_ONCE(m->mnt.mnt_flags, flags);
}
/*
* We either se... | 0 |
309,881 | NCURSES_SP_NAME(can_change_color) (NCURSES_SP_DCL)
{
int result = FALSE;
T((T_CALLED("can_change_color(%p)"), (void *) SP_PARM));
if (HasTerminal(SP_PARM) && (CanChange != 0)) {
result = TRUE;
}
returnCode(result);
} | 0 |
459,401 | get_tags(list_T *list, char_u *pat, char_u *buf_fname)
{
int num_matches, i, ret;
char_u **matches, *p;
char_u *full_fname;
dict_T *dict;
tagptrs_T tp;
long is_static;
ret = find_tags(pat, &num_matches, &matches,
TAG_REGEXP | TAG_NOIC, (int)MAXCOL, buf_fname);
if (ret == OK && num_... | 0 |
369,311 |
static __cold int io_unregister_iowq_aff(struct io_ring_ctx *ctx)
{
struct io_uring_task *tctx = current->io_uring;
if (!tctx || !tctx->io_wq)
return -EINVAL;
return io_wq_cpu_affinity(tctx->io_wq, NULL); | 0 |
221,692 | void Socket::cleanSsl() { // called when failure in ssl set up functions and from stopSsl
if (ssl != NULL) {
SSL_free(ssl);
ssl = NULL;
}
if (ctx != NULL ) {
SSL_CTX_free(ctx);
ctx = NULL;
}
issslserver = false;
isssl = false;
} | 0 |
229,320 | Status ValidateOp(EagerOperation* op) {
const NodeDef& node_def = op->MutableAttrs()->BuildNodeDef();
const OpDef* op_def;
TF_RETURN_IF_ERROR(OpRegistry::Global()->LookUpOpDef(node_def.op(), &op_def));
return ValidateNodeDef(node_def, *op_def);
} | 0 |
252,343 | static mz_bool mz_zip_get_file_modified_time(const char *pFilename,
mz_uint16 *pDOS_time,
mz_uint16 *pDOS_date) {
#ifdef MINIZ_NO_TIME
(void)pFilename;
*pDOS_date = *pDOS_time = 0;
#else
struct MZ_FILE_STAT_STRUCT file_stat;... | 0 |
513,185 | static const char *item_val_str(struct st_mysql_value *value,
char *buffer, int *length)
{
String str(buffer, *length, system_charset_info), *res;
if (!(res= ((st_item_value_holder*)value)->item->val_str(&str)))
return NULL;
*length= res->length();
if (res->c_ptr_quick() == b... | 0 |
261,410 | static int decode_intra_chroma_pred_mode(thread_context* tctx)
{
logtrace(LogSlice,"# intra_chroma_pred_mode\n");
int prefix = decode_CABAC_bit(&tctx->cabac_decoder, &tctx->ctx_model[CONTEXT_MODEL_INTRA_CHROMA_PRED_MODE]);
int mode;
if (prefix==0) {
mode=4;
}
else {
mode = decode_CABAC_FL_bypass(&... | 0 |
294,381 | commercial_to_jd(VALUE y, int w, int d, double sg,
VALUE *nth, int *ry,
int *rjd,
int *ns)
{
double style = guess_style(y, sg);
if (style == 0) {
int jd;
c_commercial_to_jd(FIX2INT(y), w, d, sg, &jd, ns);
decode_jd(INT2FIX(jd), nth, rjd);
if (f_zero_p(*nth))
*ry = FIX2INT(y);
else {
VA... | 0 |
437,284 | compile_length_enclosure_node(EnclosureNode* node, regex_t* reg)
{
int len;
int tlen;
if (node->type == ENCLOSURE_OPTION)
return compile_length_option_node(node, reg);
if (NODE_ENCLOSURE_BODY(node)) {
tlen = compile_length_tree(NODE_ENCLOSURE_BODY(node), reg);
if (tlen < 0) return tlen;
}
else... | 0 |
447,063 | DataBuf readFile(const std::wstring& wpath)
{
FileIo file(wpath);
if (file.open("rb") != 0) {
throw WError(10, wpath, "rb", strError().c_str());
}
struct _stat st;
if (0 != ::_wstat(wpath.c_str(), &st)) {
throw WError(2, wpath, strError().c_str(), ... | 0 |
484,047 | setup_key_sizes(void) {
memset(&keySizes, 0, sizeof(struct key_sizes));
keySizes.sym_sig_keyLen = DEFAULT_SYM_SIGNING_KEY_LENGTH;
keySizes.sym_enc_blockSize = DEFAULT_SYM_ENCRYPTION_BLOCK_SIZE;
keySizes.sym_enc_keyLen = DEFAULT_SYM_ENCRYPTION_KEY_LENGTH;
keySizes.sym_sig_size = DEFAULT_SYM_SIGNATUR... | 0 |
309,940 | parse_delay_value(const char *src, double *delays, int *always)
{
int star = 0;
*delays = 0.0;
if (always)
*always = 0;
while (isdigit(UChar(*src))) {
(*delays) = (*delays) * 10 + (*src++ - '0');
}
if (*src == '.') {
int gotdot = 1;
++src;
while (isdigit(UChar(*src))) {
gotdot *= 10... | 0 |
226,209 | GF_Box *url_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_DataEntryURLBox, GF_ISOM_BOX_TYPE_URL);
return (GF_Box *)tmp;
} | 0 |
453,010 | static int nft_flow_block_chain(struct nft_base_chain *basechain,
const struct net_device *this_dev,
enum flow_block_command cmd)
{
struct net_device *dev;
struct nft_hook *hook;
int err, i = 0;
list_for_each_entry(hook, &basechain->hook_list, list) {
dev = hook->ops.dev;
if (this_dev && this_dev != de... | 0 |
229,345 | Status CreateUnshapedOutput(
const KernelAndDevice& kernel, const int output_num, Device* output_device,
const DataType& output_dtype,
const absl::optional<EagerFunctionParams>& eager_func_params,
EagerContext* ctx, TensorHandle** output) {
#if defined(IS_MOBILE_PLATFORM)
return errors::Unimplemented(... | 0 |
506,699 | static int run_cert(X509 *crt, const char *nameincert,
const struct set_name_fn *fn)
{
const char *const *pname = names;
int failed = 0;
for (; *pname != NULL; ++pname) {
int samename = strcasecmp(nameincert, *pname) == 0;
size_t namelen = strlen(*pname);
char *... | 0 |
432,280 | int cpu_watchpoint_address_matches(CPUState *cpu, vaddr addr, vaddr len)
{
#if 0
CPUWatchpoint *wp;
int ret = 0;
QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) {
if (watchpoint_address_matches(wp, addr, TARGET_PAGE_SIZE)) {
ret |= wp->flags;
}
}
return ret;
#endif
retu... | 0 |
391,669 | static NTSTATUS open_mode_check(connection_struct *conn,
struct share_mode_lock *lck,
uint32 access_mask,
uint32 share_access)
{
int i;
if(lck->data->num_share_modes == 0) {
return NT_STATUS_OK;
}
if (is_stat_open(access_mask)) {
/* Stat open that doesn't trigger oplock breaks or share mode
* c... | 0 |
512,365 | Item *get_copy(THD *thd)
{ return get_item_copy<Item_float>(thd, this); } | 0 |
234,233 | fetch_indexed_string (dwarf_vma idx,
struct cu_tu_set * this_set,
dwarf_vma offset_size,
bool dwo,
dwarf_vma str_offsets_base)
{
enum dwarf_section_display_enum str_sec_idx = dwo ? str_dwo : str;
enum dwarf_section_display_enum idx_sec_id... | 0 |
261,229 | int MqttClient_Unsubscribe(MqttClient *client, MqttUnsubscribe *unsubscribe)
{
int rc, len;
/* Validate required arguments */
if (client == NULL || unsubscribe == NULL) {
return MQTT_CODE_ERROR_BAD_ARG;
}
#ifdef WOLFMQTT_V5
/* Use specified protocol version if set */
unsubscribe->proto... | 0 |
336,561 | static void reds_update_agent_properties(RedsState *reds)
{
if (!reds->agent_dev || reds->config == NULL) {
return;
}
/* copy & paste */
reds->agent_dev->priv->write_filter.copy_paste_enabled = reds->config->agent_copypaste;
reds->agent_dev->priv->read_filter.copy_paste_enabled = reds->confi... | 0 |
366,287 | static void delayed_mntput(struct work_struct *unused)
{
struct llist_node *node = llist_del_all(&delayed_mntput_list);
struct mount *m, *t;
llist_for_each_entry_safe(m, t, node, mnt_llist)
cleanup_mnt(m);
} | 0 |
253,710 | static int ccp_copy_to_from_sb(struct ccp_cmd_queue *cmd_q,
struct ccp_dm_workarea *wa, u32 jobid, u32 sb,
u32 byte_swap, bool from)
{
struct ccp_op op;
memset(&op, 0, sizeof(op));
op.cmd_q = cmd_q;
op.jobid = jobid;
op.eom = 1;
if (from) {
op.soc = 1;
op.src.type = CCP_MEMTYPE_SB;
op... | 0 |
261,414 | static int decode_split_cu_flag(thread_context* tctx,
int x0, int y0, int ctDepth)
{
// check if neighbors are available
int availableL = check_CTB_available(tctx->img, x0,y0, x0-1,y0);
int availableA = check_CTB_available(tctx->img, x0,y0, x0,y0-1);
int condL = 0;
int condA = 0;
if (availableL && tc... | 0 |
230,455 | uip_nd6_rs_output(void)
{
UIP_IP_BUF->vtc = 0x60;
UIP_IP_BUF->tcflow = 0;
UIP_IP_BUF->flow = 0;
UIP_IP_BUF->proto = UIP_PROTO_ICMP6;
UIP_IP_BUF->ttl = UIP_ND6_HOP_LIMIT;
uip_create_linklocal_allrouters_mcast(&UIP_IP_BUF->destipaddr);
uip_ds6_select_src(&UIP_IP_BUF->srcipaddr, &UIP_IP_BUF->destipaddr);
U... | 0 |
309,885 | skip_DECSCNM(const char *value, int *flag)
{
*flag = -1;
if (value != 0) {
int skip = csi_length(value);
if (skip > 0 &&
value[skip++] == '?' &&
value[skip++] == '5') {
if (value[skip] == 'h') {
*flag = 1;
} else if (value[skip] == 'l') {
*flag = 0;
}
value += skip + 1;
}
... | 0 |
225,000 | ldapServiceLookup(const char *purl, PQconninfoOption *options,
PQExpBuffer errorMessage)
{
int port = LDAP_DEF_PORT,
scope,
rc,
size,
state,
oldstate,
i;
#ifndef WIN32
int msgid;
#endif
bool found_keyword;
char *url,
*hostname,
*portstr,
*endptr,
*dn,
... | 0 |
226,055 | void gnra_box_del(GF_Box *s)
{
GF_GenericAudioSampleEntryBox *ptr = (GF_GenericAudioSampleEntryBox *)s;
gf_isom_sample_entry_predestroy((GF_SampleEntryBox *)ptr);
if (ptr->data) gf_free(ptr->data);
gf_free(ptr);
} | 0 |
220,850 | inline LutOutT lut_lookup_with_interpolation(int16_t value,
const LutOutT* lut) {
static_assert(std::is_same<LutOutT, int8_t>::value ||
std::is_same<LutOutT, int16_t>::value,
"Only LUTs with int8 or int16 outputs are supported.");
// 5... | 0 |
424,897 | static void iwl_pcie_alloc_fw_monitor_block(struct iwl_trans *trans,
u8 max_power, u8 min_power)
{
void *cpu_addr = NULL;
dma_addr_t phys = 0;
u32 size = 0;
u8 power;
for (power = max_power; power >= min_power; power--) {
size = BIT(power);
cpu_addr = dma_alloc_coherent(trans->dev, size, &phys,
... | 0 |
225,779 | GF_Err srpp_on_child_box(GF_Box *s, GF_Box *a, Bool is_rem)
{
GF_SRTPProcessBox *ptr = (GF_SRTPProcessBox *)s;
switch(a->type) {
case GF_ISOM_BOX_TYPE_SCHI:
BOX_FIELD_ASSIGN(info, GF_SchemeInformationBox)
return GF_OK;
case GF_ISOM_BOX_TYPE_SCHM:
BOX_FIELD_ASSIGN(scheme_type, GF_SchemeTypeBox)
return GF_OK;... | 0 |
293,733 | static void r_rebase_info_free(RRebaseInfo *info) {
if (!info) {
return;
}
if (info->ranges) {
R_FREE (info->ranges);
info->ranges = NULL;
}
R_FREE (info);
} | 0 |
432,263 | static bool addrrange_contains(AddrRange range, Int128 addr)
{
return int128_ge(addr, range.start)
&& int128_lt(addr, addrrange_end(range));
} | 0 |
384,211 | static int nft_del_setelem(struct nft_ctx *ctx, struct nft_set *set,
const struct nlattr *attr)
{
struct nlattr *nla[NFTA_SET_ELEM_MAX + 1];
struct nft_set_ext_tmpl tmpl;
struct nft_set_elem elem;
struct nft_set_ext *ext;
struct nft_trans *trans;
u32 flags = 0;
int err;
err = nla_parse_nested_deprecated(... | 0 |
343,294 | void doallo(const off_t size)
{
int ret = -1;
#ifdef QUOTAS
Quota quota;
#endif
if (size <= 0) {
ret = 0;
} else if (ul_check_free_space(wd, (double) size) != 0) {
ret = 0;
}
#ifdef QUOTAS
if (quota_update("a, 0LL, 0LL, NULL) == 0) {
if (quota.files >= user_quota_fil... | 0 |
274,698 | callbacks_quit_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
gboolean layers_dirty = FALSE;
gint idx;
for (idx = 0; idx<=mainProject->last_loaded; idx++) {
if (mainProject->file[idx] == NULL) break;
layers_dirty = layers_d... | 0 |
508,337 | static my_bool close_cached_tables_callback(TDC_element *element,
close_cached_tables_arg *arg)
{
mysql_mutex_lock(&element->LOCK_table_share);
if (element->share && element->flushed &&
element->version < arg->refresh_version)
{
/* wait_for_old_version() will ... | 0 |
252,412 | size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len,
const void *pSrc_buf, size_t src_buf_len,
int flags) {
tdefl_output_buffer out_buf;
MZ_CLEAR_OBJ(out_buf);
if (!pOut_buf) return 0;
out_buf.m_pBuf = (mz_uint8 *)pOut_buf;
out_... | 0 |
432,209 | AddressSpaceDispatch *address_space_dispatch_new(struct uc_struct *uc, FlatView *fv)
{
AddressSpaceDispatch *d = g_new0(AddressSpaceDispatch, 1);
#ifndef NDEBUG
uint16_t n;
n = dummy_section(uc, &d->map, fv, &(uc->io_mem_unassigned));
assert(n == PHYS_SECTION_UNASSIGNED);
#else
dummy_section(uc, &d... | 0 |
294,437 | c_find_fdoy(int y, double sg, int *rjd, int *ns)
{
int d, rm, rd;
for (d = 1; d < 31; d++)
if (c_valid_civil_p(y, 1, d, sg, &rm, &rd, rjd, ns))
return 1;
return 0;
} | 0 |
482,692 | gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
{
GstCaps *caps;
guint avail;
GstFlowReturn res = GST_FLOW_OK;
GstFlxDec *flxdec;
FlxHeader *flxh;
g_return_val_if_fail (buf != NULL, GST_FLOW_ERROR);
flxdec = (GstFlxDec *) parent;
g_return_val_if_fail (flxdec != NULL, GST_FLOW_ERRO... | 0 |
452,991 | static int nft_flow_offload_bind(struct flow_block_offload *bo,
struct nft_base_chain *basechain)
{
list_splice(&bo->cb_list, &basechain->flow_block.cb_list);
return 0;
} | 0 |
336,124 | static int ip6gre_tunnel_init_common(struct net_device *dev)
{
struct ip6_tnl *tunnel;
int ret;
int t_hlen;
tunnel = netdev_priv(dev);
tunnel->dev = dev;
tunnel->net = dev_net(dev);
strcpy(tunnel->parms.name, dev->name);
dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
if (!dev->tstats)
ret... | 0 |
405,697 | static void xemaclite_tx_handler(struct net_device *dev)
{
struct net_local *lp = netdev_priv(dev);
dev->stats.tx_packets++;
if (!lp->deferred_skb)
return;
if (xemaclite_send_data(lp, (u8 *)lp->deferred_skb->data,
lp->deferred_skb->len))
return;
dev->stats.tx_bytes += lp->deferred_skb->len;
dev_consum... | 0 |
247,690 | TEST_P(SslSocketTest, RsaPrivateKeyProviderAsyncDecryptCompleteFailure) {
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_provider:
... | 0 |
275,971 | uECC_VLI_API void uECC_vli_modSquare(uECC_word_t *result,
const uECC_word_t *left,
const uECC_word_t *mod,
wordcount_t num_words) {
uECC_vli_modMult(result, left, left, mod, num_words);
} | 0 |
369,430 | */
static void io_submit_state_start(struct io_submit_state *state,
unsigned int max_ios)
{
state->plug_started = false;
state->need_plug = max_ios > 2;
state->submit_nr = max_ios;
/* set only head, no need to init link_last in advance */
state->link.head = NULL; | 0 |
473,943 | utf16be_get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
OnigEncoding enc)
{
return onigenc_unicode_get_case_fold_codes_by_str(enc,
flag, p, end, items);
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.