diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index ae8d00f154..af34bd9ad5 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -2001,13 +2001,13 @@ dump_object(objset_t *os, uint64_t object, int verbosity, int *print_header, aux[0] = '\0'; if (doi.doi_checksum != ZIO_CHECKSUM_INHERIT || verbosity >= 6) { - (void) snprintf(aux + strlen(aux), sizeof (aux), " (K=%s)", - ZDB_CHECKSUM_NAME(doi.doi_checksum)); + (void) snprintf(aux + strlen(aux), sizeof (aux) - strlen(aux), + " (K=%s)", ZDB_CHECKSUM_NAME(doi.doi_checksum)); } if (doi.doi_compress != ZIO_COMPRESS_INHERIT || verbosity >= 6) { - (void) snprintf(aux + strlen(aux), sizeof (aux), " (Z=%s)", - ZDB_COMPRESS_NAME(doi.doi_compress)); + (void) snprintf(aux + strlen(aux), sizeof (aux) - strlen(aux), + " (Z=%s)", ZDB_COMPRESS_NAME(doi.doi_compress)); } (void) printf("%10lld %3u %5s %5s %5s %6s %5s %6s %s%s\n", diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index b9b53f22b5..26096e1152 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -785,8 +785,7 @@ zfs_do_clone(int argc, char **argv) return (!!ret); usage: - if (zhp) - zfs_close(zhp); + ASSERT3P(zhp, ==, NULL); nvlist_free(props); usage(B_FALSE); return (-1);