diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/systat/main.c | 4 | ||||
-rw-r--r-- | usr.bin/systat/sensors.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c index 0b25ab1a10a..14d93b8334b 100644 --- a/usr.bin/systat/main.c +++ b/usr.bin/systat/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.52 2009/06/19 07:48:45 jasper Exp $ */ +/* $Id: main.c,v 1.53 2009/06/25 20:39:02 okan Exp $ */ /* * Copyright (c) 2001, 2007 Can Erkin Acar * Copyright (c) 2001 Daniel Hartmeier @@ -97,7 +97,7 @@ print_header(void) tb_start(); - getloadavg(avenrun, sizeof(avenrun) / sizeof(avenrun[0])); + getloadavg(avenrun, nitems(avenrun)); time(&now); strlcpy(tbuf, ctime(&now), sizeof tbuf); 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; } |