From: fox Date: Fri, 7 Feb 2020 14:13:59 +0000 (+0000) Subject: dhcp: Cast away a compile warning X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccf3a5e9fe4ea8f63cfcdb27f96b02ec2cc8ff70;p=thirdparty%2Fdhcpcd.git dhcp: Cast away a compile warning --- diff --git a/src/dhcp.c b/src/dhcp.c index f4a0c63e..2fdfd837 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -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. */