summaryrefslogtreecommitdiffstats
path: root/sharpd
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2020-10-18 13:33:54 +0200
committerDonatas Abraitis <donatas.abraitis@gmail.com>2020-10-22 08:07:41 +0200
commit2dbe669bdf0f0bcbf0228ccdab7b631bd8b934f1 (patch)
tree69c38032b07630b46d2d5852200789b13392153c /sharpd
parentMerge pull request #7353 from AnuradhaKaruppiah/mh-cleanup-fix-1 (diff)
downloadfrr-2dbe669bdf0f0bcbf0228ccdab7b631bd8b934f1.tar.xz
frr-2dbe669bdf0f0bcbf0228ccdab7b631bd8b934f1.zip
:* Convert prefix2str to %pFX
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'sharpd')
-rw-r--r--sharpd/sharp_nht.c11
-rw-r--r--sharpd/sharp_vty.c10
2 files changed, 6 insertions, 15 deletions
diff --git a/sharpd/sharp_nht.c b/sharpd/sharp_nht.c
index 077e2b29e..bed0ebfa2 100644
--- a/sharpd/sharp_nht.c
+++ b/sharpd/sharp_nht.c
@@ -60,14 +60,9 @@ void sharp_nh_tracker_dump(struct vty *vty)
struct listnode *node;
struct sharp_nh_tracker *nht;
- for (ALL_LIST_ELEMENTS_RO(sg.nhs, node, nht)) {
- char buf[PREFIX_STRLEN];
-
- vty_out(vty, "%s: Nexthops: %u Updates: %u\n",
- prefix2str(&nht->p, buf, sizeof(buf)),
- nht->nhop_num,
- nht->updates);
- }
+ for (ALL_LIST_ELEMENTS_RO(sg.nhs, node, nht))
+ vty_out(vty, "%pFX: Nexthops: %u Updates: %u\n", &nht->p,
+ nht->nhop_num, nht->updates);
}
PREDECL_RBTREE_UNIQ(sharp_nhg_rb);
diff --git a/sharpd/sharp_vty.c b/sharpd/sharp_vty.c
index 0c3bf7af7..45c0799fa 100644
--- a/sharpd/sharp_vty.c
+++ b/sharpd/sharp_vty.c
@@ -146,16 +146,12 @@ DEFPY (install_routes_data_dump,
"Data about what is going on\n"
"Route Install/Removal Information\n")
{
- char buf[PREFIX_STRLEN];
struct timeval r;
timersub(&sg.r.t_end, &sg.r.t_start, &r);
- vty_out(vty, "Prefix: %s Total: %u %u %u Time: %jd.%ld\n",
- prefix2str(&sg.r.orig_prefix, buf, sizeof(buf)),
- sg.r.total_routes,
- sg.r.installed_routes,
- sg.r.removed_routes,
- (intmax_t)r.tv_sec, (long)r.tv_usec);
+ vty_out(vty, "Prefix: %pFX Total: %u %u %u Time: %jd.%ld\n",
+ &sg.r.orig_prefix, sg.r.total_routes, sg.r.installed_routes,
+ sg.r.removed_routes, (intmax_t)r.tv_sec, (long)r.tv_usec);
return CMD_SUCCESS;
}