mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-10 16:42:44 +00:00
Merge pull request #2421 from pacovn/Coverity_1399232_Logically_dead_code
ospfd: dead code (Coverity 1399232)
This commit is contained in:
commit
558c7c80bf
@ -8084,9 +8084,6 @@ DEFUN (ospf_redistribute_source,
|
|||||||
struct ospf_redist *red;
|
struct ospf_redist *red;
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
|
||||||
if (!ospf)
|
|
||||||
return CMD_SUCCESS;
|
|
||||||
|
|
||||||
/* Get distribute source. */
|
/* Get distribute source. */
|
||||||
source = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
|
source = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
|
||||||
if (source < 0)
|
if (source < 0)
|
||||||
@ -8169,9 +8166,6 @@ DEFUN (ospf_redistribute_instance_source,
|
|||||||
unsigned short instance;
|
unsigned short instance;
|
||||||
struct ospf_redist *red;
|
struct ospf_redist *red;
|
||||||
|
|
||||||
if (!ospf)
|
|
||||||
return CMD_SUCCESS;
|
|
||||||
|
|
||||||
source = proto_redistnum(AFI_IP, argv[idx_ospf_table]->text);
|
source = proto_redistnum(AFI_IP, argv[idx_ospf_table]->text);
|
||||||
|
|
||||||
instance = strtoul(argv[idx_number]->arg, NULL, 10);
|
instance = strtoul(argv[idx_number]->arg, NULL, 10);
|
||||||
@ -8466,9 +8460,6 @@ DEFUN (no_ospf_distance_ospf,
|
|||||||
VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf);
|
VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf);
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
|
||||||
if (!ospf)
|
|
||||||
return CMD_SUCCESS;
|
|
||||||
|
|
||||||
if (argv_find(argv, argc, "intra-area", &idx) || argc == 3)
|
if (argv_find(argv, argc, "intra-area", &idx) || argc == 3)
|
||||||
idx = ospf->distance_intra = 0;
|
idx = ospf->distance_intra = 0;
|
||||||
if (argv_find(argv, argc, "inter-area", &idx) || argc == 3)
|
if (argv_find(argv, argc, "inter-area", &idx) || argc == 3)
|
||||||
@ -8522,9 +8513,6 @@ DEFUN (ospf_distance_source,
|
|||||||
int idx_number = 1;
|
int idx_number = 1;
|
||||||
int idx_ipv4_prefixlen = 2;
|
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);
|
ospf_distance_set (vty, ospf, argv[idx_number]->arg, argv[idx_ipv4_prefixlen]->arg, NULL);
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
@ -8542,9 +8530,6 @@ DEFUN (no_ospf_distance_source,
|
|||||||
int idx_number = 2;
|
int idx_number = 2;
|
||||||
int idx_ipv4_prefixlen = 3;
|
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);
|
ospf_distance_unset (vty, ospf, argv[idx_number]->arg, argv[idx_ipv4_prefixlen]->arg, NULL);
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
@ -8563,9 +8548,6 @@ DEFUN (ospf_distance_source_access_list,
|
|||||||
int idx_ipv4_prefixlen = 2;
|
int idx_ipv4_prefixlen = 2;
|
||||||
int idx_word = 3;
|
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);
|
ospf_distance_set (vty, ospf, argv[idx_number]->arg, argv[idx_ipv4_prefixlen]->arg, argv[idx_word]->arg);
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
@ -8585,9 +8567,6 @@ DEFUN (no_ospf_distance_source_access_list,
|
|||||||
int idx_ipv4_prefixlen = 3;
|
int idx_ipv4_prefixlen = 3;
|
||||||
int idx_word = 4;
|
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);
|
ospf_distance_unset (vty, ospf, argv[idx_number]->arg, argv[idx_ipv4_prefixlen]->arg, argv[idx_word]->arg);
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
|
Loading…
Reference in New Issue
Block a user