From 0ccab8691b5987091b56e74ad65306b75b57167b Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Tue, 25 Dec 2018 17:05:57 +0000 Subject: No need for magic tick_msg(NULL,..) call to set stop time. The stop time is always config->link_timeout seconds after the first call to tick_msg(). --- sbin/dhclient/dhclient.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sbin') diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index a1ab752cb7c..0b39cf98a59 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.592 2018/12/24 23:28:20 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.593 2018/12/25 17:05:56 krw Exp $ */ /* * Copyright 2004 Henning Brauer @@ -686,8 +686,6 @@ main(int argc, char *argv[]) } time(&ifi->startup_time); - tick_msg(NULL, 0, ifi->startup_time); /* Set time to stop ticking. */ - ifi->state = S_PREBOOT; state_preboot(ifi); @@ -2772,8 +2770,8 @@ tick_msg(const char *preamble, int success, time_t start) return; } - if (preamble == NULL) { - stop = start + config->link_timeout; + if (stop == 0) { + stop = cur_time + config->link_timeout; return; } -- cgit v1.2.3