]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix compiler warning
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 7 Sep 2017 13:31:00 +0000 (15:31 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Thu, 7 Sep 2017 13:31:50 +0000 (15:31 +0200)
bgp_route.c:6393:7: error: ‘len’ may be used uninitialized in this function
gcc 5.4.0 isn't intelligent enough to notice it's set on all paths.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgp_route.c

index f3540716547da2a2545a9e47a933e0f422ec9f75..fabe4483e50cc77909889bdd0a01509156731668 100644 (file)
@@ -6339,7 +6339,7 @@ void bgp_redistribute_withdraw(struct bgp *bgp, afi_t afi, int type,
 static void route_vty_out_route(struct prefix *p, struct vty *vty,
                                json_object *json)
 {
-       int len;
+       int len = 0;
        u_int32_t destination;
        char buf[BUFSIZ];