diff options
author | Mark Stapp <mjs@labn.net> | 2023-09-19 19:15:21 +0200 |
---|---|---|
committer | Mark Stapp <mjs@labn.net> | 2023-09-19 22:25:01 +0200 |
commit | 8527084488e9d37386788feb755e21db706210d3 (patch) | |
tree | ca3f5a3c162cdd2406089d9e65780ff85b5d4a9f /bgpd/bgpd.h | |
parent | Merge pull request #14299 from SaiGomathiN/14286 (diff) | |
download | frr-8527084488e9d37386788feb755e21db706210d3.tar.xz frr-8527084488e9d37386788feb755e21db706210d3.zip |
bgpd: replace ctime with ctime_r
No ctime, use ctime_r.
Signed-off-by: Mark Stapp <mjs@labn.net>
Diffstat (limited to '')
-rw-r--r-- | bgpd/bgpd.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index c3e55b711..b80e0e787 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -2598,8 +2598,10 @@ static inline int peer_group_af_configured(struct peer_group *group) static inline char *timestamp_string(time_t ts) { time_t tbuf; + char timebuf[32]; + tbuf = time(NULL) - (monotime(NULL) - ts); - return ctime(&tbuf); + return ctime_r(&tbuf, timebuf); } static inline bool peer_established(struct peer_connection *connection) |