From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=shenglei.zhang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 609852119FF4D for ; Thu, 13 Dec 2018 00:34:46 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 00:34:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,347,1539673200"; d="scan'208";a="127513388" Received: from shenglei-dev.ccr.corp.intel.com ([10.239.158.52]) by fmsmga004.fm.intel.com with ESMTP; 13 Dec 2018 00:34:45 -0800 From: Shenglei Zhang To: edk2-devel@lists.01.org Cc: Bob Feng , Liming Gao , Yonghong Zhu Date: Thu, 13 Dec 2018 16:34:39 +0800 Message-Id: <20181213083439.28716-3-shenglei.zhang@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 In-Reply-To: <20181213083439.28716-1-shenglei.zhang@intel.com> References: <20181213083439.28716-1-shenglei.zhang@intel.com> Subject: [PATCH 2/2] BaseTools/Common: Remove InternalCharToUpper X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 08:34:46 -0000 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 Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang --- 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