Skip to content

hal fhss timer: removed unnecessary and potentially unsafe memset #11250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#define NUMBER_OF_SIMULTANEOUS_TIMEOUTS 2
#endif //NUMBER_OF_SIMULTANEOUS_TIMEOUTS

namespace {
using namespace mbed;
using namespace events;

Expand Down Expand Up @@ -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];
}
}
Expand Down Expand Up @@ -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,
Expand Down