Fix coverity issue for potentially overflowing of page size
[vpp.git] / src / vppinfra / mhash.c
index c917e16..b694cc7 100644 (file)
@@ -226,7 +226,7 @@ static uword
 mhash_set_tmp_key (mhash_t * h, const void *key)
 {
   u8 *key_tmp;
-  int my_cpu = os_get_cpu_number ();
+  int my_cpu = os_get_thread_index ();
 
   vec_validate (h->key_tmps, my_cpu);
   key_tmp = h->key_tmps[my_cpu];
@@ -263,7 +263,7 @@ typedef struct
 {
   u32 heap_handle;
 
-  /* Must conincide with vec_header. */
+  /* Must coincide with vec_header. */
   vec_header_t vec;
 } mhash_string_key_t;