mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 02:54:24 +00:00
fix(st): rework secure-status check in fdt_get_status()
This corrects MISRA C2012-15.7: All if...else if constructs shall be terminated with an else statement. Signed-off-by: Yann Gautier <yann.gautier@st.com> Change-Id: I3d893d0db0a448323270086923563147008c59b9
This commit is contained in:
parent
e7d75448b9
commit
0ebaf22289
1 changed files with 2 additions and 5 deletions
|
@ -79,11 +79,8 @@ uint8_t fdt_get_status(int node)
|
|||
}
|
||||
|
||||
cchar = fdt_getprop(fdt, node, "secure-status", NULL);
|
||||
if (cchar == NULL) {
|
||||
if (status == DT_NON_SECURE) {
|
||||
status |= DT_SECURE;
|
||||
}
|
||||
} else if (strncmp(cchar, "okay", strlen("okay")) == 0) {
|
||||
if (((cchar == NULL) && (status == DT_NON_SECURE)) ||
|
||||
((cchar != NULL) && (strncmp(cchar, "okay", strlen("okay")) == 0))) {
|
||||
status |= DT_SECURE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue