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
This commit is contained in:
lgao4
2010-06-12 03:14:26 +00:00
parent cda8ba5ed7
commit 0ccabf7bab
4 changed files with 20 additions and 9 deletions

View File

@@ -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;