From 6e38a9ece08f0acdadac3b0df7cc3fcbaa3166bd Mon Sep 17 00:00:00 2001 From: Vincent JARDIN Date: Sun, 8 Oct 2017 23:14:55 +0200 Subject: [PATCH] ospf6d: fix clang warning troute and tinfo needs to be 0'd Signed-off-by: Vincent Jardin --- ospf6d/ospf6_asbr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index e3ceee2439..c65578c11e 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -438,6 +438,9 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex, if (!ospf6_zebra_is_redistribute(type)) return; + memset(&troute, 0, sizeof(troute)); + memset(&tinfo, 0, sizeof(tinfo)); + if (IS_OSPF6_DEBUG_ASBR) { prefix2str(prefix, pbuf, sizeof(pbuf)); zlog_debug("Redistribute %s (%s)", pbuf, ZROUTE_NAME(type)); @@ -457,8 +460,6 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex, /* apply route-map */ if (ospf6->rmap[type].map) { - memset(&troute, 0, sizeof(troute)); - memset(&tinfo, 0, sizeof(tinfo)); troute.route_option = &tinfo; tinfo.ifindex = ifindex; tinfo.tag = tag; -- 2.39.5