mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 01:54:22 +00:00
fix(partition): add missing curly braces
Add braces to correct MISRA C2012 15.6 warning: The body of an iteration-statement or a selection-statement shall be a compound-statement. Signed-off-by: Yann Gautier <yann.gautier@st.com> Change-Id: I4041b0080b678f5ffdbe074e3cee9ac0afd5e176
This commit is contained in:
parent
825641d615
commit
1290662034
1 changed files with 4 additions and 2 deletions
|
@ -26,15 +26,17 @@ static int unicode_to_ascii(unsigned short *str_in, unsigned char *str_out)
|
|||
|
||||
/* check whether the unicode string is valid */
|
||||
for (i = 1; i < (EFI_NAMELEN << 1); i += 2) {
|
||||
if (name[i] != '\0')
|
||||
if (name[i] != '\0') {
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
/* convert the unicode string to ascii string */
|
||||
for (i = 0; i < (EFI_NAMELEN << 1); i += 2) {
|
||||
str_out[i >> 1] = name[i];
|
||||
if (name[i] == '\0')
|
||||
if (name[i] == '\0') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue