mirror of git://anongit.mindrot.org/openssh.git
avoid compiler warning
This commit is contained in:
parent
2d75d74272
commit
65eb8fae0d
|
@ -62,7 +62,7 @@ recallocarray(void *ptr, size_t oldnmemb, size_t newnmemb, size_t size)
|
||||||
if (newsize <= oldsize) {
|
if (newsize <= oldsize) {
|
||||||
size_t d = oldsize - newsize;
|
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);
|
memset((char *)ptr + newsize, 0, d);
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue