summaryrefslogtreecommitdiffstats
path: root/src/datetime.c
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2022-03-19 20:02:58 (EDT)
committer P. J. McDermott <pj@pehjota.net>2022-03-19 20:02:58 (EDT)
commit8cac29fafce285f1bd1f51ef89a57fdde347f75a (patch)
treecff10885f63016c33874bd0ed63976ca7b06b494 /src/datetime.c
parent004891c1800b77f8a1e84030b42b100484bae8a0 (diff)
downloadatsign-8cac29fafce285f1bd1f51ef89a57fdde347f75a.zip
atsign-8cac29fafce285f1bd1f51ef89a57fdde347f75a.tar.gz
atsign-8cac29fafce285f1bd1f51ef89a57fdde347f75a.tar.bz2
main: Pass NULL to time()
If the argument points outside the accessible address space, Linux's time() system call returns a negative value. [1] But since this is indistinguishable from a successful report that the time is before the Epoch, glibc never actually sets errno. The Linux man-pages project recommends: "The tloc argument is obsolescent and should always be NULL in new code. When tloc is NULL, the call cannot fail." [2] [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/time/time.c [2]: https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/man2/time.2?id=300c07ddd873fa1abbff96262ec365271e429dab
Diffstat (limited to 'src/datetime.c')
0 files changed, 0 insertions, 0 deletions