aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-exported_pdu.c
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 /epan/dissectors/packet-exported_pdu.c
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 'epan/dissectors/packet-exported_pdu.c')
-rw-r--r--epan/dissectors/packet-exported_pdu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-exported_pdu.c b/epan/dissectors/packet-exported_pdu.c
index 1d358acb32..6307e47faf 100644
--- a/epan/dissectors/packet-exported_pdu.c
+++ b/epan/dissectors/packet-exported_pdu.c
@@ -124,22 +124,22 @@ dissect_exported_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case EXP_PDU_TAG_IPV4_SRC:
proto_tree_add_item(tag_tree, hf_exported_pdu_ipv4_src, tvb, offset, 4, ENC_BIG_ENDIAN);
TVB_SET_ADDRESS(&pinfo->net_src, AT_IPv4, tvb, offset, 4);
- TVB_SET_ADDRESS(&pinfo->src, AT_IPv4, tvb, offset, 4);
+ COPY_ADDRESS_SHALLOW(&pinfo->src, &pinfo->net_src);
break;
case EXP_PDU_TAG_IPV4_DST:
proto_tree_add_item(tag_tree, hf_exported_pdu_ipv4_dst, tvb, offset, 4, ENC_BIG_ENDIAN);
TVB_SET_ADDRESS(&pinfo->net_dst, AT_IPv4, tvb, offset, 4);
- TVB_SET_ADDRESS(&pinfo->dst, AT_IPv4, tvb, offset, 4);
+ COPY_ADDRESS_SHALLOW(&pinfo->dst, &pinfo->net_dst);
break;
case EXP_PDU_TAG_IPV6_SRC:
proto_tree_add_item(tag_tree, hf_exported_pdu_ipv6_src, tvb, offset, 16, ENC_NA);
TVB_SET_ADDRESS(&pinfo->net_src, AT_IPv6, tvb, offset, 16);
- TVB_SET_ADDRESS(&pinfo->src, AT_IPv6, tvb, offset, 16);
+ COPY_ADDRESS_SHALLOW(&pinfo->src, &pinfo->net_src);
break;
case EXP_PDU_TAG_IPV6_DST:
proto_tree_add_item(tag_tree, hf_exported_pdu_ipv6_dst, tvb, offset, 16, ENC_NA);
TVB_SET_ADDRESS(&pinfo->net_dst, AT_IPv6, tvb, offset, 16);
- TVB_SET_ADDRESS(&pinfo->dst, AT_IPv6, tvb, offset, 16);
+ COPY_ADDRESS_SHALLOW(&pinfo->dst, &pinfo->net_dst);
break;
case EXP_PDU_TAG_PORT_TYPE:
pinfo->ptype = (port_type)tvb_get_ntohl(tvb, offset);