From 82d1a003112e3887d3bef7c949ab0ed6e9113128 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 15 Sep 2003 10:26:57 +0000 Subject: [PATCH] CUSTOM_HASH becomes INTEGRAL_HASH. --- hash.c | 2 +- hash.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hash.c b/hash.c index 03f825a..674eac4 100644 --- a/hash.c +++ b/hash.c @@ -1,7 +1,7 @@ /* hash.c -- hash and digest computation for comparator */ #include "hash.h" -#ifdef CUSTOM_HASH +#ifdef INTEGRAL_HASH /****************************************************************************** According to the Birthday Theorem, successive random choices from a diff --git a/hash.h b/hash.h index 1b9303c..f20a6a7 100644 --- a/hash.h +++ b/hash.h @@ -1,13 +1,13 @@ /* interface file for comparator hash function */ -#ifdef CUSTOM_HASH +#ifdef INTEGRAL_HASH typedef unsigned long long hashval_t; -#define hash_compare(s, t) ((s) - (t)) #else typedef unsigned char hashval_t[16]; -#define hash_compare(s, t) memcmp((s), (t), sizeof(hashval_t)) #endif +#define hash_compare(s, t) memcmp(&(s), &(t), sizeof(hashval_t)) + void hash_init(void); void hash_update(unsigned char *buffer, const int len); void hash_complete(hashval_t *hp); -- 2.43.0