From 544191a525971480d1e2a2cf403e61cf2aab27bf Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sat, 12 Dec 2020 17:41:37 +0000 Subject: [PATCH] DHCP6: Fix a LGTM issue --- src/dhcp6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dhcp6.c b/src/dhcp6.c index 4dcdcaab..176a12e4 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -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; -- 2.47.2