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)