aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/recallocarray.c
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2021-07-14 14:39:31 +0300
committerCem Keylan <cem@ckyln.com>2021-07-14 14:39:31 +0300
commit89c23755c8ab5d8c5bbbfa6e40eb0c6bda109dad (patch)
tree0619d977ce4ceecca0523f20a0609a293440e030 /lib/libc/stdlib/recallocarray.c
parent0ea3661a6ba0baaa39b95e836e8f2c87e2f4c20f (diff)
downloadotools-89c23755c8ab5d8c5bbbfa6e40eb0c6bda109dad.tar.gz
update CVS
Diffstat (limited to 'lib/libc/stdlib/recallocarray.c')
-rw-r--r--lib/libc/stdlib/recallocarray.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/recallocarray.c b/lib/libc/stdlib/recallocarray.c
index a2f37fe..81059e6 100644
--- a/lib/libc/stdlib/recallocarray.c
+++ b/lib/libc/stdlib/recallocarray.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: recallocarray.c,v 1.1 2017/03/06 18:44:21 otto Exp $ */
+/* $OpenBSD: recallocarray.c,v 1.2 2021/03/18 11:16:58 claudio Exp $ */
/*
* Copyright (c) 2008, 2017 Otto Moerbeek <otto@drijf.net>
*
@@ -57,7 +57,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;
}