mirror of
https://github.com/curl/curl.git
synced 2026-08-25 12:33:35 +03:00
compiler warning fix
This commit is contained in:
parent
1c63ceb317
commit
d2dd3d7e16
5 changed files with 11 additions and 9 deletions
|
|
@ -609,7 +609,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
|||
memset(&sockin, 0, sizeof(sockin));
|
||||
sockin.sin_family = AF_INET;
|
||||
sockin.sin_addr = server->addr;
|
||||
sockin.sin_port = channel->tcp_port;
|
||||
sockin.sin_port = (unsigned short)(channel->tcp_port & 0xffff);
|
||||
if (connect(s, (struct sockaddr *) &sockin, sizeof(sockin)) == -1) {
|
||||
int err = GET_ERRNO();
|
||||
|
||||
|
|
@ -642,7 +642,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server)
|
|||
memset(&sockin, 0, sizeof(sockin));
|
||||
sockin.sin_family = AF_INET;
|
||||
sockin.sin_addr = server->addr;
|
||||
sockin.sin_port = channel->udp_port;
|
||||
sockin.sin_port = (unsigned short)(channel->udp_port & 0xffff);
|
||||
if (connect(s, (struct sockaddr *) &sockin, sizeof(sockin)) == -1)
|
||||
{
|
||||
closesocket(s);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue