The caller of FindVariable() function ensure VariableName != NULL && VendorGuid != NULL. In the internal of this function, we only need to ensure that (VariableName[0] != 0 && VenderGuid != NULL) is true.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7389 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian 2009-02-02 03:13:35 +00:00
parent 841c077074
commit 6041576eb2
2 changed files with 2 additions and 2 deletions

View File

@ -379,7 +379,7 @@ FindVariable (
UINT32 Count;
UINT8 *VariableBase;
if (VariableName != 0 && VendorGuid == NULL) {
if (VariableName[0] != 0 && VendorGuid == NULL) {
return EFI_INVALID_PARAMETER;
}
//

View File

@ -367,7 +367,7 @@ FindVariable (
UINT32 Count;
UINT8 *VariableBase;
if (VariableName != NULL && VendorGuid == NULL) {
if (VariableName[0] != 0 && VendorGuid == NULL) {
return EFI_INVALID_PARAMETER;
}
//