avoid compiler warning

This commit is contained in:
Damien Miller 2017-06-01 16:25:09 +10:00
parent 2d75d74272
commit 65eb8fae0d
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ recallocarray(void *ptr, size_t oldnmemb, size_t newnmemb, size_t size)
if (newsize <= oldsize) {
size_t d = oldsize - newsize;
if (d < oldsize / 2 && d < getpagesize()) {
if (d < oldsize / 2 && d < (size_t)getpagesize()) {
memset((char *)ptr + newsize, 0, d);
return ptr;
}