summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/Dxe/Event/Event.c12
-rw-r--r--MdeModulePkg/Core/Dxe/Event/Timer.c2
-rw-r--r--MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c2
-rw-r--r--MdeModulePkg/Core/Dxe/Hand/Handle.c12
-rw-r--r--MdeModulePkg/Core/Dxe/Mem/Page.c6
-rw-r--r--MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c4
6 files changed, 19 insertions, 19 deletions
diff --git a/MdeModulePkg/Core/Dxe/Event/Event.c b/MdeModulePkg/Core/Dxe/Event/Event.c
index 204e9b3..b2a3459 100644
--- a/MdeModulePkg/Core/Dxe/Event/Event.c
+++ b/MdeModulePkg/Core/Dxe/Event/Event.c
@@ -172,7 +172,7 @@ CoreDispatchEventNotifies (
// Only clear the SIGNAL status if it is a SIGNAL type event.
// WAIT type events are only cleared in CheckEvent()
//
- if (Event->Type & EVT_NOTIFY_SIGNAL) {
+ if ((Event->Type & EVT_NOTIFY_SIGNAL) != 0) {
Event->SignalCount = 0;
}
@@ -496,7 +496,7 @@ CoreSignalEvent (
//
// If signalling type is a notify function, queue it
//
- if (Event->Type & EVT_NOTIFY_SIGNAL) {
+ if ((Event->Type & EVT_NOTIFY_SIGNAL) != 0) {
if (Event->ExFlag) {
//
// The CreateEventEx() style requires all members of the Event Group
@@ -552,13 +552,13 @@ CoreCheckEvent (
Status = EFI_NOT_READY;
- if (!Event->SignalCount && (Event->Type & EVT_NOTIFY_WAIT)) {
+ if ((Event->SignalCount == 0) && ((Event->Type & EVT_NOTIFY_WAIT) != 0)) {
//
// Queue the wait notify function
//
CoreAcquireEventLock ();
- if (!Event->SignalCount) {
+ if (Event->SignalCount == 0) {
CoreNotifyEvent (Event);
}
CoreReleaseEventLock ();
@@ -568,10 +568,10 @@ CoreCheckEvent (
// If the even looks signalled, get the lock and clear it
//
- if (Event->SignalCount) {
+ if (Event->SignalCount != 0) {
CoreAcquireEventLock ();
- if (Event->SignalCount) {
+ if (Event->SignalCount != 0) {
Event->SignalCount = 0;
Status = EFI_SUCCESS;
}
diff --git a/MdeModulePkg/Core/Dxe/Event/Timer.c b/MdeModulePkg/Core/Dxe/Event/Timer.c
index eefd5a7..d0ca1fc 100644
--- a/MdeModulePkg/Core/Dxe/Event/Timer.c
+++ b/MdeModulePkg/Core/Dxe/Event/Timer.c
@@ -260,7 +260,7 @@ CoreSetTimer (
return EFI_INVALID_PARAMETER;
}
- if (Type < 0 || Type > TimerRelative || !(Event->Type & EVT_TIMER)) {
+ if (Type < 0 || Type > TimerRelative || (Event->Type & EVT_TIMER) == 0) {
return EFI_INVALID_PARAMETER;
}
diff --git a/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c b/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c
index 3966daf..2c0cfd7 100644
--- a/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c
+++ b/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c
@@ -303,7 +303,7 @@ FwVolBlockGetPhysicalAddress (
FvbDevice = FVB_DEVICE_FROM_THIS (This);
- if (FvbDevice->FvbAttributes & EFI_FVB2_MEMORY_MAPPED) {
+ if ((FvbDevice->FvbAttributes & EFI_FVB2_MEMORY_MAPPED) != 0) {
*Address = FvbDevice->BaseAddress;
return EFI_SUCCESS;
}
diff --git a/MdeModulePkg/Core/Dxe/Hand/Handle.c b/MdeModulePkg/Core/Dxe/Hand/Handle.c
index e817357..062ac3f 100644
--- a/MdeModulePkg/Core/Dxe/Hand/Handle.c
+++ b/MdeModulePkg/Core/Dxe/Hand/Handle.c
@@ -640,7 +640,7 @@ CoreDisconnectControllersUsingProtocolInterface (
(Link != &Prot->OpenList) && !ItemFound;
Link = Link->ForwardLink ) {
OpenData = CR (Link, OPEN_PROTOCOL_DATA, Link, OPEN_PROTOCOL_DATA_SIGNATURE);
- if (OpenData->Attributes & EFI_OPEN_PROTOCOL_BY_DRIVER) {
+ if ((OpenData->Attributes & EFI_OPEN_PROTOCOL_BY_DRIVER) != 0) {
ItemFound = TRUE;
CoreReleaseProtocolLock ();
Status = CoreDisconnectController (UserHandle, OpenData->AgentHandle, NULL);
@@ -663,8 +663,8 @@ CoreDisconnectControllersUsingProtocolInterface (
(Link != &Prot->OpenList) && !ItemFound;
Link = Link->ForwardLink ) {
OpenData = CR (Link, OPEN_PROTOCOL_DATA, Link, OPEN_PROTOCOL_DATA_SIGNATURE);
- if (OpenData->Attributes &
- (EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL | EFI_OPEN_PROTOCOL_GET_PROTOCOL | EFI_OPEN_PROTOCOL_TEST_PROTOCOL)) {
+ if ((OpenData->Attributes &
+ (EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL | EFI_OPEN_PROTOCOL_GET_PROTOCOL | EFI_OPEN_PROTOCOL_TEST_PROTOCOL)) != 0) {
ItemFound = TRUE;
RemoveEntryList (&OpenData->Link);
Prot->OpenListCount--;
@@ -1086,14 +1086,14 @@ CoreOpenProtocol (
ExactMatch = (BOOLEAN)((OpenData->AgentHandle == ImageHandle) &&
(OpenData->Attributes == Attributes) &&
(OpenData->ControllerHandle == ControllerHandle));
- if (OpenData->Attributes & EFI_OPEN_PROTOCOL_BY_DRIVER) {
+ if ((OpenData->Attributes & EFI_OPEN_PROTOCOL_BY_DRIVER) != 0) {
ByDriver = TRUE;
if (ExactMatch) {
Status = EFI_ALREADY_STARTED;
goto Done;
}
}
- if (OpenData->Attributes & EFI_OPEN_PROTOCOL_EXCLUSIVE) {
+ if ((OpenData->Attributes & EFI_OPEN_PROTOCOL_EXCLUSIVE) != 0) {
Exclusive = TRUE;
} else if (ExactMatch) {
OpenData->OpenCount++;
@@ -1127,7 +1127,7 @@ CoreOpenProtocol (
Disconnect = FALSE;
for ( Link = Prot->OpenList.ForwardLink; (Link != &Prot->OpenList) && (!Disconnect); Link = Link->ForwardLink) {
OpenData = CR (Link, OPEN_PROTOCOL_DATA, Link, OPEN_PROTOCOL_DATA_SIGNATURE);
- if (OpenData->Attributes & EFI_OPEN_PROTOCOL_BY_DRIVER) {
+ if ((OpenData->Attributes & EFI_OPEN_PROTOCOL_BY_DRIVER) != 0) {
Disconnect = TRUE;
CoreReleaseProtocolLock ();
Status = CoreDisconnectController (UserHandle, OpenData->AgentHandle, NULL);
diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c
index c55bbe3..33dcc4f 100644
--- a/MdeModulePkg/Core/Dxe/Mem/Page.c
+++ b/MdeModulePkg/Core/Dxe/Mem/Page.c
@@ -1424,18 +1424,18 @@ CoreTerminateMemoryMap (
for (Link = gMemoryMap.ForwardLink; Link != &gMemoryMap; Link = Link->ForwardLink) {
Entry = CR(Link, MEMORY_MAP, Link, MEMORY_MAP_SIGNATURE);
- if (Entry->Attribute & EFI_MEMORY_RUNTIME) {
+ if ((Entry->Attribute & EFI_MEMORY_RUNTIME) != 0) {
if (Entry->Type == EfiACPIReclaimMemory || Entry->Type == EfiACPIMemoryNVS) {
DEBUG((DEBUG_ERROR | DEBUG_PAGE, "ExitBootServices: ACPI memory entry has RUNTIME attribute set.\n"));
Status = EFI_INVALID_PARAMETER;
goto Done;
}
- if (Entry->Start & (EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT - 1)) {
+ if ((Entry->Start & (EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT - 1)) != 0) {
DEBUG((DEBUG_ERROR | DEBUG_PAGE, "ExitBootServices: A RUNTIME memory entry is not on a proper alignment.\n"));
Status = EFI_INVALID_PARAMETER;
goto Done;
}
- if ((Entry->End + 1) & (EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT - 1)) {
+ if (((Entry->End + 1) & (EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT - 1)) != 0) {
DEBUG((DEBUG_ERROR | DEBUG_PAGE, "ExitBootServices: A RUNTIME memory entry is not on a proper alignment.\n"));
Status = EFI_INVALID_PARAMETER;
goto Done;
diff --git a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
index c8484d4..2b17239 100644
--- a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
+++ b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
@@ -656,7 +656,7 @@ CreateChildNode (
// Make sure we initialize the new stream with the correct
// authentication status for both aggregate and local status fields.
//
- if (GuidedHeader->Attributes & EFI_GUIDED_SECTION_AUTH_STATUS_VALID) {
+ if ((GuidedHeader->Attributes & EFI_GUIDED_SECTION_AUTH_STATUS_VALID) != 0) {
//
// OR in the parent stream's aggregate status.
//
@@ -685,7 +685,7 @@ CreateChildNode (
//
// There's no GUIDed section extraction protocol available.
//
- if (GuidedHeader->Attributes & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) {
+ if ((GuidedHeader->Attributes & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) != 0) {
//
// If the section REQUIRES an extraction protocol, then we're toast
//