From: Jouni Malinen Date: Sat, 7 Jan 2017 09:52:18 +0000 (+0200) Subject: RRM: Remove unnecessary cb check X-Git-Tag: hostap_2_7~1817 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f2058f4afa1e9279633cc0fc4e472b57812794d0;p=thirdparty%2Fhostap.git RRM: Remove unnecessary cb check 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 --- diff --git a/wpa_supplicant/rrm.c b/wpa_supplicant/rrm.c index 942eea79d..5754d1966 100644 --- a/wpa_supplicant/rrm.c +++ b/wpa_supplicant/rrm.c @@ -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,