diff options
Diffstat (limited to 'mansearch.c')
-rw-r--r-- | mansearch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mansearch.c b/mansearch.c index eec5ff13..f9892218 100644 --- a/mansearch.c +++ b/mansearch.c @@ -1,4 +1,4 @@ -/* $Id: mansearch.c,v 1.35 2014/04/23 16:34:50 schwarze Exp $ */ +/* $Id: mansearch.c,v 1.36 2014/04/23 21:06:41 schwarze Exp $ */ /* * Copyright (c) 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -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 * |