diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-09 14:14:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-09 14:14:16 +0200 |
commit | edbb54715c87771a9546f2a1a4b1bac2b7961d1d (patch) | |
tree | 8c506c0c251707b1c04d375a3e26f90bc1acbad8 | |
parent | Merge pull request #1311 from vjardin6WIND/csv_unittest (diff) | |
parent | bgpd: fix aspath parsing (diff) | |
download | frr-edbb54715c87771a9546f2a1a4b1bac2b7961d1d.tar.xz frr-edbb54715c87771a9546f2a1a4b1bac2b7961d1d.zip |
Merge pull request #1309 from vjardin6WIND/clean
Fix clang warnings
-rw-r--r-- | bgpd/bgp_aspath.c | 3 | ||||
-rw-r--r-- | bgpd/bgp_attr.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c index 2b776d218..6c03ba305 100644 --- a/bgpd/bgp_aspath.c +++ b/bgpd/bgp_aspath.c @@ -1914,7 +1914,8 @@ static const char *aspath_gettoken(const char *buf, enum as_token *token, /* There is no match then return unknown token. */ *token = as_token_unknown; - return p++; + p++; + return p; } struct aspath *aspath_str2aspath(const char *str) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 97b6273cb..c178089af 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -1849,7 +1849,6 @@ static int bgp_attr_encap(uint8_t type, struct peer *peer, /* IN */ u_char *startp) { bgp_size_t total; - struct bgp_attr_encap_subtlv *stlv_last = NULL; uint16_t tunneltype = 0; total = length + (CHECK_FLAG(flag, BGP_ATTR_FLAG_EXTLEN) ? 4 : 3); @@ -1926,6 +1925,7 @@ static int bgp_attr_encap(uint8_t type, struct peer *peer, /* IN */ /* attach tlv to encap chain */ if (BGP_ATTR_ENCAP == type) { + struct bgp_attr_encap_subtlv *stlv_last; for (stlv_last = attr->encap_subtlvs; stlv_last && stlv_last->next; stlv_last = stlv_last->next) @@ -1937,6 +1937,7 @@ static int bgp_attr_encap(uint8_t type, struct peer *peer, /* IN */ } #if ENABLE_BGP_VNC } else { + struct bgp_attr_encap_subtlv *stlv_last; for (stlv_last = attr->vnc_subtlvs; stlv_last && stlv_last->next; stlv_last = stlv_last->next) @@ -1948,7 +1949,6 @@ static int bgp_attr_encap(uint8_t type, struct peer *peer, /* IN */ } #endif } - stlv_last = tlv; } if (BGP_ATTR_ENCAP == type) { |