summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2021-08-27 11:28:23 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2021-08-27 11:28:23 +0000
commiteb99775ff224e71a0d87a679acf884038408dd12 (patch)
tree6c8331cb4e34443d35d4c397d91790847bff61ce /sbin
parent168d21dfa2a6dc87501f9bb400ae3314509e8d20 (diff)
Replace stray hand-rolled nitems() with nitems().
Diffstat (limited to 'sbin')
-rw-r--r--sbin/fdisk/part.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/fdisk/part.c b/sbin/fdisk/part.c
index e2c09945296..f3836000ae0 100644
--- a/sbin/fdisk/part.c
+++ b/sbin/fdisk/part.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: part.c,v 1.103 2021/08/12 12:31:16 krw Exp $ */
+/* $OpenBSD: part.c,v 1.104 2021/08/27 11:28:22 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -191,7 +191,7 @@ PRT_printall(void)
part_types[i].pt_type, part_types[i].pt_sname,
part_types[i+idrows].pt_type, part_types[i+idrows].pt_sname,
part_types[i+idrows*2].pt_type, part_types[i+idrows*2].pt_sname);
- if ((i+idrows*3) < (sizeof(part_types)/sizeof(struct part_type))) {
+ if ((i+idrows*3) < nitems(part_types)) {
printf(" %02X %s\n",
part_types[i+idrows*3].pt_type,
part_types[i+idrows*3].pt_sname);