mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
clang-tidy: drop redundant casts
Found via `readability-redundant-casting`. Prone to false positives, not enabled. Ref: https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-casting.html Closes #20630
This commit is contained in:
parent
c07c3cac74
commit
8712fac111
29 changed files with 39 additions and 41 deletions
|
|
@ -980,7 +980,7 @@ static CURLcode doh2ai(const struct dohentry *de, const char *hostname,
|
|||
addr = (void *)ai->ai_addr; /* storage area for this info */
|
||||
DEBUGASSERT(sizeof(struct in_addr) == sizeof(de->addr[i].ip.v4));
|
||||
memcpy(&addr->sin_addr, &de->addr[i].ip.v4, sizeof(struct in_addr));
|
||||
addr->sin_family = (CURL_SA_FAMILY_T)addrtype;
|
||||
addr->sin_family = addrtype;
|
||||
addr->sin_port = htons((unsigned short)port);
|
||||
break;
|
||||
|
||||
|
|
@ -989,7 +989,7 @@ static CURLcode doh2ai(const struct dohentry *de, const char *hostname,
|
|||
addr6 = (void *)ai->ai_addr; /* storage area for this info */
|
||||
DEBUGASSERT(sizeof(struct in6_addr) == sizeof(de->addr[i].ip.v6));
|
||||
memcpy(&addr6->sin6_addr, &de->addr[i].ip.v6, sizeof(struct in6_addr));
|
||||
addr6->sin6_family = (CURL_SA_FAMILY_T)addrtype;
|
||||
addr6->sin6_family = addrtype;
|
||||
addr6->sin6_port = htons((unsigned short)port);
|
||||
break;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue