Skip to content

Commit cf6fbda

Browse files
authored
Merge pull request #11250 from JarkkoPaso/master
hal fhss timer: removed unnecessary and potentially unsafe memset
2 parents edc59ce + 2aacb1c commit cf6fbda

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

features/nanostack/nanostack-hal-mbed-cmsis-rtos/arm_hal_fhss_timer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#define NUMBER_OF_SIMULTANEOUS_TIMEOUTS 2
3333
#endif //NUMBER_OF_SIMULTANEOUS_TIMEOUTS
3434

35+
namespace {
3536
using namespace mbed;
3637
using namespace events;
3738

@@ -77,7 +78,6 @@ static fhss_timeout_s *allocate_timeout(void)
7778
{
7879
for (int i = 0; i < NUMBER_OF_SIMULTANEOUS_TIMEOUTS; i++) {
7980
if (fhss_timeout[i].fhss_timer_callback == NULL) {
80-
memset(&fhss_timeout[i], 0, sizeof(fhss_timeout_s));
8181
return &fhss_timeout[i];
8282
}
8383
}
@@ -169,6 +169,7 @@ static uint32_t platform_fhss_timestamp_read(const fhss_api_t *api)
169169
(void)api;
170170
return read_current_time();
171171
}
172+
} // anonymous namespace
172173

173174
fhss_timer_t fhss_functions = {
174175
.fhss_timer_start = platform_fhss_timer_start,

0 commit comments

Comments
 (0)