diff options
-rwxr-xr-x | scripts/checkpatch.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 89b1df4e72ab..c5ec977b9c37 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -3169,12 +3169,12 @@ sub process { | |||
3169 | } | 3169 | } |
3170 | 3170 | ||
3171 | # check for global initialisers. | 3171 | # check for global initialisers. |
3172 | if ($line =~ /^\+(\s*$Type\s*$Ident\s*(?:\s+$Modifier))*\s*=\s*(0|NULL|false)\s*;/) { | 3172 | if ($line =~ /^\+$Type\s*$Ident(?:\s+$Modifier)*\s*=\s*(?:0|NULL|false)\s*;/) { |
3173 | if (ERROR("GLOBAL_INITIALISERS", | 3173 | if (ERROR("GLOBAL_INITIALISERS", |
3174 | "do not initialise globals to 0 or NULL\n" . | 3174 | "do not initialise globals to 0 or NULL\n" . |
3175 | $herecurr) && | 3175 | $herecurr) && |
3176 | $fix) { | 3176 | $fix) { |
3177 | $fixed[$fixlinenr] =~ s/($Type\s*$Ident\s*(?:\s+$Modifier))*\s*=\s*(0|NULL|false)\s*;/$1;/; | 3177 | $fixed[$fixlinenr] =~ s/(^.$Type\s*$Ident(?:\s+$Modifier)*)\s*=\s*(0|NULL|false)\s*;/$1;/; |
3178 | } | 3178 | } |
3179 | } | 3179 | } |
3180 | # check for static initialisers. | 3180 | # check for static initialisers. |