From cba19b90277b8faa6e83872411ad48df5dce4f06 Mon Sep 17 00:00:00 2001 From: Bruno Jesus <00cpxxx@gmail.com> Date: Sat, 21 Sep 2013 15:44:57 -0300 Subject: [PATCH] ws2_32: Add missing else to getsockopt(SO_ACCEPTCONN). --- dlls/ws2_32/socket.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 45166de809c..fac090d6edb 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2967,10 +2967,11 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, SetLastError((errno == EBADF) ? WSAENOTSOCK : wsaErrno()); ret = SOCKET_ERROR; } - - /* BSD returns != 0 while Windows return exact == 1 */ - if (*(int *)optval) *(int *)optval = 1; - + else + { + /* BSD returns != 0 while Windows return exact == 1 */ + if (*(int *)optval) *(int *)optval = 1; + } release_sock_fd( s, fd ); return ret; case WS_SO_DONTLINGER: -- 2.11.4.GIT