]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
RRM: Remove unnecessary cb check
authorJouni Malinen <j@w1.fi>
Sat, 7 Jan 2017 09:52:18 +0000 (11:52 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 7 Jan 2017 10:11:49 +0000 (12:11 +0200)
There is only a single caller for wpas_rrm_send_neighbor_rep_request()
and it unconditionally uses a callback function, so cb cannot be NULL
here and there is no need for additional complexity and extra code size
to check for it explicitly.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/rrm.c

index 942eea79da192f674669d8ca6b7db263d5e61613..5754d196626ff8697d6f9f78027a9e14df4684d6 100644 (file)
@@ -160,12 +160,6 @@ int wpas_rrm_send_neighbor_rep_request(struct wpa_supplicant *wpa_s,
                return -EOPNOTSUPP;
        }
 
-       if (!cb) {
-               wpa_printf(MSG_DEBUG,
-                          "RRM: Neighbor Report request must provide a callback.");
-               return -EINVAL;
-       }
-
        /* Refuse if there's a live request */
        if (wpa_s->rrm.notify_neighbor_rep) {
                wpa_printf(MSG_DEBUG,