]> 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:13:59 +0000 (14:13 +0000)
src/dhcp.c

index d111d99a923d31d906c03d073347ff5e45e3ec43..dd59945f1422c38645032217dd67b523887a6e27 100644 (file)
@@ -3307,7 +3307,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. */