summaryrefslogtreecommitdiff
path: root/logsrvd/logsrvd.c
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@sudo.ws>2021-06-19 12:56:31 -0600
committerTodd C. Miller <Todd.Miller@sudo.ws>2021-06-19 12:56:31 -0600
commit5f6f49de7f7d9d92e8c073992b2fe7c005834ff2 (patch)
treea7b059656673330b1fa465f10a4086b36bb593b8 /logsrvd/logsrvd.c
parent7c2a80f1e87a4e5adb3c4b2b0d2a932bafb297e7 (diff)
downloadsudo-5f6f49de7f7d9d92e8c073992b2fe7c005834ff2.tar.gz
Fix dead store found by clang analyzer.
Diffstat (limited to 'logsrvd/logsrvd.c')
-rw-r--r--logsrvd/logsrvd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/logsrvd/logsrvd.c b/logsrvd/logsrvd.c
index 5b8c556a4..9115e8480 100644
--- a/logsrvd/logsrvd.c
+++ b/logsrvd/logsrvd.c
@@ -1269,6 +1269,7 @@ tls_handshake_cb(int fd, int what, void *v)
{
struct connection_closure *closure = v;
const char *errstr;
+ int err, handshake_status;
debug_decl(tls_handshake_cb, SUDO_DEBUG_UTIL);
if (what == SUDO_EV_TIMEOUT) {
@@ -1276,9 +1277,9 @@ tls_handshake_cb(int fd, int what, void *v)
goto bad;
}
- int handshake_status = SSL_accept(closure->ssl);
- int err = SSL_ERROR_NONE;
- switch (err = SSL_get_error(closure->ssl, handshake_status)) {
+ handshake_status = SSL_accept(closure->ssl);
+ err = SSL_get_error(closure->ssl, handshake_status);
+ switch (err) {
case SSL_ERROR_NONE:
/* ssl handshake was successful */
sudo_debug_printf(SUDO_DEBUG_INFO|SUDO_DEBUG_LINENO,