summaryrefslogtreecommitdiffstats
path: root/mansearch.c
diff options
context:
space:
mode:
Diffstat (limited to 'mansearch.c')
-rw-r--r--mansearch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mansearch.c b/mansearch.c
index f7c99394..e116aac9 100644
--- a/mansearch.c
+++ b/mansearch.c
@@ -328,8 +328,8 @@ mansearch(const struct mansearch *search,
mp = ohash_next(&htab, &idx)) {
if (cur + 1 > maxres) {
maxres += 1024;
- *res = mandoc_realloc(*res,
- maxres * sizeof(struct manpage));
+ *res = mandoc_reallocarray(*res,
+ maxres, sizeof(struct manpage));
}
mpage = *res + cur;
mpage->form = mp->form;
@@ -793,7 +793,7 @@ static void *
hash_halloc(size_t sz, void *arg)
{
- return(mandoc_calloc(sz, 1));
+ return(mandoc_calloc(1, sz));
}
static void *