Replaced all instances of localtime with localtime_r

This commit is contained in:
Thulinma 2018-05-21 09:54:05 +02:00
parent b6f0b596b2
commit 8c2360fd56
3 changed files with 6 additions and 3 deletions

View file

@ -310,9 +310,10 @@ namespace Util{
}
time_t rawtime;
struct tm *timeinfo;
struct tm timetmp;
char buffer[100];
time(&rawtime);
timeinfo = localtime(&rawtime);
timeinfo = localtime_r(&rawtime, &timetmp);
strftime(buffer, 100, "%F %H:%M:%S", timeinfo);
dprintf(out, "%s[%s] ", color_time, buffer);
if (progname && progpid && strlen(progname) && strlen(progpid)){