summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/st.c b/st.c
index f14c69f271..e40c6e1017 100644
--- a/st.c
+++ b/st.c
@@ -62,10 +62,10 @@ static void rehash();
#define alloc(type) (type*)xmalloc((unsigned)sizeof(type))
#define Calloc(n,s) (char*)xcalloc((n),(s))
-#define EQUAL(table, x, y) ((*table->type->compare)(x, y) == 0)
+#define EQUAL(table,x,y) ((x)==(y) || (*table->type->compare)((x),(y)) == 0)
-#define do_hash(key, table) (unsigned int)(*(table)->type->hash)((key))
-#define do_hash_bin(key, table) (do_hash(key, table)&(table)->num_bins)
+#define do_hash(key,table) (unsigned int)(*(table)->type->hash)((key))
+#define do_hash_bin(key,table) (do_hash(key, table)&(table)->num_bins)
/*
* MINSIZE is the minimum size of a dictionary.