From 7c045c523b3660ca132ad9359c395f0296610d7e Mon Sep 17 00:00:00 2001 From: Patrick Caulfield Date: Thu, 13 Sep 2001 12:38:08 +0000 Subject: [PATCH] Fix includes so that string functions get prototyped. Fix cast - repeat after me Joe: "I must not cast pointers to ints"! --- lib/mm/dbg_malloc.c | 1 + lib/mm/pool.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/mm/dbg_malloc.c b/lib/mm/dbg_malloc.c index 8d5023622..9824941c7 100644 --- a/lib/mm/dbg_malloc.c +++ b/lib/mm/dbg_malloc.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "dbg_malloc.h" #include "log/log.h" diff --git a/lib/mm/pool.c b/lib/mm/pool.c index ec439e6ee..c4d526a26 100644 --- a/lib/mm/pool.c +++ b/lib/mm/pool.c @@ -19,13 +19,13 @@ * Boston, MA 02111-1307, USA. * */ +#include +#include #include "pool.h" #include "dbg_malloc.h" #include "log/log.h" -#include - struct chunk { char *begin, *end; struct chunk *prev; @@ -199,7 +199,7 @@ char *pool_strdup(struct pool *p, const char *str) void _align_chunk(struct chunk *c, unsigned alignment) { - c->begin += alignment - ((unsigned) c->begin & (alignment - 1)); + c->begin += alignment - ((unsigned long) c->begin & (alignment - 1)); } struct chunk *_new_chunk(struct pool *p, size_t s)