]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP6: Fix a LGTM issue
authorRoy Marples <roy@marples.name>
Sat, 12 Dec 2020 17:41:37 +0000 (17:41 +0000)
committerRoy Marples <roy@marples.name>
Sat, 12 Dec 2020 17:41:37 +0000 (17:41 +0000)
src/dhcp6.c

index 4dcdcaabdd38308a738ebf951a9cf85d6b1e6fa5..176a12e4df4277e618192cf70409cd980db1b5b0 100644 (file)
@@ -2065,7 +2065,8 @@ dhcp6_checkstatusok(const struct interface *ifp,
        state->lerror = code;
        errno = 0;
 
-       if (code != 0 && ifp->ctx->options & DHCPCD_TEST)
+       /* code cannot be D6_STATUS_OK, so there is a failure */
+       if (ifp->ctx->options & DHCPCD_TEST)
                eloop_exit(ifp->ctx->eloop, EXIT_FAILURE);
 
        return (int)code;