Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/time

On Wed, Jul 31, 2013 at 09:53:28AM +0200, Alan Barrett wrote:
 > >> Modified Files:
 > >>   src/lib/libc/time: localtime.c
 > >>
 > >> Log Message:
 > >> Don't depend on implicit rounding from non-integral float constant.
 > >
 > >what on earth is that code trying to do?
 > If time_t is a floating point type, then round to the nearest
 > second.  If time_t is an integral type, then do nothing.  There
 > really should be a comment to explain that.

Yes... that's... less than clear.

(I thought time_t was required to be an integer type, but I suppose
there's some legacy platform where it isn't.)

David A. Holland

Home | Main Index | Thread Index | Old Index