From 525ec045f39fdbd9828e68fbff685babc7427a46 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 8 Jun 2021 12:45:58 +0300 Subject: [PATCH] P2P: Use correct return type for has_channel() 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 --- wpa_supplicant/p2p_supplicant.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index e3d3c1d71..be1b396fe 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -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;