The ordering to check for NULL pointer was
reversed in this function.
I switched the order after examing a couple other
functions to see that they have the 'correct' order.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
#endif
VNC_RHNCK (enter);
- /* check bgp redist flag for vnc direct ("vpn") routes */
-
- if (!bgp->rfapi_cfg->redist[afi][ZEBRA_ROUTE_BGP_DIRECT])
+ if (!bgp->rfapi_cfg)
{
- zlog_debug ("%s: bgp redistribution of afi=%d VNC direct routes is off",
- __func__, afi);
+ zlog_debug ("%s: bgp->rfapi_cfg is NULL, skipping", __func__);
return;
}
- if (!bgp->rfapi_cfg)
+ /* check bgp redist flag for vnc direct ("vpn") routes */
+ if (!bgp->rfapi_cfg->redist[afi][ZEBRA_ROUTE_BGP_DIRECT])
{
- zlog_debug ("%s: bgp->rfapi_cfg is NULL, skipping", __func__);
+ zlog_debug ("%s: bgp redistribution of afi=%d VNC direct routes is off",
+ __func__, afi);
return;
}