Skip to content

Commit 1290662

Browse files
committed
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
1 parent 825641d commit 1290662

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/partition/gpt.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@ static int unicode_to_ascii(unsigned short *str_in, unsigned char *str_out)
2626

2727
/* check whether the unicode string is valid */
2828
for (i = 1; i < (EFI_NAMELEN << 1); i += 2) {
29-
if (name[i] != '\0')
29+
if (name[i] != '\0') {
3030
return -EINVAL;
31+
}
3132
}
3233
/* convert the unicode string to ascii string */
3334
for (i = 0; i < (EFI_NAMELEN << 1); i += 2) {
3435
str_out[i >> 1] = name[i];
35-
if (name[i] == '\0')
36+
if (name[i] == '\0') {
3637
break;
38+
}
3739
}
3840
return 0;
3941
}

0 commit comments

Comments
 (0)