From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Date: Sun, 28 Jan 2024 10:24:21 +0000 (+0100)
Subject: lib: smbios_entr() use logical or for booleans
X-Git-Tag: v2025.01-rc5-pxa1908~666^2~11
X-Git-Url: http://git.dujemihanovic.xyz/img/static/gitweb.css?a=commitdiff_plain;h=85e490b22e89890c99660a13131aaeae52b249dd;p=u-boot.git

lib: smbios_entr() use logical or for booleans

As a matter of programming style use logical or to combine two boolean
results.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---

diff --git a/lib/smbios-parser.c b/lib/smbios-parser.c
index f48d743657..0d1ac781b3 100644
--- a/lib/smbios-parser.c
+++ b/lib/smbios-parser.c
@@ -15,7 +15,7 @@ const struct smbios_entry *smbios_entry(u64 address, u32 size)
 {
 	const struct smbios_entry *entry = (struct smbios_entry *)(uintptr_t)address;
 
-	if (!address | !size)
+	if (!address || !size)
 		return NULL;
 
 	if (memcmp(entry->anchor, "_SM_", 4))