mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 02:43:41 +00:00
lib: work around enum issue in old gcc
I'd like to keep the explicit check here, but since underlying type of enum is implementation defined, theres some inconsistency using -Wall -Werror in older compilers here Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
e4f5680d6e
commit
f7d4592509
@ -595,8 +595,15 @@ int vrf_get_backend(void)
|
|||||||
|
|
||||||
int vrf_configure_backend(enum vrf_backend_type backend)
|
int vrf_configure_backend(enum vrf_backend_type backend)
|
||||||
{
|
{
|
||||||
if (backend < 0 || backend >= VRF_BACKEND_MAX)
|
/* Work around issue in old gcc */
|
||||||
|
switch (backend) {
|
||||||
|
case VRF_BACKEND_UNKNOWN:
|
||||||
|
case VRF_BACKEND_NETNS:
|
||||||
|
case VRF_BACKEND_VRF_LITE:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
vrf_backend = backend;
|
vrf_backend = backend;
|
||||||
vrf_backend_configured = 1;
|
vrf_backend_configured = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user