diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2020-03-24 18:16:06 +0100 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2020-04-13 23:03:42 +0200 |
commit | f7d459250939713b8707fe0fe44d2e7e5dd0276a (patch) | |
tree | d7a5b2344550c2573aa0a2b24dfa24068a19923e /lib/vrf.c | |
parent | lib: re-add accidentally deleted pfx family set (diff) | |
download | frr-f7d459250939713b8707fe0fe44d2e7e5dd0276a.tar.xz frr-f7d459250939713b8707fe0fe44d2e7e5dd0276a.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | lib/vrf.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -595,8 +595,15 @@ int vrf_get_backend(void) 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; + } vrf_backend = backend; vrf_backend_configured = 1; |