[Linux-kernel-mentees] [PATCH] checkpatch: Fix the usage of capture group ( ... )

Lukas Bulwahn lukas.bulwahn at gmail.com
Sat Jul 11 19:14:01 UTC 2020

On Sat, Jul 11, 2020 at 5:44 PM Mrinal Pandey <mrinalmni at gmail.com> wrote:

> The usage of "capture group (...)" in the immediate condition after `&&`
> results in `$1` being uninitialized. This eventually crashes the script.
It does not really crash it, right? It just emits a warning.

> Fix this by placing the capture group in the condition before `&&`.
> Thus, `$1` can be initialized to the text it matches thereby setting it
> to the desired and required value.
Maybe you can look when this bug was introduced?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/linux-kernel-mentees/attachments/20200711/805d761c/attachment.html>

More information about the Linux-kernel-mentees mailing list