Merge pull request #11250 from JarkkoPaso/master

hal fhss timer: removed unnecessary and potentially unsafe memset
pull/11307/head
Martin Kojtal 2019-08-23 10:19:20 +02:00 committed by GitHub
commit cf6fbda971
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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,