summaryrefslogtreecommitdiff
path: root/bitmap.c
diff options
context:
space:
mode:
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)
87 return -1; /* invalid */ 87 return -1; /* invalid */
88 nlen = (n / BITMAP_BITS) + 1; 88 nlen = (n / BITMAP_BITS) + 1;
89 if (b->len < nlen) { 89 if (b->len < nlen) {
90 if ((tmp = recallocarray(b->d, b->len, nlen, BITMAP_BYTES)) == NULL) 90 if ((tmp = recallocarray(b->d, b->len,
91 nlen, BITMAP_BYTES)) == NULL)
91 return -1; 92 return -1;
92 b->d = tmp; 93 b->d = tmp;
93 memset(b->d + b->len, 0, (nlen - b->len) * BITMAP_BYTES);
94 b->len = nlen; 94 b->len = nlen;
95 } 95 }
96 return 0; 96 return 0;