diff options
author | Liming Gao <liming.gao@intel.com> | 2018-05-28 15:30:50 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-06-12 09:23:11 +0800 |
commit | 3d7c6cfbab977e5c6f3e8dbcd9c7c0b72f7add8d (patch) | |
tree | 81d66f3ad3a9d7fd00ae16eceb19232d405dfc1c | |
parent | 0b37c75e6944f3d3ded7bef1e10cf4df72386616 (diff) | |
download | edk2-3d7c6cfbab977e5c6f3e8dbcd9c7c0b72f7add8d.tar.gz |
MdePkg UefiLib: Use comparison logic to check UINTN parameter
Commit d2aafe1e410c80d1046f2d1e743055882ead8489 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>
-rw-r--r-- | MdePkg/Include/Library/UefiLib.h | 4 | ||||
-rw-r--r-- | MdePkg/Library/UefiLib/UefiLib.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.h index bc2f712fdb..617420ee05 100644 --- a/MdePkg/Include/Library/UefiLib.h +++ b/MdePkg/Include/Library/UefiLib.h @@ -789,8 +789,8 @@ GetEfiGlobalVariable2 ( @param[in] SupportedLanguages A pointer to a Null-terminated ASCII string that
contains a set of language codes in the format
specified by Iso639Language.
- @param[in] Iso639Language If TRUE, then all language codes are assumed to be
- in ISO 639-2 format. If FALSE, then all language
+ @param[in] Iso639Language If not zero, then all language codes are assumed to be
+ in ISO 639-2 format. If zero, then all language
codes are assumed to be in RFC 4646 language format
@param[in] ... A variable argument list that contains pointers to
Null-terminated ASCII strings that contain one or more
diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.c index 9ade1b0ce1..2260183cba 100644 --- a/MdePkg/Library/UefiLib/UefiLib.c +++ b/MdePkg/Library/UefiLib/UefiLib.c @@ -1485,8 +1485,8 @@ GetEfiGlobalVariable2 ( @param[in] SupportedLanguages A pointer to a Null-terminated ASCII string that
contains a set of language codes in the format
specified by Iso639Language.
- @param[in] Iso639Language If TRUE, then all language codes are assumed to be
- in ISO 639-2 format. If FALSE, then all language
+ @param[in] Iso639Language If not zero, then all language codes are assumed to be
+ in ISO 639-2 format. If zero, then all language
codes are assumed to be in RFC 4646 language format
@param[in] ... A variable argument list that contains pointers to
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 (!Iso639Language) {
+ if (Iso639Language == 0) {
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
//
- if (!Iso639Language) {
+ if (Iso639Language == 0) {
//
// 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
//
|