X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=src%2Fconnection.c;h=365eaab2e6de30c361f92d07c5130eaf9c4ff3cc;hb=0a20ac33156b4978352223e461c77194f75fe814;hp=e053df2ee23e187a9399acc39c4cc403149c01a8;hpb=d0b5d139253e5c599c9e675fc0a5677bda5a5a29;p=tlsproxy%2Ftlsproxy.git diff --git a/src/connection.c b/src/connection.c index e053df2..365eaab 100644 --- a/src/connection.c +++ b/src/connection.c @@ -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; }