mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 21:28:36 +00:00
Added cast to socket() return value to prevent Windows warning
This commit is contained in:
parent
c73879139e
commit
00f5c52bfe
1 changed files with 4 additions and 2 deletions
|
@ -180,7 +180,8 @@ int net_connect( int *fd, const char *host, int port )
|
||||||
ret = POLARSSL_ERR_NET_UNKNOWN_HOST;
|
ret = POLARSSL_ERR_NET_UNKNOWN_HOST;
|
||||||
for( cur = addr_list; cur != NULL; cur = cur->ai_next )
|
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 )
|
if( *fd < 0 )
|
||||||
{
|
{
|
||||||
ret = POLARSSL_ERR_NET_SOCKET_FAILED;
|
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;
|
ret = POLARSSL_ERR_NET_UNKNOWN_HOST;
|
||||||
for( cur = addr_list; cur != NULL; cur = cur->ai_next )
|
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 )
|
if( *fd < 0 )
|
||||||
{
|
{
|
||||||
ret = POLARSSL_ERR_NET_SOCKET_FAILED;
|
ret = POLARSSL_ERR_NET_SOCKET_FAILED;
|
||||||
|
|
Loading…
Reference in a new issue