]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DFS: Remove unnecessary variable
authorJouni Malinen <j@w1.fi>
Sun, 13 Mar 2022 19:23:54 +0000 (21:23 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 13 Mar 2022 19:23:54 +0000 (21:23 +0200)
This was not used for anything else than checking the value returned by
the called function.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/dfs.c

index 480c803a9a61f33d67a18db59d0044c52e15997f..53c705ffc5268ec6a7d1a1fdac1841b99c4bb7d8 100644 (file)
@@ -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)) {