aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ieee802154.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-ieee802154.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-ieee802154.c')
-rw-r--r--epan/dissectors/packet-ieee802154.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c
index 86e42a4bc1..033990ccf8 100644
--- a/epan/dissectors/packet-ieee802154.c
+++ b/epan/dissectors/packet-ieee802154.c
@@ -479,7 +479,6 @@ dissect_ieee802154_nonask_phy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
/* Add the protocol name. */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IEEE 802.15.4 non-ASK PHY");
/* Add the packet length. */
- col_clear(pinfo->cinfo, COL_PACKET_LENGTH);
col_add_fstr(pinfo->cinfo, COL_PACKET_LENGTH, "%i", tvb_length(tvb));
preamble=tvb_get_letohl(tvb,offset);
@@ -646,7 +645,6 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
/* Add the protocol name. */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IEEE 802.15.4");
/* Add the packet length. */
- col_clear(pinfo->cinfo, COL_PACKET_LENGTH);
col_add_fstr(pinfo->cinfo, COL_PACKET_LENGTH, "%i", tvb_length(tvb));
/* Add the packet length to the filter field */
@@ -1533,7 +1531,7 @@ dissect_ieee802154_assoc_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
}
else {
/* Association was unsuccessful. */
- col_append_fstr(pinfo->cinfo, COL_INFO, ", Unsuccessful");
+ col_append_str(pinfo->cinfo, COL_INFO, ", Unsuccessful");
}
/* Update the address table. */