summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_vty.c
diff options
context:
space:
mode:
authorpaco <paco@voltanet.io>2018-06-13 12:34:23 +0200
committerpaco <paco@voltanet.io>2018-06-13 14:30:06 +0200
commit92692be16af49a611933ef054f28419612a8d89c (patch)
treedfaf20c2371eeb86e088a7a8dd35b7f9cd50f6d7 /ospfd/ospf_vty.c
parentMerge pull request #2298 from qlyoung/pipe-actions-vtysh (diff)
downloadfrr-92692be16af49a611933ef054f28419612a8d89c.tar.xz
frr-92692be16af49a611933ef054f28419612a8d89c.zip
ospfd: dead code (Coverity 1399232)
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to '')
-rw-r--r--ospfd/ospf_vty.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 21567c6ce..7218f9664 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -8084,9 +8084,6 @@ DEFUN (ospf_redistribute_source,
struct ospf_redist *red;
int idx = 0;
- if (!ospf)
- return CMD_SUCCESS;
-
/* Get distribute source. */
source = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
if (source < 0)
@@ -8169,16 +8166,10 @@ DEFUN (ospf_redistribute_instance_source,
unsigned short instance;
struct ospf_redist *red;
- if (!ospf)
- return CMD_SUCCESS;
-
source = proto_redistnum(AFI_IP, argv[idx_ospf_table]->text);
instance = strtoul(argv[idx_number]->arg, NULL, 10);
- if (!ospf)
- return CMD_SUCCESS;
-
if ((source == ZEBRA_ROUTE_OSPF) && !ospf->instance) {
vty_out(vty,
"Instance redistribution in non-instanced OSPF not allowed\n");
@@ -8469,9 +8460,6 @@ DEFUN (no_ospf_distance_ospf,
VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf);
int idx = 0;
- if (!ospf)
- return CMD_SUCCESS;
-
if (argv_find(argv, argc, "intra-area", &idx) || argc == 3)
idx = ospf->distance_intra = 0;
if (argv_find(argv, argc, "inter-area", &idx) || argc == 3)
@@ -8525,9 +8513,6 @@ DEFUN (ospf_distance_source,
int idx_number = 1;
int idx_ipv4_prefixlen = 2;
- if (!ospf)
- return CMD_SUCCESS;
-
ospf_distance_set (vty, ospf, argv[idx_number]->arg, argv[idx_ipv4_prefixlen]->arg, NULL);
return CMD_SUCCESS;
@@ -8545,9 +8530,6 @@ DEFUN (no_ospf_distance_source,
int idx_number = 2;
int idx_ipv4_prefixlen = 3;
- if (!ospf)
- return CMD_SUCCESS;
-
ospf_distance_unset (vty, ospf, argv[idx_number]->arg, argv[idx_ipv4_prefixlen]->arg, NULL);
return CMD_SUCCESS;
@@ -8566,9 +8548,6 @@ DEFUN (ospf_distance_source_access_list,
int idx_ipv4_prefixlen = 2;
int idx_word = 3;
- if (!ospf)
- return CMD_SUCCESS;
-
ospf_distance_set (vty, ospf, argv[idx_number]->arg, argv[idx_ipv4_prefixlen]->arg, argv[idx_word]->arg);
return CMD_SUCCESS;
@@ -8588,9 +8567,6 @@ DEFUN (no_ospf_distance_source_access_list,
int idx_ipv4_prefixlen = 3;
int idx_word = 4;
- if (!ospf)
- return CMD_SUCCESS;
-
ospf_distance_unset (vty, ospf, argv[idx_number]->arg, argv[idx_ipv4_prefixlen]->arg, argv[idx_word]->arg);
return CMD_SUCCESS;