X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fmempool.c;h=fffbbd299651f95022e15d8bae4836c45753eb8b;hb=e34560a76a7af3fb428604e4da3cd14cfd1bf454;hp=e28512f6895e7a95c78f69a9890743efe7c3b8e7;hpb=2771551e0dbfc9517ca6fd68f0db362434ceddbb;p=libucw.git diff --git a/lib/mempool.c b/lib/mempool.c index e28512f6..fffbbd29 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 *)(((uintptr_t) p->free + POOL_ALIGN - 1) & ~(uintptr_t)(POOL_ALIGN - 1)); if (x + s > p->last) { struct memchunk *c;