mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 16:18:48 -05:00
Fix compiler warning
This commit is contained in:
parent
62c264bcdb
commit
38dd0ede9d
@ -815,13 +815,13 @@ static int configure_socket(int s, ares_channel channel)
|
|||||||
/* Set the socket's send and receive buffer sizes. */
|
/* Set the socket's send and receive buffer sizes. */
|
||||||
if ((channel->socket_send_buffer_size > 0) &&
|
if ((channel->socket_send_buffer_size > 0) &&
|
||||||
setsockopt(s, SOL_SOCKET, SO_SNDBUF,
|
setsockopt(s, SOL_SOCKET, SO_SNDBUF,
|
||||||
(const void*)&channel->socket_send_buffer_size,
|
(void *)&channel->socket_send_buffer_size,
|
||||||
sizeof(channel->socket_send_buffer_size)) == -1)
|
sizeof(channel->socket_send_buffer_size)) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if ((channel->socket_receive_buffer_size > 0) &&
|
if ((channel->socket_receive_buffer_size > 0) &&
|
||||||
setsockopt(s, SOL_SOCKET, SO_RCVBUF,
|
setsockopt(s, SOL_SOCKET, SO_RCVBUF,
|
||||||
(const void*)&channel->socket_receive_buffer_size,
|
(void *)&channel->socket_receive_buffer_size,
|
||||||
sizeof(channel->socket_receive_buffer_size)) == -1)
|
sizeof(channel->socket_receive_buffer_size)) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -854,7 +854,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
|||||||
*/
|
*/
|
||||||
opt = 1;
|
opt = 1;
|
||||||
if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY,
|
if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY,
|
||||||
(const void*)&opt, sizeof(opt)) == -1)
|
(void *)&opt, sizeof(opt)) == -1)
|
||||||
{
|
{
|
||||||
close(s);
|
close(s);
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user