aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/newfs_msdos
diff options
context:
space:
mode:
authorMarcelo Araujo <araujo@FreeBSD.org>2016-04-19 04:57:57 +0000
committerMarcelo Araujo <araujo@FreeBSD.org>2016-04-19 04:57:57 +0000
commit564500def988c2497b9e10cf7a4d51b9d1160212 (patch)
treeeabf47091587a3849b70ecba40939b6a1eba464c /sbin/newfs_msdos
parent8ee0576c6b9c672dc2f6bef218392e22326467de (diff)
downloadsrc-564500def988c2497b9e10cf7a4d51b9d1160212.tar.gz
src-564500def988c2497b9e10cf7a4d51b9d1160212.zip
Use nitems() from sys/param.h.
MFC after: 2 weeks.
Notes
Notes: svn path=/head/; revision=298250
Diffstat (limited to 'sbin/newfs_msdos')
-rw-r--r--sbin/newfs_msdos/mkfs_msdos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/newfs_msdos/mkfs_msdos.c b/sbin/newfs_msdos/mkfs_msdos.c
index 0f72a85dc7bb..90d7df855a25 100644
--- a/sbin/newfs_msdos/mkfs_msdos.c
+++ b/sbin/newfs_msdos/mkfs_msdos.c
@@ -760,7 +760,7 @@ getstdfmt(const char *fmt, struct bpb *bpb)
{
u_int x, i;
- x = sizeof(stdfmt) / sizeof(stdfmt[0]);
+ x = nitems(stdfmt);
for (i = 0; i < x && strcmp(fmt, stdfmt[i].name); i++);
if (i == x) {
warnx("%s: unknown standard format", fmt);