1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

doh: remove redundant cast

Closes https://github.com/curl/curl/pull/5704
This commit is contained in:
Marcel Raad 2020-07-19 15:02:16 +02:00
parent ff8b6ce05f
commit d746ff1107
No known key found for this signature in database
GPG Key ID: 9D24FF0262C36959

View File

@ -858,7 +858,7 @@ doh2ai(const struct dohentry *de, const char *hostname, int port)
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;
@ -867,7 +867,7 @@ doh2ai(const struct dohentry *de, const char *hostname, int port)
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