X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fhash%2Fhash.h;h=f838e562faa64eec5371924e8a53b3d749287c72;hb=b980b856670208893a4ac597c3b2e8dec47f453d;hp=3db75753fb503d5fd9b5284a2e6e0698bdf63b26;hpb=3f4e83d8ac847d6bf0c20e88cdbca535e842a97b;p=ccan diff --git a/ccan/hash/hash.h b/ccan/hash/hash.h index 3db75753..f838e562 100644 --- a/ccan/hash/hash.h +++ b/ccan/hash/hash.h @@ -1,8 +1,8 @@ #ifndef CCAN_HASH_H #define CCAN_HASH_H +#include "config.h" #include #include -#include "config.h" #include /* Stolen mostly from: lookup3.c, by Bob Jenkins, May 2006, Public Domain. @@ -301,11 +301,11 @@ static inline uint32_t hash_pointer(const void *p, uint32_t base) if (sizeof(p) % sizeof(uint32_t) == 0) { /* This convoluted union is the right way of aliasing. */ union { - uint32_t u32[sizeof(p) / sizeof(uint32_t)]; + uint32_t a[sizeof(p) / sizeof(uint32_t)]; const void *p; } u; u.p = p; - return hash_u32(u.u32, sizeof(p) / sizeof(uint32_t), base); + return hash_u32(u.a, sizeof(p) / sizeof(uint32_t), base); } else return hash(&p, 1, base); }