Re: [PATCH v3] ctime.3: EXAMPLES: Add example program

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

 



On 2024-08-22 16:49, Alejandro Colomar wrote:
          t = mktime(tp);
          if (t == -1 && errno == EOVERFLOW)
              return -1;

This isn't right, for the same reason similar code wasn't right earlier. A successful call to mktime can return -1 and set errno to whatever value it likes.

This is just the first problem I found with the code (and I found it quickly because I remembered the earlier problem). I would expect there to be others.

How about if we omit the sample code and make the minimal changes I suggested earlier?




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux