aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-02-26 22:03:12 -0500
committerMichael Mann <mmann78@netscape.net>2015-03-01 12:54:33 +0000
commit9c55903029ee0e6720597ef07e8a5b359cae068e (patch)
tree251dddfa5de23777e225e128529b00a7a0143b76 /plugins
parent5f2c8e9575eb6afb6c645d43a015cff035fcbeb0 (diff)
Use COPY_ADDRESS_SHALLOW instead of duplicating TVB_SET_ADDRESS and SET_ADDRESS calls for the same address.
Change-Id: I0c9cc5d574fdd73ecf1f8b32dbbf0ddb2b885116 Reviewed-on: https://code.wireshark.org/review/7437 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/docsis/packet-macmgmt.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/docsis/packet-macmgmt.c b/plugins/docsis/packet-macmgmt.c
index 28b2578c31..2dae3da8f6 100644
--- a/plugins/docsis/packet-macmgmt.c
+++ b/plugins/docsis/packet-macmgmt.c
@@ -146,7 +146,6 @@ static const value_string mgmt_type_vals[] = {
static void
dissect_macmgmt (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
- const guint8 *src, *dst;
guint16 msg_len;
proto_item *mgt_hdr_it;
proto_tree *mgt_hdr_tree;
@@ -157,12 +156,10 @@ dissect_macmgmt (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
col_clear(pinfo->cinfo, COL_INFO);
- src = tvb_get_ptr (tvb, 6, 6);
- dst = tvb_get_ptr (tvb, 0, 6);
- SET_ADDRESS (&pinfo->dl_src, AT_ETHER, 6, src);
- SET_ADDRESS (&pinfo->src, AT_ETHER, 6, src);
- SET_ADDRESS (&pinfo->dl_dst, AT_ETHER, 6, dst);
- SET_ADDRESS (&pinfo->dst, AT_ETHER, 6, dst);
+ TVB_SET_ADDRESS (&pinfo->dl_src, AT_ETHER, tvb, 6, 6);
+ COPY_ADDRESS_SHALLOW(&pinfo->src, &pinfo->dl_src);
+ TVB_SET_ADDRESS (&pinfo->dl_dst, AT_ETHER, tvb, 0, 6);
+ COPY_ADDRESS_SHALLOW(&pinfo->dst, &pinfo->dl_dst);
if (tree)
{