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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

> Remove quotes from argument value only if there is qoute on both
> sides.
> 
> Signed-off-by: Michal Suchanek <msuchanek@xxxxxxx>
> ---
>  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.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux