From 24115e44926b33c763f81026690f20efd913daf2 Mon Sep 17 00:00:00 2001 From: ydong10 Date: Fri, 17 Sep 2010 10:42:10 +0000 Subject: RefRefine soma code to make code run safely. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10885 6f19259b-4bc3-4df7-8a09-765794883524 --- PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'PcAtChipsetPkg/Library') diff --git a/PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c b/PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c index 3c39f37432..6bf705312d 100644 --- a/PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c +++ b/PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c @@ -137,7 +137,7 @@ SerialPortWrite ( Result = NumberOfBytes; - while (NumberOfBytes--) { + while ((NumberOfBytes--) != 0) { // // Wait for the serail port to be ready. // @@ -178,7 +178,7 @@ SerialPortRead ( Result = NumberOfBytes; - while (NumberOfBytes--) { + while ((NumberOfBytes--) != 0) { // // Wait for the serail port to be ready. // -- cgit v1.2.3