[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH 2/5] ash: save a few bytes in code to parse case statements
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2015-10-29 18:43:26
Message-ID: CAK1hOcO5vZc2cYdpAYXq4UEe0aGb3g2XbMv5v35j_si5cwdF_Q () mail ! gmail ! com
[Download RAW message or body]
Applied, thanks
On Mon, Aug 3, 2015 at 2:46 PM, Ron Yorston <rmy@pobox.com> wrote:
> Based on commit 49b82fc from git://git.kernel.org/pub/scm/utils/dash/dash.git
> by Herbert Xu.
>
> function old new delta
> parse_command 1563 1555 -8
> ------------------------------------------------------------------------------
> (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-8) Total: -8 bytes
>
> Signed-off-by: Ron Yorston <rmy@pobox.com>
> ---
> shell/ash.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/shell/ash.c b/shell/ash.c
> index 450a42f..7f3808b 100644
> --- a/shell/ash.c
> +++ b/shell/ash.c
> @@ -10960,10 +10960,8 @@ parse_command(void)
> /*n2->narg.next = NULL; - stzalloc did it */
> n2->narg.text = wordtext;
> n2->narg.backquote = backquotelist;
> - do {
> - checkkwd = CHKKWD | CHKALIAS;
> - } while (readtoken() == TNL);
> - if (lasttoken != TIN)
> + checkkwd = CHKNL | CHKKWD | CHKALIAS;
> + if (readtoken() != TIN)
> raise_error_unexpected_syntax(TIN);
> cpp = &n1->ncase.cases;
> next_case:
> --
> 2.4.3
>
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic