diff mbox series

[3/3] move assignment out of condition

Message ID 20240301231721.139669-4-leon@georgemail.de
State New
Headers show
Series [1/3] respect limitedness of the phy name buffer | expand

Commit Message

Leon M. Busch-George March 1, 2024, 11:16 p.m. UTC
From: "Leon M. Busch-George" <leon@georgemail.eu>

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
---
 iwinfo_nl80211.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index 8eab671..6270ef9 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -2031,7 +2031,9 @@  static int nl80211_get_phyname(const char *ifname, char *buf)
 		strcpy(buf, name);
 		return 0;
 	}
-	else if ((name = nl80211_phy2ifname(ifname)) != NULL)
+
+	name = nl80211_phy2ifname(ifname);
+	if (name != NULL)
 	{
 		name = nl80211_ifname2phy(name);