bgpd: Drop timestamp_string()

Replace with time_to_string().

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
Donatas Abraitis 2024-12-20 17:23:14 +02:00
parent b37f5f53b3
commit 3784736b09
2 changed files with 2 additions and 12 deletions

View file

@ -766,8 +766,7 @@ static int update_group_show_walkcb(struct update_group *updgrp, void *arg)
safi2str(updgrp->safi));
} else {
vty_out(vty, "Update-group %" PRIu64 ":\n", updgrp->id);
vty_out(vty, " Created: %s",
timestamp_string(updgrp->uptime, timebuf));
vty_out(vty, " Created: %s", time_to_string(updgrp->uptime, timebuf));
}
filter = &updgrp->conf->filter[updgrp->afi][updgrp->safi];
@ -842,8 +841,7 @@ static int update_group_show_walkcb(struct update_group *updgrp, void *arg)
vty_out(vty, "\n");
vty_out(vty, " Update-subgroup %" PRIu64 ":\n",
subgrp->id);
vty_out(vty, " Created: %s",
timestamp_string(subgrp->uptime, timebuf));
vty_out(vty, " Created: %s", time_to_string(subgrp->uptime, timebuf));
}
if (subgrp->split_from.update_group_id

View file

@ -2711,14 +2711,6 @@ static inline int peer_group_af_configured(struct peer_group *group)
return 0;
}
static inline char *timestamp_string(time_t ts, char *timebuf)
{
time_t tbuf;
tbuf = time(NULL) - (monotime(NULL) - ts);
return ctime_r(&tbuf, timebuf);
}
static inline bool peer_established(struct peer_connection *connection)
{
return connection->status == Established;