]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
RRM: Merge similar error returns to a single one
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 9 Feb 2017 11:24:26 +0000 (13:24 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 9 Feb 2017 11:26:06 +0000 (13:26 +0200)
There is no need to maintain different return paths for STA being
completely not present and not authorized, so merge these into a single
case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/ap/rrm.c

index 5318b2076125c4ae699338d3c684267d38c0a7ae..a49fd24d8732a11d0cb518addba01c4dd0415f73 100644 (file)
@@ -370,13 +370,7 @@ int hostapd_send_lci_req(struct hostapd_data *hapd, const u8 *addr)
        struct sta_info *sta = ap_get_sta(hapd, addr);
        int ret;
 
-       if (!sta) {
-               wpa_printf(MSG_INFO,
-                          "Request LCI: Destination address is not in station list");
-               return -1;
-       }
-
-       if (!(sta->flags & WLAN_STA_AUTHORIZED)) {
+       if (!sta || !(sta->flags & WLAN_STA_AUTHORIZED)) {
                wpa_printf(MSG_INFO,
                           "Request LCI: Destination address is not connected");
                return -1;