Fix WSAStartup return value check.
SOCKET_ERROR was not a valid return value. WSAStartup returns 0 on success, so check that instead.
This commit is contained in:
parent
f7ced9232b
commit
7015de7e67
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ static int net_prepare( void )
|
||||||
|
|
||||||
if( wsa_init_done == 0 )
|
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 );
|
return( POLARSSL_ERR_NET_SOCKET_FAILED );
|
||||||
|
|
||||||
wsa_init_done = 1;
|
wsa_init_done = 1;
|
||||||
|
|
Loading…
Reference in a new issue