summaryrefslogtreecommitdiff
path: root/usr.bin/systat/swap.c
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2011-03-02 06:48:18 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2011-03-02 06:48:18 +0000
commitfcbab318f4d9fb0f0bbfdda6f18afbe4aeda3b4f (patch)
treee465dd4deb77e4839a01cb61aed669c3e6999df5 /usr.bin/systat/swap.c
parent7b5fbdb4cf52025582912373b9c28622cba1f542 (diff)
- use a common FIELD_ADDR macro, instead of rolling 78 identical copies.
ok canacar@
Diffstat (limited to 'usr.bin/systat/swap.c')
-rw-r--r--usr.bin/systat/swap.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/systat/swap.c b/usr.bin/systat/swap.c
index 8d5de7f7e47..1cf44365b70 100644
--- a/usr.bin/systat/swap.c
+++ b/usr.bin/systat/swap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: swap.c,v 1.22 2008/12/07 02:56:06 canacar Exp $ */
+/* $OpenBSD: swap.c,v 1.23 2011/03/02 06:48:17 jasper Exp $ */
/* $NetBSD: swap.c,v 1.9 1998/12/26 07:05:08 marc Exp $ */
/*-
@@ -66,12 +66,10 @@ field_def fields_sw[] = {
{"", 40, 80, 1, FLD_ALIGN_BAR, -1, 0, 0, 100},
};
-#define FIELD_ADDR(x) (&fields_sw[x])
-
-#define FLD_SW_NAME FIELD_ADDR(0)
-#define FLD_SW_BLOCKS FIELD_ADDR(1)
-#define FLD_SW_USED FIELD_ADDR(2)
-#define FLD_SW_BAR FIELD_ADDR(3)
+#define FLD_SW_NAME FIELD_ADDR(fields_sw,0)
+#define FLD_SW_BLOCKS FIELD_ADDR(fields_sw,1)
+#define FLD_SW_USED FIELD_ADDR(fields_sw,2)
+#define FLD_SW_BAR FIELD_ADDR(fields_sw,3)
/* Define views */
field_def *view_sw_0[] = {