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>
static int talloc_destroy_pointer(void ***pptr)
{
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;
TALLOC_ABORT("Double free or invalid talloc_set?");
/* Invalidate pointer so it can't be used again. */
**pptr = (void *)1;