From 6928c5d4ed2b493a2dbd8221310ec264d53a163a Mon Sep 17 00:00:00 2001 From: Martine Lenders <m.lenders@fu-berlin.de> Date: Sat, 11 Mar 2017 22:40:22 +0100 Subject: [PATCH] pkg: nordic_softdevice_ble: fix cppcheck warnings --- pkg/nordic_softdevice_ble/src/ble-mac.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/nordic_softdevice_ble/src/ble-mac.c b/pkg/nordic_softdevice_ble/src/ble-mac.c index d7168275e3..4724dbd299 100644 --- a/pkg/nordic_softdevice_ble/src/ble-mac.c +++ b/pkg/nordic_softdevice_ble/src/ble-mac.c @@ -73,6 +73,9 @@ static ble_mac_callback_t _callback; */ static ble_mac_interface_t *ble_mac_interface_lookup(ble_ipsp_handle_t *handle) { + if (handle == NULL) { + return NULL; + } for (int i = 0; i < BLE_MAC_MAX_INTERFACE_NUM; i++) { if (interfaces[i].handle.conn_handle == handle->conn_handle && interfaces[i].handle.cid == handle->cid) { -- GitLab