cmd: efi: Clarify calculation precedence for '&' and '?'

Fix cppcheck complaint:
[cmd/efi.c:173]: (style) Clarify calculation precedence for '&' and '?'.

Fixes: f1a0bafb58 ("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>
This commit is contained in:
Eugeniu Rosca 2018-07-14 22:53:32 +02:00 committed by Alexander Graf
parent c3a40cce2a
commit dbb148b22c

View File

@ -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) {