فهرست منبع

memorypool: correctly support exotic platform where size of pointer is not power of two

Evgeny Grin (Karlson2k) 6 سال پیش
والد
کامیت
35d581d04f
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/microhttpd/memorypool.c

+ 1 - 1
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))
 
 
 /**