Fix 32bit btree primitives

Using an unsigned long * to a u32 gives 32 random bits.  Not a good
identifier.

Signed-off-by: Joern Engel <joern@logfs.org>
diff --git a/btree.c b/btree.c
index af9fcc9..2c74604 100644
--- a/btree.c
+++ b/btree.c
@@ -664,9 +664,9 @@
 		void *__func)
 {
 	visitor32_t func = __func;
-	u32 *key = (void *)__key;
+	unsigned long key = *__key;
 
-	func(elem, opaque, *key, index);
+	func(elem, opaque, key, index);
 }
 
 void visitor64(void *elem, long opaque, unsigned long *__key, size_t index,
diff --git a/btree.h b/btree.h
index ad4be90..aeeaf88 100644
--- a/btree.h
+++ b/btree.h
@@ -107,19 +107,25 @@
 	btree_init(&head->h);
 }
 
-static inline void *btree_lookup32(struct btree_head32 *head, u32 key)
+static inline void *btree_lookup32(struct btree_head32 *head, u32 _key)
 {
-	return btree_lookup(&head->h, &btree_geo32, (unsigned long *)&key);
+	unsigned long key = _key;
+
+	return btree_lookup(&head->h, &btree_geo32, &key);
 }
 
-static inline int btree_insert32(struct btree_head32 *head, u32 key,
+static inline int btree_insert32(struct btree_head32 *head, u32 _key,
 		void *val)
 {
+	unsigned long key = _key;
+
 	return btree_insert(&head->h, &btree_geo32, (unsigned long *)&key, val);
 }
 
-static inline void *btree_remove32(struct btree_head32 *head, u32 key)
+static inline void *btree_remove32(struct btree_head32 *head, u32 _key)
 {
+	unsigned long key = _key;
+
 	return btree_remove(&head->h, &btree_geo32, (unsigned long *)&key);
 }