From f7b62e063d2a818fa7d5bb50447ea2eb7a179a0e Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 7 Oct 2024 11:23:39 +0200 Subject: [PATCH] Remove unreachable assignments This is harmless, but we might as well remove the unreachable line. If we ever add a break to the loop and we don't think of changing the surrounding code, it would make more sense not to set exit_code to SUCCESS. Signed-off-by: Gilles Peskine --- programs/ssl/ssl_fork_server.c | 2 -- programs/test/udp_proxy.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/programs/ssl/ssl_fork_server.c b/programs/ssl/ssl_fork_server.c index 0edadd4b74..9cee43f081 100644 --- a/programs/ssl/ssl_fork_server.c +++ b/programs/ssl/ssl_fork_server.c @@ -359,8 +359,6 @@ int main(void) goto exit; } - exit_code = MBEDTLS_EXIT_SUCCESS; - exit: mbedtls_net_free(&client_fd); mbedtls_net_free(&listen_fd); diff --git a/programs/test/udp_proxy.c b/programs/test/udp_proxy.c index 7213f8aea0..43d2e8cf73 100644 --- a/programs/test/udp_proxy.c +++ b/programs/test/udp_proxy.c @@ -938,8 +938,6 @@ accept: } - exit_code = MBEDTLS_EXIT_SUCCESS; - exit: #ifdef MBEDTLS_ERROR_C