diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-08-24 21:43:29 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-08-24 21:49:39 -0300 |
| commit | 0af35d90a125952d04aa892522b6be324f2dfbf7 (patch) | |
| tree | 30a64161c4e98d6695d8c3104d4dba1c41d8e767 /bgpd/rfapi/bgp_rfapi_cfg.c | |
| parent | e691f179b6c6fc26536e68958f19ff6983a03274 (diff) | |
*: fix assorted issues detected by Coverity Scan
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'bgpd/rfapi/bgp_rfapi_cfg.c')
| -rw-r--r-- | bgpd/rfapi/bgp_rfapi_cfg.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/bgpd/rfapi/bgp_rfapi_cfg.c b/bgpd/rfapi/bgp_rfapi_cfg.c index c8e2dd9525..e3b446f76a 100644 --- a/bgpd/rfapi/bgp_rfapi_cfg.c +++ b/bgpd/rfapi/bgp_rfapi_cfg.c @@ -2977,11 +2977,6 @@ DEFUN_NOSH (vnc_vrf_policy, struct rfapi_nve_group_cfg *rfg; VTY_DECLVAR_CONTEXT(bgp, bgp); - if (!bgp) { - vty_out(vty, "No BGP process is configured\n"); - return CMD_WARNING_CONFIG_FAILED; - } - /* Search for name */ rfg = bgp_rfapi_cfg_match_byname(bgp, argv[1]->arg, RFAPI_GROUP_CFG_VRF); @@ -3012,10 +3007,6 @@ DEFUN (vnc_no_vrf_policy, { VTY_DECLVAR_CONTEXT(bgp, bgp); - if (!bgp) { - vty_out(vty, "No BGP process is configured\n"); - return CMD_WARNING_CONFIG_FAILED; - } return bgp_rfapi_delete_named_nve_group(vty, bgp, argv[2]->arg, RFAPI_GROUP_CFG_VRF); } @@ -3031,11 +3022,6 @@ DEFUN (vnc_vrf_policy_label, uint32_t label; VTY_DECLVAR_CONTEXT(bgp, bgp); - if (!bgp) { - vty_out(vty, "No BGP process is configured\n"); - return CMD_WARNING_CONFIG_FAILED; - } - /* make sure it's still in list */ if (!listnode_lookup(bgp->rfapi_cfg->nve_groups_sequential, rfg)) { /* Not in list anymore */ @@ -3145,11 +3131,6 @@ DEFUN (vnc_vrf_policy_rt_import, int is_export_bgp = 0; int is_export_zebra = 0; - if (!bgp) { - vty_out(vty, "No BGP process is configured\n"); - return CMD_WARNING_CONFIG_FAILED; - } - /* make sure it's still in list */ if (!listnode_lookup(bgp->rfapi_cfg->nve_groups_sequential, rfg)) { /* Not in list anymore */ @@ -3213,11 +3194,6 @@ DEFUN (vnc_vrf_policy_rt_export, VTY_DECLVAR_CONTEXT(bgp, bgp); int rc; - if (!bgp) { - vty_out(vty, "No BGP process is configured\n"); - return CMD_WARNING_CONFIG_FAILED; - } - /* make sure it's still in list */ if (!listnode_lookup(bgp->rfapi_cfg->nve_groups_sequential, rfg)) { /* Not in list anymore */ @@ -3253,11 +3229,6 @@ DEFUN (vnc_vrf_policy_rt_both, struct listnode *node; struct rfapi_rfg_name *rfgn; - if (!bgp) { - vty_out(vty, "No BGP process is configured\n"); - return CMD_WARNING_CONFIG_FAILED; - } - /* make sure it's still in list */ if (!listnode_lookup(bgp->rfapi_cfg->nve_groups_sequential, rfg)) { /* Not in list anymore */ @@ -3333,11 +3304,6 @@ DEFUN (vnc_vrf_policy_rd, VTY_DECLVAR_CONTEXT_SUB(rfapi_nve_group_cfg, rfg); VTY_DECLVAR_CONTEXT(bgp, bgp); - if (!bgp) { - vty_out(vty, "No BGP process is configured\n"); - return CMD_WARNING_CONFIG_FAILED; - } - /* make sure it's still in list */ if (!listnode_lookup(bgp->rfapi_cfg->nve_groups_sequential, rfg)) { /* Not in list anymore */ @@ -3420,11 +3386,6 @@ DEFUN_NOSH (vnc_l2_group, struct rfapi_l2_group_cfg *rfg; VTY_DECLVAR_CONTEXT(bgp, bgp); - if (!bgp) { - vty_out(vty, "No BGP process is configured\n"); - return CMD_WARNING_CONFIG_FAILED; - } - /* Search for name */ rfg = rfapi_l2_group_lookup_byname(bgp, argv[1]->arg); @@ -3505,10 +3466,6 @@ DEFUN (vnc_no_l2_group, { VTY_DECLVAR_CONTEXT(bgp, bgp); - if (!bgp) { - vty_out(vty, "No BGP process is configured\n"); - return CMD_WARNING_CONFIG_FAILED; - } return bgp_rfapi_delete_named_l2_group(vty, bgp, argv[3]->arg); } @@ -3522,11 +3479,6 @@ DEFUN (vnc_l2_group_lni, VTY_DECLVAR_CONTEXT_SUB(rfapi_l2_group_cfg, rfg); VTY_DECLVAR_CONTEXT(bgp, bgp); - if (!bgp) { - vty_out(vty, "No BGP process is configured\n"); - return CMD_WARNING_CONFIG_FAILED; - } - /* make sure it's still in list */ if (!listnode_lookup(bgp->rfapi_cfg->l2_groups, rfg)) { /* Not in list anymore */ @@ -3549,11 +3501,6 @@ DEFUN (vnc_l2_group_labels, VTY_DECLVAR_CONTEXT(bgp, bgp); struct list *ll; - if (!bgp) { - vty_out(vty, "No BGP process is configured\n"); - return CMD_WARNING_CONFIG_FAILED; - } - /* make sure it's still in list */ if (!listnode_lookup(bgp->rfapi_cfg->l2_groups, rfg)) { /* Not in list anymore */ @@ -3589,11 +3536,6 @@ DEFUN (vnc_l2_group_no_labels, VTY_DECLVAR_CONTEXT(bgp, bgp); struct list *ll; - if (!bgp) { - vty_out(vty, "No BGP process is configured\n"); - return CMD_WARNING_CONFIG_FAILED; - } - /* make sure it's still in list */ if (!listnode_lookup(bgp->rfapi_cfg->l2_groups, rfg)) { /* Not in list anymore */ @@ -3646,10 +3588,6 @@ DEFUN (vnc_l2_group_rt, vty_out(vty, "Unknown option, %s\n", argv[1]->arg); return CMD_ERR_NO_MATCH; } - if (!bgp) { - vty_out(vty, "No BGP process is configured\n"); - return CMD_WARNING_CONFIG_FAILED; - } /* make sure it's still in list */ if (!listnode_lookup(bgp->rfapi_cfg->l2_groups, rfg)) { |
