]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Cast away an alignment error.
authorRoy Marples <roy@marples.name>
Sat, 3 Aug 2019 07:48:29 +0000 (08:48 +0100)
committerRoy Marples <roy@marples.name>
Sat, 3 Aug 2019 07:48:29 +0000 (08:48 +0100)
src/dhcp.c

index 5965b9a97cc0f082c25b30b49ba9c3b1af51a037..d2cd3768d4f90401c2f2b7e8fcad451a51b08650 100644 (file)
@@ -3279,7 +3279,7 @@ valid_udp_packet(void *packet, size_t plen, struct in_addr *from,
 
        /* UDP checksum is based on a pseudo IP header alongside
         * the UDP header and payload. */
-       udp = (struct udphdr *)((char *)ip + ip_hlen);
+       udp = (struct udphdr *)(void *)((char *)ip + ip_hlen);
        if (udp->uh_sum == 0)
                return 0;