Fix several coding style violations

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6163 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2008-10-21 03:11:47 +00:00
parent 47b702c650
commit 6e53646837
6 changed files with 19 additions and 19 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);

View File

@ -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;

View File

@ -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
//