Skip to content

Commit

Permalink
pathd: replace ctime with ctime_r
Browse files Browse the repository at this point in the history
No ctime - replace with ctime_r()

Signed-off-by: Mark Stapp <[email protected]>
  • Loading branch information
Mark Stapp committed Sep 19, 2023
1 parent 6212bbc commit b97b6e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pathd/path_pcep_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit b97b6e7

Please sign in to comment.