This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] Use MAKEWORD macro in WSAStartup call per documentation


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=8cd1ff7a4538a0a14debd2e6b383422a1a20b9a6

commit 8cd1ff7a4538a0a14debd2e6b383422a1a20b9a6
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Tue Jan 12 15:25:15 2016 +0100

    Use MAKEWORD macro in WSAStartup call per documentation
    
    	* autoload.cc (wsock_init): Use MAKEWORD macro to create requested
    	version rather than handcrafted expression.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/autoload.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
index 7158e95..08b2188 100644
--- a/winsup/cygwin/autoload.cc
+++ b/winsup/cygwin/autoload.cc
@@ -523,7 +523,7 @@ wsock_init ()
 		   GetProcAddress ((HMODULE) (dll->handle), "WSAStartup");
       if (wsastartup)
 	{
-	  int res = wsastartup ((2<<8) | 2, &wsadata);
+	  int res = wsastartup (MAKEWORD (2, 2), &wsadata);
 
 	  debug_printf ("res %d", res);
 	  debug_printf ("wVersion %d", wsadata.wVersion);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]