X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/29cecee7ff6894517a32d929aecee283bb85058c..8eb0cfe199b90872bf8e9411ce6d59e3de0b9418:/manpath.c diff --git a/manpath.c b/manpath.c index 01635cd8..61b2c7e0 100644 --- a/manpath.c +++ b/manpath.c @@ -1,4 +1,4 @@ -/* $Id: manpath.c,v 1.14 2014/04/20 16:46:05 schwarze Exp $ */ +/* $Id: manpath.c,v 1.15 2014/04/23 21:06:41 schwarze Exp $ */ /* * Copyright (c) 2011 Ingo Schwarze * Copyright (c) 2011 Kristaps Dzonsons @@ -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); }