From dfb7916b1a577df33ce4c9ee3aee8a6abb67dd35 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 16 Feb 2020 09:38:57 +0000 Subject: [PATCH] Revert "dhcp: Cast away a compile warning" 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dhcp.c b/src/dhcp.c index 11a2c18e..4015c65f 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -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. */ -- 2.47.3