P2P: Avoid compiler warning in p2p_supplicant.c
authorMax Stepanov <Max.Stepanov@intel.com>
Mon, 10 Feb 2014 10:55:05 +0000 (12:55 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 13 Feb 2014 13:46:37 +0000 (15:46 +0200)
Initialize flag variable explicitly to avoid [-Wmaybeuninitialized]
compiler warning in wpas_p2p_verify_channel().

Signed-hostap: Max Stepanov <Max.Stepanov@intel.com>

wpa_supplicant/p2p_supplicant.c

index 113ef83..1495ea4 100644 (file)
@@ -3461,7 +3461,7 @@ static enum chan_allowed wpas_p2p_verify_channel(struct wpa_supplicant *wpa_s,
                                                 struct hostapd_hw_modes *mode,
                                                 u8 channel, u8 bw)
 {
-       int flag;
+       int flag = 0;
        enum chan_allowed res, res2;
 
        res2 = res = has_channel(wpa_s->global, mode, channel, &flag);