]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
dhcp: Cast away a compile warning
authorfox <fox@netbsd.org>
Fri, 7 Feb 2020 14:13:59 +0000 (14:13 +0000)
committerRoy Marples <roy@marples.name>
Fri, 7 Feb 2020 14:14:39 +0000 (14:14 +0000)
src/dhcp.c

index f4a0c63ebec3d140f238d0e7199819890feee793..2fdfd8379fd9ba646d411b7f33534a861c4f2e1f 100644 (file)
@@ -3369,7 +3369,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 + ntohs(udp.uh_ulen) > plen)
+       if (ip_hlen + (size_t)ntohs(udp.uh_ulen) > plen)
                return false;
 
        /* Check it's to and from the right ports. */