s3:utils: Fix UNUSED_VALUE
authorPavel Filipenský <pfilipensky@samba.org>
Thu, 2 Feb 2023 08:49:31 +0000 (09:49 +0100)
committerRalph Boehme <slow@samba.org>
Thu, 2 Feb 2023 15:46:52 +0000 (15:46 +0000)
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ý <pfilipensky@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Feb  2 15:46:52 UTC 2023 on atb-devel-224

source3/utils/status.c

index be2ce29f4c2995bef824dec4e72f3c0bd58e5658..5359dda90cc0e4f93f798093a12e702149b4e549 100644 (file)
@@ -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;