]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospf6d: fix clang warning
authorVincent JARDIN <vincent.jardin@6wind.com>
Sun, 8 Oct 2017 21:14:55 +0000 (23:14 +0200)
committerVincent JARDIN <vincent.jardin@6wind.com>
Sun, 8 Oct 2017 21:19:34 +0000 (23:19 +0200)
troute and tinfo needs to be 0'd

Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
ospf6d/ospf6_asbr.c

index e3ceee2439fc3eccade7b330e49c5e247dd31fd2..c65578c11e34988c457d5283e23002bbb153661c 100644 (file)
@@ -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;