fix dereferencing type-punned pointer warning

This commit is contained in:
dartvader316 2024-08-07 15:52:56 +03:00
parent ff4f811692
commit 64639d6661

View File

@ -58,7 +58,8 @@ void map_fix(struct sockaddr_ina *addr, char f6)
else if (!ipv6m->o64 && !ipv6m->o16 &&
ipv6m->t16 == 0xffff && !f6) {
addr->sa.sa_family = AF_INET;
addr->in.sin_addr = *(struct in_addr *)(&ipv6m->o32);
const struct in_addr *sin_addr_ptr = (struct in_addr *) &ipv6m->o32;
addr->in.sin_addr = *sin_addr_ptr;
}
}