]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP: dl is always >0 at this point, so remove check.
authorRoy Marples <roy@marples.name>
Sat, 7 Dec 2019 17:06:18 +0000 (17:06 +0000)
committerRoy Marples <roy@marples.name>
Sat, 7 Dec 2019 17:06:18 +0000 (17:06 +0000)
Found by the LGTM bot.

src/dhcp.c

index d16c649f867437f7a4ebf5c62cb667ff5983c7d7..621a03fed6d9a94aef93faae323e5d1618b72b29 100644 (file)
@@ -485,7 +485,7 @@ print_rfc3361(FILE *fp, const uint8_t *data, size_t dl)
                        return -1;
                break;
        case 1:
-               if (dl == 0 || dl % 4 != 0) {
+               if (dl % 4 != 0) {
                        errno = EINVAL;
                        break;
                }