]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/blobdiff - src/connection.c
Minor code cleanup.
[tlsproxy/tlsproxy.git] / src / connection.c
index e053df2ee23e187a9399acc39c4cc403149c01a8..365eaab2e6de30c361f92d07c5130eaf9c4ff3cc 100644 (file)
@@ -625,9 +625,8 @@ static int read_from_write_to(int from, int to) {
     if (size_read < 0) {
         LOG_PERROR(LOG_WARNING, "read_from_write_to(): read()");
         return -1;
-    }
     /* EOF */
-    if (size_read == 0) {
+    } else if (size_read == 0) {
         return -1;
     }
 
@@ -722,9 +721,8 @@ static int read_from_write_to_tls(gnutls_session_t from,
         LOG(LOG_WARNING, "read_from_write_to_tls(): gnutls_record_recv(): %s",
                          gnutls_strerror((int)size_read));
         return -1;
-    }
     /* EOF */
-    if (size_read == 0) {
+    } else if (size_read == 0) {
         return -1;
     }