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);