summaryrefslogtreecommitdiff
path: root/openbsd-compat/recallocarray.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2017-06-01 16:25:09 +1000
committerDamien Miller <djm@mindrot.org>2017-06-01 16:25:26 +1000
commit65eb8fae0d7ba45ef4483a3cf0ae7fd0dbc7c226 (patch)
tree5e912d0b0d64eeae0392ab87c9f8288a292f5403 /openbsd-compat/recallocarray.c
parent2d75d74272dc2a0521fce13cfe6388800c9a2406 (diff)
avoid compiler warning
Diffstat (limited to 'openbsd-compat/recallocarray.c')
-rw-r--r--openbsd-compat/recallocarray.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsd-compat/recallocarray.c b/openbsd-compat/recallocarray.c
index 50674170..c281f75e 100644
--- a/openbsd-compat/recallocarray.c
+++ b/openbsd-compat/recallocarray.c
@@ -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;
}