aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsdb/fsdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/fsdb/fsdb.c')
-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;