mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 11:45:42 +01:00
Added cast to socket() return value to prevent Windows warning
This commit is contained in:
parent
c73879139e
commit
00f5c52bfe
@ -180,7 +180,8 @@ int net_connect( int *fd, const char *host, int port )
|
||||
ret = POLARSSL_ERR_NET_UNKNOWN_HOST;
|
||||
for( cur = addr_list; cur != NULL; cur = cur->ai_next )
|
||||
{
|
||||
*fd = socket( cur->ai_family, cur->ai_socktype, cur->ai_protocol );
|
||||
*fd = (int) socket( cur->ai_family, cur->ai_socktype,
|
||||
cur->ai_protocol );
|
||||
if( *fd < 0 )
|
||||
{
|
||||
ret = POLARSSL_ERR_NET_SOCKET_FAILED;
|
||||
@ -267,7 +268,8 @@ int net_bind( int *fd, const char *bind_ip, int port )
|
||||
ret = POLARSSL_ERR_NET_UNKNOWN_HOST;
|
||||
for( cur = addr_list; cur != NULL; cur = cur->ai_next )
|
||||
{
|
||||
*fd = socket( cur->ai_family, cur->ai_socktype, cur->ai_protocol );
|
||||
*fd = (int) socket( cur->ai_family, cur->ai_socktype,
|
||||
cur->ai_protocol );
|
||||
if( *fd < 0 )
|
||||
{
|
||||
ret = POLARSSL_ERR_NET_SOCKET_FAILED;
|
||||
|
Loading…
Reference in New Issue
Block a user