Alexandre Julliard : server: Avoid some compiler warnings when EWOULDBLOCK == EAGAIN.
Alexandre Julliard
julliard at winehq.org
Mon Dec 19 13:10:37 CST 2016
Module: wine
Branch: stable
Commit: 0befffb5d9e884d9793d9cb671941aff14415d97
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0befffb5d9e884d9793d9cb671941aff14415d97
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Aug 30 19:08:23 2016 +0900
server: Avoid some compiler warnings when EWOULDBLOCK == EAGAIN.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 438dae524d9410f571f7fe5cc335fb74fec8d2bb)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
server/request.c | 6 +++---
server/sock.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/server/request.c b/server/request.c
index f78026a..e7eb89f 100644
--- a/server/request.c
+++ b/server/request.c
@@ -184,7 +184,7 @@ void write_reply( struct thread *thread )
}
if (errno == EPIPE)
kill_thread( thread, 0 ); /* normal death */
- else if (errno != EWOULDBLOCK && errno != EAGAIN)
+ else if (errno != EWOULDBLOCK && (EWOULDBLOCK == EAGAIN || errno != EAGAIN))
fatal_protocol_error( thread, "reply write: %s\n", strerror( errno ));
}
@@ -311,7 +311,7 @@ error:
kill_thread( thread, 0 );
else if (ret > 0)
fatal_protocol_error( thread, "partial read %d\n", ret );
- else if (errno != EWOULDBLOCK && errno != EAGAIN)
+ else if (errno != EWOULDBLOCK && (EWOULDBLOCK == EAGAIN || errno != EAGAIN))
fatal_protocol_error( thread, "read: %s\n", strerror( errno ));
}
@@ -392,7 +392,7 @@ int receive_fd( struct process *process )
}
else
{
- if (errno != EWOULDBLOCK && errno != EAGAIN)
+ if (errno != EWOULDBLOCK && (EWOULDBLOCK == EAGAIN || errno != EAGAIN))
{
fprintf( stderr, "Protocol error: process %04x: ", process->id );
perror( "recvmsg" );
diff --git a/server/sock.c b/server/sock.c
index 1767dea..a35a115 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -1071,8 +1071,8 @@ static void ifchange_poll_event( struct fd *fd, int event )
r = recv( get_unix_fd(fd), buffer, sizeof(buffer), MSG_DONTWAIT );
if (r < 0)
{
- if (errno == EWOULDBLOCK || errno == EAGAIN)
- return; /* retry when poll() says the socket is ready */
+ if (errno == EWOULDBLOCK || (EWOULDBLOCK != EAGAIN && errno == EAGAIN))
+ return; /* retry when poll() says the socket is ready */
status = sock_get_ntstatus( errno );
}
else if (r > 0)
More information about the wine-cvs
mailing list