mirror of
https://github.com/curl/curl.git
synced 2024-12-09 06:30:06 +08:00
hostip: silence compiler warning -Wparentheses-equality
Seen with LLVM 17.
```
hostip.c:1336:22: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
1336 | (a->ai_family == PF_INET)) {
| ~~~~~~~~~~~~~^~~~~~~~~~
hostip.c:1336:22: note: remove extraneous parentheses around the comparison to silence this warning
1336 | (a->ai_family == PF_INET)) {
| ~ ^ ~
hostip.c:1336:22: note: use '=' to turn this equality comparison into an assignment
1336 | (a->ai_family == PF_INET)) {
| ^~
| =
1 warning generated.
```
Follow-up to b651aba096
#12145
Reviewed-by: Daniel Stenberg
Closes #12215
This commit is contained in:
parent
277486b6b4
commit
d14e11d248
@ -1333,9 +1333,9 @@ static void show_resolve_info(struct Curl_easy *data,
|
|||||||
while(a) {
|
while(a) {
|
||||||
if(
|
if(
|
||||||
#ifdef CURLRES_IPV6
|
#ifdef CURLRES_IPV6
|
||||||
(a->ai_family == PF_INET6) ||
|
a->ai_family == PF_INET6 ||
|
||||||
#endif
|
#endif
|
||||||
(a->ai_family == PF_INET)) {
|
a->ai_family == PF_INET) {
|
||||||
char buf[MAX_IPADR_LEN];
|
char buf[MAX_IPADR_LEN];
|
||||||
struct dynbuf *d = &out[(a->ai_family != PF_INET)];
|
struct dynbuf *d = &out[(a->ai_family != PF_INET)];
|
||||||
Curl_printable_address(a, buf, sizeof(buf));
|
Curl_printable_address(a, buf, sizeof(buf));
|
||||||
|
Loading…
Reference in New Issue
Block a user