idx int64 | func string | target int64 |
|---|---|---|
430,400 | static struct sw_flow_actions *nla_alloc_flow_actions(int size)
{
struct sw_flow_actions *sfa;
WARN_ON_ONCE(size > MAX_ACTIONS_BUFSIZE);
sfa = kmalloc(sizeof(*sfa) + size, GFP_KERNEL);
if (!sfa)
return ERR_PTR(-ENOMEM);
sfa->actions_len = 0;
return sfa;
} | 0 |
247,352 | unsigned int pgpDigParamsAlgo(pgpDigParams digp, unsigned int algotype)
{
unsigned int algo = 0; /* assume failure */
if (digp) {
switch (algotype) {
case PGPVAL_PUBKEYALGO:
algo = digp->pubkey_algo;
break;
case PGPVAL_HASHALGO:
algo = digp->hash_algo;
break;
}
}
return algo;
} | 0 |
301,407 | static off_t vfswrap_lseek(vfs_handle_struct *handle, files_struct *fsp, off_t offset, int whence)
{
off_t result = 0;
START_PROFILE(syscall_lseek);
/* Cope with 'stat' file opens. */
if (fsp->fh->fd != -1)
result = lseek(fsp->fh->fd, offset, whence);
/*
* We want to maintain the fiction that we can seek
... | 0 |
234,782 | static int chunk_usage_filter(struct btrfs_fs_info *fs_info,
u64 chunk_offset, struct btrfs_balance_args *bargs)
{
struct btrfs_block_group *cache;
u64 chunk_used, user_thresh;
int ret = 1;
cache = btrfs_lookup_block_group(fs_info, chunk_offset);
chunk_used = cache->used;
if (bargs->usage_min == 0)
user_thr... | 0 |
256,421 | PJ_DEF(pj_status_t) pjmedia_rtcp_enable_xr( pjmedia_rtcp_session *sess,
pj_bool_t enable)
{
#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
/* Check if request won't change anything */
if (!(enable ^ sess->xr_enabled))
return PJ_SUCCESS;
if (!enable) {
sess->xr_enabled = PJ_FALS... | 0 |
317,238 | static int parse_sid(struct super_block *sb, const char *s, u32 *sid)
{
int rc = security_context_str_to_sid(&selinux_state, s,
sid, GFP_KERNEL);
if (rc)
pr_warn("SELinux: security_context_str_to_sid"
"(%s) failed for (dev %s, type %s) errno=%d\n",
s, sb->s_id, sb->s_type->name, rc);
re... | 0 |
500,657 | int sftp_packet_write(sftp_session sftp, uint8_t type, ssh_buffer payload){
int size;
if (buffer_prepend_data(payload, &type, sizeof(uint8_t)) < 0) {
ssh_set_error_oom(sftp->session);
return -1;
}
size = htonl(buffer_get_rest_len(payload));
if (buffer_prepend_data(payload, &size, sizeof(uint32_t)) <... | 0 |
90,158 | bool WifiNetwork::IsCertificateLoaded() const {
static const std::string settings_string("SETTINGS:");
static const std::string pkcs11_key("key_id");
if (cert_path_.find(settings_string) == 0) {
std::string::size_type idx = cert_path_.find(pkcs11_key);
if (idx != std::string::npos)
idx = cert_path_.... | 0 |
390,610 | XkbClientGone(pointer data,XID id)
{
DevicePtr pXDev = (DevicePtr)data;
if (!XkbRemoveResourceClient(pXDev,id)) {
ErrorF("[xkb] Internal Error! bad RemoveResourceClient in XkbClientGone\n");
}
return 1;
} | 0 |
349,279 | static void read_block_list(unsigned int *block_list, long long start,
unsigned int offset, int blocks)
{
int res;
TRACE("read_block_list: blocks %d\n", blocks);
res = read_inode_data(block_list, &start, &offset, blocks * sizeof(unsigned int));
if(res == FALSE)
EXIT_UNSQUASH("read_block_list: failed to rea... | 0 |
474,448 | ObjectSetLoadedAttributes(
OBJECT *object, // IN: object attributes to finalize
TPM_HANDLE parentHandle // IN: the parent handle
)
{
OBJECT *parent = HandleToObject(parentHandle);
TPMA_OBJECT objectAttributes = object->publicArea.objectAttributes;
... | 0 |
267,964 | R_API RBinField *r_bin_file_add_field(RBinFile *binfile, const char *classname, const char *name) {
//TODO: add_field into class
//eprintf ("TODO add field: %s \n", name);
return NULL;
} | 0 |
503,853 | SCM_DEFINE (scm_system_file_name_convention,
"system-file-name-convention", 0, 0, 0, (void),
"Return either @code{posix} or @code{windows}, depending on\n"
"what kind of system this Guile is running on.")
#define FUNC_NAME s_scm_system_file_name_convention
{
return sym_file_name_conventio... | 0 |
261,407 | void read_coding_unit(thread_context* tctx,
int x0, int y0, // position of coding unit in frame
int log2CbSize,
int ctDepth)
{
de265_image* img = tctx->img;
const seq_parameter_set& sps = img->get_sps();
const pic_parameter_set& pps = img->get_pps... | 0 |
218,815 | static MagickBooleanType ReadPSDMergedImage(const ImageInfo *image_info,
Image* image,const PSDInfo* psd_info,ExceptionInfo *exception)
{
MagickOffsetType
*sizes;
MagickBooleanType
status;
PSDCompressionType
compression;
ssize_t
i;
compression=(PSDCompressionType) ReadBlobMSBShort(image)... | 0 |
436,148 | static int io_accept(struct io_kiocb *req, unsigned int issue_flags)
{
struct io_accept *accept = &req->accept;
bool force_nonblock = issue_flags & IO_URING_F_NONBLOCK;
unsigned int file_flags = force_nonblock ? O_NONBLOCK : 0;
int ret;
if (req->file->f_flags & O_NONBLOCK)
req->flags |= REQ_F_NOWAIT;
ret = __... | 0 |
508,402 | int setup_conds(THD *thd, TABLE_LIST *tables, List<TABLE_LIST> &leaves,
COND **conds)
{
SELECT_LEX *select_lex= thd->lex->current_select;
TABLE_LIST *table= NULL; // For HP compilers
/*
it_is_update set to TRUE when tables of primary SELECT_LEX (SELECT_LEX
which belong to LEX, i.e. most up... | 0 |
437,352 | set_optimize_exact(regex_t* reg, OptExact* e)
{
int r;
if (e->len == 0) return 0;
if (e->ignore_case) {
reg->exact = (UChar* )xmalloc(e->len);
CHECK_NULL_RETURN_MEMERR(reg->exact);
xmemcpy(reg->exact, e->s, e->len);
reg->exact_end = reg->exact + e->len;
reg->optimize = OPTIMIZE_STR_IC;
}
... | 0 |
343,213 | static int generic_aton(const char *src, struct sockaddr_storage *a)
{
if (inet_pton(AF_INET6, src, &STORAGE_SIN_ADDR6(*a)) > 0) {
STORAGE_FAMILY(*a) = AF_INET6;
return 0;
}
if (inet_pton(AF_INET, src, &STORAGE_SIN_ADDR(*a)) > 0) {
STORAGE_FAMILY(*a) = AF_INET;
return 0;
... | 0 |
225,672 | GF_Err gnra_box_size(GF_Box *s)
{
GF_GenericAudioSampleEntryBox *ptr = (GF_GenericAudioSampleEntryBox *)s;
s->type = GF_ISOM_BOX_TYPE_GNRA;
gf_isom_audio_sample_entry_size((GF_AudioSampleEntryBox *)s);
ptr->size += ptr->data_size;
return GF_OK;
} | 0 |
450,382 | static int zrle_compress_data(VncState *vs, int level)
{
z_streamp zstream = &vs->zrle->stream;
buffer_reset(&vs->zrle->zlib);
if (zstream->opaque != vs) {
int err;
zstream->zalloc = vnc_zlib_zalloc;
zstream->zfree = vnc_zlib_zfree;
err = deflateInit2(zstream, level, Z_DE... | 0 |
402,661 | handle_sign_detached(context *ctx, struct pollfd *pollfd, socklen_t size)
{
handle_sign_helper(ctx, pollfd, size, 0, false);
} | 0 |
317,333 | static int __init enforcing_setup(char *str)
{
unsigned long enforcing;
if (!kstrtoul(str, 0, &enforcing))
selinux_enforcing_boot = enforcing ? 1 : 0;
return 1;
} | 0 |
202,600 | append_command(char_u *cmd)
{
char_u *s = cmd;
char_u *d;
STRCAT(IObuff, ": ");
d = IObuff + STRLEN(IObuff);
while (*s != NUL && d - IObuff < IOSIZE - 7)
{
if (enc_utf8 ? (s[0] == 0xc2 && s[1] == 0xa0) : *s == 0xa0)
{
s += enc_utf8 ? 2 : 1;
STRCPY(d, "<a0>");
d += 4;
}
else
... | 1 |
508,382 | static bool check_lock_and_start_stmt(THD *thd,
Query_tables_list *prelocking_ctx,
TABLE_LIST *table_list)
{
int error;
thr_lock_type lock_type;
DBUG_ENTER("check_lock_and_start_stmt");
/*
Prelocking placeholder is not set for TABL... | 0 |
230,628 | void get_merge_candidate_list_without_step_9(base_context* ctx,
const slice_segment_header* shdr,
const MotionVectorAccess& mvaccess,
de265_image* img,
... | 0 |
228,449 | String WddxPacket::wrapValue(const String& start,
const String& end,
const String& varValue,
const String& varName,
bool hasVarTag) {
StringBuffer valueStr;
if (hasVarTag) {
valueStr.append("<var... | 0 |
400,730 | void iov_iter_kvec(struct iov_iter *i, unsigned int direction,
const struct kvec *kvec, unsigned long nr_segs,
size_t count)
{
WARN_ON(direction & ~(READ | WRITE));
*i = (struct iov_iter){
.iter_type = ITER_KVEC,
.data_source = direction,
.kvec = kvec,
.nr_segs = nr_segs,
.iov_offset = 0,
.count = c... | 0 |
376,344 | gpg_ctx_set_userid (struct _GpgCtx *gpg,
const gchar *userid)
{
g_slist_free_full (gpg->userids, g_free);
gpg->userids = NULL;
if (userid && *userid) {
gchar **uids = g_strsplit (userid, " ", -1);
if (!uids) {
gpg->userids = g_slist_append (gpg->userids, g_strdup (userid));
} else {
... | 0 |
387,598 | static int snd_ctl_check_elem_info(struct snd_card *card,
const struct snd_ctl_elem_info *info)
{
static const unsigned int max_value_counts[] = {
[SNDRV_CTL_ELEM_TYPE_BOOLEAN] = 128,
[SNDRV_CTL_ELEM_TYPE_INTEGER] = 128,
[SNDRV_CTL_ELEM_TYPE_ENUMERATED] = 128,
[SNDRV_CTL_ELEM_TYPE_BYTES] = 512,
[SNDRV... | 0 |
90,758 | void DidGetGlobalUsage(StorageType type, int64 usage,
int64 unlimited_usage) {
DCHECK_EQ(type_, type);
DCHECK_GE(usage, unlimited_usage);
global_usage_ = usage;
global_unlimited_usage_ = unlimited_usage;
CheckCompleted();
}
| 0 |
249,518 | int processing_finish(png_structp png_ptr, png_infop info_ptr) {
unsigned char footer[12] = {0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130};
if (!png_ptr || !info_ptr) return 1;
if (setjmp(png_jmpbuf(png_ptr))) {
png_destroy_read_struct(&png_ptr, &info_ptr, 0);
return 1;
}
png_process_data(png_ptr, ... | 0 |
338,183 | bool WasmBinaryBuilder::maybeVisitTableSize(Expression*& out, uint32_t code) {
if (code != BinaryConsts::TableSize) {
return false;
}
Index tableIdx = getU32LEB();
if (tableIdx >= tables.size()) {
throwError("bad table index");
}
auto* curr = allocator.alloc<TableSize>();
curr->finalize();
// De... | 0 |
385,812 | static long do_sys_truncate(const char __user *pathname, loff_t length)
{
unsigned int lookup_flags = LOOKUP_FOLLOW;
struct path path;
int error;
if (length < 0) /* sorry, but loff_t says... */
return -EINVAL;
retry:
error = user_path_at(AT_FDCWD, pathname, lookup_flags, &path);
if (!error) {
error = vfs_tr... | 0 |
317,218 | static unsigned int selinux_ip_output(struct sk_buff *skb,
u16 family)
{
struct sock *sk;
u32 sid;
if (!netlbl_enabled())
return NF_ACCEPT;
/* we do this in the LOCAL_OUT path and not the POST_ROUTING path
* because we want to make sure we apply the necessary labeling
* before IPsec is applied so ... | 0 |
513,222 | bool sys_var_pluginvar::session_update(THD *thd, set_var *var)
{
DBUG_ASSERT(!is_readonly());
DBUG_ASSERT(plugin_var->flags & PLUGIN_VAR_THDLOCAL);
DBUG_ASSERT(thd == current_thd);
mysql_mutex_lock(&LOCK_global_system_variables);
void *tgt= real_value_ptr(thd, OPT_SESSION);
const void *src= var->value ? (v... | 0 |
328,820 | R_API ut32 r_bin_java_get_utf8_len_from_cp_item_list(RList *cp_list, ut64 idx) {
/*
Search through the Constant Pool list for the given CP Index.
If the idx not found by directly going to the list index,
the list will be walked and then the IDX will be checked.
rvalue: new ut32 .
*/
ut32 value = -1;
RListIter *... | 0 |
344,796 | strdelim(char **s)
{
return strdelim_internal(s, 1);
} | 0 |
446,405 | static ut64 estimate_slide(RzDyldCache *cache, ut64 value_mask, ut64 value_add) {
ut64 slide = 0;
if (cache->n_hdr > 1) {
return slide;
}
ut64 *classlist = malloc(64);
if (!classlist) {
goto beach;
}
RzListIter *iter;
RzDyldBinImage *bin;
rz_list_foreach (cache->bins, iter, bin) {
bool found_sample = fa... | 0 |
221,484 | flatpak_run_extend_ld_path (FlatpakBwrap *bwrap,
const char *prepend,
const char *append)
{
g_autoptr(GString) ld_library_path = g_string_new (g_environ_getenv (bwrap->envp, "LD_LIBRARY_PATH"));
if (prepend != NULL && *prepend != '\0')
{
if (ld_libr... | 0 |
246,444 | RPVector *r_bin_wasm_get_datas(RBinWasmObj *bin) {
r_return_val_if_fail (bin && bin->g_sections, NULL);
return bin->g_datas? bin->g_datas: parse_unique_subsec_vec_by_id (bin, R_BIN_WASM_SECTION_DATA);
} | 0 |
232,949 | char *Curl_all_content_encodings(void)
{
size_t len = 0;
const struct content_encoding * const *cep;
const struct content_encoding *ce;
char *ace;
for(cep = encodings; *cep; cep++) {
ce = *cep;
if(!strcasecompare(ce->name, CONTENT_ENCODING_DEFAULT))
len += strlen(ce->name) + 2;
}
if(!len)
... | 0 |
353,221 | void SplashOutputDev::updateStrokeAdjust(GfxState * /*state*/) {
#if 0 // the SA parameter supposedly defaults to false, but Acrobat
// apparently hardwires it to true
splash->setStrokeAdjust(state->getStrokeAdjust());
#endif
} | 0 |
488,407 | static void remove_migration_ptes(struct page *old, struct page *new)
{
if (PageAnon(new))
remove_anon_migration_ptes(old, new);
else
remove_file_migration_ptes(old, new);
} | 0 |
393,506 | static SQInteger array_pop(HSQUIRRELVM v)
{
return SQ_SUCCEEDED(sq_arraypop(v,1,SQTrue))?1:SQ_ERROR;
} | 0 |
210,570 | static RCoreSymCacheElement *parseDragons(RBinFile *bf, RBuffer *buf, int off, int bits, R_OWN char *file_name) {
D eprintf ("Dragons at 0x%x\n", off);
ut64 size = r_buf_size (buf);
if (off >= size) {
return NULL;
}
size -= off;
if (!size) {
return NULL;
}
ut8 *b = malloc (size);
if (!b) {
return NULL;
... | 1 |
210,206 | gopherToHTML(GopherStateData * gopherState, char *inbuf, int len)
{
char *pos = inbuf;
char *lpos = NULL;
char *tline = NULL;
LOCAL_ARRAY(char, line, TEMP_BUF_SIZE);
LOCAL_ARRAY(char, tmpbuf, TEMP_BUF_SIZE);
char *name = NULL;
char *selector = NULL;
char *host = NULL;
char *port = NU... | 1 |
309,978 | can_change_color(void)
{
return NCURSES_SP_NAME(can_change_color) (CURRENT_SCREEN);
} | 0 |
231,059 | void vQueueUnregisterQueue( QueueHandle_t xQueue )
{
UBaseType_t ux;
/* See if the handle of the queue being unregistered in actually in the
* registry. */
for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
{
if( xQu... | 0 |
437,282 | noname_disable_map(Node** plink, GroupNumRemap* map, int* counter)
{
int r = 0;
Node* node = *plink;
switch (NODE_TYPE(node)) {
case NODE_LIST:
case NODE_ALT:
do {
r = noname_disable_map(&(NODE_CAR(node)), map, counter);
} while (r == 0 && IS_NOT_NULL(node = NODE_CDR(node)));
break;
case... | 0 |
231,762 | TEST_F(
QuicServerTransportForciblySetUDUPayloadSizeTest,
TestHandleTransportKnobParamForciblySetUDPPayloadSize) {
EXPECT_LT(server->getConn().udpSendPacketLen, 1452);
server->handleKnobParams(
{{static_cast<uint64_t>(
TransportKnobParamId::FORCIBLY_SET_UDP_PAYLOAD_SIZE),
1}});
E... | 0 |
252,424 | static void DecodeTiledPixelData(
unsigned char **out_images, int *width, int *height,
const int *requested_pixel_types, const unsigned char *data_ptr,
size_t data_len, int compression_type, int line_order, int data_width,
int data_height, int tile_offset_x, int tile_offset_y, int tile_size_x,
int t... | 0 |
483,498 | static int __init fdt_find_uefi_params(unsigned long node, const char *uname,
int depth, void *data)
{
struct param_info *info = data;
int i;
for (i = 0; i < ARRAY_SIZE(dt_params); i++) {
const char *subnode = dt_params[i].subnode;
if (depth != 1 || strcmp(uname, dt_params[i].uname) != 0) {
info-... | 0 |
333,499 | gdImagePtr Scale(const gdImagePtr src, const unsigned int src_width, const unsigned int src_height, const gdImagePtr dst, const unsigned int new_width, const unsigned int new_height)
{
gdImagePtr tmp_im;
if (new_width == 0 || new_height == 0) {
return NULL;
}
tmp_im = gdImageCreateTrueColor(new_width, src_heigh... | 0 |
238,464 | static const char *disasm_kfunc_name(void *data, const struct bpf_insn *insn)
{
const struct btf_type *func;
struct btf *desc_btf;
if (insn->src_reg != BPF_PSEUDO_KFUNC_CALL)
return NULL;
desc_btf = find_kfunc_desc_btf(data, insn->imm, insn->off, NULL);
if (IS_ERR(desc_btf))
return "<error>";
func = btf_ty... | 0 |
225,858 |
GF_Box *reftype_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_TrackReferenceTypeBox, GF_ISOM_BOX_TYPE_REFT);
return (GF_Box *)tmp; | 0 |
309,935 | stripped(char *src)
{
char *dst = 0;
while (isspace(UChar(*src)))
src++;
if (*src != '\0') {
size_t len;
if ((dst = strdup(src)) == NULL) {
failed("strdup");
} else {
len = strlen(dst);
while (--len != 0 && isspace(UChar(dst[len])))
dst[len] = '\0';
}
}
return dst;
} | 0 |
514,308 | void multi_update::prepare_to_read_rows()
{
/*
update column maps now. it cannot be done in ::prepare() before the
optimizer, because the optimize might reset them (in
SELECT_LEX::update_used_tables()), it cannot be done in
::initialize_tables() after the optimizer, because the optimizer
might rea... | 0 |
234,819 | static struct btrfs_device * btrfs_find_next_active_device(
struct btrfs_fs_devices *fs_devs, struct btrfs_device *device)
{
struct btrfs_device *next_device;
list_for_each_entry(next_device, &fs_devs->devices, dev_list) {
if (next_device != device &&
!test_bit(BTRFS_DEV_STATE_MISSING, &next_device->dev_st... | 0 |
226,430 | Status AsGraphDefInternal(SerializationContext* ctx,
DatasetGraphDefBuilder* b,
Node** output) const override {
Node* indices_node;
TF_RETURN_IF_ERROR(b->AddTensor(sparse_tensor_.indices(), &indices_node));
Node* value_node;
TF_RETURN_IF_ERROR(b-... | 0 |
301,354 | static int vfswrap_fchown(vfs_handle_struct *handle, files_struct *fsp, uid_t uid, gid_t gid)
{
#ifdef HAVE_FCHOWN
int result;
START_PROFILE(syscall_fchown);
result = fchown(fsp->fh->fd, uid, gid);
END_PROFILE(syscall_fchown);
return result;
#else
errno = ENOSYS;
return -1;
#endif
} | 0 |
445,972 | fr_window_set_dialog (FrWindow *window,
const char *dialog_name,
GtkWidget *dialog)
{
g_object_set_data (G_OBJECT (dialog), DIALOG_NAME_KEY, (gpointer) _g_str_get_static (dialog_name));
g_hash_table_insert (window->priv->named_dialogs, (gpointer) dialog_name, dialog);
g_signal_connect (dialog,
... | 0 |
301,436 | static int vfswrap_chflags(vfs_handle_struct *handle, const char *path,
unsigned int flags)
{
#ifdef HAVE_CHFLAGS
return chflags(path, flags);
#else
errno = ENOSYS;
return -1;
#endif
} | 0 |
401,519 | bool rng_is_initialized(void)
{
return crng_ready();
} | 0 |
248,247 | DLLIMPORT int cfg_opt_rmtsec(cfg_opt_t *opt, const char *title)
{
unsigned int i, n;
if (!opt || !title) {
errno = EINVAL;
return CFG_FAIL;
}
if (!is_set(CFGF_TITLE, opt->flags))
return CFG_FAIL;
n = cfg_opt_size(opt);
for (i = 0; i < n; i++) {
cfg_t *sec = cfg_opt_getnsec(opt, i);
if (!sec || !sec-... | 0 |
195,026 | nfs4_file_open(struct inode *inode, struct file *filp)
{
struct nfs_open_context *ctx;
struct dentry *dentry = file_dentry(filp);
struct dentry *parent = NULL;
struct inode *dir;
unsigned openflags = filp->f_flags;
struct iattr attr;
int err;
/*
* If no cached dentry exists or if it's negative, NFSv4 handled... | 1 |
402,626 | generate_signed_attributes(cms_context *cms, SECItem *sattrs)
{
Attribute *attrs[5];
memset(attrs, '\0', sizeof (attrs));
SECItem encoded;
SECOidTag tag;
SECOidData *oid;
/* build the first attribute, which says we have no S/MIME
* capabilities whatsoever */
attrs[0] = PORT_ArenaZAlloc(cms->arena, sizeof (At... | 0 |
457,876 | load_cache (GeglProperties *op_magick_load)
{
if (!op_magick_load->user_data)
{
gchar *filename;
GeglNode *graph, *sink, *loader;
GeglBuffer *newbuf = NULL;
/* ImageMagick backed fallback FIXME: make this robust.
* maybe use pipes in a manner similar to the raw loader,
* ... | 0 |
202,748 | static Image *ReadTGAImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
Image
*image;
MagickBooleanType
status;
PixelInfo
pixel;
Quantum
index;
register Quantum
*q;
register ssize_t
i,
x;
size_t
base,
flag,
offset,
real,
skip;
ssize_t
... | 1 |
477,249 | current_block(
oparg_T *oap,
long count,
int include, // TRUE == include white space
int what, // '(', '{', etc.
int other) // ')', '}', etc.
{
pos_T old_pos;
pos_T *pos = NULL;
pos_T start_pos;
pos_T *end_pos;
pos_T old_start, old_end;
char_u *save_cpo;
int sol = F... | 0 |
101,694 | void WebProcessProxy::registerNewWebBackForwardListItem(WebBackForwardListItem* item)
{
ASSERT(!m_backForwardListItemMap.contains(item->itemID()));
m_backForwardListItemMap.set(item->itemID(), item);
}
| 0 |
415,189 | reset_notify (assuan_context_t ctx, char *line)
{
ctrl_t ctrl = assuan_get_pointer (ctx);
(void) line;
do_reset (ctrl, 1);
return 0;
} | 0 |
413,600 | static bool myvalid(RIO *io, ut64 addr) {
if (addr < 0x100) {
return false;
}
if (addr == UT32_MAX || addr == UT64_MAX) { //the best of the best of the best :(
return false;
}
if (!r_io_is_valid_offset (io, addr, 0)) {
return false;
}
return true;
} | 0 |
246,740 | Bool print_version(char *arg_val, u32 param)
{
fprintf(stderr, "MP4Box - GPAC version %s\n"
"%s\n"
"GPAC Configuration: " GPAC_CONFIGURATION "\n"
"Features: %s %s\n", gf_gpac_version(), gf_gpac_copyright_cite(), gf_sys_features(GF_FALSE), gf_sys_features(GF_TRUE));
return GF_TRUE;
} | 0 |
512,994 | Item *Item_cond_or::copy_andor_structure(THD *thd)
{
Item_cond_or *item;
if ((item= new (thd->mem_root) Item_cond_or(thd, this)))
item->copy_andor_arguments(thd, this);
return item;
} | 0 |
335,417 | parse_command_modifiers(
exarg_T *eap,
char **errormsg,
cmdmod_T *cmod,
int skip_only)
{
char_u *orig_cmd = eap->cmd;
char_u *cmd_start = NULL;
int did_plus_cmd = FALSE;
char_u *p;
int starts_with_colon = FALSE;
int vim9script = in_vim9script();
int has_... | 0 |
442,584 | static void init_qxl_surface(QXLSurfaceCmd *qxl)
{
void *surface_mem;
memset(qxl, 0, sizeof(*qxl));
qxl->surface_id = 123;
qxl->u.surface_create.format = SPICE_SURFACE_FMT_32_xRGB;
qxl->u.surface_create.width = 128;
qxl->u.surface_create.stride = 512;
qxl->u.surface_create.height = 128;
... | 0 |
374,042 | static const char *typeString(ut32 n, int *bits) {
*bits = 32;
if (n == 12) { // CPU_SUBTYPE_ARM_V7) {
return "arm";
}
if (n == 0x0100000c) { // arm64
*bits = 64;
return "arm";
}
if (n == 0x0200000c) { // arm64-32
// TODO: must change bits
*bits = 64;
return "arm";
}
return "x86";
} | 0 |
310,107 | vid_attr(attr_t newmode, NCURSES_PAIRS_T pair_arg, void *opts)
{
return NCURSES_SP_NAME(vid_attr) (CURRENT_SCREEN, newmode, pair_arg, opts);
} | 0 |
369,885 | static int proc_map_files_get_link(struct dentry *dentry, struct path *path)
{
unsigned long vm_start, vm_end;
struct vm_area_struct *vma;
struct task_struct *task;
struct mm_struct *mm;
int rc;
rc = -ENOENT;
task = get_proc_task(dentry->d_inode);
if (!task)
goto out;
mm = get_task_mm(task);
put_task_stru... | 0 |
263,381 | Status ScatterNdTensorShape(InferenceContext* c) {
ShapeHandle output_shape;
TF_RETURN_IF_ERROR(c->WithRankAtLeast(c->input(0), 1, &output_shape));
ShapeHandle indices_shape;
TF_RETURN_IF_ERROR(c->WithRankAtLeast(c->input(1), 1, &indices_shape));
ShapeHandle updates_shape;
TF_RETURN_IF_ERROR(c->WithRankAtLe... | 0 |
498,112 | int http_parse_querystring(const char *txt_, void (*fn)(const char *name, const char *value))
{
char *o, *t, *txt, *value = NULL, c;
if (!txt_)
return 0;
o = t = txt = xstrdup(txt_);
while ((c=*t) != '\0') {
if (c == '=') {
*t = '\0';
value = t + 1;
} else if (c == '+') {
*t = ' ';
} else if (c =... | 0 |
225,777 | GF_Err rely_box_size(GF_Box *s)
{
s->size += 1;
return GF_OK;
} | 0 |
522,338 | static int64_t GetFilPos(GmfMshSct *msh)
{
#ifdef WITH_GMF_AIO
if(msh->typ & Bin)
return(lseek(msh->FilDes, 0, 1));
else
return(MYFTELL(msh->hdl));
#else
return(MYFTELL(msh->hdl));
#endif
} | 0 |
343,226 | static int dlmap_exit(DLHandler * const dlhandler)
{
if (dlhandler->map != NULL) {
free(dlhandler->map);
dlhandler->map = NULL;
dlhandler->sizeof_map = (size_t) 0U;
dlhandler->dlmap_size = (size_t) 0U;
}
return 0;
} | 0 |
216,946 | static void fix_dl_name(MEM_ROOT *root, LEX_STRING *dl)
{
const size_t so_ext_len= sizeof(SO_EXT) - 1;
if (my_strcasecmp(&my_charset_latin1, dl->str + dl->length - so_ext_len,
SO_EXT))
{
char *s= (char*)alloc_root(root, dl->length + so_ext_len + 1);
memcpy(s, dl->str, dl->length);
... | 1 |
314,772 | cdf_swap_header(cdf_header_t *h)
{
size_t i;
h->h_magic = CDF_TOLE8(h->h_magic);
h->h_uuid[0] = CDF_TOLE8(h->h_uuid[0]);
h->h_uuid[1] = CDF_TOLE8(h->h_uuid[1]);
h->h_revision = CDF_TOLE2(h->h_revision);
h->h_version = CDF_TOLE2(h->h_version);
h->h_byte_order = CDF_TOLE2(h->h_byte_order);
h->h_sec_size_p2 = CDF... | 0 |
459,002 | http_linkh(const struct http *to, const struct http *fm, unsigned n)
{
assert(n < HTTP_HDR_FIRST);
Tcheck(fm->hd[n]);
to->hd[n] = fm->hd[n];
to->hdf[n] = fm->hdf[n];
http_VSLH(to, n);
} | 0 |
359,548 | DEFUN (address_family_ipv4,
address_family_ipv4_cmd,
"address-family ipv4",
"Enter Address Family command mode\n"
"Address family\n")
{
vty->node = BGP_IPV4_NODE;
return CMD_SUCCESS;
} | 0 |
301,493 | add_sound_suggest(
suginfo_T *su,
char_u *goodword,
int score, // soundfold score
langp_T *lp)
{
slang_T *slang = lp->lp_slang; // language for sound folding
int sfwordnr;
char_u *nrline;
int orgnr;
char_u theword[MAXWLEN];
int i;
int wlen;
char_u *byts;
idx_T *... | 0 |
247,619 | void testSupportForStatelessSessionResumption(const std::string& server_ctx_yaml,
const std::string& client_ctx_yaml,
bool expect_support,
const Network::Address::IpVersion ip_versio... | 0 |
333,046 | nfa_print_state2(FILE *debugf, nfa_state_T *state, garray_T *indent)
{
char_u *p;
if (state == NULL)
return;
fprintf(debugf, "(%2d)", abs(state->id));
// Output indent
p = (char_u *)indent->ga_data;
if (indent->ga_len >= 3)
{
int last = indent->ga_len - 3;
char_u save[2];
STRNCPY(sa... | 0 |
366,301 | static bool disconnect_mount(struct mount *mnt, enum umount_tree_flags how)
{
/* Leaving mounts connected is only valid for lazy umounts */
if (how & UMOUNT_SYNC)
return true;
/* A mount without a parent has nothing to be connected to */
if (!mnt_has_parent(mnt))
return true;
/* Because the reference countin... | 0 |
405,392 | static struct xfrm_policy *clone_policy(const struct xfrm_policy *old, int dir)
{
struct xfrm_policy *newp = xfrm_policy_alloc(xp_net(old), GFP_ATOMIC);
struct net *net = xp_net(old);
if (newp) {
newp->selector = old->selector;
if (security_xfrm_policy_clone(old->security,
&newp->security)) {
kfr... | 0 |
242,657 | static GFINLINE Bool isor_is_local(const char *url)
{
if (!strnicmp(url, "file://", 7)) return GF_TRUE;
if (!strnicmp(url, "gmem://", 7)) return GF_TRUE;
if (!strnicmp(url, "gfio://", 7)) return GF_TRUE;
if (!strnicmp(url, "isobmff://", 10)) return GF_TRUE;
if (strstr(url, "://")) return GF_FALSE;
/*the rest is l... | 0 |
413,836 | LinkInfo::LinkInfo(const constantPoolHandle& pool, int index, TRAPS) {
// resolve klass
_resolved_klass = pool->klass_ref_at(index, CHECK);
// Get name, signature, and static klass
_name = pool->name_ref_at(index);
_signature = pool->signature_ref_at(index);
_tag = pool->tag_ref_at(... | 0 |
343,220 | static void keepalive(const int fd, int keep)
{
#ifdef SO_KEEPALIVE
{
setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (char *) &keep, sizeof keep);
}
#endif
} | 0 |
312,585 | set_errorlist(
win_T *wp,
list_T *list,
int action,
char_u *title,
dict_T *what)
{
qf_info_T *qi = &ql_info;
int retval = OK;
if (wp != NULL)
{
qi = ll_get_or_alloc_list(wp);
if (qi == NULL)
return FAIL;
}
if (action == 'f')
{
// Free the entire quickfix or location list stac... | 0 |
448,532 | void bgp_update_restarted_peers(struct peer *peer)
{
if (!bgp_update_delay_active(peer->bgp))
return; /* BGP update delay has ended */
if (peer->update_delay_over)
return; /* This peer has already been considered */
if (bgp_debug_neighbor_events(peer))
zlog_debug("Peer %s: Checking restarted", peer->host);
... | 0 |
220,404 | ary_new_from_values(mrb_state *mrb, mrb_int size, const mrb_value *vals)
{
struct RArray *a = ary_new_capa(mrb, size);
array_copy(ARY_PTR(a), vals, size);
ARY_SET_LEN(a, size);
return a;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.