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
Subject: [Patch 2/3] IntelFrameworkPkg UefiLib: Use comparison logic to check UINTN parameter
Date: Mon, 28 May 2018 15:30:51 +0800	[thread overview]
Message-ID: <1527492652-17544-3-git-send-email-liming.gao@intel.com> (raw)
In-Reply-To: <1527492652-17544-1-git-send-email-liming.gao@intel.com>

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

diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
index 1d71f47..819795b 100644
--- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
+++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
@@ -1510,7 +1510,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++);
     }
 
@@ -1525,7 +1525,7 @@ GetBestLanguage (
         //
         // In RFC 4646 mode, then Loop through all language codes in SupportedLanguages
         //
-        if (!Iso639Language) {
+        if (Iso639Language == 0) {
           //
           // Skip ';' characters in Supported
           //
@@ -1557,7 +1557,7 @@ GetBestLanguage (
         }
       }
 
-      if (Iso639Language) {
+      if (Iso639Language != 0) {
         //
         // If ISO 639 mode, then each language can only be tested once
         //
-- 
2.8.0.windows.1



  parent 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 ` [Patch 1/3] MdePkg UefiLib: Use comparison logic to check UINTN parameter Liming Gao
2018-05-28  7:30 ` Liming Gao [this message]
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-3-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