From 03cbf11a4a787ca22586ead630412241c99810fd Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Thu, 18 Oct 2018 14:40:38 +0200 Subject: [PATCH] npl/riot: fix issues if building without DEVELHELP --- porting/npl/riot/include/nimble/nimble_npl_os.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/porting/npl/riot/include/nimble/nimble_npl_os.h b/porting/npl/riot/include/nimble/nimble_npl_os.h index 79c58c8b3..b07b1145b 100644 --- a/porting/npl/riot/include/nimble/nimble_npl_os.h +++ b/porting/npl/riot/include/nimble/nimble_npl_os.h @@ -89,12 +89,12 @@ ble_npl_eventq_put(struct ble_npl_eventq *evq, struct ble_npl_event *ev) static inline struct ble_npl_event * ble_npl_eventq_get(struct ble_npl_eventq *evq, ble_npl_time_t tmo) { + assert((tmo == 0) || (tmo == BLE_NPL_TIME_FOREVER)); + if (tmo == 0) { return (struct ble_npl_event *)event_get(&evq->q); - } else if (tmo == BLE_NPL_TIME_FOREVER) { - return (struct ble_npl_event *)event_wait(&evq->q); } else { - assert(0); + return (struct ble_npl_event *)event_wait(&evq->q); } } @@ -151,6 +151,8 @@ static inline ble_npl_error_t ble_npl_mutex_pend(struct ble_npl_mutex *mu, ble_npl_time_t timeout) { assert(timeout == BLE_NPL_TIME_FOREVER); + (void)timeout; + mutex_lock(&mu->mu); return BLE_NPL_OK; }