IPv6: Remove two offsetof()s
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>
Thu, 1 Oct 2015 15:31:04 +0000 (16:31 +0100)
committerMichael Mann <mmann78@netscape.net>
Thu, 1 Oct 2015 20:31:53 +0000 (20:31 +0000)
Change-Id: I41c93927595be523528d44c263b7028f40e524e2
Reviewed-on: https://code.wireshark.org/review/10706
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
epan/dissectors/packet-ipv6.c

index 885885f0b9451343c8fa7e2a070a52dea8f374e6..5546c46254e2cf2e5b057b3d3b540a49da110147 100644 (file)
@@ -2187,9 +2187,9 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
         /* Add different items for the destination address */
         proto_tree_add_item(ipv6_tree, hf_ipv6_dst, tvb,
-                            offset + (int)offsetof(struct ip6_hdr, ip6_dst), 16, ENC_NA);
+                            offset + IP6H_DST, 16, ENC_NA);
         ti = proto_tree_add_ipv6(ipv6_tree, hf_ipv6_addr, tvb,
-                                 offset + (int)offsetof(struct ip6_hdr, ip6_dst),
+                                 offset + IP6H_DST,
                                  16, (guint8 *)&ipv6->ip6_dst);
         PROTO_ITEM_SET_HIDDEN(ti);
         name = address_to_display(wmem_packet_scope(), &pinfo->dst);