]> git.puffer.fish Git - matthieu/frr.git/commitdiff
babeld: Prevent compiler warning about uninited value for n
authorDonald Sharp <sharpd@nvidia.com>
Wed, 13 Oct 2021 18:34:08 +0000 (14:34 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Wed, 13 Oct 2021 18:34:08 +0000 (14:34 -0400)
the variable n, when used must have been set via the find_route_slot
but the compiler in question is probably getting confused with the
multiple levels of indention.  Just get around the whole problem
by setting n = 0 and being done with it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
babeld/route.c

index dfd0bfab89945f0e53b9982a4a104991bc9d8708..8dd1e40431233521a792cda4f0a411aac19d7f58 100644 (file)
@@ -166,7 +166,7 @@ resize_route_table(int new_slots)
 static struct babel_route *
 insert_route(struct babel_route *route)
 {
-    int i, n;
+    int i, n = 0;
 
     assert(!route->installed);