diff options
author | Bill Meier <wmeier@newsguy.com> | 2013-10-29 14:09:20 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2013-10-29 14:09:20 +0000 |
commit | 0ad98563a24b8685545825aac889ef43bfc58809 (patch) | |
tree | d44e5d34582bc2a05ba6be6bd8d818e9a813147f /plugins/docsis | |
parent | 86c145ecb33495023a7966030faab5a69a3067eb (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 'plugins/docsis')
-rw-r--r-- | plugins/docsis/packet-bintrngreq.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-cmctrlreq.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-cmctrlrsp.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-cmstatus.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-dbcack.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-dbcreq.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-dbcrsp.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-docsis.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-dpvreq.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-dpvrsp.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-dsareq.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-dscreq.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-dsdreq.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-intrngreq.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-map.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-regreq.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-rngreq.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-rngrsp.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-type29ucd.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-uccreq.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-uccrsp.c | 1 | ||||
-rw-r--r-- | plugins/docsis/packet-ucd.c | 1 |
22 files changed, 0 insertions, 22 deletions
diff --git a/plugins/docsis/packet-bintrngreq.c b/plugins/docsis/packet-bintrngreq.c index 5b2256a85b..710efc7c5e 100644 --- a/plugins/docsis/packet-bintrngreq.c +++ b/plugins/docsis/packet-bintrngreq.c @@ -50,7 +50,6 @@ dissect_bintrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) md_ds_sg_id = tvb_get_ntohs (tvb, 0); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "Bonded Ranging Request: MD-DS-SG-ID = %u (0x%X)", md_ds_sg_id, md_ds_sg_id ); diff --git a/plugins/docsis/packet-cmctrlreq.c b/plugins/docsis/packet-cmctrlreq.c index dcadf54560..86555220f2 100644 --- a/plugins/docsis/packet-cmctrlreq.c +++ b/plugins/docsis/packet-cmctrlreq.c @@ -46,7 +46,6 @@ dissect_cmctrlreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) transid = tvb_get_ntohs (tvb, 0); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "CM Control Request: Transaction-Id = %u", transid); diff --git a/plugins/docsis/packet-cmctrlrsp.c b/plugins/docsis/packet-cmctrlrsp.c index c0195bfce1..60ec51ee87 100644 --- a/plugins/docsis/packet-cmctrlrsp.c +++ b/plugins/docsis/packet-cmctrlrsp.c @@ -54,7 +54,6 @@ dissect_cmctrlrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) transid = tvb_get_ntohs (tvb, 0); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "CM Control Response: Transaction-Id = %u", transid); diff --git a/plugins/docsis/packet-cmstatus.c b/plugins/docsis/packet-cmstatus.c index 2e2b100246..7681879c15 100644 --- a/plugins/docsis/packet-cmstatus.c +++ b/plugins/docsis/packet-cmstatus.c @@ -144,7 +144,6 @@ dissect_cmstatus (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) transid = tvb_get_ntohs (tvb, 0); event_type = tvb_get_guint8 (tvb, 2); len = tvb_reported_length_remaining (tvb, 3); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "CM-STATUS Report: Transaction ID = %u", transid); if (tree) diff --git a/plugins/docsis/packet-dbcack.c b/plugins/docsis/packet-dbcack.c index e2b43788e2..a7fc8f2337 100644 --- a/plugins/docsis/packet-dbcack.c +++ b/plugins/docsis/packet-dbcack.c @@ -46,7 +46,6 @@ dissect_dbcack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) transid = tvb_get_ntohs (tvb, 0); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "Dynamic Bonding Change Acknowledge: Tran-Id = %u", transid); diff --git a/plugins/docsis/packet-dbcreq.c b/plugins/docsis/packet-dbcreq.c index 3b073854b9..89b65836cc 100644 --- a/plugins/docsis/packet-dbcreq.c +++ b/plugins/docsis/packet-dbcreq.c @@ -48,7 +48,6 @@ dissect_dbcreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) transid = tvb_get_ntohs (tvb, 0); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "Dynamic Bonding Change Request: Tran-Id = %u", transid); diff --git a/plugins/docsis/packet-dbcrsp.c b/plugins/docsis/packet-dbcrsp.c index 34d0a18402..f40c2dac54 100644 --- a/plugins/docsis/packet-dbcrsp.c +++ b/plugins/docsis/packet-dbcrsp.c @@ -51,7 +51,6 @@ dissect_dbcrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) transid = tvb_get_ntohs (tvb, 0); confcode = tvb_get_guint8 (tvb, 2); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "Dynamic Bonding Change Response: Tran-Id = %u (%s)", transid, val_to_str (confcode, docsis_conf_code, "%d")); diff --git a/plugins/docsis/packet-docsis.c b/plugins/docsis/packet-docsis.c index d6e709a893..2c1dfd3a39 100644 --- a/plugins/docsis/packet-docsis.c +++ b/plugins/docsis/packet-docsis.c @@ -403,7 +403,6 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) /* Make entries in Protocol column and Info column on summary display */ col_set_str (pinfo->cinfo, COL_PROTOCOL, "DOCSIS"); - col_clear (pinfo->cinfo, COL_INFO); switch (fctype) { case FCTYPE_PACKET: diff --git a/plugins/docsis/packet-dpvreq.c b/plugins/docsis/packet-dpvreq.c index d3a9035b50..cadb81563b 100644 --- a/plugins/docsis/packet-dpvreq.c +++ b/plugins/docsis/packet-dpvreq.c @@ -54,7 +54,6 @@ dissect_dpvreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) transid = tvb_get_ntohs (tvb, 0); dschan = tvb_get_guint8 (tvb, 2); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "DOCSIS Path Verify Request: Transaction-Id = %u DS-Ch %d", transid, dschan); diff --git a/plugins/docsis/packet-dpvrsp.c b/plugins/docsis/packet-dpvrsp.c index c8bf0d2a5e..d2af746a9f 100644 --- a/plugins/docsis/packet-dpvrsp.c +++ b/plugins/docsis/packet-dpvrsp.c @@ -54,7 +54,6 @@ dissect_dpvrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) transid = tvb_get_ntohs (tvb, 0); dschan = tvb_get_guint8 (tvb, 2); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "DOCSIS Path Verify Response: Transaction-Id = %u DS-Ch %d", transid, dschan); diff --git a/plugins/docsis/packet-dsareq.c b/plugins/docsis/packet-dsareq.c index 1e3b9be75e..f4333f85dd 100644 --- a/plugins/docsis/packet-dsareq.c +++ b/plugins/docsis/packet-dsareq.c @@ -48,7 +48,6 @@ dissect_dsareq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) transid = tvb_get_ntohs (tvb, 0); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "Dynamic Service Addition Request Tran-id = %u", transid); diff --git a/plugins/docsis/packet-dscreq.c b/plugins/docsis/packet-dscreq.c index ac7aac268c..fefa3ea9a4 100644 --- a/plugins/docsis/packet-dscreq.c +++ b/plugins/docsis/packet-dscreq.c @@ -49,7 +49,6 @@ dissect_dscreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) transid = tvb_get_ntohs (tvb, 0); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "Dynamic Service Change Request Tran-id = %u", transid); diff --git a/plugins/docsis/packet-dsdreq.c b/plugins/docsis/packet-dsdreq.c index 40c0be2765..6769323d32 100644 --- a/plugins/docsis/packet-dsdreq.c +++ b/plugins/docsis/packet-dsdreq.c @@ -51,7 +51,6 @@ dissect_dsdreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) transid = tvb_get_ntohs (tvb, 0); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "Dynamic Service Delete Request Tran-id = %u", transid); if (tree) diff --git a/plugins/docsis/packet-intrngreq.c b/plugins/docsis/packet-intrngreq.c index 2c7f1f204e..3dbbb555f0 100644 --- a/plugins/docsis/packet-intrngreq.c +++ b/plugins/docsis/packet-intrngreq.c @@ -48,7 +48,6 @@ dissect_intrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) sid = tvb_get_ntohs (tvb, 0); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "Ranging Request: SID = %u",sid); if (tree) diff --git a/plugins/docsis/packet-map.c b/plugins/docsis/packet-map.c index b4f275a2a7..1c67a7c455 100644 --- a/plugins/docsis/packet-map.c +++ b/plugins/docsis/packet-map.c @@ -84,7 +84,6 @@ dissect_map (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) upchid = tvb_get_guint8 (tvb, 0); ucd_count = tvb_get_guint8 (tvb, 1); - col_clear (pinfo->cinfo, COL_INFO); if (upchid > 0) col_add_fstr (pinfo->cinfo, COL_INFO, "Map Message: Channel ID = %u (U%u), UCD Count = %u, # IE's = %u", diff --git a/plugins/docsis/packet-regreq.c b/plugins/docsis/packet-regreq.c index dd26d5c7ff..a9a27b1810 100644 --- a/plugins/docsis/packet-regreq.c +++ b/plugins/docsis/packet-regreq.c @@ -49,7 +49,6 @@ dissect_regreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) sid = tvb_get_ntohs (tvb, 0); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "Registration Request SID = %u", sid); diff --git a/plugins/docsis/packet-rngreq.c b/plugins/docsis/packet-rngreq.c index 5deba47e12..b5c451c73e 100644 --- a/plugins/docsis/packet-rngreq.c +++ b/plugins/docsis/packet-rngreq.c @@ -48,7 +48,6 @@ dissect_rngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) sid = tvb_get_ntohs (tvb, 0); - col_clear (pinfo->cinfo, COL_INFO); if (sid > 0) col_add_fstr (pinfo->cinfo, COL_INFO, "Ranging Request: SID = %u", sid); diff --git a/plugins/docsis/packet-rngrsp.c b/plugins/docsis/packet-rngrsp.c index 6a2cf0543e..c641941c87 100644 --- a/plugins/docsis/packet-rngrsp.c +++ b/plugins/docsis/packet-rngrsp.c @@ -74,7 +74,6 @@ dissect_rngrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) sid = tvb_get_ntohs (tvb, 0); upchid = tvb_get_guint8 (tvb, 2); - col_clear (pinfo->cinfo, COL_INFO); if (upchid > 0) col_add_fstr (pinfo->cinfo, COL_INFO, "Ranging Response: SID = %u, Upstream Channel = %u (U%u)", diff --git a/plugins/docsis/packet-type29ucd.c b/plugins/docsis/packet-type29ucd.c index 40d415123d..2689805605 100644 --- a/plugins/docsis/packet-type29ucd.c +++ b/plugins/docsis/packet-type29ucd.c @@ -204,7 +204,6 @@ dissect_type29ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) upchid = tvb_get_guint8 (tvb, 0); /* if the upstream Channel ID is 0 then this is for Telephony Return) */ - col_clear (pinfo->cinfo, COL_INFO); if (upchid > 0) col_add_fstr (pinfo->cinfo, COL_INFO, "type29ucd Message: Channel ID = %u (U%u)", upchid, diff --git a/plugins/docsis/packet-uccreq.c b/plugins/docsis/packet-uccreq.c index 817bc54c7b..ff8aff00d0 100644 --- a/plugins/docsis/packet-uccreq.c +++ b/plugins/docsis/packet-uccreq.c @@ -48,7 +48,6 @@ dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) chid = tvb_get_guint8 (tvb, 0); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "Upstream Channel Change request Channel ID = %u (U%u)", chid, (chid > 0 ? chid - 1 : chid)); diff --git a/plugins/docsis/packet-uccrsp.c b/plugins/docsis/packet-uccrsp.c index ac33e40402..2dbd88770f 100644 --- a/plugins/docsis/packet-uccrsp.c +++ b/plugins/docsis/packet-uccrsp.c @@ -46,7 +46,6 @@ dissect_uccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) chid = tvb_get_guint8 (tvb, 0); - col_clear (pinfo->cinfo, COL_INFO); col_add_fstr (pinfo->cinfo, COL_INFO, "Upstream Channel Change response Channel ID = %u (U%u)", chid, (chid > 0 ? chid - 1 : chid)); diff --git a/plugins/docsis/packet-ucd.c b/plugins/docsis/packet-ucd.c index 7d83f4a408..df0cf1a170 100644 --- a/plugins/docsis/packet-ucd.c +++ b/plugins/docsis/packet-ucd.c @@ -169,7 +169,6 @@ static void upchid = tvb_get_guint8 (tvb, 0); /* if the upstream Channel ID is 0 then this is for Telephony Return) */ - col_clear (pinfo->cinfo, COL_INFO); if (upchid > 0) col_add_fstr (pinfo->cinfo, COL_INFO, "UCD Message: Channel ID = %u (U%u)", upchid, |