aboutsummaryrefslogtreecommitdiffstats
path: root/capture-pcap-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'capture-pcap-util.c')
-rw-r--r--capture-pcap-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/capture-pcap-util.c b/capture-pcap-util.c
index 52c984912f..87d49cf958 100644
--- a/capture-pcap-util.c
+++ b/capture-pcap-util.c
@@ -384,7 +384,7 @@ if_info_add_address(if_info_t *if_info, struct sockaddr *addr)
if_addr->ifat_type = IF_AT_IPv4;
if_addr->addr.ip4_addr =
*((guint32 *)&(ai->sin_addr.s_addr));
- if_info->addrs = g_slist_prepend(if_info->addrs, if_addr);
+ if_info->addrs = g_slist_append(if_info->addrs, if_addr);
break;
#ifdef INET6
@@ -395,7 +395,7 @@ if_info_add_address(if_info_t *if_info, struct sockaddr *addr)
memcpy((void *)&if_addr->addr.ip6_addr,
(void *)&ai6->sin6_addr.s6_addr,
sizeof if_addr->addr.ip6_addr);
- if_info->addrs = g_slist_prepend(if_info->addrs, if_addr);
+ if_info->addrs = g_slist_append(if_info->addrs, if_addr);
break;
#endif
}