diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-25 20:45:44 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-25 20:45:44 +0000 |
commit | 429f9268a4fee3d872a0b78ec118e0bb0843d87a (patch) | |
tree | 13f451b683e200c1690eb907b65503afd20dbd66 /usr.bin/systat/sensors.c | |
parent | c9e88c5e7ee535e86b97a3bdab695c6ad74b796e (diff) |
the rule is not to use nitems() in userland yet
Diffstat (limited to 'usr.bin/systat/sensors.c')
-rw-r--r-- | usr.bin/systat/sensors.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/systat/sensors.c b/usr.bin/systat/sensors.c index 4469f58ca65..33d02608f89 100644 --- a/usr.bin/systat/sensors.c +++ b/usr.bin/systat/sensors.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sensors.c,v 1.16 2009/06/25 20:40:33 okan Exp $ */ +/* $OpenBSD: sensors.c,v 1.17 2009/06/25 20:45:43 deraadt 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 < nitems(drvstat)) { + s->sn_value < sizeof(drvstat)/sizeof(drvstat[0])) { tbprintf("%15s", drvstat[s->sn_value]); break; } |