X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fjbitset%2Fjbitset.c;h=4efc775099296069be0c3691f8a3fd4ffd2a5292;hp=0756e3048ff9f1255b8b8ff9ec4a0850199c9ef4;hb=f76c68579cb445177b9957814ba8623a73e5d60e;hpb=2965496c70c345ea83e14d4b25e8687f7c682531 diff --git a/ccan/jbitset/jbitset.c b/ccan/jbitset/jbitset.c index 0756e304..4efc7750 100644 --- a/ccan/jbitset/jbitset.c +++ b/ccan/jbitset/jbitset.c @@ -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) {