Mercurial > hg > dhcpcd
changeset 5053:aaf555707cb8 draft
dhcp: Cast away a compile warning
| author | fox <fox@netbsd.org> |
|---|---|
| date | Fri, 07 Feb 2020 14:13:59 +0000 |
| parents | f8f1977aa728 |
| children | 5dd878123b5c |
| files | src/dhcp.c |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dhcp.c Fri Feb 07 13:21:14 2020 +0000 +++ b/src/dhcp.c Fri Feb 07 14:13:59 2020 +0000 @@ -3307,7 +3307,7 @@ 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. */
