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:
Yann Gautier 2022-06-21 14:34:00 +02:00
parent 825641d615
commit 1290662034

View file

@ -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;
}