diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2011-03-02 06:48:18 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2011-03-02 06:48:18 +0000 |
commit | fcbab318f4d9fb0f0bbfdda6f18afbe4aeda3b4f (patch) | |
tree | e465dd4deb77e4839a01cb61aed669c3e6999df5 /usr.bin/systat/sensors.c | |
parent | 7b5fbdb4cf52025582912373b9c28622cba1f542 (diff) |
- use a common FIELD_ADDR macro, instead of rolling 78 identical copies.
ok canacar@
Diffstat (limited to 'usr.bin/systat/sensors.c')
-rw-r--r-- | usr.bin/systat/sensors.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/systat/sensors.c b/usr.bin/systat/sensors.c index 2472b8a708e..08ec4484a69 100644 --- a/usr.bin/systat/sensors.c +++ b/usr.bin/systat/sensors.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sensors.c,v 1.23 2010/04/21 19:40:59 deraadt Exp $ */ +/* $OpenBSD: sensors.c,v 1.24 2011/03/02 06:48:17 jasper Exp $ */ /* * Copyright (c) 2007 Deanna Phillips <deanna@openbsd.org> @@ -72,12 +72,10 @@ field_def fields_sn[] = { {"DESCRIPTION", 20, 45, 1, FLD_ALIGN_LEFT, -1, 0, 0, 0} }; -#define FIELD_ADDR(x) (&fields_sn[x]) - -#define FLD_SN_SENSOR FIELD_ADDR(0) -#define FLD_SN_VALUE FIELD_ADDR(1) -#define FLD_SN_STATUS FIELD_ADDR(2) -#define FLD_SN_DESCR FIELD_ADDR(3) +#define FLD_SN_SENSOR FIELD_ADDR(fields_sn,0) +#define FLD_SN_VALUE FIELD_ADDR(fields_sn,1) +#define FLD_SN_STATUS FIELD_ADDR(fields_sn,2) +#define FLD_SN_DESCR FIELD_ADDR(fields_sn,3) /* Define views */ field_def *view_sn_0[] = { |