mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-25 06:19:56 +00:00
fix(mmc): explicitly check operators precedence
This corrects the MISRA violation C2012-12.1: The precedence of operators within expressions should be made explicit While at it put the test on one line. Signed-off-by: Yann Gautier <yann.gautier@st.com> Change-Id: Id19231faaf033c1e7dbe703690e0dddc7aa8f346
This commit is contained in:
parent
d1c6c49554
commit
14cda5168d
1 changed files with 1 additions and 2 deletions
|
@ -780,8 +780,7 @@ int mmc_part_switch_current_boot(void)
|
|||
unsigned char current_boot_part = mmc_current_boot_part();
|
||||
int ret;
|
||||
|
||||
if (current_boot_part != 1U &&
|
||||
current_boot_part != 2U) {
|
||||
if ((current_boot_part != 1U) && (current_boot_part != 2U)) {
|
||||
ERROR("Got unexpected value for active boot partition, %u\n", current_boot_part);
|
||||
return -EIO;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue