changeset 5561:3853222e97c7 draft

DHCP6: Fix a LGTM issue
author Roy Marples <roy@marples.name>
date Sat, 12 Dec 2020 17:41:37 +0000
parents ecfe552000c0
children f0957b45f547
files src/dhcp6.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/dhcp6.c	Sat Dec 12 17:35:45 2020 +0000
+++ b/src/dhcp6.c	Sat Dec 12 17:41:37 2020 +0000
@@ -2065,7 +2065,8 @@
 	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;