Skip to content
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

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

Merged
merged 2 commits into from
Aug 23, 2019

Conversation

JarkkoPaso
Copy link

@JarkkoPaso JarkkoPaso commented Aug 16, 2019

Description

hal fhss timer: removed unnecessary and potentially unsafe memset

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

Release Notes

@ciarmcom ciarmcom requested review from a team August 16, 2019 15:00
@ciarmcom
Copy link
Member

@JarkkoPaso, thank you for your changes.
@ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-maintainers please review.

@kjbracey
Copy link
Contributor

While you're here, could you make the structure type and array not global?

Stick namespace { } around both the type and array to put them in an anonymous namespace. You could actually do that for all your other objects above, instead of the statics.

See bit about anonymous namespaces in the Organization section of https://os.mbed.com/docs/mbed-os/v5.13/contributing/software-design.html

static is fine for objects, but doesn't work for the types - namespace { } handles both.

@kjbracey
Copy link
Contributor

Actually, all your currently-static functions and the using declarations could be in the anonymous namespace rather than static. Would keep the style consistent within the file. Only the fhss_functions needs to be global.

Technically fhss_functions should be declared extern "C", if you're accessing it from C code, but I don't think any of our toolchains care.

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above ^^

@JarkkoPaso
Copy link
Author

@kjbracey-arm please review again

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 22, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Aug 22, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 28, 2019

@JarkkoPaso always provide description please. It is required. I fixed it here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants