From 46c82860b17e59ca9208994f86c52c22561f7a83 Mon Sep 17 00:00:00 2001 From: perry Date: Sun, 23 Jun 2002 17:47:45 +0000 Subject: [PATCH] Fix a variable initializer where CLK_TCK was assumed to be a compile time constant. Soon it won't be. --- usr.sbin/timed/timed/timed.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/usr.sbin/timed/timed/timed.c b/usr.sbin/timed/timed/timed.c index 19050245c374..1078c04ae433 100644 --- a/usr.sbin/timed/timed/timed.c +++ b/usr.sbin/timed/timed/timed.c @@ -1,4 +1,4 @@ -/* $NetBSD: timed.c,v 1.13 2001/09/02 00:13:07 reinoud Exp $ */ +/* $NetBSD: timed.c,v 1.14 2002/06/23 17:47:45 perry Exp $ */ /*- * Copyright (c) 1985, 1993 The Regents of the University of California. @@ -44,7 +44,7 @@ __COPYRIGHT( #if 0 static char sccsid[] = "@(#)timed.c 8.2 (Berkeley) 3/26/95"; #else -__RCSID("$NetBSD: timed.c,v 1.13 2001/09/02 00:13:07 reinoud Exp $"); +__RCSID("$NetBSD: timed.c,v 1.14 2002/06/23 17:47:45 perry Exp $"); #endif #endif /* not lint */ @@ -776,7 +776,8 @@ void get_goodgroup(int force) { # define NG_DELAY (30*60*CLK_TCK) /* 30 minutes */ - static unsigned long last_update = -NG_DELAY; + static unsigned long last_update; + static int firsttime; unsigned long new_update; struct goodhost *ghp, **ghpp; #ifdef HAVENIS @@ -785,6 +786,10 @@ get_goodgroup(int force) #endif struct tms tm; + if (firsttime == 0) { + last_update = -NG_DELAY; + firsttime++; + } /* if no netgroup, then we are finished */ if (goodgroup == 0 || !Mflag)