]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pathd: replace ctime with ctime_r
authorMark Stapp <mjs@labn.net>
Tue, 19 Sep 2023 17:15:55 +0000 (13:15 -0400)
committerMark Stapp <mjs@labn.net>
Tue, 19 Sep 2023 20:25:01 +0000 (16:25 -0400)
No ctime - replace with ctime_r()

Signed-off-by: Mark Stapp <mjs@labn.net>
pathd/path_pcep_debug.c

index 7d04587b8d760c2ebb9cbb548c5299eb443d0667..7bff9c7b9c0eb85a670a3790cf64a65809f011e3 100644 (file)
@@ -1312,6 +1312,8 @@ void _format_path_hop(int ps, struct path_hop *hop)
 
 void _format_pcep_event(int ps, pcep_event *event)
 {
+       char buf[32];
+
        if (event == NULL) {
                PATHD_FORMAT("NULL\n");
        } else {
@@ -1320,7 +1322,7 @@ void _format_pcep_event(int ps, pcep_event *event)
                PATHD_FORMAT("%*sevent_type: %s\n", ps2, "",
                             pcep_event_type_name(event->event_type));
                PATHD_FORMAT("%*sevent_time: %s", ps2, "",
-                            ctime(&event->event_time));
+                            ctime_r(&event->event_time, buf));
                if (event->session == NULL) {
                        PATHD_FORMAT("%*ssession: NULL\n", ps2, "");
                } else {