public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Liming Gao <liming.gao@intel.com>
To: edk2-devel@lists.01.org
Cc: Michael Kinney <michael.d.kinney@intel.com>
Subject: [Patch 1/3] MdePkg UefiLib: Use comparison logic to check UINTN parameter
Date: Mon, 28 May 2018 15:30:50 +0800	[thread overview]
Message-ID: <1527492652-17544-2-git-send-email-liming.gao@intel.com> (raw)
In-Reply-To: <1527492652-17544-1-git-send-email-liming.gao@intel.com>

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>
---
 MdePkg/Library/UefiLib/UefiLib.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.c
index 23faa63..888519d 100644
--- a/MdePkg/Library/UefiLib/UefiLib.c
+++ b/MdePkg/Library/UefiLib/UefiLib.c
@@ -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
         //
-- 
2.8.0.windows.1



  reply	other threads:[~2018-05-28  7:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-28  7:30 [Patch 0/3] Use comparison logic to check UINTN parameter in GetBestLanguage API Liming Gao
2018-05-28  7:30 ` Liming Gao [this message]
2018-05-28  7:30 ` [Patch 2/3] IntelFrameworkPkg UefiLib: Use comparison logic to check UINTN parameter Liming Gao
2018-05-28  7:30 ` [Patch 3/3] MdeModulePkg Variable: " Liming Gao
2018-05-28  7:53 ` [Patch 0/3] Use comparison logic to check UINTN parameter in GetBestLanguage API Zeng, Star
2018-05-28  8:10   ` Marvin H?user
2018-05-29  3:36     ` Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1527492652-17544-2-git-send-email-liming.gao@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox