aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2003-08-07 05:38:56 +0000
committerWarner Losh <imp@FreeBSD.org>2003-08-07 05:38:56 +0000
commit534734ed1725ab8c4dfaf0a62f66fa6cbeef74cd (patch)
treee2e00ff1c92172fb115c562f1ee5753d4faea8bb /sbin
parent834a93de56bd8c92b1cbed9b8193d0128f113a29 (diff)
downloadsrc-534734ed1725ab8c4dfaf0a62f66fa6cbeef74cd.tar.gz
src-534734ed1725ab8c4dfaf0a62f66fa6cbeef74cd.zip
Prefer PATH_MAX to MAXPATHLEN. Both contain the trailing NUL, so
remove the unneeded +1.
Notes
Notes: svn path=/head/; revision=118582
Diffstat (limited to 'sbin')
-rw-r--r--sbin/quotacheck/quotacheck.c4
-rw-r--r--sbin/routed/defs.h2
-rw-r--r--sbin/routed/trace.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/sbin/quotacheck/quotacheck.c b/sbin/quotacheck/quotacheck.c
index e32f84ff0202..a5cce23f11bc 100644
--- a/sbin/quotacheck/quotacheck.c
+++ b/sbin/quotacheck/quotacheck.c
@@ -97,8 +97,8 @@ union dinode {
struct quotaname {
long flags;
- char grpqfname[MAXPATHLEN + 1];
- char usrqfname[MAXPATHLEN + 1];
+ char grpqfname[PATH_MAX];
+ char usrqfname[PATH_MAX];
};
#define HASUSR 1
#define HASGRP 2
diff --git a/sbin/routed/defs.h b/sbin/routed/defs.h
index aba95e3a27cd..2e7aa3064ffb 100644
--- a/sbin/routed/defs.h
+++ b/sbin/routed/defs.h
@@ -499,7 +499,7 @@ extern int tracelevel, new_tracelevel;
#define TRACEPACKETS (tracelevel >= 2) /* note packets */
#define TRACEACTIONS (tracelevel != 0)
extern FILE *ftrace; /* output trace file */
-extern char inittracename[MAXPATHLEN+1];
+extern char inittracename[PATH_MAX];
extern struct radix_node_head *rhead;
diff --git a/sbin/routed/trace.c b/sbin/routed/trace.c
index ba1d31f926cf..5b258df0d8d3 100644
--- a/sbin/routed/trace.c
+++ b/sbin/routed/trace.c
@@ -58,8 +58,8 @@ __RCSID("$NetBSD$");
int tracelevel, new_tracelevel;
FILE *ftrace; /* output trace file */
static const char *sigtrace_pat = "%s";
-static char savetracename[MAXPATHLEN+1];
-char inittracename[MAXPATHLEN+1];
+static char savetracename[PATH_MAX];
+char inittracename[PATH_MAX];
int file_trace; /* 1=tracing to file, not stdout */
static void trace_dump(void);