[1/7] winhttp: Avoid testing errno when it isn't set.
Hans Leidekker
hans at codeweavers.com
Tue Sep 2 03:53:11 CDT 2008
With my old #N numbering scheme I would just continue numbering
dependent patches. The N/M scheme precludes this (and I don't
think patchwatcher can handle dependent sets?), so I'm resending
the complete patch set.
-Hans
diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c
index d367723..90950cb 100644
--- a/dlls/winhttp/net.c
+++ b/dlls/winhttp/net.c
@@ -524,9 +524,10 @@ BOOL netconn_get_next_line( netconn_t *conn, char *buffer, DWORD *buflen )
{
if (poll( &pfd, 1, DEFAULT_RECEIVE_TIMEOUT * 1000 ) > 0)
{
- if (recv( conn->socket, &buffer[recvd], 1, 0 ) <= 0)
+ int res;
+ if ((res = recv( conn->socket, &buffer[recvd], 1, 0 )) <= 0)
{
- set_last_error( sock_get_error( errno ) );
+ if (res == -1) set_last_error( sock_get_error( errno ) );
break;
}
if (buffer[recvd] == '\n')
More information about the wine-patches
mailing list