From 8455a528c3486013c123fcfb16514561866ecf80 Mon Sep 17 00:00:00 2001 From: "L. Pereira" Date: Sat, 18 May 2024 13:56:09 -0700 Subject: [PATCH] Limit the scope of the FNV1a seed externs --- src/lib/hash.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/hash.h b/src/lib/hash.h index bec709e55..edec94134 100644 --- a/src/lib/hash.h +++ b/src/lib/hash.h @@ -32,12 +32,10 @@ bool hash_iter_next(struct hash_iter *iter, const void **key, const void **value); -extern uint64_t fnv1a_64_seed; -extern uint32_t fnv1a_32_seed; - static inline uint64_t fnv1a_64(const void *buffer, size_t len) { const unsigned char *data = (unsigned char *)buffer; + extern uint64_t fnv1a_64_seed; uint64_t hash; for (hash = fnv1a_64_seed; len--; data++) { @@ -50,6 +48,7 @@ static inline uint64_t fnv1a_64(const void *buffer, size_t len) static inline uint32_t fnv1a_32(const void *buffer, size_t len) { const unsigned char *data = (unsigned char *)buffer; + extern uint32_t fnv1a_32_seed; uint32_t hash; for (hash = fnv1a_32_seed; len--; data++) {