summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2021-02-24 16:36:47 +0000
committerkrw <krw@openbsd.org>2021-02-24 16:36:47 +0000
commit9e5c511a3fcc88fa9fb5992b25e576eeae4ae39a (patch)
treeb3e348b7628777fff93847ddbadb4e64869b948b /sbin/dhclient
parentNo need to check ifi->active for NULL when looking for duplicate/obsolete (diff)
downloadwireguard-openbsd-9e5c511a3fcc88fa9fb5992b25e576eeae4ae39a.tar.xz
wireguard-openbsd-9e5c511a3fcc88fa9fb5992b25e576eeae4ae39a.zip
No need to get time() twice. Just use the already
obtained cur_time to initialize a missing lease->epoch.
Diffstat (limited to 'sbin/dhclient')
-rw-r--r--sbin/dhclient/dhclient.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index b7f9ff0a17e..68567dbd5dd 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.701 2021/02/24 16:27:05 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.702 2021/02/24 16:36:47 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -2587,7 +2587,7 @@ get_recorded_lease(struct interface_info *ifi)
}
if (lp != NULL && lp->epoch == 0)
- time(&lp->epoch);
+ lp->epoch = cur_time;
return lp;
}