Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
f5a469b5
Commit
f5a469b5
authored
Apr 21, 2014
by
Hisham Muhammad
Browse files
Use reentrant version to silence warnings.
parent
4027e5ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
ClockMeter.c
View file @
f5a469b5
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment