From: Pavel Filipenský Date: Thu, 2 Feb 2023 08:49:31 +0000 (+0100) Subject: s3:utils: Fix UNUSED_VALUE X-Git-Tag: tevent-0.14.1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65e9b409a6c27bbdf80307514523b3f37f20859d;p=thirdparty%2Fsamba.git s3:utils: Fix UNUSED_VALUE Reported by RedHat internal Covscan Since cb8a0d9 we no longer stop traversing the list if encryption_flag or signing_flags are unknown. Assignment "result = -1;" is always overwritten by "result = traverse_connections_*()" and is a dead code. Signed-off-by: Pavel Filipenský Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Thu Feb 2 15:46:52 UTC 2023 on atb-devel-224 --- diff --git a/source3/utils/status.c b/source3/utils/status.c index be2ce29f4c2..5359dda90cc 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -550,7 +550,6 @@ static int traverse_connections(const struct connections_data *crec, break; default: encryption = "???"; - result = -1; break; } encryption_degree = CRYPTO_DEGREE_FULL; @@ -572,7 +571,6 @@ static int traverse_connections(const struct connections_data *crec, break; default: signing = "???"; - result = -1; break; } signing_degree = CRYPTO_DEGREE_FULL;