Add duplicate value_string in check filter
authorMichael Mann <mmann78@netscape.net>
Wed, 29 Mar 2017 01:49:47 +0000 (21:49 -0400)
committerAnders Broman <a.broman58@gmail.com>
Wed, 24 Jan 2018 11:48:53 +0000 (11:48 +0000)
Change-Id: Ie00d057f5bc36d65b6bba790169543a65b068e47
Signed-off-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-on: https://code.wireshark.org/review/20744
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
epan/proto.c

index 51a402358e62dd1aed1a09ecc5109b8f7c9352b0..2981cfb2ba1469ad03eda0d62b5e0c1a7d8b2653 100644 (file)
@@ -7361,13 +7361,14 @@ tmp_fld_check_assert(header_field_info *hfinfo)
        /* TODO: This check may slow down startup, and output quite a few warnings.
           It would be good to be able to enable this (and possibly other checks?)
           in non-release builds.   */
-#if 0
+#if ENABLE_CHECK_FILTER
        /* Check for duplicate value_string values.
           There are lots that have the same value *and* string, so for now only
           report those that have same value but different string. */
        if ((hfinfo->strings != NULL) &&
            !(hfinfo->display & BASE_RANGE_STRING) &&
-           !(FIELD_DISPLAY(hfinfo->display) == BASE_CUSTOM) &&
+           !(hfinfo->display & BASE_UNIT_STRING) &&
+           !((hfinfo->display & FIELD_DISPLAY_E_MASK) == BASE_CUSTOM) &&
            (
                    (hfinfo->type == FT_CHAR)  ||
                    (hfinfo->type == FT_UINT8)  ||
@@ -7377,8 +7378,7 @@ tmp_fld_check_assert(header_field_info *hfinfo)
                    (hfinfo->type == FT_INT8)   ||
                    (hfinfo->type == FT_INT16)  ||
                    (hfinfo->type == FT_INT24)  ||
-                   (hfinfo->type == FT_INT32)  ||
-                   (hfinfo->type == FT_FRAMENUM) )) {
+                   (hfinfo->type == FT_INT32)  )) {
 
                int n, m;
                const value_string *start_values;