|
@@ -3169,12 +3169,12 @@ sub process {
|
|
|
}
|
|
|
|
|
|
# check for global initialisers.
|
|
|
- if ($line =~ /^\+(\s*$Type\s*$Ident\s*(?:\s+$Modifier))*\s*=\s*(0|NULL|false)\s*;/) {
|
|
|
+ if ($line =~ /^\+$Type\s*$Ident(?:\s+$Modifier)*\s*=\s*(?:0|NULL|false)\s*;/) {
|
|
|
if (ERROR("GLOBAL_INITIALISERS",
|
|
|
"do not initialise globals to 0 or NULL\n" .
|
|
|
$herecurr) &&
|
|
|
$fix) {
|
|
|
- $fixed[$fixlinenr] =~ s/($Type\s*$Ident\s*(?:\s+$Modifier))*\s*=\s*(0|NULL|false)\s*;/$1;/;
|
|
|
+ $fixed[$fixlinenr] =~ s/(^.$Type\s*$Ident(?:\s+$Modifier)*)\s*=\s*(0|NULL|false)\s*;/$1;/;
|
|
|
}
|
|
|
}
|
|
|
# check for static initialisers.
|