Merge pull request #6803 from donaldsharp/coverity_moo_moo

Coverity code cleanup
This commit is contained in:
Donatas Abraitis 2020-07-27 17:20:51 +03:00 committed by GitHub
commit db8a7160da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 8 deletions

View File

@ -951,8 +951,11 @@ afibreak:
/* initialize syncrdpos to the first /* initialize syncrdpos to the first
* mid-layer table entry * mid-layer table entry
*/ */
if (!bmp->syncrdpos) if (!bmp->syncrdpos) {
bmp->syncrdpos = bgp_table_top(table); bmp->syncrdpos = bgp_table_top(table);
if (!bmp->syncrdpos)
goto eor;
}
/* look for a valid mid-layer table */ /* look for a valid mid-layer table */
do { do {

View File

@ -3899,6 +3899,12 @@ DEFPY (bgp_evpn_advertise_pip_ip_mac,
struct listnode *node = NULL; struct listnode *node = NULL;
struct bgpevpn *vpn = NULL; struct bgpevpn *vpn = NULL;
/*
* At this point if bgp_evpn is NULL and evpn is enabled
* something stupid has gone wrong
*/
assert(bgp_evpn);
update_advertise_vrf_routes(bgp_vrf); update_advertise_vrf_routes(bgp_vrf);
/* Update (svi) type-2 routes */ /* Update (svi) type-2 routes */

View File

@ -133,19 +133,20 @@ void sighup(void)
/* /*
* This is turned off for the moment. There is all * This is turned off for the moment. There is all
* sorts of config turned off by bgp_terminate * sorts of config turned off by bgp_terminate
* that is not setup properly again in bgp_rest. * that is not setup properly again in bgp_reset.
* I see no easy way to do this nor do I see that * I see no easy way to do this nor do I see that
* this is a desirable way to reload config * this is a desirable way to reload config
* given the yang work. * given the yang work.
*/ */
/* Terminate all thread. */ /* Terminate all thread. */
bgp_terminate(); /*
bgp_reset(); * bgp_terminate();
zlog_info("bgpd restarting!"); * bgp_reset();
* zlog_info("bgpd restarting!");
/* Reload config file. */
vty_read_config(NULL, bgpd_di.config_file, config_default);
* Reload config file.
* vty_read_config(NULL, bgpd_di.config_file, config_default);
*/
/* Try to return to normal operation. */ /* Try to return to normal operation. */
} }