diff options
author | Donald Sharp <sharpd@nvidia.com> | 2023-01-30 16:06:29 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2023-01-31 21:15:42 +0100 |
commit | bde30e78cb27fba58ca7107bcb25cc0b2685b826 (patch) | |
tree | 97dffefafaa55a83ea6c959dcd85050886706519 /lib/prefix.c | |
parent | zebra: Add missing enums to switch statements (diff) | |
download | frr-bde30e78cb27fba58ca7107bcb25cc0b2685b826.tar.xz frr-bde30e78cb27fba58ca7107bcb25cc0b2685b826.zip |
lib: Add missing enum's to switch statement
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/prefix.c')
-rw-r--r-- | lib/prefix.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/prefix.c b/lib/prefix.c index 1d098f78c..9d6dc7357 100644 --- a/lib/prefix.c +++ b/lib/prefix.c @@ -148,11 +148,11 @@ const char *afi2str(afi_t afi) case AFI_L2VPN: return "l2vpn"; case AFI_MAX: + case AFI_UNSPEC: return "bad-value"; - default: - break; } - return NULL; + + assert(!"Reached end of function we should never reach"); } const char *safi2str(safi_t safi) @@ -172,9 +172,12 @@ const char *safi2str(safi_t safi) return "labeled-unicast"; case SAFI_FLOWSPEC: return "flowspec"; - default: + case SAFI_UNSPEC: + case SAFI_MAX: return "unknown"; } + + assert(!"Reached end of function we should never reach"); } /* If n includes p prefix then return 1 else return 0. */ @@ -1507,7 +1510,7 @@ static ssize_t printfrr_ia(struct fbuf *buf, struct printfrr_eargs *ea, return bputch(buf, '*'); break; - default: + case IPADDR_NONE: break; } } |