summaryrefslogtreecommitdiff
path: root/usr.sbin/mtree/create.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-16 06:40:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-16 06:40:24 +0000
commit315054f4737a39489e0a14f3a92bff61f1592832 (patch)
tree62bf010653374ce09b6beb4dfa0414a91457233b /usr.sbin/mtree/create.c
parent79e3d817585ca08a91e30ad14abe43e2ab70295f (diff)
Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
Diffstat (limited to 'usr.sbin/mtree/create.c')
-rw-r--r--usr.sbin/mtree/create.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/mtree/create.c b/usr.sbin/mtree/create.c
index 777a9bff344..eac12974748 100644
--- a/usr.sbin/mtree/create.c
+++ b/usr.sbin/mtree/create.c
@@ -1,5 +1,5 @@
/* $NetBSD: create.c,v 1.11 1996/09/05 09:24:19 mycroft Exp $ */
-/* $OpenBSD: create.c,v 1.29 2013/08/22 04:43:41 guenther Exp $ */
+/* $OpenBSD: create.c,v 1.30 2015/01/16 06:40:18 deraadt Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -30,7 +30,6 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/stat.h>
#include <time.h>
#include <fcntl.h>
@@ -40,6 +39,7 @@
#include <pwd.h>
#include <errno.h>
#include <unistd.h>
+#include <limits.h>
#include <stdio.h>
#include <stdarg.h>
#include <vis.h>
@@ -57,7 +57,7 @@ extern u_int32_t crc_total;
extern int ftsoptions;
extern int dflag, iflag, nflag, sflag;
extern u_int keys;
-extern char fullpath[MAXPATHLEN];
+extern char fullpath[PATH_MAX];
static gid_t gid;
static uid_t uid;
@@ -74,7 +74,7 @@ cwalk(void)
FTS *t;
FTSENT *p;
time_t clock;
- char *argv[2], host[MAXHOSTNAMELEN];
+ char *argv[2], host[HOST_NAME_MAX+1];
int indent = 0;
(void)time(&clock);