Skip to content

Commit

Permalink
soc: arm: comply to coding guidelines MISRA C:2012 Rule 14.4
Browse files Browse the repository at this point in the history
MISRA C:2012 Rule 14.4 (The controlling expression of an if statement
and the controlling expression of an iteration-statement shall have
essentially Boolean type.)

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

This commit is a subset of the original commit:
5d02614

Signed-off-by: Simon Hein <SHein@baumer.com>
  • Loading branch information
simhein authored and aescolar committed Jul 21, 2022
1 parent 93dfc69 commit c29d0a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion soc/arm/cypress/common/cypress_psoc6_dt.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
isr, DEVICE_DT_INST_GET(n), 0);\
CY_PSOC6_NVIC_MUX_MAP(n); \
irq_enable(CY_PSOC6_NVIC_MUX_IRQN(n)); \
} while (0)
} while (false)

/*
* Devicetree related macros to construct pin control config data
Expand Down
2 changes: 1 addition & 1 deletion soc/arm/nuvoton_npcx/common/soc_dt.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
DT_PROP(child, group_mask), \
0); \
irq_enable(DT_PROP(child, irq)); \
} while (0)
} while (false)

/**
* @brief Get a child node from path '/npcx-espi-vws-map/name'.
Expand Down

0 comments on commit c29d0a3

Please sign in to comment.