summaryrefslogtreecommitdiffstats
path: root/bitmap.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-06-01 08:59:21 +0200
committerDamien Miller <djm@mindrot.org>2017-06-07 03:31:15 +0200
commit1527d9f61e6d50f6c2b4a3fa5b45829034b1b0b1 (patch)
tree72053204fdde1b368201b01a94f7184532817661 /bitmap.c
parentupstream commit (diff)
downloadopenssh-1527d9f61e6d50f6c2b4a3fa5b45829034b1b0b1.tar.xz
openssh-1527d9f61e6d50f6c2b4a3fa5b45829034b1b0b1.zip
upstream commit
no need to bzero allocated space now that we use use recallocarray; ok deraadt@ Upstream-ID: 53333c62ccf97de60b8cb570608c1ba5ca5803c8
Diffstat (limited to 'bitmap.c')
-rw-r--r--bitmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitmap.c b/bitmap.c
index e8320d8c0..5089b0407 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -87,10 +87,10 @@ reserve(struct bitmap *b, u_int n)
return -1; /* invalid */
nlen = (n / BITMAP_BITS) + 1;
if (b->len < nlen) {
- if ((tmp = recallocarray(b->d, b->len, nlen, BITMAP_BYTES)) == NULL)
+ if ((tmp = recallocarray(b->d, b->len,
+ nlen, BITMAP_BYTES)) == NULL)
return -1;
b->d = tmp;
- memset(b->d + b->len, 0, (nlen - b->len) * BITMAP_BYTES);
b->len = nlen;
}
return 0;