Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/timed/timed Fix a variable initializer where CLK_TC...
details: https://anonhg.NetBSD.org/src/rev/d9ff84965c3e
branches: trunk
changeset: 533168:d9ff84965c3e
user: perry <perry%NetBSD.org@localhost>
date: Sun Jun 23 17:47:45 2002 +0000
description:
Fix a variable initializer where CLK_TCK was assumed to be a compile
time constant. Soon it won't be.
diffstat:
usr.sbin/timed/timed/timed.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r 33140b386a72 -r d9ff84965c3e usr.sbin/timed/timed/timed.c
--- a/usr.sbin/timed/timed/timed.c Sun Jun 23 17:26:58 2002 +0000
+++ b/usr.sbin/timed/timed/timed.c Sun Jun 23 17:47:45 2002 +0000
@@ -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 @@
#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 @@
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 @@
#endif
struct tms tm;
+ if (firsttime == 0) {
+ last_update = -NG_DELAY;
+ firsttime++;
+ }
/* if no netgroup, then we are finished */
if (goodgroup == 0 || !Mflag)
Home |
Main Index |
Thread Index |
Old Index