aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/zdb/zdb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
index d626d0824..d19eb71f0 100644
--- a/cmd/zdb/zdb.c
+++ b/cmd/zdb/zdb.c
@@ -2858,9 +2858,11 @@ dump_bookmarks(objset_t *os, int verbosity)
zap_cursor_advance(&zc)) {
char osname[ZFS_MAX_DATASET_NAME_LEN];
char buf[ZFS_MAX_DATASET_NAME_LEN];
+ int len;
dmu_objset_name(os, osname);
- VERIFY3S(0, <=, snprintf(buf, sizeof (buf), "%s#%s", osname,
- attr.za_name));
+ len = snprintf(buf, sizeof (buf), "%s#%s", osname,
+ attr.za_name);
+ VERIFY3S(len, <, ZFS_MAX_DATASET_NAME_LEN);
(void) dump_bookmark(dp, buf, verbosity >= 5, verbosity >= 6);
}
zap_cursor_fini(&zc);