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>
lime2-spi
Eugeniu Rosca 6 years ago committed by Alexander Graf
parent c3a40cce2a
commit dbb148b22c
  1. 2
      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) {

Loading…
Cancel
Save