summaryrefslogtreecommitdiff
path: root/ospf6d
diff options
context:
space:
mode:
authorDenis Ovsienko <infrastation@yandex.ru>2011-08-19 22:24:27 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2011-08-27 21:18:38 +0400
commitd91f35bc90ec4e5c8513cd7ac1f6fd00c5113c27 (patch)
tree29499885dfe8f2f16a0fb49bd36f400fe7194265 /ospf6d
parent538cb284864c17de66152a5236db4cd80e3e7639 (diff)
ospf6d: justify some ABR debug code
* ospf6_abr.c * ospf6_abr_examin_summary(): only fill "buf" when it is used
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ospf6_abr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c
index d38ef21a..c3a63fe6 100644
--- a/ospf6d/ospf6_abr.c
+++ b/ospf6d/ospf6_abr.c
@@ -555,7 +555,8 @@ ospf6_abr_examin_summary (struct ospf6_lsa *lsa, struct ospf6_area *oa)
prefix.family = AF_INET6;
prefix.prefixlen = prefix_lsa->prefix.prefix_length;
ospf6_prefix_in6_addr (&prefix.u.prefix6, &prefix_lsa->prefix);
- prefix2str (&prefix, buf, sizeof (buf));
+ if (is_debug)
+ prefix2str (&prefix, buf, sizeof (buf));
table = oa->ospf6->route_table;
type = OSPF6_DEST_TYPE_NETWORK;
prefix_options = prefix_lsa->prefix.prefix_options;
@@ -574,7 +575,8 @@ ospf6_abr_examin_summary (struct ospf6_lsa *lsa, struct ospf6_area *oa)
router_lsa = (struct ospf6_inter_router_lsa *)
OSPF6_LSA_HEADER_END (lsa->header);
ospf6_linkstate_prefix (router_lsa->router_id, htonl (0), &prefix);
- inet_ntop (AF_INET, &router_lsa->router_id, buf, sizeof (buf));
+ if (is_debug)
+ inet_ntop (AF_INET, &router_lsa->router_id, buf, sizeof (buf));
table = oa->ospf6->brouter_table;
type = OSPF6_DEST_TYPE_ROUTER;
options[0] = router_lsa->options[0];