aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2015-09-23 10:14:31 -0400
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2015-09-23 20:09:39 +0000
commit3ff5afd54131dc611ac08cf4f256a7c081c0cbb3 (patch)
tree22f9d3de81455bb78dd16ae44f1a55aed17620d9 /tshark.c
parent66de69aeaee944cf3130dc75fe3ecb7f383be897 (diff)
Add a test to verify we pre-allocated enough hf entries.
This way we'll know as soon as we drop below the pre-allocated limit. As suggested by Graham on https://code.wireshark.org/review/10601 Change-Id: Ieeb14bdcf991d7a67c30787c97ca24ebb35d1763 Reviewed-on: https://code.wireshark.org/review/10627 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tshark.c b/tshark.c
index ff37f85557..4c4c800fd5 100644
--- a/tshark.c
+++ b/tshark.c
@@ -1276,9 +1276,10 @@ DIAG_ON(cast-qual)
write_prefs(NULL);
else if (strcmp(argv[2], "dissector-tables") == 0)
dissector_dump_dissector_tables();
- else if (strcmp(argv[2], "fieldcount") == 0)
- proto_registrar_dump_fieldcount();
- else if (strcmp(argv[2], "fields") == 0)
+ else if (strcmp(argv[2], "fieldcount") == 0) {
+ /* return value for the test suite */
+ return proto_registrar_dump_fieldcount();
+ } else if (strcmp(argv[2], "fields") == 0)
proto_registrar_dump_fields();
else if (strcmp(argv[2], "ftypes") == 0)
proto_registrar_dump_ftypes();