From: Eugeniu Rosca Date: Sat, 14 Jul 2018 22:53:32 +0200 Subject: [U-Boot] [PATCH v2 3/3] cmd: efi: Clarify calculation precedence for '&' and '?' In-Reply-To: <20180714205332.17709-1-erosca@de.adit-jv.com> References: <20180714205332.17709-1-erosca@de.adit-jv.com> Message-ID: <20180714205332.17709-3-erosca@de.adit-jv.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- v2: - newly added cmd/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/efi.c b/cmd/efi.c index 366a79a96488..919cb2fcfd55 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) { -- 2.18.0