From f2058f4afa1e9279633cc0fc4e472b57812794d0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 7 Jan 2017 11:52:18 +0200 Subject: [PATCH] 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 --- wpa_supplicant/rrm.c | 6 ------ 1 file changed, 6 deletions(-) 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,