summaryrefslogtreecommitdiff
path: root/usr.bin/systat/sensors.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2009-06-25 20:39:03 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2009-06-25 20:39:03 +0000
commitf52d042016ceaf049a55894ed50c44b84b16e308 (patch)
tree74762d9817bc7641e729aaaff81cc0f86fcb4cad /usr.bin/systat/sensors.c
parent520215f062a3454a24d3ba2cb4f7d3df39affff7 (diff)
use the nitems() macro where appropriate
ok canacar@
Diffstat (limited to 'usr.bin/systat/sensors.c')
-rw-r--r--usr.bin/systat/sensors.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/systat/sensors.c b/usr.bin/systat/sensors.c
index d12c0dbd644..8280fe68976 100644
--- a/usr.bin/systat/sensors.c
+++ b/usr.bin/systat/sensors.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sensors.c,v 1.14 2008/12/07 02:56:06 canacar Exp $ */
+/* $OpenBSD: sensors.c,v 1.15 2009/06/25 20:39:02 okan Exp $ */
/*
* Copyright (c) 2007 Deanna Phillips <deanna@openbsd.org>
@@ -244,7 +244,7 @@ showsensor(struct sensinfo *s)
break;
case SENSOR_DRIVE:
if (0 < s->sn_value &&
- s->sn_value < sizeof(drvstat)/sizeof(drvstat[0])) {
+ s->sn_value < nitems(drvstat)) {
tbprintf("%15s", drvstat[s->sn_value]);
break;
}