From: Eric S. Raymond Date: Mon, 15 Sep 2003 08:48:34 +0000 (+0000) Subject: Get rid of evil magic constant. X-Git-Tag: 1.6~7 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=f420a24d11ec843c6119aaec35dfb74c068a1625;p=comparator.git Get rid of evil magic constant. --- 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);