]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Interworking: Fix network selection warning without SIM/USIM support
authorJouni Malinen <j@w1.fi>
Sun, 26 Apr 2015 14:00:26 +0000 (17:00 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 26 Apr 2015 14:00:26 +0000 (17:00 +0300)
interworking_credentials_available_3gpp() would have left excluded2
uninitialized without INTERWORKING_3GPP in the build. This could result
in a static analyzer warning within
interworking_credentials_available_helper() about use of uninitialized
variable. Get rid of that warning by explicitly initializing excluded2
even though this does not really result in any difference in behavior
since the excluded2 value would be used only if the non-NULL is returned
and that could not have been the case here without INTERWORKING_3GPP.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/interworking.c

index 4a396654487e68244fc48e995a784bf21245b4b1..35885ee2a7109c549200bcfaf2e7fc5fd18c2ec1 100644 (file)
@@ -2058,7 +2058,7 @@ static struct wpa_cred * interworking_credentials_available_helper(
        int *excluded)
 {
        struct wpa_cred *cred, *cred2;
-       int excluded1, excluded2;
+       int excluded1, excluded2 = 0;
 
        if (disallowed_bssid(wpa_s, bss->bssid) ||
            disallowed_ssid(wpa_s, bss->ssid, bss->ssid_len)) {