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

Bluetooth: Controller: Change condition in while to Boolean #73937

Conversation

tychofrei02
Copy link
Contributor

Use do { ... } while (false) instead of do { ... } while (0).

This corresponds to following coding guideline:

The controlling expression of an if statement and the controlling expression of an iteration-statement shall have essentially Boolean type

This PR is part of the enhancement issue #48002 which port the coding guideline fixes done by BUGSENG on the https://github.com/zephyrproject-rtos/zephyr/tree/v2.7-auditable-branch back to main

The commit in this PR is a subset of the original auditable-branch commit:
5d02614

cvinayak
cvinayak previously approved these changes Jun 7, 2024
@cvinayak cvinayak dismissed their stale review June 7, 2024 19:52

Need the commit title to be "Bluetooth: Controller: ..."

@tychofrei02 tychofrei02 force-pushed the misra_rule_14_4_auditable_to_main_in_subsys branch from 09901c3 to a2c7b8f Compare June 10, 2024 08:28
@tychofrei02 tychofrei02 changed the title bluetooth: change controlling expressions in while to Boolean bluetooth: controller: change controlling expressions in while to Boolean Jun 10, 2024
@tychofrei02 tychofrei02 changed the title bluetooth: controller: change controlling expressions in while to Boolean bluetooth: controller: change condition in while to Boolean Jun 10, 2024
@cvinayak cvinayak changed the title bluetooth: controller: change condition in while to Boolean Bluetooth: Controller: Change condition in while to Boolean Jun 10, 2024
@cvinayak
Copy link
Contributor

cvinayak commented Jul 7, 2024

This may be a nitpick, but Bluetooth and Controller with B and C in capitals, so that it is consistent with the Bluetooth Specification style.

Use `do { ... } while (false)` instead of `do { ... } while (0)`.

Signed-off-by: frei tycho <[email protected]>
@tychofrei02 tychofrei02 force-pushed the misra_rule_14_4_auditable_to_main_in_subsys branch from a2c7b8f to 001909d Compare July 8, 2024 07:18
@tychofrei02
Copy link
Contributor Author

This may be a nitpick, but Bluetooth and Controller with B and C in capitals, so that it is consistent with the Bluetooth Specification style.

@cvinayak I changed it to Capitals.

@carlescufi carlescufi merged commit 3603d83 into zephyrproject-rtos:main Aug 5, 2024
25 checks passed
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.

6 participants