public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Shenglei Zhang <shenglei.zhang@intel.com>
To: edk2-devel@lists.01.org
Cc: Bob Feng <bob.c.feng@intel.com>,
	Liming Gao <liming.gao@intel.com>,
	Yonghong Zhu <yonghong.zhu@intel.com>
Subject: [PATCH 2/2] BaseTools/Common: Remove InternalCharToUpper
Date: Thu, 13 Dec 2018 16:34:39 +0800	[thread overview]
Message-ID: <20181213083439.28716-3-shenglei.zhang@intel.com> (raw)
In-Reply-To: <20181213083439.28716-1-shenglei.zhang@intel.com>

InternalCharToUpper is an internal function.
So remove InternalCharToUpper and replace it with a public
function CharToUpper which has the same function as the internal one
in all places.
https://bugzilla.tianocore.org/show_bug.cgi?id=1369

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 BaseTools/Source/C/Common/CommonLib.c | 16 ++--------------
 BaseTools/Source/C/Common/CommonLib.h |  4 ----
 2 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/BaseTools/Source/C/Common/CommonLib.c b/BaseTools/Source/C/Common/CommonLib.c
index 5c40fdb5fd..878b593a4e 100644
--- a/BaseTools/Source/C/Common/CommonLib.c
+++ b/BaseTools/Source/C/Common/CommonLib.c
@@ -740,18 +740,6 @@ Returns:
 #endif
 }
 
-CHAR16
-InternalCharToUpper (
-        CHAR16                    Char
-  )
-{
-  if (Char >= L'a' && Char <= L'z') {
-    return (CHAR16) (Char - (L'a' - L'A'));
-  }
-
-  return Char;
-}
-
 UINTN
 StrnLenS (
    CONST CHAR16              *String,
@@ -1089,7 +1077,7 @@ StrHexToUint64S (
     String++;
   }
 
-  if (InternalCharToUpper (*String) == L'X') {
+  if (CharToUpper (*String) == L'X') {
     if (*(String - 1) != L'0') {
       *Data = 0;
       return RETURN_SUCCESS;
@@ -1264,7 +1252,7 @@ InternalHexCharToUintn (
     return Char - L'0';
   }
 
-  return (10 + InternalCharToUpper (Char) - L'A');
+  return (10 + CharToUpper (Char) - L'A');
 }
 
 
diff --git a/BaseTools/Source/C/Common/CommonLib.h b/BaseTools/Source/C/Common/CommonLib.h
index 4e1541bc70..b81584c7d4 100644
--- a/BaseTools/Source/C/Common/CommonLib.h
+++ b/BaseTools/Source/C/Common/CommonLib.h
@@ -304,10 +304,6 @@ StrnLenS (
    UINTN                     MaxSize
   );
 
-CHAR16
-InternalCharToUpper (
-        CHAR16                    Char
-  );
 
 INTN
 StrCmp (
-- 
2.18.0.windows.1



  parent reply	other threads:[~2018-12-13  8:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13  8:34 [PATCH 0/2] Add two public functions Shenglei Zhang
2018-12-13  8:34 ` [PATCH 1/2] MdePkg/BaseLib: " Shenglei Zhang
2018-12-13 10:33   ` Laszlo Ersek
2018-12-13 10:49   ` Leif Lindholm
2018-12-13  8:34 ` Shenglei Zhang [this message]
2018-12-13 10:51 ` [PATCH 0/2] " Leif Lindholm
2018-12-14  6:17   ` Zhang, Shenglei

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=20181213083439.28716-3-shenglei.zhang@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