ripd: Convert to using internal printf formatters

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2021-03-09 20:07:20 -05:00
parent 0490a45f7c
commit 2e2262fe14

View file

@ -698,7 +698,6 @@ static void rip_packet_dump(struct rip_packet *packet, int size,
caddr_t lim; caddr_t lim;
struct rte *rte; struct rte *rte;
const char *command_str; const char *command_str;
char pbuf[BUFSIZ], nbuf[BUFSIZ];
uint8_t netmask = 0; uint8_t netmask = 0;
uint8_t *p; uint8_t *p;
@ -766,24 +765,18 @@ static void rip_packet_dump(struct rip_packet *packet, int size,
} }
} else } else
zlog_debug( zlog_debug(
" %s/%d -> %s family %d tag %" ROUTE_TAG_PRI " %pI4/%d -> %pI4 family %d tag %" ROUTE_TAG_PRI
" metric %ld", " metric %ld",
inet_ntop(AF_INET, &rte->prefix, pbuf, &rte->prefix, netmask, &rte->nexthop,
BUFSIZ),
netmask,
inet_ntop(AF_INET, &rte->nexthop, nbuf,
BUFSIZ),
ntohs(rte->family), ntohs(rte->family),
(route_tag_t)ntohs(rte->tag), (route_tag_t)ntohs(rte->tag),
(unsigned long)ntohl(rte->metric)); (unsigned long)ntohl(rte->metric));
} else { } else {
zlog_debug( zlog_debug(" %pI4 family %d tag %" ROUTE_TAG_PRI
" %s family %d tag %" ROUTE_TAG_PRI " metric %ld",
" metric %ld", &rte->prefix, ntohs(rte->family),
inet_ntop(AF_INET, &rte->prefix, pbuf, BUFSIZ), (route_tag_t)ntohs(rte->tag),
ntohs(rte->family), (unsigned long)ntohl(rte->metric));
(route_tag_t)ntohs(rte->tag),
(unsigned long)ntohl(rte->metric));
} }
} }
} }