This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v5 1/2] Y2038: Add 64-bit time for all architectures


On 06/20/2018 09:45 AM, Albert ARIBAUD wrote:
I'll go with the
code you suggest, with a more explicit name for the temporary and a
one-line short comment.

    /* Convert from __time64 to time_t or fail with EOVERFLOW.  */
    time_t t32 = t64;
    if (t32 == t64)
      return t32;
    __set_errno (EOVERFLOW);
    return -1;

That's OK, except for clarity please use "t" rather than "t32" since time_t is not necessarily 32-bit.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]