mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-18 06:58:54 +00:00
x86: don't compare pointers to 0
x86_vendor_name is defined as static const char *const x86_vendor_name[] So its elements should not be compared to 0. Remove superfluous paranthesis. Problem identified with Coccinelle. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
a2c0eed4e0
commit
39670c341f
1 changed files with 2 additions and 2 deletions
|
@ -143,8 +143,8 @@ const char *cpu_vendor_name(int vendor)
|
|||
{
|
||||
const char *name;
|
||||
name = "<invalid cpu vendor>";
|
||||
if ((vendor < (ARRAY_SIZE(x86_vendor_name))) &&
|
||||
(x86_vendor_name[vendor] != 0))
|
||||
if (vendor < ARRAY_SIZE(x86_vendor_name) &&
|
||||
x86_vendor_name[vendor])
|
||||
name = x86_vendor_name[vendor];
|
||||
|
||||
return name;
|
||||
|
|
Loading…
Add table
Reference in a new issue