summaryrefslogtreecommitdiff
path: root/lib/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stream.c')
-rw-r--r--lib/stream.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/lib/stream.c b/lib/stream.c
index 2de3abdf45..c6de3aefa1 100644
--- a/lib/stream.c
+++ b/lib/stream.c
@@ -1,22 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Packet interface
* Copyright (C) 1999 Kunihiro Ishiguro
- *
- * This file is part of GNU Zebra.
- *
- * GNU Zebra is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * GNU Zebra is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -635,7 +620,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 +639,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 +932,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);