X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Falloc%2Ftest%2Frun.c;h=7c8fce3d76fd0f2202d4a136b1ce89712993c4cb;hb=c438ec17d7b2efe76e56e5fc5ab88bd4a02735e8;hp=e75eddbffe4fabe8b45cd3f6e7f85ef6bc2e17a5;hpb=fbd94d9909892758d594d410bb5f981b3567fb3e;p=ccan diff --git a/ccan/alloc/test/run.c b/ccan/alloc/test/run.c index e75eddbf..7c8fce3d 100644 --- a/ccan/alloc/test/run.c +++ b/ccan/alloc/test/run.c @@ -11,7 +11,7 @@ static int addr_cmp(void **a, void **b) { - return (*a) - (*b); + return (char *)(*a) - (char *)(*b); } static bool unique(void *p[], unsigned int num) @@ -160,11 +160,13 @@ static void test(unsigned int pool_size) ok1(alloc_size(mem, pool_size, p[0]) < pool_size); alloc_free(mem, pool_size, p[0]); ok1(alloc_check(mem, pool_size)); + + free(mem); } int main(int argc, char *argv[]) { - plan_tests(480); + plan_tests(440); /* Large test. */ test(MIN_USEFUL_SIZE * 2);