ws2_32: Avoid magic numbers in shutdown() function
Bruno Jesus
00cpxxx at gmail.com
Sun May 11 23:21:54 CDT 2014
-------------- next part --------------
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-patches
mailing list