]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg UefiLib: Use comparison logic to check UINTN parameter
authorLiming Gao <liming.gao@intel.com>
Mon, 28 May 2018 07:30:50 +0000 (15:30 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 12 Jun 2018 01:23:11 +0000 (09:23 +0800)
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>
MdePkg/Include/Library/UefiLib.h
MdePkg/Library/UefiLib/UefiLib.c

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