\r
ReturnBuffer = Buffer;\r
\r
- while (Length--) {\r
+ while (Length-- > 0) {\r
*(Buffer++) = MmioRead8 (StartAddress++);\r
}\r
\r
\r
ReturnBuffer = Buffer;\r
\r
- while (Length) {\r
+ while (Length > 0) {\r
*(Buffer++) = MmioRead16 (StartAddress);\r
StartAddress += sizeof (UINT16);\r
Length -= sizeof (UINT16);\r
\r
ReturnBuffer = Buffer;\r
\r
- while (Length) {\r
+ while (Length > 0) {\r
*(Buffer++) = MmioRead32 (StartAddress);\r
StartAddress += sizeof (UINT32);\r
Length -= sizeof (UINT32);\r
\r
ReturnBuffer = Buffer;\r
\r
- while (Length) {\r
+ while (Length > 0) {\r
*(Buffer++) = MmioRead64 (StartAddress);\r
StartAddress += sizeof (UINT64);\r
Length -= sizeof (UINT64);\r
\r
ReturnBuffer = (UINT8 *) Buffer;\r
\r
- while (Length--) {\r
+ while (Length-- > 0) {\r
MmioWrite8 (StartAddress++, *(Buffer++));\r
}\r
\r
\r
ReturnBuffer = (UINT16 *) Buffer;\r
\r
- while (Length) {\r
+ while (Length > 0) {\r
MmioWrite16 (StartAddress, *(Buffer++));\r
\r
StartAddress += sizeof (UINT16);\r
\r
ReturnBuffer = (UINT32 *) Buffer;\r
\r
- while (Length) {\r
+ while (Length > 0) {\r
MmioWrite32 (StartAddress, *(Buffer++));\r
\r
StartAddress += sizeof (UINT32);\r
\r
ReturnBuffer = (UINT64 *) Buffer;\r
\r
- while (Length) {\r
+ while (Length > 0) {\r
MmioWrite64 (StartAddress, *(Buffer++));\r
\r
StartAddress += sizeof (UINT64);\r