From 493ba2dba6ffb61eaf9e8dfff5558d4821948f5c Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 28 Jul 2013 04:39:12 +0200 Subject: [PATCH] Simplify a few if conditions. --- src/connection.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/connection.c b/src/connection.c index 316339e..3f361a0 100644 --- a/src/connection.c +++ b/src/connection.c @@ -311,17 +311,17 @@ void handle_connection(int client_socket) { out: /* Close TLS sessions if necessary. Use GNUTLS_SHUT_RDWR so the data is * reliable transmitted. */ - if (server_session_started != 0) { + if (server_session_started) { gnutls_bye(server_session, GNUTLS_SHUT_RDWR); } - if (client_session_started != 0) { + if (client_session_started) { gnutls_bye(client_session, GNUTLS_SHUT_RDWR); } - if (server_session_init != 0) { + if (server_session_init) { gnutls_deinit(server_session); gnutls_certificate_free_credentials(server_x509_cred); } - if (client_session_init != 0) { + if (client_session_init) { gnutls_deinit(client_session); gnutls_certificate_free_cas(client_x509_cred); gnutls_certificate_free_keys(client_x509_cred); -- 2.45.2