Re: [PATCH] fixdep: remove redundant null character check

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

 



On Tue, Feb 18, 2020 at 7:00 PM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
>
> If *q is '\0', the condition (isalnum(*q) || *q == '_') is false anyway.
>
> Ensuring non-zero *q is redundant.
>
> Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
> ---


Applied to linux-kbuild.

>  scripts/basic/fixdep.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
> index ad2041817985..877ca2c88246 100644
> --- a/scripts/basic/fixdep.c
> +++ b/scripts/basic/fixdep.c
> @@ -246,7 +246,7 @@ static void parse_config_file(const char *p)
>                 }
>                 p += 7;
>                 q = p;
> -               while (*q && (isalnum(*q) || *q == '_'))
> +               while (isalnum(*q) || *q == '_')
>                         q++;
>                 if (str_ends_with(p, q - p, "_MODULE"))
>                         r = q - 7;
> --
> 2.17.1
>


-- 
Best Regards
Masahiro Yamada



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux