diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 906624c0e9e6a6862631f085c263049e5d3eed58..a521d493b0c8600790d20b9574fc445d98f18d4a 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1632,7 +1632,7 @@ sub process { $herecurr); } # check for static initialisers. - if ($line =~ /\s*static\s.*=\s*(0|NULL|false)\s*;/) { + if ($line =~ /\bstatic\s.*=\s*(0|NULL|false)\s*;/) { ERROR("do not initialise statics to 0 or NULL\n" . $herecurr); }