From 97c0d02fd653fe210b6a19771d3442abfae87066 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Mon, 28 Jun 2010 10:26:41 +0000 Subject: Remove unnecessary volatile for local Index variable. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10608 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'EdkCompatibilityPkg') diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c index cc491238fe..a57b0b9e37 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c @@ -142,7 +142,7 @@ GlueMakeTable ( UINT16 Start[18]; UINT16 *Pointer; UINT16 Index3; - volatile UINT16 Index; + UINT16 Index; UINT16 Len; UINT16 Char; UINT16 JuBits; @@ -155,7 +155,7 @@ GlueMakeTable ( // // TableBits should not be greater than 16. // - if (TableBits > 16) { + if (TableBits >= (sizeof (Count)/sizeof (UINT16))) { return (UINT16) BAD_TABLE; } @@ -170,7 +170,7 @@ GlueMakeTable ( // // Count array index should not be greater than or equal to its size. // - if (BitLen[Index] <= 16) { + if (BitLen[Index] < (sizeof (Count)/sizeof (UINT16))) { Count[BitLen[Index]]++; } else { return (UINT16) BAD_TABLE; -- cgit v1.2.3