From ce86f2446f852b4fa8cae0152a0bd6a6a54cc7ec Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 13 Mar 2022 21:23:54 +0200 Subject: [PATCH] DFS: Remove unnecessary variable This was not used for anything else than checking the value returned by the called function. Signed-off-by: Jouni Malinen --- src/ap/dfs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ap/dfs.c b/src/ap/dfs.c index 480c803a9..53c705ffc 100644 --- a/src/ap/dfs.c +++ b/src/ap/dfs.c @@ -1407,8 +1407,6 @@ int hostapd_dfs_radar_detected(struct hostapd_iface *iface, int freq, int ht_enabled, int chan_offset, int chan_width, int cf1, int cf2) { - int res; - wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, DFS_EVENT_RADAR_DETECTED "freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d", freq, ht_enabled, chan_offset, chan_width, cf1, cf2); @@ -1421,9 +1419,8 @@ int hostapd_dfs_radar_detected(struct hostapd_iface *iface, int freq, return 0; /* mark radar frequency as invalid */ - res = set_dfs_state(iface, freq, ht_enabled, chan_offset, chan_width, - cf1, cf2, HOSTAPD_CHAN_DFS_UNAVAILABLE); - if (!res) + if (!set_dfs_state(iface, freq, ht_enabled, chan_offset, chan_width, + cf1, cf2, HOSTAPD_CHAN_DFS_UNAVAILABLE)) return 0; if (!hostapd_dfs_is_background_event(iface, freq)) {