diff --git a/src/microhttpd/memorypool.c b/src/microhttpd/memorypool.c index 12a22f22..5f532b83 100644 --- a/src/microhttpd/memorypool.c +++ b/src/microhttpd/memorypool.c @@ -54,7 +54,7 @@ /** * Round up 'n' to a multiple of ALIGN_SIZE. */ -#define ROUND_TO_ALIGN(n) (((n)+(ALIGN_SIZE-1)) & (~(ALIGN_SIZE-1))) +#define ROUND_TO_ALIGN(n) (((n)+(ALIGN_SIZE-1)) / (ALIGN_SIZE) * (ALIGN_SIZE)) /**