diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c index 7aa3a27c60..13243a55af 100644 --- a/ospfd/ospf_abr.c +++ b/ospfd/ospf_abr.c @@ -350,7 +350,6 @@ static int ospf_abr_nssa_am_elected(struct ospf_area *area) struct ospf_lsa *lsa; struct router_lsa *rlsa; struct in_addr *best = NULL; - char buf[PREFIX_STRLEN]; LSDB_LOOP (ROUTER_LSDB(area), rn, lsa) { /* sanity checks */ @@ -382,9 +381,8 @@ static int ospf_abr_nssa_am_elected(struct ospf_area *area) if (IS_DEBUG_OSPF_NSSA) zlog_debug( - "ospf_abr_nssa_am_elected: best electable ABR is: %s", - (best) ? inet_ntop(AF_INET, best, buf, sizeof(buf)) : - ""); + "ospf_abr_nssa_am_elected: best electable ABR is: %pI4", + best); if (best == NULL) return 1; diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index 8f9153d766..848f340750 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -454,16 +454,13 @@ int ospf_flood_through_interface(struct ospf_interface *oi, struct ospf_neighbor *onbr; struct route_node *rn; int retx_flag; - char buf[PREFIX_STRLEN]; if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "%s: considering int %s (%s), INBR(%s), LSA[%s] AGE %u", + "%s: considering int %s (%s), INBR(%pI4), LSA[%s] AGE %u", __func__, IF_NAME(oi), ospf_get_name(oi->ospf), - inbr ? inet_ntop(AF_INET, &inbr->router_id, buf, - sizeof(buf)) - : "NULL", - dump_lsa_key(lsa), ntohs(lsa->data->ls_age)); + inbr ? &inbr->router_id : NULL, dump_lsa_key(lsa), + ntohs(lsa->data->ls_age)); if (!ospf_if_is_enable(oi)) return 0;