mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-06-30 08:55:47 +08:00
rc_conf: Minor clean up in the net services.
This commit is contained in:
parent
334019da73
commit
145a821cb8
@ -660,8 +660,9 @@ run_dhcp(rtems_bsd_rc_conf* rc_conf, rtems_bsd_rc_conf_argc_argv* aa)
|
|||||||
--delay;
|
--delay;
|
||||||
|
|
||||||
memset(&sin, 0, sizeof(sin));
|
memset(&sin, 0, sizeof(sin));
|
||||||
|
memset(&rti_info[0], 0, sizeof(rti_info));
|
||||||
sin.sin_family = AF_INET;
|
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);
|
r = rtems_get_route(&sin, rti_info);
|
||||||
if (r == 0 && rti_info[RTAX_GATEWAY] != NULL) {
|
if (r == 0 && rti_info[RTAX_GATEWAY] != NULL) {
|
||||||
@ -722,7 +723,7 @@ network_service(rtems_bsd_rc_conf* rc_conf)
|
|||||||
if (aa == NULL)
|
if (aa == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
show_result("hostname", hostname(rc_conf, aa));
|
show_result("hostname", hostname(rc_conf, aa));
|
||||||
|
|
||||||
r = interfaces(rc_conf, aa);
|
r = interfaces(rc_conf, aa);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user