]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Revert "dhcp: Cast away a compile warning"
authorRoy Marples <roy@marples.name>
Sun, 16 Feb 2020 09:38:57 +0000 (09:38 +0000)
committerRoy Marples <roy@marples.name>
Sun, 16 Feb 2020 09:38:57 +0000 (09:38 +0000)
This reverts commit ccf3a5e9fe4ea8f63cfcdb27f96b02ec2cc8ff70.
This has been determined to be a gcc bug and will be worked
around another way in the build system.

src/dhcp.c

index 11a2c18e657e658b75e02499ddeb22cd401b0dee..4015c65f290634ea75ac97d6725f2f860f342721 100644 (file)
@@ -3370,7 +3370,7 @@ is_packet_udp_bootp(void *packet, size_t plen)
        memcpy(&udp, (char *)ip + ip_hlen, sizeof(udp));
        if (ntohs(udp.uh_ulen) < sizeof(udp))
                return false;
-       if (ip_hlen + (size_t)ntohs(udp.uh_ulen) > plen)
+       if (ip_hlen + ntohs(udp.uh_ulen) > plen)
                return false;
 
        /* Check it's to and from the right ports. */