diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2019-06-11 13:18:04 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2019-06-15 16:31:11 +0000 |
commit | a360d9a6bf6556a7e73c40f257e807a73964bb70 (patch) | |
tree | 44f7239ab0dd8c8701e0820ea819ed5f015f9a63 /src | |
parent | d844431af09aafd65656f77b699c737966b30086 (diff) |
vendorcode/agesa/*/Proc/IDS/Library/IdsLib.c: Fix logical 'or' tests
"if (_pcidata != 0xFFFFFFFF || _pcidata != 0)", is always true.
The right test should be && not ||.
Error found using -Wlogical-op warning option.
Change-Id: I537fa4867499e1e6e5f662086fabc99b91aa0c70
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33392
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c | 2 | ||||
-rw-r--r-- | src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c b/src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c index 34a12a78e6..046d1826aa 100644 --- a/src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c +++ b/src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c @@ -900,7 +900,7 @@ IdsCheckPciExisit ( _pciaddr = PciAddr; _pciaddr.Address.Register = 0; LibAmdPciRead (AccessWidth32, _pciaddr, &_pcidata, StdHeader); - if (_pcidata != 0xFFFFFFFF || _pcidata != 0) { + if (_pcidata != 0xFFFFFFFF && _pcidata != 0) { status = TRUE; } return status; diff --git a/src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c b/src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c index 0cb0a63680..b7a49b27f1 100644 --- a/src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c +++ b/src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c @@ -983,7 +983,7 @@ IdsCheckPciExisit ( _pciaddr = PciAddr; _pciaddr.Address.Register = 0; LibAmdPciRead (AccessWidth32, _pciaddr, &_pcidata, StdHeader); - if (_pcidata != 0xFFFFFFFF || _pcidata != 0) { + if (_pcidata != 0xFFFFFFFF && _pcidata != 0) { status = TRUE; } return status; |