fix -Wmaybe-uninitialized warning
authorAndre Heider <a.heider@gmail.com>
Wed, 23 Nov 2022 13:26:41 +0000 (14:26 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 15 Dec 2022 19:07:49 +0000 (20:07 +0100)
All previous cases not hit, which means no scan was possible.
Indicate that.

Signed-off-by: Andre Heider <a.heider@gmail.com>
iwinfo_nl80211.c

index 97cd39f4333a64b9eee745fb611c3e3bdca7b24b..0e339b5203b36809b02e898cec64dfd528aae30c 100644 (file)
@@ -2899,6 +2899,8 @@ static int nl80211_get_scanlist(const char *ifname, char *buf, int *len)
                                iwinfo_ifup(ifname);
                                nl80211_hostapd_hup(ifname);
                        }
+                       else
+                               rv = -1;
 
                        nl80211_ifdel(res);
                        return rv;