aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtpproxy.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2013-12-16 20:38:20 +0000
committerBill Meier <wmeier@newsguy.com>2013-12-16 20:38:20 +0000
commit09ce0cf43cb40361a5f97abb75fdda2f991a9270 (patch)
treed6d839ab581c35da37e2d044af3b841791031fab /epan/dissectors/packet-rtpproxy.c
parent0afeb2ae959a238fff951ae136d70ac07a7f6232 (diff)
From Peter Lemenkov:
"This patch removes misleading dereferencing operator from the array's name. E.g. consider the following declaration: guint32 ipaddr[4]; ipaddr points to the address of an array of guint32's, while &ipaddr points to the first' guint32 object. E.g. &ipaddr == &ipaddr[0]. The value is the same, but has different type which is necessary sometimes. However inet_pton treats latest argument as void*, and this information is left anyway. So no need to bother with types and let's just pass pointer to the array." https://bugs.wireshark.org/bugzilla/attachment.cgi?id=12304 From me: Remove dereferencing operator from 'ipaddr' in two calls to wmem_memdup(). svn path=/trunk/; revision=54156
Diffstat (limited to 'epan/dissectors/packet-rtpproxy.c')
-rw-r--r--epan/dissectors/packet-rtpproxy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-rtpproxy.c b/epan/dissectors/packet-rtpproxy.c
index f79cf6eb50..1348b10591 100644
--- a/epan/dissectors/packet-rtpproxy.c
+++ b/epan/dissectors/packet-rtpproxy.c
@@ -760,17 +760,17 @@ dissect_rtpproxy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
/* Extract IP */
tmp = tvb_find_line_end(tvb, offset, -1, &new_offset, FALSE);
if (tvb_find_guint8(tvb, offset, -1, ':') == -1){
- inet_pton(AF_INET, (char*)tvb_get_string(wmem_packet_scope(), tvb, offset, tmp), &ipaddr);
+ inet_pton(AF_INET, (char*)tvb_get_string(wmem_packet_scope(), tvb, offset, tmp), ipaddr);
addr.type = AT_IPv4;
addr.len = 4;
- addr.data = wmem_memdup(wmem_packet_scope(), &ipaddr, 4);
+ addr.data = wmem_memdup(wmem_packet_scope(), ipaddr, 4);
proto_tree_add_item(rtpproxy_tree, hf_rtpproxy_ipv4, tvb, offset, tmp, ENC_ASCII | ENC_NA);
}
else{
- inet_pton(AF_INET6, (char*)tvb_get_string(wmem_packet_scope(), tvb, offset, tmp), &ipaddr);
+ inet_pton(AF_INET6, (char*)tvb_get_string(wmem_packet_scope(), tvb, offset, tmp), ipaddr);
addr.type = AT_IPv6;
addr.len = 16;
- addr.data = wmem_memdup(wmem_packet_scope(), &ipaddr, 16);
+ addr.data = wmem_memdup(wmem_packet_scope(), ipaddr, 16);
proto_tree_add_item(rtpproxy_tree, hf_rtpproxy_ipv6, tvb, offset, tmp, ENC_ASCII | ENC_NA);
}