From 571b22c4b2ef0063aab233b85cde137d3125e361 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Thu, 19 Jan 2017 05:05:35 -0500 Subject: [PATCH] Rename client_state_t init variable to program_init. Easier to grep. No functional change. --- src/arp.c | 2 +- src/ndhc.c | 2 +- src/ndhc.h | 2 +- src/state.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/arp.c b/src/arp.c index d316916..36eab7c 100644 --- a/src/arp.c +++ b/src/arp.c @@ -495,7 +495,7 @@ int arp_collision_timeout(struct client_state_t cs[static 1], long long nowts) log_line("%s: Lease of %s obtained. Lease time is %ld seconds.", client_config.interface, clibuf, cs->lease); cs->clientAddr = garp.dhcp_packet.yiaddr; - cs->init = false; + cs->program_init = false; garp.last_conflict_ts = 0; garp.wake_ts[AS_COLLISION_CHECK] = -1; if (ifchange_bind(cs, &garp.dhcp_packet) < 0) { diff --git a/src/ndhc.c b/src/ndhc.c index e7bf095..6e251aa 100644 --- a/src/ndhc.c +++ b/src/ndhc.c @@ -74,7 +74,7 @@ #include "rfkill.h" struct client_state_t cs = { - .init = true, + .program_init = true, .epollFd = -1, .signalFd = -1, .listenFd = -1, diff --git a/src/ndhc.h b/src/ndhc.h index 962c851..2ce2260 100644 --- a/src/ndhc.h +++ b/src/ndhc.h @@ -46,7 +46,7 @@ struct client_state_t { uint32_t lease, xid; uint8_t routerArp[6], serverArp[6]; bool using_dhcp_bpf, got_router_arp, got_server_arp, arp_is_defense, - check_fingerprint, init; + check_fingerprint, program_init; }; struct client_config_t { diff --git a/src/state.c b/src/state.c index 9cae747..655c261 100644 --- a/src/state.c +++ b/src/state.c @@ -340,11 +340,11 @@ static int selecting_packet(struct client_state_t cs[static 1], static int selecting_timeout(struct client_state_t cs[static 1], long long nowts) { - if (cs->init && cs->num_dhcp_requests >= 2) { + if (cs->program_init && cs->num_dhcp_requests >= 2) { if (client_config.background_if_no_lease) { log_line("%s: No lease; going to background.", client_config.interface); - cs->init = false; + cs->program_init = false; background(); } else if (client_config.abort_if_no_lease) suicide("%s: No lease; failing.", client_config.interface);