summaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpd.c
diff options
context:
space:
mode:
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) {