summaryrefslogtreecommitdiffstats
path: root/ripngd/ripngd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ripngd/ripngd.c')
-rw-r--r--ripngd/ripngd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index f8d7dc968..b583df4de 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -1991,20 +1991,20 @@ void ripng_event(struct ripng *ripng, enum ripng_event event, int sock)
static void ripng_vty_out_uptime(struct vty *vty, struct ripng_info *rinfo)
{
time_t clock;
- struct tm *tm;
+ struct tm tm;
#define TIME_BUF 25
char timebuf[TIME_BUF];
struct thread *thread;
if ((thread = rinfo->t_timeout) != NULL) {
clock = thread_timer_remain_second(thread);
- tm = gmtime(&clock);
- strftime(timebuf, TIME_BUF, "%M:%S", tm);
+ gmtime_r(&clock, &tm);
+ strftime(timebuf, TIME_BUF, "%M:%S", &tm);
vty_out(vty, "%5s", timebuf);
} else if ((thread = rinfo->t_garbage_collect) != NULL) {
clock = thread_timer_remain_second(thread);
- tm = gmtime(&clock);
- strftime(timebuf, TIME_BUF, "%M:%S", tm);
+ gmtime_r(&clock, &tm);
+ strftime(timebuf, TIME_BUF, "%M:%S", &tm);
vty_out(vty, "%5s", timebuf);
}
}