]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/commitdiff
Simplify a few if conditions.
authorSimon Ruderich <simon@ruderich.org>
Sun, 28 Jul 2013 02:39:12 +0000 (04:39 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sun, 28 Jul 2013 02:39:12 +0000 (04:39 +0200)
src/connection.c

index 316339eb8cbbb6ce522b59bc570571bfe405438b..3f361a03effdd8cbd54a5bbe17d068b98f714ac2 100644 (file)
@@ -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);