fix(el3-runtime): add missing curly braces
This corrects the MISRA violation C2012-15.6:
The body of an iteration-statement or a selection-statement shall
be a compound-statement.
Enclosed statement body within the curly braces.
Change-Id: I14a69f79aba98e243fa29a50914431358efa2a49
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
diff --git a/lib/el3_runtime/aarch64/context_mgmt.c b/lib/el3_runtime/aarch64/context_mgmt.c
index e28e1c3..3388f1c 100644
--- a/lib/el3_runtime/aarch64/context_mgmt.c
+++ b/lib/el3_runtime/aarch64/context_mgmt.c
@@ -1966,10 +1966,11 @@
el1_sysregs_context_save(get_el1_sysregs_ctx(ctx));
#if IMAGE_BL31
- if (security_state == SECURE)
+ if (security_state == SECURE) {
PUBLISH_EVENT(cm_exited_secure_world);
- else
+ } else {
PUBLISH_EVENT(cm_exited_normal_world);
+ }
#endif
}
@@ -1983,10 +1984,11 @@
el1_sysregs_context_restore(get_el1_sysregs_ctx(ctx));
#if IMAGE_BL31
- if (security_state == SECURE)
+ if (security_state == SECURE) {
PUBLISH_EVENT(cm_entering_secure_world);
- else
+ } else {
PUBLISH_EVENT(cm_entering_normal_world);
+ }
#endif
}