[rtems-libbsd commit] rc_conf: Minor clean up in the net services.

Chris Johns chrisj at rtems.org
Wed Apr 26 07:43:48 UTC 2017


Module:    rtems-libbsd
Branch:    master
Commit:    145a821cb853eab16746b361092efa9a0606463d
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=145a821cb853eab16746b361092efa9a0606463d

Author:    Chris Johns <chrisj at rtems.org>
Date:      Wed Apr 26 17:38:50 2017 +1000

rc_conf: Minor clean up in the net services.

---

 rtemsbsd/rtems/rtems-bsd-rc-conf-net.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/rtemsbsd/rtems/rtems-bsd-rc-conf-net.c b/rtemsbsd/rtems/rtems-bsd-rc-conf-net.c
index 67b18d1..5176838 100644
--- a/rtemsbsd/rtems/rtems-bsd-rc-conf-net.c
+++ b/rtemsbsd/rtems/rtems-bsd-rc-conf-net.c
@@ -660,8 +660,9 @@ run_dhcp(rtems_bsd_rc_conf* rc_conf, rtems_bsd_rc_conf_argc_argv* aa)
     --delay;
 
     memset(&sin, 0, sizeof(sin));
+    memset(&rti_info[0], 0, sizeof(rti_info));
     sin.sin_family = AF_INET;
-    inet_pton(AF_INET, "0.0.0.0.", &sin.sin_addr);
+    inet_pton(AF_INET, "0.0.0.0", &sin.sin_addr);
 
     r = rtems_get_route(&sin, rti_info);
     if (r == 0 && rti_info[RTAX_GATEWAY] != NULL) {
@@ -722,7 +723,7 @@ network_service(rtems_bsd_rc_conf* rc_conf)
   if (aa == NULL)
     return -1;
 
-  show_result("hostname",    hostname(rc_conf, aa));
+  show_result("hostname", hostname(rc_conf, aa));
 
   r = interfaces(rc_conf, aa);
   if (r < 0) {




More information about the vc mailing list