aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btatt.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-btatt.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-btatt.c')
-rw-r--r--epan/dissectors/packet-btatt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-btatt.c b/epan/dissectors/packet-btatt.c
index f05e42dd6a..4adfb52875 100644
--- a/epan/dissectors/packet-btatt.c
+++ b/epan/dissectors/packet-btatt.c
@@ -269,10 +269,10 @@ dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
switch (pinfo->p2p_dir) {
case P2P_DIR_SENT:
- col_add_str(pinfo->cinfo, COL_INFO, "Sent ");
+ col_set_str(pinfo->cinfo, COL_INFO, "Sent ");
break;
case P2P_DIR_RECV:
- col_add_str(pinfo->cinfo, COL_INFO, "Rcvd ");
+ col_set_str(pinfo->cinfo, COL_INFO, "Rcvd ");
break;
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown direction %d ",
@@ -290,7 +290,7 @@ dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
opcode = tvb_get_guint8(tvb, 0);
offset++;
- col_append_fstr(pinfo->cinfo, COL_INFO, "%s", val_to_str_const(opcode, opcode_vals, "<unknown>"));
+ col_append_str(pinfo->cinfo, COL_INFO, val_to_str_const(opcode, opcode_vals, "<unknown>"));
switch (opcode) {
case 0x01: /* Error Response */