From owner-cvs-all Mon Oct 29 15:29:37 2001 Delivered-To: cvs-all@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [24.14.150.180]) by hub.freebsd.org (Postfix) with ESMTP id 298E037B40A; Mon, 29 Oct 2001 15:29:24 -0800 (PST) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f9TNTNM59629; Mon, 29 Oct 2001 15:29:23 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 9C4DE380A; Mon, 29 Oct 2001 15:29:23 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Warner Losh Cc: Matt Dillon , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/rusers rusers.c In-Reply-To: <200110292310.f9TNAN794691@harmony.village.org> Date: Mon, 29 Oct 2001 15:29:23 -0800 From: Peter Wemm Message-Id: <20011029232923.9C4DE380A@overcee.netplex.com.au> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Warner Losh wrote: > In message <200110282024.f9SKOq150002@freefall.freebsd.org> Matt Dillon write s: > : Fix time_t == int assumption, properly convert protocol int to time_t. > > Doesn't this break the wire protocol for machines that aren't FreeBSD? Have a look at the diff.. it isn't that.. - strncpy(date, - &(ctime((time_t *)&(up->utmpidlearr_val[x].ui_utmp.ut_time))[4]), - sizeof(date) - 1); + time_t t = int_to_time(up->utmpidlearr_val[x].ui_utmp.ut_time); + strncpy(date, &(ctime(&t)[4]), sizeof(date) - 1); He means "take the protocol int and convert that properly to a time_t". Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message