mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #11250 from JarkkoPaso/master
hal fhss timer: removed unnecessary and potentially unsafe memsetpull/11307/head
commit
cf6fbda971
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue