]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
avoid compiler warning
authorDamien Miller <djm@mindrot.org>
Thu, 1 Jun 2017 06:25:09 +0000 (16:25 +1000)
committerDamien Miller <djm@mindrot.org>
Thu, 1 Jun 2017 06:25:26 +0000 (16:25 +1000)
openbsd-compat/recallocarray.c

index 5067417082818fcc67f05861b4cad4169704f560..c281f75e94d12ad1002a921c414d9efb90fb8140 100644 (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;
                }