From 4fdde404aad5a56a785cc92a240b0b854a9b2635 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Thu, 19 Jan 2017 05:18:04 -0500 Subject: [PATCH] Remove unused client_config_t foreground variable. --- src/arp.c | 2 -- src/ndhc.c | 4 +--- src/ndhc.h | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/arp.c b/src/arp.c index 36eab7c..096885d 100644 --- a/src/arp.c +++ b/src/arp.c @@ -515,8 +515,6 @@ int arp_collision_timeout(struct client_state_t cs[static 1], long long nowts) ret = ARPR_FAIL; if (client_config.quit_after_lease) exit(EXIT_SUCCESS); - if (!client_config.foreground) - background(); return ret; } long long rtts = garp.send_stats[ASEND_COLLISION_CHECK].ts + diff --git a/src/ndhc.c b/src/ndhc.c index dd8e425..72b51fe 100644 --- a/src/ndhc.c +++ b/src/ndhc.c @@ -92,7 +92,6 @@ struct client_config_t client_config = { .arp = "\0\0\0\0\0\0", .clientid_len = 0, .metric = 0, - .foreground = true, }; void set_client_addr(const char v[static 1]) { cs.clientAddr = inet_addr(v); } @@ -474,8 +473,7 @@ static void ndhc_main(void) { cs.rfkillFd = rfkill_open(&client_config.enable_rfkill); - if (write_pid_enabled && - client_config.foreground && !client_config.background_if_no_lease) + if (write_pid_enabled && !client_config.background_if_no_lease) write_pid(pidfile); open_leasefile(); diff --git a/src/ndhc.h b/src/ndhc.h index 9786431..688bc3b 100644 --- a/src/ndhc.h +++ b/src/ndhc.h @@ -50,7 +50,6 @@ struct client_state_t { }; struct client_config_t { - bool foreground; // Do not fork bool quit_after_lease; // Quit after obtaining lease bool abort_if_no_lease; // Abort if no lease bool background_if_no_lease; // Fork to background if no lease