aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mrcpv2.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2013-10-29 14:09:20 +0000
committerBill Meier <wmeier@newsguy.com>2013-10-29 14:09:20 +0000
commit0ad98563a24b8685545825aac889ef43bfc58809 (patch)
treed44e5d34582bc2a05ba6be6bd8d818e9a813147f /epan/dissectors/packet-mrcpv2.c
parent86c145ecb33495023a7966030faab5a69a3067eb (diff)
From didier gautheron: remove redundant or use faster col_xxx functions
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster. - same for replace col_append_fstr and col_append_str - remove col_clear() when it's redundant: + before a col_set/col_add if the dissector can't throw an exception. - replace col_append() after a col_clear() with faster col_add... or col_set https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344 svn path=/trunk/; revision=52948
Diffstat (limited to 'epan/dissectors/packet-mrcpv2.c')
-rw-r--r--epan/dissectors/packet-mrcpv2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-mrcpv2.c b/epan/dissectors/packet-mrcpv2.c
index 17a326b885..46147f2b4a 100644
--- a/epan/dissectors/packet-mrcpv2.c
+++ b/epan/dissectors/packet-mrcpv2.c
@@ -509,7 +509,7 @@ dissect_mrcpv2_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch(line_type){
case REQUEST_LINE:
{
- col_add_str(pinfo->cinfo, COL_INFO, "Request: ");
+ col_set_str(pinfo->cinfo, COL_INFO, "Request: ");
line_item = proto_tree_add_item(mrcpv2_tree, hf_mrcpv2_Request_Line, tvb, offset, linelen, ENC_UTF_8);
request_line_item = proto_item_add_subtree(line_item, ett_Request_Line);
/* version */
@@ -533,7 +533,7 @@ dissect_mrcpv2_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case RESPONSE_LINE:
{
- col_add_str(pinfo->cinfo, COL_INFO, "Response: ");
+ col_set_str(pinfo->cinfo, COL_INFO, "Response: ");
line_item = proto_tree_add_item(mrcpv2_tree, hf_mrcpv2_Response_Line, tvb, offset, linelen, ENC_UTF_8);
response_line_item = proto_item_add_subtree(line_item, ett_Response_Line);
/* version */
@@ -563,7 +563,7 @@ dissect_mrcpv2_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case EVENT_LINE:
{
- col_add_str(pinfo->cinfo, COL_INFO, "Event: ");
+ col_set_str(pinfo->cinfo, COL_INFO, "Event: ");
line_item = proto_tree_add_item(mrcpv2_tree, hf_mrcpv2_Event_Line, tvb, offset, linelen, ENC_UTF_8);
event_line_item = proto_item_add_subtree(line_item, ett_Event_Line);
/* version */
@@ -592,7 +592,7 @@ dissect_mrcpv2_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
default:
{
/* mark whole packet as unknown and return */
- col_add_str(pinfo->cinfo, COL_INFO, "UNKNOWN message");
+ col_set_str(pinfo->cinfo, COL_INFO, "UNKNOWN message");
proto_tree_add_item(mrcpv2_tree, hf_mrcpv2_Unknown_Message, tvb, offset, tvb_len, ENC_UTF_8);
return tvb_len;
}