diff options
author | Cody P Schafer <dev@codyps.com> | 2015-08-16 18:58:32 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-08-17 12:01:49 +0930 |
commit | 426bd7e6844f1f01637facaba087f78a5a1d530a (patch) | |
tree | eb397aa9ee9a2f77ffad88c2bbe80dd9e75c666a | |
parent | d88372302ac7d1b5e6d6def90df16c3b9fcd8a4f (diff) |
talloc: avoid a comparison mismatch & at the same time switch to non-legacy sysconf()
Without this, gcc warns about a sign mismatch in the comparison.
Signed-off-by: Cody P Schafer <dev@codyps.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | ccan/talloc/talloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ccan/talloc/talloc.c b/ccan/talloc/talloc.c index 0c6bcda9..3ada60fc 100644 --- a/ccan/talloc/talloc.c +++ b/ccan/talloc/talloc.c @@ -810,7 +810,7 @@ void *_talloc(const void *context, size_t size) static int talloc_destroy_pointer(void ***pptr) { - if ((uintptr_t)**pptr < getpagesize()) + if ((uintptr_t)**pptr < (uintptr_t)sysconf(_SC_PAGESIZE)) TALLOC_ABORT("Double free or invalid talloc_set?"); /* Invalidate pointer so it can't be used again. */ **pptr = (void *)1; |