From 2dbe669bdf0f0bcbf0228ccdab7b631bd8b934f1 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Sun, 18 Oct 2020 14:33:54 +0300 Subject: :* Convert prefix2str to %pFX Signed-off-by: Donatas Abraitis --- staticd/static_zebra.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'staticd') diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index efde3babd..a9b570de8 100644 --- a/staticd/static_zebra.c +++ b/staticd/static_zebra.c @@ -109,24 +109,21 @@ static int route_notify_owner(ZAPI_CALLBACK_ARGS) struct prefix p; enum zapi_route_notify_owner note; uint32_t table_id; - char buf[PREFIX_STRLEN]; if (!zapi_route_notify_decode(zclient->ibuf, &p, &table_id, ¬e)) return -1; - prefix2str(&p, buf, sizeof(buf)); - switch (note) { case ZAPI_ROUTE_FAIL_INSTALL: static_nht_mark_state(&p, vrf_id, STATIC_NOT_INSTALLED); - zlog_warn("%s: Route %s failed to install for table: %u", - __func__, buf, table_id); + zlog_warn("%s: Route %pFX failed to install for table: %u", + __func__, &p, table_id); break; case ZAPI_ROUTE_BETTER_ADMIN_WON: static_nht_mark_state(&p, vrf_id, STATIC_NOT_INSTALLED); zlog_warn( - "%s: Route %s over-ridden by better route for table: %u", - __func__, buf, table_id); + "%s: Route %pFX over-ridden by better route for table: %u", + __func__, &p, table_id); break; case ZAPI_ROUTE_INSTALLED: static_nht_mark_state(&p, vrf_id, STATIC_INSTALLED); @@ -136,8 +133,8 @@ static int route_notify_owner(ZAPI_CALLBACK_ARGS) break; case ZAPI_ROUTE_REMOVE_FAIL: static_nht_mark_state(&p, vrf_id, STATIC_INSTALLED); - zlog_warn("%s: Route %s failure to remove for table: %u", - __func__, buf, table_id); + zlog_warn("%s: Route %pFX failure to remove for table: %u", + __func__, &p, table_id); break; } -- cgit v1.2.3