From 0ad98563a24b8685545825aac889ef43bfc58809 Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Tue, 29 Oct 2013 14:09:20 +0000 Subject: 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 --- epan/dissectors/packet-umts_mac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-umts_mac.c') diff --git a/epan/dissectors/packet-umts_mac.c b/epan/dissectors/packet-umts_mac.c index db066acd36..1f666ce03a 100644 --- a/epan/dissectors/packet-umts_mac.c +++ b/epan/dissectors/packet-umts_mac.c @@ -290,7 +290,7 @@ static void dissect_mac_fdd_rach(tvbuff_t *tvb, packet_info *pinfo, proto_tree * col_set_str(pinfo->cinfo, COL_PROTOCOL, "MAC"); - col_add_str(pinfo->cinfo, COL_INFO, + col_set_str(pinfo->cinfo, COL_INFO, val_to_str_const(tctf, rach_fdd_tctf_vals, "Unknown TCTF")); ti = proto_tree_add_item(tree, proto_umts_mac, tvb, 0, -1, ENC_NA); @@ -380,7 +380,7 @@ static void dissect_mac_fdd_fach(tvbuff_t *tvb, packet_info *pinfo, proto_tree * col_set_str(pinfo->cinfo, COL_PROTOCOL, "MAC"); - col_add_str(pinfo->cinfo, COL_INFO, + col_set_str(pinfo->cinfo, COL_INFO, val_to_str_const(tctf, fach_fdd_tctf_vals, "Unknown TCTF")); ti = proto_tree_add_item(tree, proto_umts_mac, tvb, 0, -1, ENC_NA); -- cgit v1.2.3