]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd: efi: Clarify calculation precedence for '&' and '?'
authorEugeniu Rosca <roscaeugeniu@gmail.com>
Sat, 14 Jul 2018 20:53:32 +0000 (22:53 +0200)
committerAlexander Graf <agraf@suse.de>
Mon, 20 Aug 2018 22:04:24 +0000 (00:04 +0200)
Fix cppcheck complaint:
[cmd/efi.c:173]: (style) Clarify calculation precedence for '&' and '?'.

Fixes: f1a0bafb5802 ("efi: Add a command to display the memory map")
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
cmd/efi.c

index 366a79a96488716afca576f355f447aa74ea13d3..919cb2fcfd55a8b1d063cf610ad120b253f04fc1 100644 (file)
--- a/cmd/efi.c
+++ b/cmd/efi.c
@@ -173,7 +173,7 @@ static void efi_print_mem_table(struct efi_entry_memmap *map,
                bool first;
                int j;
 
-               printf("%c%llx: ", attr & EFI_MEMORY_RUNTIME ? 'r' : ' ',
+               printf("%c%llx: ", (attr & EFI_MEMORY_RUNTIME) ? 'r' : ' ',
                       attr & ~EFI_MEMORY_RUNTIME);
                for (j = 0, first = true; j < ARRAY_SIZE(mem_attr); j++) {
                        if (attr & mem_attr[j].val) {