From 3f13b11d1cb78df094cd414085e5ae24c1a3f2bb Mon Sep 17 00:00:00 2001 From: stsp Date: Wed, 18 Jan 2023 21:57:10 +0000 Subject: [PATCH] remove redundant SIOCS80211JOIN ioctl call in ifconfig delifjoinlist() Found by Mathias Koehler, thanks! --- sbin/ifconfig/ifconfig.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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"); -- 2.20.1