[quagga-dev 10639] [PATCH] bgpd: use ATTR_FLAG_BIT() for BGP_ATTR_ values

Jorge Boncompte [DTI2] jorge at dti2.net
Wed Jul 31 18:36:08 BST 2013


From: "Jorge Boncompte [DTI2]" <jorge at dti2.net>

* bgp_attr.c: this UNSET_FLAG()s are bogus. I did a quick review and
  I think that they could not cause any bug anyway.

Signed-off-by: Jorge Boncompte [DTI2] <jorge at dti2.net>
---
 bgpd/bgp_attr.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index cbf2902..feb073c 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -645,21 +645,21 @@ bgp_attr_unintern_sub (struct attr *attr)
   /* aspath refcount shoud be decrement. */
   if (attr->aspath)
     aspath_unintern (&attr->aspath);
-  UNSET_FLAG(attr->flag, BGP_ATTR_AS_PATH);
+  UNSET_FLAG(attr->flag, ATTR_FLAG_BIT (BGP_ATTR_AS_PATH));
   
   if (attr->community)
     community_unintern (&attr->community);
-  UNSET_FLAG(attr->flag, BGP_ATTR_COMMUNITIES);
+  UNSET_FLAG(attr->flag, ATTR_FLAG_BIT (BGP_ATTR_COMMUNITIES));
   
   if (attr->extra)
     {
       if (attr->extra->ecommunity)
         ecommunity_unintern (&attr->extra->ecommunity);
-      UNSET_FLAG(attr->flag, BGP_ATTR_EXT_COMMUNITIES);
+      UNSET_FLAG(attr->flag, ATTR_FLAG_BIT (BGP_ATTR_EXT_COMMUNITIES));
       
       if (attr->extra->cluster)
         cluster_unintern (attr->extra->cluster);
-      UNSET_FLAG(attr->flag, BGP_ATTR_CLUSTER_LIST);
+      UNSET_FLAG(attr->flag, ATTR_FLAG_BIT (BGP_ATTR_CLUSTER_LIST));
       
       if (attr->extra->transit)
         transit_unintern (attr->extra->transit);
-- 
1.7.10.4






More information about the Quagga-dev mailing list