summaryrefslogtreecommitdiff
path: root/sbin/fsck/fsutil.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 /sbin/fsck/fsutil.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 'sbin/fsck/fsutil.c')
-rw-r--r--sbin/fsck/fsutil.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/fsck/fsutil.c b/sbin/fsck/fsutil.c
index 6b9adff3d11..e18335d1a95 100644
--- a/sbin/fsck/fsutil.c
+++ b/sbin/fsck/fsutil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fsutil.c,v 1.19 2014/10/08 16:27:53 deraadt Exp $ */
+/* $OpenBSD: fsutil.c,v 1.20 2015/01/16 06:39:57 deraadt Exp $ */
/* $NetBSD: fsutil.c,v 1.2 1996/10/03 20:06:31 christos Exp $ */
/*
@@ -30,13 +30,13 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <errno.h>
#include <fstab.h>
+#include <limits.h>
#include <err.h>
#include <sys/types.h>
@@ -169,7 +169,7 @@ unrawname(char *name)
char *
rawname(char *name)
{
- static char rawbuf[MAXPATHLEN];
+ static char rawbuf[PATH_MAX];
char *dp;
if ((dp = strrchr(name, '/')) == NULL)