From: stsp Date: Wed, 18 Jan 2023 21:57:10 +0000 (+0000) Subject: remove redundant SIOCS80211JOIN ioctl call in ifconfig delifjoinlist() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3f13b11d1cb78df094cd414085e5ae24c1a3f2bb;p=openbsd remove redundant SIOCS80211JOIN ioctl call in ifconfig delifjoinlist() Found by Mathias Koehler, thanks! --- diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 06753159e76..f16d1b74b29 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.460 2022/12/18 18:56:38 kn Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.461 2023/01/18 21:57:10 stsp Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -1907,13 +1907,6 @@ delifjoinlist(const char *val, int d) memset(&join, 0, sizeof(join)); join.i_flags |= (IEEE80211_JOIN_DEL | IEEE80211_JOIN_DEL_ALL); - if (d == -1) { - ifr.ifr_data = (caddr_t)&join; - if (ioctl(sock, SIOCS80211JOIN, (caddr_t)&ifr) == -1) - err(1, "SIOCS80211JOIN"); - return; - } - ifr.ifr_data = (caddr_t)&join; if (ioctl(sock, SIOCS80211JOIN, (caddr_t)&ifr) == -1) err(1, "SIOCS80211JOIN");