aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-knet.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-knet.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-knet.c')
-rw-r--r--epan/dissectors/packet-knet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-knet.c b/epan/dissectors/packet-knet.c
index 259ea160ea..523d7b932a 100644
--- a/epan/dissectors/packet-knet.c
+++ b/epan/dissectors/packet-knet.c
@@ -551,7 +551,7 @@ dissect_knet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
bytes_left = TRUE;
col_clear(pinfo->cinfo, COL_INFO);
- col_add_str(pinfo->cinfo, COL_PROTOCOL, "KNET");
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "KNET");
if((current_protocol == KNET_SCTP_PACKET) || (current_protocol == KNET_TCP_PACKET))
{
@@ -643,7 +643,7 @@ dissect_knet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if(current_protocol == KNET_TCP_PACKET && ((struct tcpinfo*)(pinfo->private_data))->is_reassembled)
- col_add_str(pinfo->cinfo, COL_INFO, "REASSEMBLED PACKET");
+ col_set_str(pinfo->cinfo, COL_INFO, "REASSEMBLED PACKET");
else
col_add_fstr(pinfo->cinfo, COL_INFO, "Messages: %d %s", messageindex + 1, wmem_strbuf_get_str(info_field));