]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: use logical and in do_env_print_efi()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 6 May 2020 00:01:34 +0000 (02:01 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 7 May 2020 16:23:16 +0000 (18:23 +0200)
If we want to check if two booleans are true, we should use a logical
conjunction (&&) and not a bitwise and-operator (&).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
cmd/nvedit_efi.c

index 837e39e021798876ddc9e05a230ca619642898c8..6f69a84feaa0e2d4fb146e8a1dc34a52b58119b8 100644 (file)
@@ -298,7 +298,7 @@ int do_env_print_efi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                                return CMD_RET_USAGE;
 
                        /* -a already specified */
-                       if (!default_guid & guid_any)
+                       if (!default_guid && guid_any)
                                return CMD_RET_USAGE;
 
                        argc--;