From: deraadt Date: Tue, 22 Feb 2022 03:33:12 +0000 (+0000) Subject: need a local nitems() definition X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a1feffce8034d0eda03d570e279b4f4e914f03b0;p=openbsd need a local nitems() definition --- diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index ba8d1a5608f..e1f3fd25c37 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmstat.c,v 1.92 2022/02/20 00:09:29 deraadt Exp $ */ +/* $OpenBSD: vmstat.c,v 1.93 2022/02/22 03:33:12 deraadt Exp $ */ /* $NetBSD: vmstat.c,v 1.5 1996/05/10 23:16:40 thorpej Exp $ */ /*- @@ -59,6 +59,7 @@ #define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b)) #define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) +#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0])) static struct Info { struct cpustats cpustats;