]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkPkg/Library/DxeIoLibCpuIo/IoLibMmioBuffer.c
fix ecc report-out issues
[mirror_edk2.git] / IntelFrameworkPkg / Library / DxeIoLibCpuIo / IoLibMmioBuffer.c
index 1a39f212884454ca4e3b7c081cf32081c5d81f80..f43db07fe6e3036b5b5c5431e5892076f4c352eb 100644 (file)
@@ -48,7 +48,7 @@ MmioReadBuffer8 (
 \r
   ReturnBuffer = Buffer;\r
 \r
-  while (Length--) {\r
+  while (Length-- > 0) {\r
     *(Buffer++) = MmioRead8 (StartAddress++);\r
   }\r
 \r
@@ -97,7 +97,7 @@ MmioReadBuffer16 (
 \r
   ReturnBuffer = Buffer;\r
 \r
-  while (Length) {\r
+  while (Length > 0) {\r
     *(Buffer++) = MmioRead16 (StartAddress);\r
     StartAddress += sizeof (UINT16);\r
     Length -= sizeof (UINT16);\r
@@ -148,7 +148,7 @@ MmioReadBuffer32 (
 \r
   ReturnBuffer = Buffer;\r
 \r
-  while (Length) {\r
+  while (Length > 0) {\r
     *(Buffer++) = MmioRead32 (StartAddress);\r
     StartAddress += sizeof (UINT32);\r
     Length -= sizeof (UINT32);\r
@@ -199,7 +199,7 @@ MmioReadBuffer64 (
 \r
   ReturnBuffer = Buffer;\r
 \r
-  while (Length) {\r
+  while (Length > 0) {\r
     *(Buffer++) = MmioRead64 (StartAddress);\r
     StartAddress += sizeof (UINT64);\r
     Length -= sizeof (UINT64);\r
@@ -242,7 +242,7 @@ MmioWriteBuffer8 (
 \r
   ReturnBuffer = (UINT8 *) Buffer;\r
 \r
-  while (Length--) {\r
+  while (Length-- > 0) {\r
      MmioWrite8 (StartAddress++, *(Buffer++));\r
   }\r
 \r
@@ -293,7 +293,7 @@ MmioWriteBuffer16 (
 \r
   ReturnBuffer = (UINT16 *) Buffer;\r
 \r
-  while (Length) {\r
+  while (Length > 0) {\r
     MmioWrite16 (StartAddress, *(Buffer++));\r
 \r
     StartAddress += sizeof (UINT16);\r
@@ -347,7 +347,7 @@ MmioWriteBuffer32 (
 \r
   ReturnBuffer = (UINT32 *) Buffer;\r
 \r
-  while (Length) {\r
+  while (Length > 0) {\r
     MmioWrite32 (StartAddress, *(Buffer++));\r
 \r
     StartAddress += sizeof (UINT32);\r
@@ -400,7 +400,7 @@ MmioWriteBuffer64 (
 \r
   ReturnBuffer = (UINT64 *) Buffer;\r
 \r
-  while (Length) {\r
+  while (Length > 0) {\r
     MmioWrite64 (StartAddress, *(Buffer++));\r
 \r
     StartAddress += sizeof (UINT64);\r