diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-05-04 02:28:38 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-05-03 11:05:19 +0200 |
commit | 48e5512c01d3b3484fda64546003f9a723451b35 (patch) | |
tree | c6e72de7f5dc2520922f2994a073da9274686ef9 /lib/vrf.c | |
parent | ospfd: continue statement is redundant (diff) | |
download | frr-48e5512c01d3b3484fda64546003f9a723451b35.tar.xz frr-48e5512c01d3b3484fda64546003f9a723451b35.zip |
lib: Remove functionally dead code.
The vrf_with_default_name vrf variable is set to NULL
and then tested to see if it is valid. Removing the
dead code.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/vrf.c')
-rw-r--r-- | lib/vrf.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -860,7 +860,6 @@ void vrf_cmd_init(int (*writefunc)(struct vty *vty), void vrf_set_default_name(const char *default_name, bool force) { struct vrf *def_vrf; - struct vrf *vrf_with_default_name = NULL; static bool def_vrf_forced; def_vrf = vrf_lookup_by_id(VRF_DEFAULT); @@ -871,13 +870,7 @@ void vrf_set_default_name(const char *default_name, bool force) def_vrf->vrf_id); return; } - if (vrf_with_default_name && vrf_with_default_name != def_vrf) { - /* vrf name already used by an other VRF */ - zlog_debug("VRF: %s, avoid changing name to %s, same name exists (%u)", - vrf_with_default_name->name, default_name, - vrf_with_default_name->vrf_id); - return; - } + snprintf(vrf_default_name, VRF_NAMSIZ, "%s", default_name); if (def_vrf) { if (force) |