Replaced all instances of localtime with localtime_r
This commit is contained in:
parent
3ce86d0e4c
commit
2d9e9f3c8b
4 changed files with 8 additions and 4 deletions
|
@ -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)){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue