diff options
| author | Mark Stapp <mjs@labn.net> | 2023-09-19 13:15:21 -0400 |
|---|---|---|
| committer | Mark Stapp <mjs@labn.net> | 2023-09-19 16:25:01 -0400 |
| commit | 8527084488e9d37386788feb755e21db706210d3 (patch) | |
| tree | ca3f5a3c162cdd2406089d9e65780ff85b5d4a9f /bgpd/bgp_btoa.c | |
| parent | e7f0bbb1980660bdcf4595e88b60eadd41a0a172 (diff) | |
bgpd: replace ctime with ctime_r
No ctime, use ctime_r.
Signed-off-by: Mark Stapp <mjs@labn.net>
Diffstat (limited to 'bgpd/bgp_btoa.c')
| -rw-r--r-- | bgpd/bgp_btoa.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bgpd/bgp_btoa.c b/bgpd/bgp_btoa.c index fc3363b098..8e27d9769f 100644 --- a/bgpd/bgp_btoa.c +++ b/bgpd/bgp_btoa.c @@ -120,6 +120,7 @@ int main(int argc, char **argv) struct in_addr dip; uint16_t viewno, seq_num; struct prefix_ipv4 p; + char tbuf[32]; s = stream_new(10000); @@ -155,7 +156,7 @@ int main(int argc, char **argv) subtype = stream_getw(s); len = stream_getl(s); - printf("TIME: %s", ctime(&now)); + printf("TIME: %s", ctime_r(&now, tbuf)); /* printf ("TYPE: %d/%d\n", type, subtype); */ @@ -239,7 +240,8 @@ int main(int argc, char **argv) source_as = stream_getw(s); printf("FROM: %pI4 AS%d\n", &peer, source_as); - printf("ORIGINATED: %s", ctime(&originated)); + printf("ORIGINATED: %s", ctime_r(&originated, + tbuf)); attrlen = stream_getw(s); printf("ATTRLEN: %d\n", attrlen); |
