summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2013-11-11 18:43:46 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2013-11-11 18:43:46 +0000
commitf493a7fe11e5143e6135cf66c5b03494f590adcf (patch)
treea0d2f1f614bc83cf3c98b54dc0fdf14d9f41a3c9
parenta0bec26f17031685e3286b12433121e245c75565 (diff)
Nuke 'cur_time' variable used only to assign time(NULL) to a field.
-rw-r--r--sbin/dhclient/dhclient.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index feb66ddfeab..47f2286dd75 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.265 2013/11/11 17:16:11 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.266 2013/11/11 18:43:45 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -651,7 +651,6 @@ void
state_selecting(void)
{
struct client_lease *lp, *picked;
- time_t cur_time;
cancel_timeout();
@@ -677,8 +676,6 @@ state_selecting(void)
return;
}
- time(&cur_time);
-
/* If it was a BOOTREPLY, we can just take the lease right now. */
if (!picked->options[DHO_DHCP_MESSAGE_TYPE].len) {
struct option_data *option;
@@ -717,7 +714,8 @@ state_selecting(void)
client->destination.s_addr = INADDR_BROADCAST;
client->state = S_REQUESTING;
- client->first_sending = cur_time;
+ client->first_sending = time(NULL);
+
client->interval = 0;
/*