mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
Use reentrant version to silence warnings.
This commit is contained in:
parent
4027e5ee44
commit
f5a469b5a8
@ -21,7 +21,8 @@ int ClockMeter_attributes[] = {
|
||||
|
||||
static void ClockMeter_setValues(Meter* this, char* buffer, int size) {
|
||||
time_t t = time(NULL);
|
||||
struct tm *lt = localtime(&t);
|
||||
struct tm result;
|
||||
struct tm *lt = localtime_r(&t, &result);
|
||||
this->values[0] = lt->tm_hour * 60 + lt->tm_min;
|
||||
strftime(buffer, size, "%H:%M:%S", lt);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user