diff --git a/features/nanostack/nanostack-hal-mbed-cmsis-rtos/arm_hal_fhss_timer.cpp b/features/nanostack/nanostack-hal-mbed-cmsis-rtos/arm_hal_fhss_timer.cpp index c349432317..3885747651 100644 --- a/features/nanostack/nanostack-hal-mbed-cmsis-rtos/arm_hal_fhss_timer.cpp +++ b/features/nanostack/nanostack-hal-mbed-cmsis-rtos/arm_hal_fhss_timer.cpp @@ -32,6 +32,7 @@ #define NUMBER_OF_SIMULTANEOUS_TIMEOUTS 2 #endif //NUMBER_OF_SIMULTANEOUS_TIMEOUTS +namespace { using namespace mbed; using namespace events; @@ -77,7 +78,6 @@ static fhss_timeout_s *allocate_timeout(void) { for (int i = 0; i < NUMBER_OF_SIMULTANEOUS_TIMEOUTS; i++) { if (fhss_timeout[i].fhss_timer_callback == NULL) { - memset(&fhss_timeout[i], 0, sizeof(fhss_timeout_s)); return &fhss_timeout[i]; } } @@ -169,6 +169,7 @@ static uint32_t platform_fhss_timestamp_read(const fhss_api_t *api) (void)api; return read_current_time(); } +} // anonymous namespace fhss_timer_t fhss_functions = { .fhss_timer_start = platform_fhss_timer_start,