From a1feffce8034d0eda03d570e279b4f4e914f03b0 Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 22 Feb 2022 03:33:12 +0000 Subject: [PATCH] need a local nitems() definition --- usr.bin/systat/vmstat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.20.1