]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
cast is not needed
authorRoy Marples <roy@marples.name>
Sun, 19 Apr 2020 09:41:11 +0000 (10:41 +0100)
committerRoy Marples <roy@marples.name>
Sun, 19 Apr 2020 09:41:11 +0000 (10:41 +0100)
src/dhcp.c

index ac2c6ea709c97ab69cd2482aab927bc6a092df49..958720339976690272e9fd4c3e8dc0a2c665ed19 100644 (file)
@@ -3308,7 +3308,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. */