From 42eedea958591087603bbacd1c2227d2494026af Mon Sep 17 00:00:00 2001 From: yshang1 Date: Fri, 25 Jul 2008 12:21:57 +0000 Subject: Code Scrub for MdePkg. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5567 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'MdePkg/Library/PeiIoLibCpuIo') diff --git a/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c b/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c index 133f5c2a2a..bc81ca2243 100644 --- a/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c +++ b/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c @@ -53,7 +53,7 @@ MmioReadBuffer8 ( ReturnBuffer = Buffer; - while (Length--) { + while (Length-- != 0) { *(Buffer++) = MmioRead8 (StartAddress++); } @@ -102,7 +102,7 @@ MmioReadBuffer16 ( ReturnBuffer = Buffer; - while (Length) { + while (Length != 0) { *(Buffer++) = MmioRead16 (StartAddress); StartAddress += sizeof (UINT16); Length -= sizeof (UINT16); @@ -153,7 +153,7 @@ MmioReadBuffer32 ( ReturnBuffer = Buffer; - while (Length) { + while (Length != 0) { *(Buffer++) = MmioRead32 (StartAddress); StartAddress += sizeof (UINT32); Length -= sizeof (UINT32); @@ -204,7 +204,7 @@ MmioReadBuffer64 ( ReturnBuffer = Buffer; - while (Length) { + while (Length != 0) { *(Buffer++) = MmioRead64 (StartAddress); StartAddress += sizeof (UINT64); Length -= sizeof (UINT64); @@ -247,7 +247,7 @@ MmioWriteBuffer8 ( ReturnBuffer = (UINT8 *) Buffer; - while (Length--) { + while (Length-- != 0) { MmioWrite8 (StartAddress++, *(Buffer++)); } @@ -298,7 +298,7 @@ MmioWriteBuffer16 ( ReturnBuffer = (UINT16 *) Buffer; - while (Length) { + while (Length != 0) { MmioWrite16 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT16); @@ -352,7 +352,7 @@ MmioWriteBuffer32 ( ReturnBuffer = (UINT32 *) Buffer; - while (Length) { + while (Length != 0) { MmioWrite32 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT32); @@ -405,7 +405,7 @@ MmioWriteBuffer64 ( ReturnBuffer = (UINT64 *) Buffer; - while (Length) { + while (Length != 0) { MmioWrite64 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT64); -- cgit v1.2.3