summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2021-02-24 16:27:06 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2021-02-24 16:27:06 +0000
commit05e64a052ff77cd0d57d3a583b23cd17f66b9515 (patch)
tree94f81973a2eb4be87ed8d1a1e642c05fd4050bac /sbin
parent98d57fe2a49050396d7947179fcdffea2f23ebee (diff)
No need to check ifi->active for NULL when looking for duplicate/obsolete
leases. It can't be NULL, and is unconditionally dereferenced a few lines later anyway.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/dhclient.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 667167f5e3b..b7f9ff0a17e 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.700 2021/02/24 16:21:33 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.701 2021/02/24 16:27:05 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -1098,8 +1098,6 @@ newlease:
*/
seen = 0;
TAILQ_FOREACH_SAFE(ll, &ifi->lease_db, next, pl) {
- if (ifi->active == NULL)
- continue;
if (ifi->ssid_len != ll->ssid_len)
continue;
if (memcmp(ifi->ssid, ll->ssid, ll->ssid_len) != 0)