From: krw Date: Wed, 24 Feb 2021 16:27:05 +0000 (+0000) Subject: No need to check ifi->active for NULL when looking for duplicate/obsolete X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=02a4417fb4e958701fa1c0acefe2951cbe502821;p=openbsd 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. --- 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 @@ -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)