aboutsummaryrefslogtreecommitdiffstats
path: root/hash.h
diff options
context:
space:
mode:
authoroga2008-04-15 20:24:41 +0000
committeroga2008-04-15 20:24:41 +0000
commitb31333397785733587b3bfe3adb27ff2761702b5 (patch)
treeb4fdd1360ef1add5766452793034ef73bec0ebc4 /hash.h
parent137723ad08c9062a346b29d72b4b2ce55971c217 (diff)
downloadcwm-b31333397785733587b3bfe3adb27ff2761702b5.tar.gz
hit it with the knf stick.
Diffstat (limited to '')
-rw-r--r--hash.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/hash.h b/hash.h
index 3e18736..6dcac2c 100644
--- a/hash.h
+++ b/hash.h
@@ -21,9 +21,9 @@
#include <sys/tree.h>
-#define HASH_ENTRY SPLAY_ENTRY
+#define HASH_ENTRY SPLAY_ENTRY
-#define HASH_HEAD(name, type, nbuckets) \
+#define HASH_HEAD(name, type, nbuckets) \
SPLAY_HEAD(name##_HASH_TREE, type); \
struct name { \
struct name##_HASH_TREE buckets[nbuckets]; \
@@ -52,7 +52,7 @@ struct type *name##_HASH_TREE_FIND(struct name *head, struct type *find) \
{ \
struct name##_HASH_TREE *bucket = \
&head->buckets[(*head->hashfn)(find) % HASH_NBUCKETS(head)]; \
- return SPLAY_FIND(name##_HASH_TREE, bucket, find); \
+ return (SPLAY_FIND(name##_HASH_TREE, bucket, find)); \
} \
void name##_HASH_TREE_INSERT(struct name *head, struct type *insert) \
{ \