util/HugeAllocator: paranoid check for sysconf()<0

Just in case.
This commit is contained in:
Max Kellermann 2017-03-01 21:50:26 +01:00
parent 9dfedbe619
commit 42a3a87f13

View File

@ -48,7 +48,7 @@ static size_t
AlignToPageSize(size_t size)
{
static const long page_size = sysconf(_SC_PAGESIZE);
if (page_size == 0)
if (page_size <= 0)
return size;
size_t ps(page_size);