Bruno Jesus : ws2_32: Add missing else to getsockopt(SO_ACCEPTCONN).

Alexandre Julliard julliard at winehq.org
Tue Sep 24 03:21:59 CDT 2013


Module: wine
Branch: master
Commit: cba19b90277b8faa6e83872411ad48df5dce4f06
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=cba19b90277b8faa6e83872411ad48df5dce4f06

Author: Bruno Jesus <00cpxxx at gmail.com>
Date:   Sat Sep 21 15:44:57 2013 -0300

ws2_32: Add missing else to getsockopt(SO_ACCEPTCONN).

---

 dlls/ws2_32/socket.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 45166de..fac090d 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:




More information about the wine-cvs mailing list