Skip to contentSkip to conversation

dhcp-lease: Fix typo

PATCH Applied Tim Kourt 2 participants 2 messages Dec 12, 2019

lore
Share & tools
lore

Tim Kourt

author
#0 lore raw

PATCH 1/1 dhcp-lease: Fix typo

Replace logical AND with OR.

---
 ell/dhcp-lease.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ell/dhcp-lease.c +1 -1
index 8f044fb..4d49190 100644
@@ -104,7 +104,7 @@ struct l_dhcp_lease *_dhcp_lease_parse_options(struct dhcp_message_iter *iter)
 			}
 			break;
 		case L_DHCP_OPTION_DOMAIN_NAME:
-			if (l < 1 && l > 253)
+			if (l < 1 || l > 253)
 				goto error;
 
 			/* Disallow embedded NUL bytes. */
Signature · 1 line
2.13.6
#1 lore raw

Hi Tim,

Quoted 5 lines · Tim Kourt

Replace logical AND with OR.

---
  ell/dhcp-lease.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Regards,
-Denis