diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-16 06:40:24 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-16 06:40:24 +0000 |
commit | 315054f4737a39489e0a14f3a92bff61f1592832 (patch) | |
tree | 62bf010653374ce09b6beb4dfa0414a91457233b /bin/ls | |
parent | 79e3d817585ca08a91e30ad14abe43e2ab70295f (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 'bin/ls')
-rw-r--r-- | bin/ls/print.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c index 5b223303976..ccc1d856ec1 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.32 2014/05/06 20:55:10 tedu Exp $ */ +/* $OpenBSD: print.c,v 1.33 2015/01/16 06:39:32 deraadt Exp $ */ /* $NetBSD: print.c,v 1.15 1996/12/11 03:25:39 thorpej Exp $ */ /* @@ -33,7 +33,7 @@ * SUCH DAMAGE. */ -#include <sys/param.h> +#include <sys/types.h> #include <sys/stat.h> #include <err.h> @@ -47,6 +47,7 @@ #include <time.h> #include <tzfile.h> #include <unistd.h> +#include <limits.h> #include <util.h> #include "ls.h" @@ -346,7 +347,7 @@ static void printlink(FTSENT *p) { int lnklen; - char name[MAXPATHLEN], path[MAXPATHLEN]; + char name[PATH_MAX], path[PATH_MAX]; if (p->fts_level == FTS_ROOTLEVEL) (void)snprintf(name, sizeof(name), "%s", p->fts_name); |