]> git.ozlabs.org Git - ccan/blobdiff - ccan/jbitset/jbitset.c
compiler: shorten names of attributes, add UNUSED
[ccan] / ccan / jbitset / jbitset.c
index 0756e3048ff9f1255b8b8ff9ec4a0850199c9ef4..4efc775099296069be0c3691f8a3fd4ffd2a5292 100644 (file)
@@ -7,8 +7,10 @@ struct jbitset *jbit_new(void)
 {
        struct jbitset *set;
 
-       /* Judy uses Word_t, we use size_t. */
-       BUILD_ASSERT(sizeof(size_t) == sizeof(Word_t));
+       /* Judy uses Word_t, we use unsigned long directly. */
+       BUILD_ASSERT(sizeof(unsigned long) == sizeof(Word_t));
+       /* We pack pointers into jbitset (in jbitset_type.h) */
+       BUILD_ASSERT(sizeof(Word_t) >= sizeof(void *));
 
        set = malloc(sizeof(*set));
        if (set) {