X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fmempool.c;h=af65b2856770199bf73e38320b34941d6716814a;hb=b5f9a4654516e0ec37373e198e6b3a6f6a2a186d;hp=b0c03eed50ab5a628462f8ce35783d52fc3cb81d;hpb=cad27e97e6370f96903d42aaf345c099af0a03bd;p=libucw.git diff --git a/lib/mempool.c b/lib/mempool.c index b0c03eed..af65b285 100644 --- a/lib/mempool.c +++ b/lib/mempool.c @@ -10,7 +10,6 @@ #include "lib/lib.h" #include "lib/mempool.h" -#include #include struct memchunk { @@ -69,7 +68,7 @@ mp_alloc(struct mempool *p, uns s) { if (s <= p->threshold) { - byte *x = (byte *)(((uns) p->free + POOL_ALIGN - 1) & ~(POOL_ALIGN - 1)); + byte *x = (byte *)(((addr_int_t) p->free + POOL_ALIGN - 1) & ~(addr_int_t)(POOL_ALIGN - 1)); if (x + s > p->last) { struct memchunk *c;