mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
connect: mark intentional ignores of setsockopt return values
Pointed out by Coverity Closes #6431
This commit is contained in:
parent
70af179118
commit
6cb803ecb1
@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@ -445,7 +445,7 @@ static CURLcode bindlocal(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef IP_BIND_ADDRESS_NO_PORT
|
#ifdef IP_BIND_ADDRESS_NO_PORT
|
||||||
setsockopt(sockfd, SOL_IP, IP_BIND_ADDRESS_NO_PORT, &on, sizeof(on));
|
(void)setsockopt(sockfd, SOL_IP, IP_BIND_ADDRESS_NO_PORT, &on, sizeof(on));
|
||||||
#endif
|
#endif
|
||||||
for(;;) {
|
for(;;) {
|
||||||
if(bind(sockfd, sock, sizeof_sa) >= 0) {
|
if(bind(sockfd, sock, sizeof_sa) >= 0) {
|
||||||
@ -1578,18 +1578,17 @@ CURLcode Curl_socket(struct connectdata *conn,
|
|||||||
if(addr->socktype == SOCK_DGRAM) {
|
if(addr->socktype == SOCK_DGRAM) {
|
||||||
int one = 1;
|
int one = 1;
|
||||||
switch(addr->family) {
|
switch(addr->family) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
setsockopt(*sockfd, SOL_IP, IP_RECVERR, &one, sizeof(one));
|
(void)setsockopt(*sockfd, SOL_IP, IP_RECVERR, &one, sizeof(one));
|
||||||
break;
|
break;
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
setsockopt(*sockfd, SOL_IPV6, IPV6_RECVERR, &one, sizeof(one));
|
(void)setsockopt(*sockfd, SOL_IPV6, IPV6_RECVERR, &one, sizeof(one));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user