diff options
author | Brian Behlendorf <[email protected]> | 2020-04-10 21:10:09 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-10 21:10:09 -0700 |
commit | 808084825492721571d617e6c670dcf307ddffcd (patch) | |
tree | 8bf1dd9f6b54ab5c91457dfe132322f82e48b444 /cmd/zstream | |
parent | c618f87cd2e96438468a391246d63ba1803f35c8 (diff) |
Minor `zstream redup` command fixes
* Fix uninitialized variable in `zstream redup` command. The
'rdt.ddt_count' variable is uninitialized because it was
allocated from the stack and not globally. Initialize it.
This was reported by gcc when compiling with debugging enabled.
zstream_redup.c:157:16: error: 'rdt.ddt_count' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
* Remove the cmd/zstreamdump/.gitignore file. It's no longer
needed now that the zstreamdump command is a script.
Reviewed-by: Matthew Ahrens <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #10192
Diffstat (limited to 'cmd/zstream')
-rw-r--r-- | cmd/zstream/zstream_redup.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/zstream/zstream_redup.c b/cmd/zstream/zstream_redup.c index 6720cfd12..9ed8df337 100644 --- a/cmd/zstream/zstream_redup.c +++ b/cmd/zstream/zstream_redup.c @@ -218,6 +218,7 @@ zfs_redup_stream(int infd, int outfd, boolean_t verbose) rdt.ddecache = umem_cache_create("rde", sizeof (redup_entry_t), 0, NULL, NULL, NULL, NULL, NULL, 0); rdt.numhashbits = highbit64(numbuckets) - 1; + rdt.ddt_count = 0; char *buf = safe_calloc(bufsz); FILE *ofp = fdopen(infd, "r"); |