Don't cast pointers when they're assigned to the data field of an address.

That field is just a void *, so there's no need to cast them, and at
least one of those casts generates alignment warnings with -Wcast-align.

Change-Id: I88e22a794a8c990b01e7ed8f45951a2665febbc1
Reviewed-on: https://code.wireshark.org/review/8421
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2015-05-11 17:14:54 -07:00
parent b55d801392
commit 0970872a4c
1 changed files with 2 additions and 2 deletions

View File

@ -2242,7 +2242,7 @@ dissect_skinny_ipv4or6(ptvcursor_t *cursor, int hfindex_ipv4, int hfindex_ipv6,
guint32 ip_address;
src_addr.type = AT_IPv4;
src_addr.len = 4;
src_addr.data = (guint8 *)&ip_address;
src_addr.data = &ip_address;
ip_address = tvb_get_ipv4(tvb, offset);
rtp_add_address(pinfo, &src_addr, tvb_get_letohl(tvb, offset), 0, "Skinny", pinfo->fd->num, is_video, NULL);
ptvcursor_add(cursor, hfindex_ipv4, 4, ENC_BIG_ENDIAN);
@ -2254,7 +2254,7 @@ dissect_skinny_ipv4or6(ptvcursor_t *cursor, int hfindex_ipv4, int hfindex_ipv6,
struct e_in6_addr IPv6;
src_addr.type = AT_IPv6;
src_addr.len = 16;
src_addr.data = (guint16 *)&IPv6;
src_addr.data = &IPv6;
tvb_get_ipv6(tvb, offset, &IPv6);
rtp_add_address(pinfo, &src_addr, tvb_get_letohl(tvb, offset), 0, "Skinny", pinfo->fd->num, is_video, NULL);
ptvcursor_add(cursor, hfindex_ipv6, 16, ENC_NA);