MdePkg UefiLib: Use comparison logic to check UINTN parameter

Commit d2aafe1e41 changes the input parameter
from BOOLEAN to UINTN. Its comparison logic should be updated.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Liming Gao 2018-05-28 15:30:50 +08:00
parent 0b37c75e69
commit 3d7c6cfbab
2 changed files with 7 additions and 7 deletions

View File

@ -789,8 +789,8 @@ GetEfiGlobalVariable2 (
@param[in] SupportedLanguages A pointer to a Null-terminated ASCII string that @param[in] SupportedLanguages A pointer to a Null-terminated ASCII string that
contains a set of language codes in the format contains a set of language codes in the format
specified by Iso639Language. specified by Iso639Language.
@param[in] Iso639Language If TRUE, then all language codes are assumed to be @param[in] Iso639Language If not zero, then all language codes are assumed to be
in ISO 639-2 format. If FALSE, then all language in ISO 639-2 format. If zero, then all language
codes are assumed to be in RFC 4646 language format codes are assumed to be in RFC 4646 language format
@param[in] ... A variable argument list that contains pointers to @param[in] ... A variable argument list that contains pointers to
Null-terminated ASCII strings that contain one or more Null-terminated ASCII strings that contain one or more

View File

@ -1485,8 +1485,8 @@ GetEfiGlobalVariable2 (
@param[in] SupportedLanguages A pointer to a Null-terminated ASCII string that @param[in] SupportedLanguages A pointer to a Null-terminated ASCII string that
contains a set of language codes in the format contains a set of language codes in the format
specified by Iso639Language. specified by Iso639Language.
@param[in] Iso639Language If TRUE, then all language codes are assumed to be @param[in] Iso639Language If not zero, then all language codes are assumed to be
in ISO 639-2 format. If FALSE, then all language in ISO 639-2 format. If zero, then all language
codes are assumed to be in RFC 4646 language format codes are assumed to be in RFC 4646 language format
@param[in] ... A variable argument list that contains pointers to @param[in] ... A variable argument list that contains pointers to
Null-terminated ASCII strings that contain one or more Null-terminated ASCII strings that contain one or more
@ -1538,7 +1538,7 @@ GetBestLanguage (
// //
// If in RFC 4646 mode, then determine the length of the first RFC 4646 language code in Language // If in RFC 4646 mode, then determine the length of the first RFC 4646 language code in Language
// //
if (!Iso639Language) { if (Iso639Language == 0) {
for (LanguageLength = 0; Language[LanguageLength] != 0 && Language[LanguageLength] != ';'; LanguageLength++); for (LanguageLength = 0; Language[LanguageLength] != 0 && Language[LanguageLength] != ';'; LanguageLength++);
} }
@ -1553,7 +1553,7 @@ GetBestLanguage (
// //
// In RFC 4646 mode, then Loop through all language codes in SupportedLanguages // In RFC 4646 mode, then Loop through all language codes in SupportedLanguages
// //
if (!Iso639Language) { if (Iso639Language == 0) {
// //
// Skip ';' characters in Supported // Skip ';' characters in Supported
// //
@ -1585,7 +1585,7 @@ GetBestLanguage (
} }
} }
if (Iso639Language) { if (Iso639Language != 0) {
// //
// If ISO 639 mode, then each language can only be tested once // If ISO 639 mode, then each language can only be tested once
// //