diff options
Diffstat (limited to 'manpath.c')
-rw-r--r-- | manpath.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/manpath.c b/manpath.c index c33e0ecf469c..61b2c7e05077 100644 --- a/manpath.c +++ b/manpath.c @@ -1,4 +1,4 @@ -/* $Id: manpath.c,v 1.12 2013/11/21 01:49:18 schwarze Exp $ */ +/* $Id: manpath.c,v 1.15 2014/04/23 21:06:41 schwarze Exp $ */ /* * Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> @@ -26,7 +26,7 @@ #include <stdlib.h> #include <string.h> -#include "mandoc.h" +#include "mandoc_aux.h" #include "manpath.h" #define MAN_CONF_FILE "/etc/man.conf" @@ -169,9 +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); } |