aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsdb
diff options
context:
space:
mode:
authorMarcelo Araujo <araujo@FreeBSD.org>2016-07-30 06:19:34 +0000
committerMarcelo Araujo <araujo@FreeBSD.org>2016-07-30 06:19:34 +0000
commit02c8c1182bb82e98da00fae3539aef0b9ca952fb (patch)
tree5a08faa208967b37424ccfc8096b69a44bd178d3 /sbin/fsdb
parent131cac80e193d8a8aef49eb910f24080857c2fca (diff)
downloadsrc-02c8c1182bb82e98da00fae3539aef0b9ca952fb.tar.gz
src-02c8c1182bb82e98da00fae3539aef0b9ca952fb.zip
Use nitems() from sys/param.h.
Sponsored by: gandi.net (BSD Day Taiwan)
Notes
Notes: svn path=/head/; revision=303539
Diffstat (limited to 'sbin/fsdb')
-rw-r--r--sbin/fsdb/fsdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c
index 1315aeca0acb..b35a06775452 100644
--- a/sbin/fsdb/fsdb.c
+++ b/sbin/fsdb/fsdb.c
@@ -898,7 +898,7 @@ CMDFUNCSTART(newtype)
return 1;
type = DIP(curinode, di_mode) & IFMT;
for (tp = typenamemap;
- tp < &typenamemap[sizeof(typenamemap)/sizeof(*typenamemap)];
+ tp < &typenamemap[nitems(typenamemap)];
tp++) {
if (!strcmp(argv[1], tp->typename)) {
printf("setting type to %s\n", tp->typename);
@@ -906,7 +906,7 @@ CMDFUNCSTART(newtype)
break;
}
}
- if (tp == &typenamemap[sizeof(typenamemap)/sizeof(*typenamemap)]) {
+ if (tp == &typenamemap[nitems(typenamemap)]) {
warnx("type `%s' not known", argv[1]);
warnx("try one of `file', `dir', `socket', `fifo'");
return 1;