]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Use correct return type for has_channel()
authorJouni Malinen <jouni@codeaurora.org>
Tue, 8 Jun 2021 09:45:58 +0000 (12:45 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 8 Jun 2021 09:46:45 +0000 (12:46 +0300)
This helper function returns enum chan_allowed values, so use it as the
return type instead of unnecessarily generic int.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/p2p_supplicant.c

index e3d3c1d710290239fa2a22f42f51acb40fa6eee7..be1b396fe0826460b87d1a709e86d85e416feffe 100644 (file)
@@ -3545,8 +3545,9 @@ static int wpas_p2p_default_channels(struct wpa_supplicant *wpa_s,
 }
 
 
-static int has_channel(struct wpa_global *global,
-                      struct hostapd_hw_modes *mode, u8 chan, int *flags)
+static enum chan_allowed has_channel(struct wpa_global *global,
+                                    struct hostapd_hw_modes *mode, u8 chan,
+                                    int *flags)
 {
        int i;
        unsigned int freq;