On 3/11/23 23:34, Paul Eggert wrote: > On 2023-03-11 14:18, Alejandro Colomar wrote: > >> What I'm not sure is that strftime(3) requires nonnull. > > glibc's strftime implementation segfaults if you pass a null pointer, so > we can't pass NULL regardless of whether the strftime API in time.h uses > __attribute__ ((nonnull))'.
Hmm, please fix the API :-) So, yes, then that dummy seems to be necessary. However, then I wonder if the patch is really "simplifying". I think strlcpy(3) was simpler. -- <http://www.alejandro-colomar.es/> GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
OpenPGP_signature
Description: OpenPGP digital signature