Commit Diff


commit - a0faec76c1ca1d5e829f04d65b45b8c9d032383a
commit + 41499e1536a5972223b1e902fad04b7f5f451935
blob - 8fc7ec538398cea9a0d4e2a87d378caf25b7ab6f
blob + d339af083a825dd6016a0ddb1fcef2490bde9843
--- stats.c
+++ stats.c
@@ -778,7 +778,7 @@ mbpr(void)
 	struct mbtypes *mp;
 	size_t size;
 	int page_size = getpagesize();
-	int nmbtypes = sizeof(mbstat.m_mtypes) / sizeof(short);
+	int nmbtypes = nitems(mbstat.m_mtypes);
 
 	memset(&seen, 0, sizeof(seen));