]> thyrsus.com Git - comparator.git/commitdiff
Get rid of evil magic constant.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 15 Sep 2003 08:48:34 +0000 (08:48 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 15 Sep 2003 08:48:34 +0000 (08:48 +0000)
hash.h

diff --git a/hash.h b/hash.h
index ac49cf97a80c97baebfbb07f3f700b5ea6828e33..9bf41bc73f9bb0e6565e6b38ec8179a569016400 100644 (file)
--- 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);