summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2006-11-27 14:18:54 +0000
committeryar <yar@FreeBSD.org>2006-11-27 14:18:54 +0000
commit17ece0d412566384233aea89940a03ac8c5f8385 (patch)
treea3751b9c47477cee5355fd0ff2a1b575072454e5 /usr.bin
parentb4eda2e286f97498dabe1d00a44a3005c42a50b9 (diff)
downloadFreeBSD-src-17ece0d412566384233aea89940a03ac8c5f8385.zip
FreeBSD-src-17ece0d412566384233aea89940a03ac8c5f8385.tar.gz
Use C99 initializers so that we don't really have to worry
about the order of related things at several places.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/systat/convtbl.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/usr.bin/systat/convtbl.c b/usr.bin/systat/convtbl.c
index 01288f7..b5c035f 100644
--- a/usr.bin/systat/convtbl.c
+++ b/usr.bin/systat/convtbl.c
@@ -34,18 +34,17 @@
struct convtbl convtbl[] = {
/* mul, scale, str */
- { BYTE, BYTES, "bytes" }, /* SC_BYTE (0) */
- { BYTE, KILO, "KB" }, /* SC_KILOBYTE (1) */
- { BYTE, MEGA, "MB" }, /* SC_MEGABYTE (2) */
- { BYTE, GIGA, "GB" }, /* SC_GIGABYTE (3) */
+ [SC_BYTE] = { BYTE, BYTES, "bytes" },
+ [SC_KILOBYTE] = { BYTE, KILO, "KB" },
+ [SC_MEGABYTE] = { BYTE, MEGA, "MB" },
+ [SC_GIGABYTE] = { BYTE, GIGA, "GB" },
- { BIT, BITS, "b" }, /* SC_BITS (4) */
- { BIT, KILO, "Kb" }, /* SC_KILOBITS (5) */
- { BIT, MEGA, "Mb" }, /* SC_MEGABITS (6) */
- { BIT, GIGA, "Gb" }, /* SC_GIGABITS (7) */
-
- { 0, 0, "" } /* SC_AUTO (8) */
+ [SC_BIT] = { BIT, BITS, "b" },
+ [SC_KILOBIT] = { BIT, KILO, "Kb" },
+ [SC_MEGABIT] = { BIT, MEGA, "Mb" },
+ [SC_GIGABIT] = { BIT, GIGA, "Gb" },
+ [SC_AUTO] = { 0, 0, "" }
};
OpenPOWER on IntegriCloud