diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-06-05 02:00:26 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-06-05 02:00:26 +0000 |
commit | 8400486b39e9f57a03d2efe49cf8eab233476669 (patch) | |
tree | 05031258c9f3babdf621263c0a55031f2a2a2c0a /manpath.c | |
parent | 91ed0105333c4ac483f7581f13a317c5560bdf58 (diff) | |
download | mandoc-8400486b39e9f57a03d2efe49cf8eab233476669.tar.gz mandoc-8400486b39e9f57a03d2efe49cf8eab233476669.tar.zst mandoc-8400486b39e9f57a03d2efe49cf8eab233476669.zip |
Some places used PATH_MAX from <limits.h>, some MAXPATHLEN from <sys/param.h>.
Consistently use the PATH_MAX since it is specified by POSIX,
while MAXPATHLEN is not.
In preparation for using this at a few more places.
Diffstat (limited to 'manpath.c')
-rw-r--r-- | manpath.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -1,4 +1,4 @@ -/* $Id: manpath.c,v 1.10 2013/05/29 22:48:10 schwarze Exp $ */ +/* $Id: manpath.c,v 1.11 2013/06/05 02:00:26 schwarze Exp $ */ /* * Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> @@ -19,10 +19,6 @@ #include "config.h" #endif -#ifdef USE_MANPATH -#include <sys/param.h> -#endif - #include <assert.h> #include <ctype.h> #include <limits.h> @@ -44,7 +40,7 @@ manpath_parse(struct manpaths *dirs, const char *file, char *defp, char *auxp) { #ifdef USE_MANPATH - char cmd[(MAXPATHLEN * 3) + 20]; + char cmd[(PATH_MAX * 3) + 20]; FILE *stream; char *buf; size_t sz, bsz; |