[rtems-libbsd commit] netstat: Don't init vars if they are not defined.

Sebastian Huber sebh at rtems.org
Fri Aug 5 06:38:18 UTC 2016


Module:    rtems-libbsd
Branch:    4.11
Commit:    6bf772b86ce874c620609d6a0d0b8a4582f8ded4
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=6bf772b86ce874c620609d6a0d0b8a4582f8ded4

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