diff options
author | Peter Palfrader <peter@palfrader.org> | 2007-08-17 22:43:00 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2007-08-17 22:43:00 +0000 |
commit | 0713606469ab9f47fb74f9b3984ff5fdd7095eb2 (patch) | |
tree | f1589cbdd75d1abb17a5cb780d5617face411563 | |
parent | c5893e50358dda27158835374769f4e394bedc2d (diff) | |
download | tor-0713606469ab9f47fb74f9b3984ff5fdd7095eb2.tar.gz tor-0713606469ab9f47fb74f9b3984ff5fdd7095eb2.zip |
redefine BITARRAY_MASK as a function of BITARRAY_SHIFT
svn:r11160
-rw-r--r-- | src/common/container.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/container.h b/src/common/container.h index 2953b0d68f..668befdd6e 100644 --- a/src/common/container.h +++ b/src/common/container.h @@ -268,13 +268,12 @@ void* strmap_remove_lc(strmap_t *map, const char *key); #if SIZEOF_INT == 4 #define BITARRAY_SHIFT 5 -#define BITARRAY_MASK 31 #elif SIZEOF_INT == 8 #define BITARRAY_SHIFT 6 -#define BITARRAY_MASK 63 #else #error "int is neither 4 nor 8 bytes. I can't deal with that." #endif +#define BITARRAY_MASK ((1u<<BITARRAY_SHIFT)-1) /** A random-access array of one-bit-wide elements. */ typedef unsigned int bitarray_t; |