summaryrefslogtreecommitdiffstats
path: root/manpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'manpath.c')
-rw-r--r--manpath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/manpath.c b/manpath.c
index 56fb73a0..c5d2cc0c 100644
--- a/manpath.c
+++ b/manpath.c
@@ -169,8 +169,8 @@ manpath_add(struct manpaths *dirs, const char *dir)
if (0 == strcmp(dirs->paths[i], dir))
return;
- dirs->paths = mandoc_realloc(dirs->paths,
- (dirs->sz + 1) * sizeof(char *));
+ dirs->paths = mandoc_reallocarray(dirs->paths,
+ dirs->sz + 1, sizeof(char *));
dirs->paths[dirs->sz++] = mandoc_strdup(cp);
}