diff options
author | Evan Huus <eapache@gmail.com> | 2013-09-15 22:34:36 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-09-15 22:34:36 +0000 |
commit | 464bbb1275273ecd1058c26ddc96525677b0a5f4 (patch) | |
tree | 930cf1c6dba37422a5efba20ed5b484472d304b5 | |
parent | c05e9683fd6c15f358b932ead19c018b9c69e429 (diff) |
Tweak mq macro and checkAPI to avoid false positives - "garbage"
(like a #define) at the beginning of a line before a value_string no longer
matches so a #define that includes the beginning of a value_string doesn't
confuse the script.
svn path=/trunk/; revision=52089
-rw-r--r-- | epan/dissectors/packet-mq.h | 3 | ||||
-rwxr-xr-x | tools/checkAPIs.pl | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/epan/dissectors/packet-mq.h b/epan/dissectors/packet-mq.h index cc722cb6f9..94eab327fa 100644 --- a/epan/dissectors/packet-mq.h +++ b/epan/dissectors/packet-mq.h @@ -31,8 +31,7 @@ #define GET_VALSV(A) mq_##A##_vals #define GET_VALSP(F) (gchar *)GET_VALSV(F) -#define DEF_VALSB(A) \ -const value_string mq_##A##_vals[] = \ +#define DEF_VALSB(A) const value_string mq_##A##_vals[] = \ { #define DEF_VALS1(A) { (guint32)MQ_##A, #A } diff --git a/tools/checkAPIs.pl b/tools/checkAPIs.pl index 6080e9d145..5a9da1131d 100755 --- a/tools/checkAPIs.pl +++ b/tools/checkAPIs.pl @@ -1880,7 +1880,7 @@ my $SingleQuotedStr = qr{ (?: \' (?: \\. | [^\'\\])* [']) }x; my $StaticRegex = qr/ static \s+ /xs; my $ConstRegex = qr/ const \s+ /xs; my $Static_andor_ConstRegex = qr/ (?: $StaticRegex $ConstRegex | $StaticRegex | $ConstRegex) /xs; -my $ValueStringRegex = qr/ $Static_andor_ConstRegex (?:value|string|range)_string \ + [^;*]+ = [^;]+ [{] [^;]+ ; /xs; +my $ValueStringRegex = qr/ ^ \s* $Static_andor_ConstRegex (?:value|string|range)_string \ + [^;*]+ = [^;]+ [{] [^;]+ ; /xms; my $EnumValRegex = qr/ $Static_andor_ConstRegex enum_val_t \ + [^;*]+ = [^;]+ [{] [^;]+ ; /xs; # |