From a4a28f04cb887ee690ccc9f563d06bf74fe18faf Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Thu, 17 Mar 2022 15:46:25 +0100 Subject: vppinfra: use stored vec header size to find header Type: refactor Change-Id: Iaa1e43c87c5725ab33ea8489bff2a7bda18b9c79 Signed-off-by: Damjan Marion --- src/vppinfra/hash.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/vppinfra/hash.h') diff --git a/src/vppinfra/hash.h b/src/vppinfra/hash.h index 23b91b107a2..f5735bc92ee 100644 --- a/src/vppinfra/hash.h +++ b/src/vppinfra/hash.h @@ -96,18 +96,11 @@ typedef struct hash_header uword *is_user; } hash_t; -/* Hash header size in bytes */ -always_inline uword -hash_header_bytes (void *v) -{ - return sizeof (hash_t); -} - /* Returns a pointer to the hash header given the vector pointer */ always_inline hash_t * hash_header (void *v) { - return vec_header (v, hash_header_bytes (v)); + return vec_header (v); } /* Number of elements in the hash table */ -- cgit 1.2.3-korg