summaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpd.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-11-27 23:43:28 +0000
committerDenis Vlasenko2006-11-27 23:43:28 +0000
commite2d3ded3549edd58fe3b39f2254c65f0808bcac2 (patch)
tree90e9aecef63439d80859ce43876e6a68001c8d14 /networking/udhcp/dhcpd.c
parent30d7a346e68bb7f0cb916e6c1e75dd75822d88a8 (diff)
downloadbusybox-e2d3ded3549edd58fe3b39f2254c65f0808bcac2.zip
busybox-e2d3ded3549edd58fe3b39f2254c65f0808bcac2.tar.gz
udhcpc: convert to getopt32
Diffstat (limited to 'networking/udhcp/dhcpd.c')
-rw-r--r--networking/udhcp/dhcpd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index 0935a94..7438036 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -68,11 +68,13 @@ int udhcpd_main(int argc, char *argv[])
timeout_end = time(0) + server_config.auto_time;
while (1) { /* loop until universe collapses */
- if (server_socket < 0)
- if ((server_socket = listen_socket(INADDR_ANY, SERVER_PORT, server_config.interface)) < 0) {
+ if (server_socket < 0) {
+ server_socket = listen_socket(INADDR_ANY, SERVER_PORT, server_config.interface);
+ if (server_socket < 0) {
bb_perror_msg("FATAL: cannot create server socket");
return 2;
}
+ }
max_sock = udhcp_sp_fd_set(&rfds, server_socket);
if (server_config.auto_time) {