]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: replace ctime with ctime_r
authorMark Stapp <mjs@labn.net>
Tue, 19 Sep 2023 20:24:07 +0000 (16:24 -0400)
committerMark Stapp <mjs@labn.net>
Tue, 19 Sep 2023 20:25:01 +0000 (16:25 -0400)
Replace ctime with ctime_r in bgp test.

Signed-off-by: Mark Stapp <mjs@labn.net>
tests/bgpd/test_mpath.c

index bc2c1e8a442ff0ae1cf29baa7d812d0037780739..ebbe3ac3e28f3f53efb046bbe96282b93c5f4d2b 100644 (file)
@@ -467,9 +467,10 @@ int main(void)
 {
        int pass_count, fail_count;
        time_t cur_time;
+       char buf[32];
 
        time(&cur_time);
-       printf("BGP Multipath Tests Run at %s", ctime(&cur_time));
+       printf("BGP Multipath Tests Run at %s", ctime_r(&cur_time, buf));
        if (global_test_init() != 0) {
                printf("Global init failed. Terminating.\n");
                exit(1);