summaryrefslogtreecommitdiff
path: root/usr.bin/systat/sensors.c
diff options
context:
space:
mode:
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;
}