Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Oct 2001 15:29:23 -0800
From:      Peter Wemm <peter@wemm.org>
To:        Warner Losh <imp@harmony.village.org>
Cc:        Matt Dillon <dillon@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/rusers rusers.c 
Message-ID:  <20011029232923.9C4DE380A@overcee.netplex.com.au>
In-Reply-To: <200110292310.f9TNAN794691@harmony.village.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011029232923.9C4DE380A>