From de558d9dfeca14d561a416d139ff521d87e83e47 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Wed, 3 Mar 2010 05:40:19 +0000 Subject: [PATCH] Fix non-boolean comparison expression. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10165 6f19259b-4bc3-4df7-8a09-765794883524 --- .../DeviceIoOnPciRootBridgeIoThunk.c | 2 +- .../Compatibility/FrameworkHiiOnUefiHiiThunk/OpcodeCreation.c | 4 ++-- .../PiSmbiosRecordOnDataHubSmbiosRecordThunk/MiscConv.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/EdkCompatibilityPkg/Compatibility/DeviceIoOnPciRootBridgeIoThunk/DeviceIoOnPciRootBridgeIoThunk.c b/EdkCompatibilityPkg/Compatibility/DeviceIoOnPciRootBridgeIoThunk/DeviceIoOnPciRootBridgeIoThunk.c index b5ce020458..6437fcbfb5 100644 --- a/EdkCompatibilityPkg/Compatibility/DeviceIoOnPciRootBridgeIoThunk/DeviceIoOnPciRootBridgeIoThunk.c +++ b/EdkCompatibilityPkg/Compatibility/DeviceIoOnPciRootBridgeIoThunk/DeviceIoOnPciRootBridgeIoThunk.c @@ -898,7 +898,7 @@ AppendPciDevicePath ( return ReturnDevicePath; } } - if (ThisFunc == 0 && !(PciPtr->Hdr.HeaderType & HEADER_TYPE_MULTI_FUNCTION)) { + if (ThisFunc == 0 && ((PciPtr->Hdr.HeaderType & HEADER_TYPE_MULTI_FUNCTION) != HEADER_TYPE_MULTI_FUNCTION)) { // // Skip sub functions, this is not a multi function device // diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/OpcodeCreation.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/OpcodeCreation.c index 1f3e61e475..27969d2d24 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/OpcodeCreation.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/OpcodeCreation.c @@ -403,7 +403,7 @@ F2UCreateOneOfOpCode ( } - if (FwOneOfOp->Flags & EFI_IFR_FLAG_RESET_REQUIRED) { + if ((FwOneOfOp->Flags & EFI_IFR_FLAG_RESET_REQUIRED) == EFI_IFR_FLAG_RESET_REQUIRED) { UOpcode.Question.Flags |= EFI_IFR_FLAG_RESET_REQUIRED; } @@ -522,7 +522,7 @@ F2UCreateOrderedListOpCode ( } } - if (FwOneOfOp->Flags & EFI_IFR_FLAG_RESET_REQUIRED) { + if ((FwOneOfOp->Flags & EFI_IFR_FLAG_RESET_REQUIRED) == EFI_IFR_FLAG_RESET_REQUIRED) { UOpcode.Question.Flags |= EFI_IFR_FLAG_RESET_REQUIRED; } diff --git a/EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/MiscConv.c b/EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/MiscConv.c index 3ffbbe5195..1dca381ace 100644 --- a/EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/MiscConv.c +++ b/EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/MiscConv.c @@ -1,7 +1,7 @@ /** @file Routines that support Misc SubClass data records translation. -Copyright (c) 2009, Intel Corporation +Copyright (c) 2009 - 2010, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -480,7 +480,7 @@ SmbiosFldMiscType3 ( OFFSET_OF (SMBIOS_TABLE_TYPE3, ContainedElementCount)) = (UINT8)Ec->ChassisElementCount; - if( Ec->ChassisElementCount ) { + if(Ec->ChassisElementCount > 0) { // // Element Record Length // Current solution covers first 3 bytes; user can extend to meet its requirements. -- 2.39.2