[U-Boot] [PATCH 1/1] efi_selftest: incorrect use of bitwise or

Heinrich Schuchardt xypron.glpk at gmx.de
Sun Nov 25 14:21:40 UTC 2018


We should use a logical or when combining logical values.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 lib/efi_selftest/efi_selftest_loaded_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi_selftest/efi_selftest_loaded_image.c b/lib/efi_selftest/efi_selftest_loaded_image.c
index f9b54ae2635..ea2b380a777 100644
--- a/lib/efi_selftest/efi_selftest_loaded_image.c
+++ b/lib/efi_selftest/efi_selftest_loaded_image.c
@@ -53,7 +53,7 @@ static int execute(void)
 		efi_st_error("ProtocolsPerHandle failed\n");
 		return EFI_ST_FAILURE;
 	}
-	if (!protocol_buffer_count | !protocol_buffer) {
+	if (!protocol_buffer_count || !protocol_buffer) {
 		efi_st_error("ProtocolsPerHandle returned no protocol\n");
 		return EFI_ST_FAILURE;
 	}
-- 
2.19.1



More information about the U-Boot mailing list