summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2010-10-22 17:54:08 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2010-10-22 17:54:08 +0000
commit6683e22b442c211e2377a7bb76e08841f70d0495 (patch)
treec99b9ec47a9358ed62bba060a9613abaca34eea1
parent052ba7eb466c7800554f50283e7e0cfacaaf20b6 (diff)
downloadwireshark-6683e22b442c211e2377a7bb76e08841f70d0495.tar.gz
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
-rwxr-xr-xtools/checkhf.pl16
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