All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: David Howells <dhowells@redhat.com>
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Leonardo Brás" <leobras.c@gmail.com>
Subject: Re: [PATCH 1/1] kbuild: Optimize tests and remove shadowed local variable.
Date: Wed, 19 Sep 2018 16:10:41 +0900	[thread overview]
Message-ID: <CAK7LNASCai6rPV-ibbKKzm94pr=5Ku_K3r1LY80BGngJWU73FQ@mail.gmail.com> (raw)
In-Reply-To: <20180918230002.GA7572@WindFlash>

FW: David Howells


2018-09-19 8:00 GMT+09:00 Leonardo Brás <leobras.c@gmail.com>:
> Removes an unnecessary shadowed local variable (start).
> Optimize test of isdigit:
> - If isalpha returns true, isdigit will return false, so no need to test.
>
> Signed-off-by: Leonardo Brás <leobras.c@gmail.com>


This patch was sent to me, but maybe belong to David's field.

David, will you take care of this patch?

https://lore.kernel.org/patchwork/patch/988171/

I think the commit subject should be changed kbuild: -> ASN.1:


Anyway, this patch looks trivial,
FWIW

Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>





> ---
>  scripts/asn1_compiler.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c
> index c146020fc783..a0056df4e358 100644
> --- a/scripts/asn1_compiler.c
> +++ b/scripts/asn1_compiler.c
> @@ -413,7 +413,7 @@ static void tokenise(char *buffer, char *end)
>
>                         /* Handle string tokens */
>                         if (isalpha(*p)) {
> -                               const char **dir, *start = p;
> +                               const char **dir;
>
>                                 /* Can be a directive, type name or element
>                                  * name.  Find the end of the name.
> @@ -454,10 +454,10 @@ static void tokenise(char *buffer, char *end)
>
>                                 tokens[tix++].token_type = TOKEN_TYPE_NAME;
>                                 continue;
> -                       }
>
> -                       /* Handle numbers */
> -                       if (isdigit(*p)) {
> +                       } else if (isdigit(*p)) {
> +                               /* Handle numbers */
> +
>                                 /* Find the end of the number */
>                                 q = p + 1;
>                                 while (q < nl && (isdigit(*q)))
> --
> 2.19.0
>



-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2018-09-19  7:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18 23:00 [PATCH 1/1] kbuild: Optimize tests and remove shadowed local variable Leonardo Brás
2018-09-19  7:10 ` Masahiro Yamada [this message]
2018-10-05  2:29   ` Leonardo Bras
2018-10-06 19:49     ` Masahiro Yamada
2018-10-10  1:02       ` Leonardo Bras

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-all 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='CAK7LNASCai6rPV-ibbKKzm94pr=5Ku_K3r1LY80BGngJWU73FQ@mail.gmail.com' \
    --to=yamada.masahiro@socionext.com \
    --cc=dhowells@redhat.com \
    --cc=leobras.c@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.