From 2c73a9c70dc17bc38c854af1229decf8d8ca0b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Tvrd=C3=ADk?= Date: Wed, 20 Jan 2016 15:44:32 +0100 Subject: [PATCH] RPKI: Use '%N' key in printf net_addr --- proto/rpki/packets.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/proto/rpki/packets.c b/proto/rpki/packets.c index ac4ce14c..2a227a9b 100644 --- a/proto/rpki/packets.c +++ b/proto/rpki/packets.c @@ -183,9 +183,7 @@ pfx_table_add(struct rpki_cache *cache, const net_addr_union *pfxr) { struct rpki_proto *p = cache->p; - char addr_buf[100]; - net_format((net_addr *)pfxr, addr_buf, sizeof(addr_buf)); - CACHE_TRACE(D_EVENTS, cache, "Import %s", addr_buf); + CACHE_TRACE(D_EVENTS, cache, "Import %N", pfxr); net *n = net_get(cache->p->p.table, &pfxr->n); @@ -211,9 +209,7 @@ pfx_table_remove(struct rpki_cache *cache, const net_addr_union *pfxr) { struct rpki_proto *p = cache->p; - char addr_buf[100]; - net_format((net_addr *)pfxr, addr_buf, sizeof(addr_buf)); - CACHE_TRACE(D_EVENTS, cache, "Remove %s", addr_buf); + CACHE_TRACE(D_EVENTS, cache, "Remove %N", pfxr); net *n = net_get(cache->p->p.table, &pfxr->n); rte_update2(p->p.main_ahook, n, NULL, rt_get_source(&cache->p->p, cache->cache_id));