Re: [PATCH] ctime.3: Document how to check errors from mktime(3)

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

 



Basically saying the same thing as in the other thread.

On 2024-08-23 14:58:39 +0200, Alejandro Colomar wrote:
> ISO C specifies that tp->tm_wday is unmodified after a failed call, and
> puts an example where this is used to determine errors.

This is not what I can see in C17.

> It is indeed the only way to check for errors from this call.

So you *additionally* need to test whether the return value is -1.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




[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