public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, zhichao.gao@intel.com
Cc: Michael D Kinney <michael.d.kinney@intel.com>,
	Liming Gao <liming.gao@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/3] MdePkg/BaseLib: Adjust the coding style in Base64Decode
Date: Mon, 1 Jul 2019 11:24:38 +0200	[thread overview]
Message-ID: <6468ec59-5d69-b8f2-e7f4-01318e0dcc79@redhat.com> (raw)
In-Reply-To: <20190628035746.24160-2-zhichao.gao@intel.com>

I have to revise my previous R-b for this patch. The patch is not wrong,
but it's not complete:

On 06/28/19 05:57, Gao, Zhichao wrote:
> Adjust the code style for better view.
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> ---
>  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++;

The line above remains incorrectly indented.

Thanks
Laszlo

> -      }
> -        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;
> 


  parent reply	other threads:[~2019-07-01  9:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28  3:57 [PATCH 0/3] MdePkg/BaseLib: Base64Decode: Make it follow its specification Gao, Zhichao
2019-06-28  3:57 ` [PATCH 1/3] MdePkg/BaseLib: Adjust the coding style in Base64Decode Gao, Zhichao
2019-06-28 14:26   ` [edk2-devel] " Laszlo Ersek
2019-07-01  9:24   ` Laszlo Ersek [this message]
2019-07-01  9:55   ` Laszlo Ersek
2019-06-28  3:57 ` [PATCH 2/3] MdePkg/BaseLib: Base64Decode: Make DestinationSize complied to spec Gao, Zhichao
2019-07-01 11:03   ` [edk2-devel] " Laszlo Ersek
2019-06-28  3:57 ` [PATCH 3/3] MdePkg/BaseLib: Base64Decode: Add decription for RETURN_SUCCESS Gao, Zhichao
2019-07-01  9:54   ` [edk2-devel] " Laszlo Ersek
2019-06-28 14:28 ` [edk2-devel] [PATCH 0/3] MdePkg/BaseLib: Base64Decode: Make it follow its specification Laszlo Ersek
2019-07-01 11:02 ` Laszlo Ersek
2019-07-01 11:11   ` Laszlo Ersek
2019-07-01 18:01   ` Laszlo Ersek

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=6468ec59-5d69-b8f2-e7f4-01318e0dcc79@redhat.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