diff options
author | Michael Mann <mmann78@netscape.net> | 2015-02-26 22:03:12 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-03-01 12:54:33 +0000 |
commit | 9c55903029ee0e6720597ef07e8a5b359cae068e (patch) | |
tree | 251dddfa5de23777e225e128529b00a7a0143b76 /epan/dissectors/packet-ip.c | |
parent | 5f2c8e9575eb6afb6c645d43a015cff035fcbeb0 (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-ip.c')
-rw-r--r-- | epan/dissectors/packet-ip.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c index 83e1b5fa7e..2b527044f8 100644 --- a/epan/dissectors/packet-ip.c +++ b/epan/dissectors/packet-ip.c @@ -2224,8 +2224,8 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } src32 = tvb_get_ntohl(tvb, offset + IPH_SRC); TVB_SET_ADDRESS(&pinfo->net_src, AT_IPv4, tvb, offset + IPH_SRC, 4); - SET_ADDRESS(&pinfo->src, AT_IPv4, 4, pinfo->net_src.data); - SET_ADDRESS(&iph->ip_src, AT_IPv4, 4, pinfo->net_src.data); + COPY_ADDRESS_SHALLOW(&pinfo->src, &pinfo->net_src); + COPY_ADDRESS_SHALLOW(&iph->ip_src, &pinfo->src); if (tree) { const char *src_host; @@ -2266,8 +2266,8 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) dst32 = tvb_get_ntohl(tvb, offset + IPH_DST + dst_off); TVB_SET_ADDRESS(&pinfo->net_dst, AT_IPv4, tvb, offset + IPH_DST + dst_off, 4); - SET_ADDRESS(&pinfo->dst, AT_IPv4, 4, pinfo->net_dst.data); - SET_ADDRESS(&iph->ip_dst, AT_IPv4, 4, pinfo->net_dst.data); + COPY_ADDRESS_SHALLOW(&pinfo->dst, &pinfo->net_dst); + COPY_ADDRESS_SHALLOW(&iph->ip_dst, &pinfo->net_dst); /* If an IP is destined for an IP address in the Local Network Control Block * (e.g. 224.0.0.0/24), the packet should never be routed and the TTL would |