nightmaremail

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 17dc89aeebb0dc3bdcab9a34da6d44c40fd337dc
parent c556526488eee88c58b4cb91a9bb31a3f97170ee
Author: Rolf Eike Beer <eike@sf-mail.de>
Date:   Fri, 12 Jun 2020 18:35:28 +0200

predate: use better version of calling time()

From time(2):

  The tloc argument is obsolescent and should always be NULL in new code.
  When tloc is NULL, the call cannot fail.

This is old code, but when we can prevent it from failing this is a good thing
in any case.

Diffstat:
Mpredate.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/predate.c b/predate.c @@ -55,7 +55,7 @@ int main(int argc, char **argv) close(pi[0]); substdio_fdbuf(&ss,write,pi[1],outbuf,sizeof(outbuf)); - time(&now); + now = time(NULL); tm = gmtime(&now); dt.year = tm->tm_year;