From: Eugeniu Rosca Date: Sat, 14 Jul 2018 20:53:32 +0000 (+0200) Subject: cmd: efi: Clarify calculation precedence for '&' and '?' X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=dbb148b22cbf242156edf53cca6d661cd320cb83;p=u-boot.git cmd: efi: Clarify calculation precedence for '&' and '?' 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 Reviewed-by: Heinrich Schuchardt Signed-off-by: Alexander Graf --- diff --git a/cmd/efi.c b/cmd/efi.c index 366a79a964..919cb2fcfd 100644 --- 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) {