]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
lib: smbios_entr() use logical or for booleans
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 28 Jan 2024 10:24:21 +0000 (11:24 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 2 Feb 2024 18:55:29 +0000 (19:55 +0100)
As a matter of programming style use logical or to combine two boolean
results.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/smbios-parser.c

index f48d743657018847a7e56f284ab0864489e9d411..0d1ac781b38c5fa8bfac95bf169c4525b39eaac1 100644 (file)
@@ -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))