]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: Remove usage of inet_ntop
authorDonald Sharp <sharpd@nvidia.com>
Tue, 26 Jul 2022 20:23:46 +0000 (16:23 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 29 Jul 2022 22:31:58 +0000 (18:31 -0400)
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
ospfd/ospf_abr.c
ospfd/ospf_flood.c

index 7aa3a27c604d29d161de0469d87ce58c19f34fc9..13243a55af19a337b46e70932bbb54dbf4bb0347 100644 (file)
@@ -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)) :
-                       "<none>");
+                       "ospf_abr_nssa_am_elected: best electable ABR is: %pI4",
+                       best);
 
        if (best == NULL)
                return 1;
index 8f9153d766ae64d49c6219d8e8b20f6f323a684c..848f3407503e5bf7862cb10ceb4565aedb1281a8 100644 (file)
@@ -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;