diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-09-13 04:00:47 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-09-13 04:00:47 +0000 |
commit | 1999e1d30fd2045ba0ff2b5fe47afc4aa3454030 (patch) | |
tree | ccbb4c7cee8f5d724b831c9a19315ecacd91de0b /epan/dissectors/packet-frame.c | |
parent | 9851cfbf1c1df8105231150fb50a87682bb22f8b (diff) |
Move the definition of GNUC_FORMAT_CHECK() to its own header, use it in
column-utils.h, and add it to expert.h, so we check the arguments to
"expert_add_info_format()", at least if the format argument is a
constant string.
Fix some more calls to "expert_add_info_format()" to pass it a format
string.
Don't record BoundsError exceptions as expert events - they merely
reflect a capture done with a snapshot length too short to capture all
of the packet (any case where it's caused by something else is a bug).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15776 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-frame.c')
-rw-r--r-- | epan/dissectors/packet-frame.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c index b7d35cad25..1c1ef49d0b 100644 --- a/epan/dissectors/packet-frame.c +++ b/epan/dissectors/packet-frame.c @@ -275,8 +275,6 @@ show_exception(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, col_append_str(pinfo->cinfo, COL_INFO, "[Short Frame]"); item = proto_tree_add_protocol_format(tree, proto_short, tvb, 0, 0, "[Short Frame: %s]", pinfo->current_proto); - expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR, - "Short Frame"); break; case ReportedBoundsError: @@ -299,8 +297,9 @@ show_exception(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pinfo->current_proto, pinfo->fd->num, exception_message == NULL ? dissector_error_nomsg : exception_message); - expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR, - exception_message == NULL ? + expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR, + "%s", + exception_message == NULL ? dissector_error_nomsg : exception_message); if (exception_message != NULL) g_free(exception_message); |