From f420a24d11ec843c6119aaec35dfb74c068a1625 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 15 Sep 2003 08:48:34 +0000 Subject: [PATCH] Get rid of evil magic constant. --- hash.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hash.h b/hash.h index ac49cf9..9bf41bc 100644 --- a/hash.h +++ b/hash.h @@ -1,13 +1,11 @@ /* interface file for comparator hash function */ #ifdef CUSTOM_HASH -#define HASHSIZE 8 typedef unsigned long long hashval_t; #define hash_compare(s, t) ((s) - (t)) #else -#define HASHSIZE 16 -typedef unsigned char hashval_t[HASHSIZE]; -#define hash_compare(s, t) memcmp((s), (t), HASHSIZE) +typedef unsigned char hashval_t[16]; +#define hash_compare(s, t) memcmp((s), (t), sizeof(hashval_t)) #endif void hash_init(void); -- 2.43.0