[rtems-libbsd commit] netstat: Don't init vars if they are not defined.
Sebastian Huber
sebh at rtems.org
Thu Aug 4 13:45:30 UTC 2016
Module: rtems-libbsd
Branch: master
Commit: 9907ae4070140fe2ff09506d7b98d5af3ba4ca6b
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=9907ae4070140fe2ff09506d7b98d5af3ba4ca6b
Author: Christian Mauderer <Christian.Mauderer at embedded-brains.de>
Date: Thu Aug 4 14:13:20 2016 +0200
netstat: Don't init vars if they are not defined.
The variables are not available, if there is no INET6 defined.
---
freebsd/usr.bin/netstat/inet.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/freebsd/usr.bin/netstat/inet.c b/freebsd/usr.bin/netstat/inet.c
index cbd0932..e67ef0a 100644
--- a/freebsd/usr.bin/netstat/inet.c
+++ b/freebsd/usr.bin/netstat/inet.c
@@ -93,9 +93,11 @@ static int udp_done, tcp_done, sdp_done;
void
rtems_bsd_netstat_inet_init(void)
{
+#ifdef INET6
udp_done = 0;
tcp_done = 0;
sdp_done = 0;
+#endif /* INET6 */
}
#endif /* __rtems__ */
More information about the vc
mailing list