diff options
| author | Yann Gautier <yann.gautier@st.com> | 2022-06-21 14:34:00 +0200 |
|---|---|---|
| committer | Yann Gautier <yann.gautier@st.com> | 2022-12-07 14:16:48 +0100 |
| commit | 1290662034578b4e52443c79f34dfd7c284c0435 (patch) | |
| tree | 2ff4825e2a61a5de5d10ab5170db449f8cca98a4 /drivers | |
| parent | 825641d6150f05c1bcf6328ec726f46f2e9e37f9 (diff) | |
| download | arm-trusted-firmware-1290662034578b4e52443c79f34dfd7c284c0435.tar.gz | |
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
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/partition/gpt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/partition/gpt.c b/drivers/partition/gpt.c index 4fe832244..8b1046d00 100644 --- a/drivers/partition/gpt.c +++ b/drivers/partition/gpt.c @@ -26,14 +26,16 @@ 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; } |
