From: Simon Ruderich Date: Sun, 28 Jul 2013 02:39:12 +0000 (+0200) Subject: Simplify a few if conditions. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=493ba2dba6ffb61eaf9e8dfff5558d4821948f5c;p=tlsproxy%2Ftlsproxy.git Simplify a few if conditions. --- 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);