]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Unexpand BITS_IN_SIZE_T in the only place it's used and remove the macro.
authorTimo Sirainen <tss@iki.fi>
Sun, 5 Dec 2010 23:53:25 +0000 (23:53 +0000)
committerTimo Sirainen <tss@iki.fi>
Sun, 5 Dec 2010 23:53:25 +0000 (23:53 +0000)
src/lib/lib.c
src/lib/macros.h

index b9d87c7c8af4aa7e55314aa6f359097cc77b7841..dbb1f242e888d294f049e83df6e25e253557f388 100644 (file)
@@ -13,7 +13,7 @@ size_t nearest_power(size_t num)
 {
        size_t n = 1;
 
-       i_assert(num <= ((size_t)1 << (BITS_IN_SIZE_T-1)));
+       i_assert(num <= ((size_t)1 << (CHAR_BIT*sizeof(size_t) - 1)));
 
        while (n < num) n <<= 1;
        return n;
index aa0c8246291f528421f4bc97b9fee5a34fc31513..b69715b2b14b250af67569b7362c6f5ad256f3cf 100644 (file)
@@ -19,7 +19,6 @@
        (sizeof(arr) / sizeof((arr)[0]))
 
 #define BITS_IN_UINT (CHAR_BIT * sizeof(unsigned int))
-#define BITS_IN_SIZE_T (CHAR_BIT * sizeof(size_t))
 
 #define MEM_ALIGN(size) \
        (((size) + MEM_ALIGN_SIZE-1) & ~((unsigned int) MEM_ALIGN_SIZE-1))