Merge branch 'next' of git://git.denx.de/u-boot-sh
[oweals/u-boot.git] / cmd / efi.c
index 366a79a96488716afca576f355f447aa74ea13d3..ea239a01f0b1c38e187b22d57a6f7695d36881ef 100644 (file)
--- a/cmd/efi.c
+++ b/cmd/efi.c
@@ -9,6 +9,7 @@
 #include <efi.h>
 #include <errno.h>
 #include <malloc.h>
+#include <sort.h>
 
 static const char *const type_name[] = {
        "reserved",
@@ -173,7 +174,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) {