From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: zhichao.gao@intel.com) Received: from mga18.intel.com (mga18.intel.com []) by groups.io with SMTP; Thu, 27 Jun 2019 21:29:11 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2019 20:58:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,426,1557212400"; d="scan'208";a="183599680" Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga001.fm.intel.com with ESMTP; 27 Jun 2019 20:57:59 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao Subject: [PATCH 1/3] MdePkg/BaseLib: Adjust the coding style in Base64Decode Date: Fri, 28 Jun 2019 11:57:44 +0800 Message-Id: <20190628035746.24160-2-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190628035746.24160-1-zhichao.gao@intel.com> References: <20190628035746.24160-1-zhichao.gao@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Adjust the code style for better view. Cc: Michael D Kinney Cc: Liming Gao Signed-off-by: Zhichao Gao --- MdePkg/Library/BaseLib/String.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/String.c index 32e189791c..b86e7e9436 100644 --- a/MdePkg/Library/BaseLib/String.c +++ b/MdePkg/Library/BaseLib/String.c @@ -1993,8 +1993,7 @@ Base64Decode ( if (BufferSize < -2) { return RETURN_INVALID_PARAMETER; } - } - else { + } else { Chr = Source[SourceIndex]; if (BAD_V != DecodingTable[(UINT8) Chr]) { @@ -2006,8 +2005,7 @@ Base64Decode ( return RETURN_INVALID_PARAMETER; } ActualSourceLength++; - } - else { + } else { // // The reset of the decoder will ignore all invalid characters allowed here. @@ -2029,8 +2027,8 @@ Base64Decode ( } BufferSize += ActualSourceLength / 4 * 3; - if (BufferSize < 0) { - return RETURN_INVALID_PARAMETER; + if (BufferSize < 0) { + return RETURN_INVALID_PARAMETER; } // @@ -2061,7 +2059,7 @@ Base64Decode ( // for (Index = 0; Index < 4; Index++) { do { - Chr = DecodingTable[(UINT8) Source[SourceIndex++]]; + Chr = DecodingTable[(UINT8) Source[SourceIndex++]]; } while (Chr == BAD_V); Value <<= 6; Value |= (UINT32)Chr; -- 2.21.0.windows.1