diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-10-22 17:54:08 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-10-22 17:54:08 +0000 |
commit | 6683e22b442c211e2377a7bb76e08841f70d0495 (patch) | |
tree | c99b9ec47a9358ed62bba060a9613abaca34eea1 /tools/checkhf.pl | |
parent | 052ba7eb466c7800554f50283e7e0cfacaaf20b6 (diff) |
Fix detection of hf entries being used in the hf array where the opening brace
is on the preceding line. There was code here to do it but it needed to be
moved inside the preceding 'else' (in particular, before the 'next' sent us
around the loop again).
The bug was noticed by Alexis La Goutte in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5329
svn path=/trunk/; revision=34623
Diffstat (limited to 'tools/checkhf.pl')
-rwxr-xr-x | tools/checkhf.pl | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/tools/checkhf.pl b/tools/checkhf.pl index 0e66d16c98..74ad9e2e32 100755 --- a/tools/checkhf.pl +++ b/tools/checkhf.pl @@ -162,7 +162,7 @@ while (<>) { $skip{$element} = 1; } next; - } elsif ($brace == 1 && /^\s*?&\s*?(hf_\w*)\W+/) { + } elsif ($brace == 1 && /^\s*&\s*(hf_\w*)\W+/) { $element = $1; $type = "t_array"; } elsif (/^\s*\{\s*?&\s*?(hf_\w*)\W+/) { @@ -174,15 +174,13 @@ while (<>) { next if ($skip{$element}); $type = "t_usage"; } else { - # current line is not relevant - next; - } - # Line with only a { - if (/^\s+\{\s*$/) { - $brace = 1; + # Line with only a { + if (/^\s+\{\s*$/) { + $brace = 1; + } else { + $brace = 0; + } next; - } else { - $brace = 0; } # Get current state |