diff options
author | Christophe Grenier <grenier@cgsecurity.org> | 2017-04-15 12:00:24 +0200 |
---|---|---|
committer | Christophe Grenier <grenier@cgsecurity.org> | 2017-04-15 12:00:24 +0200 |
commit | a1419a0806b4270bfad92ea496624b2edee5062c (patch) | |
tree | d08d076cd116f0a05092d49ddac393bfc82ab3b9 /src/dfxml.c | |
parent | 1cba494e472d280483cc3bf05940efd061846a9e (diff) |
Use localtime_t() instead of localtime()
Diffstat (limited to 'src/dfxml.c')
-rw-r--r-- | src/dfxml.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dfxml.c b/src/dfxml.c index 1a99f04..c9da693 100644 --- a/src/dfxml.c +++ b/src/dfxml.c @@ -253,7 +253,8 @@ void xml_add_DFXML_creator(const char *package, const char *version) { char outstr[200]; const time_t t = time(NULL); - const struct tm *tmp = localtime(&t); + struct tm tm_tmp; + const struct tm *tmp = localtime_r(&t,&tm_tmp); if (tmp != NULL && strftime(outstr, sizeof(outstr), "%Y-%m-%dT%H:%M:%S%z", tmp) != 0) { |