diff options
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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. |