[quagga-dev 12094] [PATCH] zebra: don't print uninitialized string (3b02fe8)

David Lamparter equinox at opensourcerouting.org
Wed Mar 4 06:39:45 GMT 2015

This crept in as part of the MRIB improvements and I missed the compiler
warning between other noise.  Unfortunately, printing an uninitialised
variable can in fact make zebra crash, so this is not trivial.

Fixes: 3b02fe8 ("zebra: add "show ip rpf" to get result of RPF lookup")
Signed-off-by: David Lamparter <equinox at opensourcerouting.org>

Found this while cleaning up the remaining warnings.  Didn't notice while
testing my code :( ... this should probably go on stable/0.99.24.

 zebra/zebra_vty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 598b40d..1e39ebd 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -702,7 +702,7 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn, int mcast)
   RNODE_FOREACH_RIB (rn, rib)
-      const char *mcast_info;
+      const char *mcast_info = "";
       if (mcast)
           rib_table_info_t *info = rn->table->info;

More information about the Quagga-dev mailing list