]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Fix non-compilation of bgp_attr_extcom_tunnel_type 4341/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 15 May 2019 02:42:05 +0000 (22:42 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 15 May 2019 02:42:05 +0000 (22:42 -0400)
The bgp_attr_extcom_tunnel_type does not properly
compile with warnings turned on due to recent change.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_attr.c

index 0e9d3871532a0f87b67e61a27f16b44e47479198..bdcce596ce4e9ab205a1cfa40204f22b3147e0f0 100644 (file)
@@ -2783,16 +2783,16 @@ bgp_attr_parse_ret_t bgp_attr_parse(struct peer *peer, struct attr *attr,
  * Extract the tunnel type from extended community
  */
 void bgp_attr_extcom_tunnel_type(struct attr *attr,
-                                       bgp_encap_types *tunnel_type)
+                                bgp_encap_types *tunnel_type)
 {
        struct ecommunity *ecom;
        int i;
        if (!attr)
-               return false;
+               return;
 
        ecom = attr->ecommunity;
        if (!ecom || !ecom->size)
-               return false;
+               return;
 
        for (i = 0; i < ecom->size; i++) {
                uint8_t *pnt;
@@ -2805,10 +2805,10 @@ void bgp_attr_extcom_tunnel_type(struct attr *attr,
                      sub_type == ECOMMUNITY_OPAQUE_SUBTYPE_ENCAP))
                        continue;
                *tunnel_type = ((pnt[6] << 8) | pnt[7]);
-               return true;
+               return;
        }
 
-       return false;
+       return;
 }
 
 size_t bgp_packet_mpattr_start(struct stream *s, struct peer *peer, afi_t afi,