]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
RPKI: Use '%N' key in printf net_addr
authorPavel Tvrdík <pawel.tvrdik@gmail.com>
Wed, 20 Jan 2016 14:44:32 +0000 (15:44 +0100)
committerPavel Tvrdík <pawel.tvrdik@gmail.com>
Mon, 25 Jan 2016 14:39:38 +0000 (15:39 +0100)
proto/rpki/packets.c

index ac4ce14c3c825b71cb0aadd1ab46c43e125b76cc..2a227a9bf4b527e961a10e649fef89f81ad715c5 100644 (file)
@@ -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));