]> 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>
Fri, 20 Dec 2019 11:28:58 +0000 (11:28 +0000)
Found by the LGTM bot.

src/dhcp.c

index 797b3ad44e661ec8281daa051a2210b89b8eb90d..ccd39b996ef19b2c4cb01a1889643a58c44e44bc 100644 (file)
@@ -489,7 +489,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;
                }