Source-Changes-D archive

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

Re: CVS commit: src/bin/sleep



    Date:        Sat, 26 Jan 2019 23:23:32 -0500
    From:        Christos Zoulas <christos%zoulas.com@localhost>
    Message-ID:  <C369129B-F2E6-40BB-81A6-C7CBA9ABC23B%zoulas.com@localhost>

  | I think it is easier and less error-prone to consistently cast time_t
  | to intmax_t instead of choosing how to cast based on knowing the range.

The real problem is the long standing abuse of time_t to represent
durations, which it really should never be used for.   This is like
using size_t where what we have is a ptrdiff_t, while they look
similar, and are likely to have similar ranges, they are not the
same thing.

That and that we don't have a PRItt (or something) for time_t

I may (someday) convert the one that should be %g, but I will leave
the others...

kre



Home | Main Index | Thread Index | Old Index