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 /sbin/mount_ntfs/mount_ntfs.c | |
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 'sbin/mount_ntfs/mount_ntfs.c')
-rw-r--r-- | sbin/mount_ntfs/mount_ntfs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/mount_ntfs/mount_ntfs.c b/sbin/mount_ntfs/mount_ntfs.c index 12553e4e6b0..10be734f5a2 100644 --- a/sbin/mount_ntfs/mount_ntfs.c +++ b/sbin/mount_ntfs/mount_ntfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_ntfs.c,v 1.14 2011/06/27 23:40:07 tedu Exp $ */ +/* $OpenBSD: mount_ntfs.c,v 1.15 2015/01/16 06:39:59 deraadt Exp $ */ /* $NetBSD: mount_ntfs.c,v 1.9 2003/05/03 15:37:08 christos Exp $ */ /* @@ -34,7 +34,7 @@ * Id: mount_ntfs.c,v 1.1.1.1 1999/02/03 03:51:19 semenu Exp */ -#include <sys/param.h> +#include <sys/types.h> #include <sys/mount.h> #include <sys/stat.h> @@ -44,6 +44,7 @@ #include <string.h> #include <sysexits.h> #include <unistd.h> +#include <limits.h> #include <mntopts.h> @@ -61,7 +62,7 @@ main(int argc, char *argv[]) struct ntfs_args args; struct stat sb; int c, mntflags, set_gid, set_uid, set_mask; - char *dev, dir[MAXPATHLEN]; + char *dev, dir[PATH_MAX]; mntflags = set_gid = set_uid = set_mask = 0; memset(&args, 0, sizeof(args)); |