aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zstream/zstream_dump.c
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2022-09-29 13:16:37 -0400
committerGitHub <[email protected]>2022-09-29 10:16:37 -0700
commitdee8934e8fcd002eb826cf29aa453632d634b826 (patch)
tree0b378566d333760cb9d2c11c589bc891f8013399 /cmd/zstream/zstream_dump.c
parent4acc36ed7c5c1e1a8ab005de9f89880dd31ba112 (diff)
Fix unreachable code in zstreamdump
82226e4f44baa3f7c3101caaaf941927aa318e46 was intended to prevent a warning from being printed in situations where it was inappropriate, but accidentally disabled it entirely by setting featureflags in the wrong case statement. Coverity reported this as dead code. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes #13946
Diffstat (limited to 'cmd/zstream/zstream_dump.c')
-rw-r--r--cmd/zstream/zstream_dump.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/zstream/zstream_dump.c b/cmd/zstream/zstream_dump.c
index 0e3954678..4b562c237 100644
--- a/cmd/zstream/zstream_dump.c
+++ b/cmd/zstream/zstream_dump.c
@@ -363,9 +363,6 @@ zstream_do_dump(int argc, char *argv[])
BSWAP_64(drrb->drr_fromguid);
}
- featureflags =
- DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo);
-
(void) printf("BEGIN record\n");
(void) printf("\thdrtype = %lld\n",
DMU_GET_STREAM_HDRTYPE(drrb->drr_versioninfo));
@@ -465,6 +462,9 @@ zstream_do_dump(int argc, char *argv[])
BSWAP_64(drro->drr_maxblkid);
}
+ featureflags =
+ DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo);
+
if (featureflags & DMU_BACKUP_FEATURE_RAW &&
drro->drr_bonuslen > drro->drr_raw_bonuslen) {
(void) fprintf(stderr,