mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 21:10:28 +00:00
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>
This commit is contained in:
parent
24d9575d53
commit
48e5512c01
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user