diff options
Diffstat (limited to 'lib/bfd.c')
| -rw-r--r-- | lib/bfd.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -136,7 +136,7 @@ void bfd_peer_sendmsg(struct zclient *zclient, struct bfd_info *bfd_info, if (bfd_debug) zlog_debug( "%s: Suppressing BFD peer reg/dereg messages", - __FUNCTION__); + __func__); return; } @@ -146,7 +146,7 @@ void bfd_peer_sendmsg(struct zclient *zclient, struct bfd_info *bfd_info, zlog_debug( "%s: Can't send BFD peer register, Zebra client not " "established", - __FUNCTION__); + __func__); return; } @@ -328,7 +328,7 @@ static void bfd_last_update(time_t last_update, char *buf, size_t len) { time_t curr; time_t diff; - struct tm *tm; + struct tm tm; struct timeval tv; /* If no BFD satatus update has ever been received, print `never'. */ @@ -341,10 +341,10 @@ static void bfd_last_update(time_t last_update, char *buf, size_t len) monotime(&tv); curr = tv.tv_sec; diff = curr - last_update; - tm = gmtime(&diff); + gmtime_r(&diff, &tm); - snprintf(buf, len, "%d:%02d:%02d:%02d", tm->tm_yday, tm->tm_hour, - tm->tm_min, tm->tm_sec); + snprintf(buf, len, "%d:%02d:%02d:%02d", tm.tm_yday, tm.tm_hour, + tm.tm_min, tm.tm_sec); } /* @@ -454,7 +454,7 @@ void bfd_client_sendmsg(struct zclient *zclient, int command, zlog_debug( "%s: Can't send BFD client register, Zebra client not " "established", - __FUNCTION__); + __func__); return; } |
