]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix unitialized variable in `zstream redup` command
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 23 Apr 2020 22:54:38 +0000 (15:54 -0700)
committerGitHub <noreply@github.com>
Thu, 23 Apr 2020 22:54:38 +0000 (15:54 -0700)
commit6de3e59bdd70fc9db5d3ef2549a49264845c937e
tree4f609129b329e243dad60ab5e19eb9b31c942833
parent5d4ed9614fad523fafd6e8a7705847b624a005fe
Fix unitialized variable in `zstream redup` command

Fix uninitialized variable in `zstream redup` command.  The compiler
may determine the 'stream_offset' variable can be uninitialized
because not all rdt_lookup() exit paths set it.  This should never
happen in practice as documented by the assert, but initialize it
regardless to resolve the warning.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10241
Closes #10244
cmd/zstream/zstream_redup.c