From: Timo Sirainen Date: Sun, 5 Dec 2010 23:53:25 +0000 (+0000) Subject: Unexpand BITS_IN_SIZE_T in the only place it's used and remove the macro. X-Git-Tag: 2.1.alpha1~458 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92550656e08f70674c5233de23ec50a107accfd9;p=thirdparty%2Fdovecot%2Fcore.git Unexpand BITS_IN_SIZE_T in the only place it's used and remove the macro. --- diff --git a/src/lib/lib.c b/src/lib/lib.c index b9d87c7c8a..dbb1f242e8 100644 --- a/src/lib/lib.c +++ b/src/lib/lib.c @@ -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; diff --git a/src/lib/macros.h b/src/lib/macros.h index aa0c824629..b69715b2b1 100644 --- a/src/lib/macros.h +++ b/src/lib/macros.h @@ -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))