* [PATCH] fixdep: remove redundant null character check
@ 2020-02-18 10:00 Masahiro Yamada
2020-02-27 16:44 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2020-02-18 10:00 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel
If *q is '\0', the condition (isalnum(*q) || *q == '_') is false anyway.
Ensuring non-zero *q is redundant.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fixdep: remove redundant null character check
2020-02-18 10:00 [PATCH] fixdep: remove redundant null character check Masahiro Yamada
@ 2020-02-27 16:44 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2020-02-27 16:44 UTC (permalink / raw)
To: Linux Kbuild mailing list; +Cc: Michal Marek, Linux Kernel Mailing List
On Tue, Feb 18, 2020 at 7:00 PM Masahiro Yamada <masahiroy@kernel.org> 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@kernel.org>
> ---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-27 16:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-18 10:00 [PATCH] fixdep: remove redundant null character check Masahiro Yamada
2020-02-27 16:44 ` Masahiro Yamada
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.