aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/manpath.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-06-05 02:00:26 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-06-05 02:00:26 +0000
commit8400486b39e9f57a03d2efe49cf8eab233476669 (patch)
tree05031258c9f3babdf621263c0a55031f2a2a2c0a /manpath.c
parent91ed0105333c4ac483f7581f13a317c5560bdf58 (diff)
downloadmandoc-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.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/manpath.c b/manpath.c
index 888c8db5..90089323 100644
--- a/manpath.c
+++ b/manpath.c
@@ -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;