Bruno Jesus : ws2_32: Avoid magic numbers in shutdown() function.

Alexandre Julliard julliard at winehq.org
Mon May 12 15:35:48 CDT 2014


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

Author: Bruno Jesus <00cpxxx at gmail.com>
Date:   Mon May 12 01:21:54 2014 -0300

ws2_32: Avoid magic numbers in shutdown() function.

---

 dlls/ws2_32/socket.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 519ce85..5499753 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -5027,13 +5027,13 @@ int WINAPI WS_shutdown(SOCKET s, int how)
 
     switch( how )
     {
-    case 0: /* drop receives */
+    case SD_RECEIVE: /* drop receives */
         clear_flags |= FD_READ;
         break;
-    case 1: /* drop sends */
+    case SD_SEND: /* drop sends */
         clear_flags |= FD_WRITE;
         break;
-    case 2: /* drop all */
+    case SD_BOTH: /* drop all */
         clear_flags |= FD_READ|FD_WRITE;
         /*fall through */
     default:
@@ -7375,7 +7375,7 @@ INT WINAPI WSARecvDisconnect( SOCKET s, LPWSABUF disconnectdata )
 {
     TRACE( "(0x%04lx %p)\n", s, disconnectdata );
 
-    return WS_shutdown( s, 0 );
+    return WS_shutdown( s, SD_RECEIVE );
 }
 
 /***********************************************************************




More information about the wine-cvs mailing list