From: Andre Heider Date: Wed, 23 Nov 2022 13:26:41 +0000 (+0100) Subject: fix -Wmaybe-uninitialized warning X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ebd5f84955d180b3357f7005762a6cfb42cf1b1c;p=project%2Fiwinfo.git fix -Wmaybe-uninitialized warning All previous cases not hit, which means no scan was possible. Indicate that. Signed-off-by: Andre Heider --- diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c index 97cd39f..0e339b5 100644 --- a/iwinfo_nl80211.c +++ b/iwinfo_nl80211.c @@ -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;