summaryrefslogtreecommitdiffstats
path: root/sbin/fsck/fsutil.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-01-16 06:39:28 +0000
committerderaadt <deraadt@openbsd.org>2015-01-16 06:39:28 +0000
commitb9fc9a728fce9c4289b7e9a992665e28d5629a54 (patch)
tree72b2433e418dfa1aef5fcf8305617b97979a25d8 /sbin/fsck/fsutil.c
parentimprove checksum parsing slightly. now handles filenames with spaces. (diff)
downloadwireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.tar.xz
wireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.zip
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)