Date: Sun, 3 Jun 2001 13:56:33 -0400 From: Garance A Drosihn <drosih@rpi.edu> To: Dima Dorfman <dima@unixfreak.org>, audit@FreeBSD.ORG Subject: Re: last(1) WARNS patch for review Message-ID: <p05100e13b740290b2b97@[128.113.24.47]> In-Reply-To: <20010530032324.6D5A13E0B@bazooka.unixfreak.org> References: <20010530032324.6D5A13E0B@bazooka.unixfreak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
At 8:23 PM -0700 5/29/01, Dima Dorfman wrote: >Please review the attached patch to last(1) which silences >most of the warnings. I'm particuarly doubtful about the >printf formatting changes. They seem to be correct, but >there might've been a reason why they were originally >written incorrectly (a reason other than not compiling >with the right -W flags). There are a number of hairy issues when going to print out a time_t. See my recent message to -arch, where I quoted most of Garrett Wollman's recent message to -stable. In short: A time_t can be integral, floating-point, or complex. It can be signed or unsigned. It can be "regular size" or "long". When it comes to printing, Garrett mentioned: There is a simple way around this, for POSIX systems only: use strftime() with the %s format. which I assume means that freebsd has %s in strftime. If so, then maybe the wisest change for 'last' would be to call strftime() to get the right string. -- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05100e13b740290b2b97>