summaryrefslogtreecommitdiffstats
path: root/lib/stream.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-01-30 16:06:29 +0100
committerDonald Sharp <sharpd@nvidia.com>2023-01-31 21:15:42 +0100
commitbde30e78cb27fba58ca7107bcb25cc0b2685b826 (patch)
tree97dffefafaa55a83ea6c959dcd85050886706519 /lib/stream.c
parentzebra: Add missing enums to switch statements (diff)
downloadfrr-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/stream.c')
-rw-r--r--lib/stream.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/stream.c b/lib/stream.c
index 2de3abdf4..0756f9027 100644
--- a/lib/stream.c
+++ b/lib/stream.c
@@ -635,7 +635,7 @@ uint32_t stream_get_ipv4(struct stream *s)
bool stream_get_ipaddr(struct stream *s, struct ipaddr *ip)
{
- uint16_t ipa_len;
+ uint16_t ipa_len = 0;
STREAM_VERIFY_SANE(s);
@@ -654,7 +654,7 @@ bool stream_get_ipaddr(struct stream *s, struct ipaddr *ip)
case IPADDR_V6:
ipa_len = IPV6_MAX_BYTELEN;
break;
- default:
+ case IPADDR_NONE:
flog_err(EC_LIB_DEVELOPMENT,
"%s: unknown ip address-family: %u", __func__,
ip->ipa_type);
@@ -947,7 +947,7 @@ bool stream_put_ipaddr(struct stream *s, struct ipaddr *ip)
case IPADDR_V6:
stream_write(s, (uint8_t *)&ip->ipaddr_v6, 16);
break;
- default:
+ case IPADDR_NONE:
flog_err(EC_LIB_DEVELOPMENT,
"%s: unknown ip address-family: %u", __func__,
ip->ipa_type);