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 <j@w1.fi>
This commit is contained in:
Jouni Malinen 2017-01-07 11:52:18 +02:00
parent 05e5e615e6
commit f2058f4afa

View file

@ -160,12 +160,6 @@ int wpas_rrm_send_neighbor_rep_request(struct wpa_supplicant *wpa_s,
return -EOPNOTSUPP; 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 */ /* Refuse if there's a live request */
if (wpa_s->rrm.notify_neighbor_rep) { if (wpa_s->rrm.notify_neighbor_rep) {
wpa_printf(MSG_DEBUG, wpa_printf(MSG_DEBUG,