Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1714393

Re: [PATCH v7 3/4] lib/cmdline.c Remove quotes symmetrically.

From msuchanek <msuchanek@suse.de>
Newsgroups linux.kernel
Subject Re: [PATCH v7 3/4] lib/cmdline.c Remove quotes symmetrically.
Date 2017-08-17 23:30 +0200
Message-ID <ufAwB-26N-95@gated-at.bofh.it> (permalink)
References <ufzqN-1nj-3@gated-at.bofh.it> <ufzqN-1nj-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 17 Aug 2017 22:14:30 +0200
Michal Suchanek <msuchanek@suse.de> wrote:

> Remove quotes from argument value only if there is qoute on both
> sides.
> 
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> ---
>  arch/powerpc/kernel/fadump.c | 6 ++----
>  lib/cmdline.c                | 7 ++-----
>  2 files changed, 4 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/fadump.c
> b/arch/powerpc/kernel/fadump.c index a1614d9b8a21..d7da4ce9f7ae 100644
> --- a/arch/powerpc/kernel/fadump.c
> +++ b/arch/powerpc/kernel/fadump.c
> @@ -489,10 +489,8 @@ static void __init fadump_update_params(struct
> param_info *param_info, *tgt++ = ' ';
>  
>  	/* next_arg removes one leading and one trailing '"' */
> -	if (*tgt == '"')
> -		shortening += 1;
> -	if (*(tgt + vallen + shortening) == '"')
> -		shortening += 1;
> +	if ((*tgt == '"') && (*(tgt + vallen + shortening) == '"'))
s/shortening/1/                                ^

in case somebody would want this patch and not the following one that
removes the code.

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v7 3/4] lib/cmdline.c Remove quotes symmetrically. Michal Suchanek <msuchanek@suse.de> - 2017-08-17 22:20 +0200
  Re: [PATCH v7 3/4] lib/cmdline.c Remove quotes symmetrically. msuchanek <msuchanek@suse.de> - 2017-08-17 23:30 +0200
  Re: [PATCH v7 3/4] lib/cmdline.c Remove quotes symmetrically. Baoquan He <bhe@redhat.com> - 2017-08-21 12:30 +0200
    Re: [PATCH v7 3/4] lib/cmdline.c Remove quotes symmetrically. Michal Suchánek <msuchanek@suse.de> - 2017-08-21 13:40 +0200
  Re: [PATCH v7 3/4] lib/cmdline.c Remove quotes symmetrically. Michael Ellerman <mpe@ellerman.id.au> - 2017-08-24 13:10 +0200
    Re: [PATCH v7 3/4] lib/cmdline.c Remove quotes symmetrically. msuchanek <msuchanek@suse.de> - 2017-08-24 14:20 +0200

csiph-web