summaryrefslogtreecommitdiff
path: root/ripd/ripd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ripd/ripd.c')
-rw-r--r--ripd/ripd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c
index 5ccefac178..5009b788ff 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -3020,20 +3020,20 @@ void rip_ecmp_disable(struct rip *rip)
static void rip_vty_out_uptime(struct vty *vty, struct rip_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);
}
}