From c48f394145d246304bd0d2b29e4b0eec4d1dd090 Mon Sep 17 00:00:00 2001 From: mrg Date: Thu, 11 May 2006 08:40:28 +0000 Subject: [PATCH] assign to wd.wd_recvtime rather than casting a pointer to it to a time_t pointer to call time(3). --- usr.sbin/rwhod/rwhod.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c index 42e0e92aa975..55662fb2309c 100644 --- a/usr.sbin/rwhod/rwhod.c +++ b/usr.sbin/rwhod/rwhod.c @@ -1,4 +1,4 @@ -/* $NetBSD: rwhod.c,v 1.33 2005/10/02 16:49:46 christos Exp $ */ +/* $NetBSD: rwhod.c,v 1.34 2006/05/11 08:40:28 mrg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\ #if 0 static char sccsid[] = "@(#)rwhod.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: rwhod.c,v 1.33 2005/10/02 16:49:46 christos Exp $"); +__RCSID("$NetBSD: rwhod.c,v 1.34 2006/05/11 08:40:28 mrg Exp $"); #endif #endif /* not lint */ @@ -327,7 +327,7 @@ handleread(int s) } } #endif - (void)time((time_t *)&wd.wd_recvtime); + wd.wd_recvtime = time(NULL); (void)write(whod, (char *)&wd, cc); if (fstat(whod, &st) < 0 || st.st_size > cc) (void)ftruncate(whod, cc);