]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
CID 1358676: Forward NULL.
authorRoy Marples <roy@marples.name>
Sun, 24 Apr 2016 19:46:28 +0000 (19:46 +0000)
committerRoy Marples <roy@marples.name>
Sun, 24 Apr 2016 19:46:28 +0000 (19:46 +0000)
dhcp-common.c

index 6951a569def913285122fbdefa619c31fc1dc29f..3307ce43c2e18fd0afba1c77d66133ca18636c11 100644 (file)
@@ -207,7 +207,7 @@ make_option_mask(const struct dhcp_opt *dopts, size_t dopts_len,
                        continue;
                match = 0;
                for (i = 0, opt = odopts; i < odopts_len; i++, opt++) {
-                       if (opt->var == NULL && opt->option == 0)
+                       if (opt->var == NULL || opt->option == 0)
                                continue; /* buggy dhcpcd-definitions.conf */
                        if (strcmp(opt->var, token) == 0)
                                match = 1;