X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2Fmempool.c;h=af65b2856770199bf73e38320b34941d6716814a;hb=751d6c55d37bf6485427080e9884ab22291b66f0;hp=e28512f6895e7a95c78f69a9890743efe7c3b8e7;hpb=2771551e0dbfc9517ca6fd68f0db362434ceddbb;p=libucw.git diff --git a/lib/mempool.c b/lib/mempool.c index e28512f6..af65b285 100644 --- a/lib/mempool.c +++ b/lib/mempool.c @@ -1,5 +1,5 @@ /* - * Sherlock Library -- Memory Pools (One-Time Allocation) + * UCW Library -- Memory Pools (One-Time Allocation) * * (c) 1997--2001 Martin Mares * @@ -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;