summaryrefslogtreecommitdiffstats
path: root/sbin/dumpfs/dumpfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/dumpfs/dumpfs.c')
-rw-r--r--sbin/dumpfs/dumpfs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c
index 7633b89fc23..f7cdb38768e 100644
--- a/sbin/dumpfs/dumpfs.c
+++ b/sbin/dumpfs/dumpfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dumpfs.c,v 1.30 2014/05/13 12:51:40 krw Exp $ */
+/* $OpenBSD: dumpfs.c,v 1.31 2015/01/16 06:39:57 deraadt Exp $ */
/*
* Copyright (c) 2002 Networks Associates Technology, Inc.
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/param.h> /* DEV_BSIZE MAXFRAG MAXBSIZE isset */
#include <sys/time.h>
#include <ufs/ufs/dinode.h>
@@ -54,6 +54,8 @@
#include <unistd.h>
#include <util.h>
+#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
+
union {
struct fs fs;
char pad[MAXBSIZE];
@@ -184,7 +186,7 @@ dumpfs(int fd, const char *name)
max = afs.fs_maxcontig;
size = afs.fs_contigsumsize;
if ((max < 2 && size == 0) ||
- (max > 1 && size >= MIN(max, FS_MAXCONTIG)))
+ (max > 1 && size >= MINIMUM(max, FS_MAXCONTIG)))
i++;
}
}