]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/timedate/timedated.c
timedate: use gmtime_r() and localtime_r()
authorLennart Poettering <lennart@poettering.net>
Mon, 25 Jun 2018 12:29:25 +0000 (14:29 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 25 Jun 2018 17:20:34 +0000 (19:20 +0200)
commite46acb7950a9f07ac60d772309de842c444ad2bd
tree3845064b42d184158f7017b35659b5cf69d48824
parente49807606dee54e7455045ee9b1b652180c4a336
timedate: use gmtime_r() and localtime_r()

gmtime() and localtime() operate on a static buffer. let's avoid this,
as we never know whether some library might use these calls in some
backrgound thread.

Discovered by lgtm:

https://lgtm.com/projects/g/systemd/systemd/
src/timedate/timedated.c