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/fsck_ffs/pass5.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/fsck_ffs/pass5.c')
-rw-r--r-- | sbin/fsck_ffs/pass5.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/fsck_ffs/pass5.c b/sbin/fsck_ffs/pass5.c index 052753651f2..edb08644eba 100644 --- a/sbin/fsck_ffs/pass5.c +++ b/sbin/fsck_ffs/pass5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pass5.c,v 1.46 2014/09/06 04:05:40 guenther Exp $ */ +/* $OpenBSD: pass5.c,v 1.47 2015/01/16 06:39:57 deraadt Exp $ */ /* $NetBSD: pass5.c,v 1.16 1996/09/27 22:45:18 christos Exp $ */ /* @@ -30,7 +30,7 @@ * SUCH DAMAGE. */ -#include <sys/param.h> +#include <sys/param.h> /* MAXFRAG MAXBSIZE roundup setbit */ #include <sys/time.h> #include <sys/lock.h> #include <sys/ucred.h> @@ -40,11 +40,14 @@ #include <ufs/ffs/ffs_extern.h> #include <stdio.h> #include <string.h> +#include <limits.h> #include "fsutil.h" #include "fsck.h" #include "extern.h" +#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) + static int info_cg; static int info_maxcg; @@ -95,7 +98,7 @@ pass5(void) if (doit) { i = fs->fs_contigsumsize; fs->fs_contigsumsize = - MIN(fs->fs_maxcontig, FS_MAXCONTIG); + MINIMUM(fs->fs_maxcontig, FS_MAXCONTIG); if (CGSIZE(fs) > fs->fs_bsize) { pwarn("CANNOT %s CLUSTER MAPS\n", doit); fs->fs_contigsumsize = i; |