From cc9e29c67144b6dcb5b9de9d0ab0bd3590f2a676 Mon Sep 17 00:00:00 2001 From: Luis Angel Curiel Sanz Date: Fri, 19 Apr 2013 10:46:47 +0200 Subject: [PATCH] Fixed sock_read on Windows when returning cero Fixed coding style --- src/tls_schannel.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/tls_schannel.c b/src/tls_schannel.c index 0c49350..2b95ab2 100644 --- a/src/tls_schannel.c +++ b/src/tls_schannel.c @@ -455,11 +455,10 @@ int tls_read(tls_t *tls, void * const buff, const size_t len) bytes = sock_read(tls->sock, tls->recvbuffer + tls->recvbufferpos, tls->recvbuffermaxlen - tls->recvbufferpos); - if (bytes == 0) - { - tls->lasterror = WSAETIMEDOUT; - return -1; - } + if (bytes == 0) { + tls->lasterror = WSAETIMEDOUT; + return -1; + } if (bytes == -1) { if (!tls_is_recoverable(sock_error())) {