X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/71b291d71b70cd09865882235fca3a8d35edc6b3..5f238db203f4ba876cfa8949f87f3f93507c049f:/lib/pool_alloc.c diff --git a/lib/pool_alloc.c b/lib/pool_alloc.c index ab4ff0af..c282db60 100644 --- a/lib/pool_alloc.c +++ b/lib/pool_alloc.c @@ -17,10 +17,10 @@ struct alloc_pool /* statistical data */ unsigned long e_created; /* extents created */ unsigned long e_freed; /* extents detroyed */ - uint64 n_allocated; /* calls to alloc */ - uint64 n_freed; /* calls to free */ - uint64 b_allocated; /* cum. bytes allocated */ - uint64 b_freed; /* cum. bytes freed */ + int64 n_allocated; /* calls to alloc */ + int64 n_freed; /* calls to free */ + int64 b_allocated; /* cum. bytes allocated */ + int64 b_freed; /* cum. bytes freed */ }; struct pool_extent @@ -34,7 +34,7 @@ struct pool_extent struct align_test { void *foo; - uint64 bar; + int64 bar; }; #define MINALIGN offsetof(struct align_test, bar) @@ -227,7 +227,7 @@ pool_free(alloc_pool_t p, size_t len, void *addr) for (prev = NULL, cur = pool->free; cur; prev = cur, cur = cur->next) { if (addr >= cur->start - && addr < cur->start + pool->size) + && addr < PTR_ADD(cur->start, pool->size)) break; } if (!cur)