commit | 7015de7e6789a57136e32e7d6505ed235d592b80 | [log] [tgz] |
---|---|---|
author | Peter Vaskovic <petervas@users.noreply.github.com> | Thu May 15 02:54:37 2014 +0200 |
committer | Paul Bakker <p.j.bakker@polarssl.org> | Wed May 28 11:40:51 2014 +0200 |
tree | a4699999f99964e8873a0812059e4ba78fb5fb88 | |
parent | f7ced9232bd1832180f3a93fa2f0c7b9e9487951 [diff] [blame] |
Fix WSAStartup return value check. SOCKET_ERROR was not a valid return value. WSAStartup returns 0 on success, so check that instead.
diff --git a/library/net.c b/library/net.c index be30fbd..0866149 100644 --- a/library/net.c +++ b/library/net.c
@@ -146,7 +146,7 @@ if( wsa_init_done == 0 ) { - if( WSAStartup( MAKEWORD(2,0), &wsaData ) == SOCKET_ERROR ) + if( WSAStartup( MAKEWORD(2,0), &wsaData ) != 0 ) return( POLARSSL_ERR_NET_SOCKET_FAILED ); wsa_init_done = 1;