aboutsummaryrefslogtreecommitdiffstats
path: root/vppinfra
diff options
context:
space:
mode:
Diffstat (limited to 'vppinfra')
-rw-r--r--vppinfra/vppinfra/mhash.c4
-rw-r--r--vppinfra/vppinfra/mhash.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/vppinfra/vppinfra/mhash.c b/vppinfra/vppinfra/mhash.c
index 84517e191bd..c917e164cd9 100644
--- a/vppinfra/vppinfra/mhash.c
+++ b/vppinfra/vppinfra/mhash.c
@@ -223,7 +223,7 @@ mhash_init (mhash_t * h, uword n_value_bytes, uword n_key_bytes)
}
static uword
-mhash_set_tmp_key (mhash_t * h, void *key)
+mhash_set_tmp_key (mhash_t * h, const void *key)
{
u8 *key_tmp;
int my_cpu = os_get_cpu_number ();
@@ -251,7 +251,7 @@ mhash_set_tmp_key (mhash_t * h, void *key)
}
hash_pair_t *
-mhash_get_pair (mhash_t * h, void *key)
+mhash_get_pair (mhash_t * h, const void *key)
{
uword ikey;
mhash_sanitize_hash_user (h);
diff --git a/vppinfra/vppinfra/mhash.h b/vppinfra/vppinfra/mhash.h
index 8ce8454b0a4..102adf4eb83 100644
--- a/vppinfra/vppinfra/mhash.h
+++ b/vppinfra/vppinfra/mhash.h
@@ -101,13 +101,13 @@ mhash_key_to_mem (mhash_t * h, uword key)
return vec_elt_at_index (h->key_vector_or_heap, key);
}
-hash_pair_t *mhash_get_pair (mhash_t * h, void *key);
+hash_pair_t *mhash_get_pair (mhash_t * h, const void *key);
uword mhash_set_mem (mhash_t * h, void *key, uword * new_value,
uword * old_value);
uword mhash_unset (mhash_t * h, void *key, uword * old_value);
always_inline uword *
-mhash_get (mhash_t * h, void *key)
+mhash_get (mhash_t * h, const void *key)
{
hash_pair_t *p = mhash_get_pair (h, key);
return p ? &p->value[0] : 0;