From 052ea98b431598466e939575df2992b483524587 Mon Sep 17 00:00:00 2001 From: vivek Date: Sun, 4 Mar 2018 06:56:19 +0000 Subject: [PATCH] bgpd: Fix warnings Signed-off-by: Vivek Venkatraman --- bgpd/bgp_attr.c | 8 ++++---- bgpd/bgp_debug.c | 4 ++-- bgpd/bgp_debug.h | 1 + bgpd/bgp_route.c | 1 - 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 56303a3df5..73256046f6 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -2143,10 +2143,10 @@ bgp_attr_pmsi_tunnel(struct bgp_attr_parser_args *args) if (tnl_type == PMSI_TNLTYPE_INGR_REPL) { if (length != 9) { zlog_err("Bad PMSI tunnel attribute length %d for IR", - length); - return bgp_attr_malformed(args, - BGP_NOTIFY_UPDATE_ATTR_LENG_ERR, - args->total); + length); + return bgp_attr_malformed( + args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR, + args->total); } } diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 1c9c92044c..8b308c8f3e 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -419,8 +419,8 @@ int bgp_dump_attr(struct attr *attr, char *buf, size_t size) } if (CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_PMSI_TUNNEL))) - snprintf(buf + strlen(buf), size - strlen(buf), ", pmsi tnltype %u", - attr->pmsi_tnl_type); + snprintf(buf + strlen(buf), size - strlen(buf), + ", pmsi tnltype %u", attr->pmsi_tnl_type); if (CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_AS_PATH))) snprintf(buf + strlen(buf), size - strlen(buf), ", path %s", diff --git a/bgpd/bgp_debug.h b/bgpd/bgp_debug.h index 765e43f5b4..10a1e3159f 100644 --- a/bgpd/bgp_debug.h +++ b/bgpd/bgp_debug.h @@ -136,6 +136,7 @@ struct bgp_debug_filter { #define CONF_BGP_DEBUG(a, b) (conf_bgp_debug_ ## a & BGP_DEBUG_ ## b) extern const char *bgp_type_str[]; +extern const char *pmsi_tnltype_str[]; extern int bgp_dump_attr(struct attr *, char *, size_t); extern int bgp_debug_peer_updout_enabled(char *host); diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 93570f4a3c..d9d8280027 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -81,7 +81,6 @@ /* Extern from bgp_dump.c */ extern const char *bgp_origin_str[]; extern const char *bgp_origin_long_str[]; -extern const char *pmsi_tnltype_str[]; struct bgp_node *bgp_afi_node_get(struct bgp_table *table, afi_t afi, safi_t safi, struct prefix *p, -- 2.39.5