summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-06-12 03:14:26 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-06-12 03:14:26 +0000
commit0ccabf7bab741234721a8ee78113ef191c0ce8d5 (patch)
tree77ee8361991a9ebe4eb0ef10ad2452ad573c2477 /EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib
parentcda8ba5ed7db9b6a4c963734915eae3f1d31b613 (diff)
downloadedk2-platforms-0ccabf7bab741234721a8ee78113ef191c0ce8d5.tar.xz
Initialize the local variable before refer to them.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10577 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib')
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
index 30ec41769e..cc491238fe 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
@@ -155,7 +155,7 @@ GlueMakeTable (
//
// TableBits should not be greater than 16.
//
- if (TableBits >= (sizeof (Count)/sizeof (UINT16))) {
+ if (TableBits > 16) {
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] < (sizeof (Count)/sizeof (UINT16))) {
+ if (BitLen[Index] <= 16) {
Count[BitLen[Index]]++;
} else {
return (UINT16) BAD_TABLE;