Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Quagga: Dev

[PATCH] bgpd: fix compiler warnings in bgp_mpath.c

 

 

Quagga dev RSS feed   Index | Next | Previous | View Threaded


jorge at dti2

Apr 20, 2012, 5:05 AM

Post #1 of 3 (177 views)
Permalink
[PATCH] bgpd: fix compiler warnings in bgp_mpath.c

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

- bgp_attr_unintern() and ecommunity_free() changed a while ago to accept
a pointer to struct pointer.

Signed-off-by: Jorge Boncompte [DTI2] <jorge [at] dti2>
---
bgpd/bgp_mpath.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c
index d07830d..aa657d8 100644
--- a/bgpd/bgp_mpath.c
+++ b/bgpd/bgp_mpath.c
@@ -230,7 +230,7 @@ bgp_info_mpath_free (struct bgp_info_mpath **mpath)
if (mpath && *mpath)
{
if ((*mpath)->mp_attr)
- bgp_attr_unintern ((*mpath)->mp_attr);
+ bgp_attr_unintern (&(*mpath)->mp_attr);
XFREE (MTYPE_BGP_MPATH_INFO, *mpath);
*mpath = NULL;
}
@@ -605,7 +605,7 @@ bgp_info_mpath_aggregate_update (struct bgp_info *new_best,
if (old_best && (old_best != new_best) &&
(old_attr = bgp_info_mpath_attr (old_best)))
{
- bgp_attr_unintern (old_attr);
+ bgp_attr_unintern (&old_attr);
bgp_info_mpath_attr_set (old_best, NULL);
}

@@ -616,7 +616,7 @@ bgp_info_mpath_aggregate_update (struct bgp_info *new_best,
{
if ((new_attr = bgp_info_mpath_attr (new_best)))
{
- bgp_attr_unintern (new_attr);
+ bgp_attr_unintern (&new_attr);
bgp_info_mpath_attr_set (new_best, NULL);
SET_FLAG (new_best->flags, BGP_INFO_ATTR_CHANGED);
}
@@ -692,7 +692,7 @@ bgp_info_mpath_aggregate_update (struct bgp_info *new_best,
{
ecommerge = ecommunity_merge (ecomm, ae->ecommunity);
ecomm = ecommunity_uniq_sort (ecommerge);
- ecommunity_free (ecommerge);
+ ecommunity_free (&ecommerge);
}
else
ecomm = ecommunity_dup (ae->ecommunity);
@@ -728,10 +728,10 @@ bgp_info_mpath_aggregate_update (struct bgp_info *new_best,
if (new_attr != bgp_info_mpath_attr (new_best))
{
if ((old_attr = bgp_info_mpath_attr (new_best)))
- bgp_attr_unintern (old_attr);
+ bgp_attr_unintern (&old_attr);
bgp_info_mpath_attr_set (new_best, new_attr);
SET_FLAG (new_best->flags, BGP_INFO_ATTR_CHANGED);
}
else
- bgp_attr_unintern (new_attr);
+ bgp_attr_unintern (&new_attr);
}
--
1.7.8.3


_______________________________________________
Quagga-dev mailing list
Quagga-dev [at] lists
http://lists.quagga.net/mailman/listinfo/quagga-dev


equinox at diac24

Apr 28, 2012, 5:28 PM

Post #2 of 3 (149 views)
Permalink
Re: [PATCH] bgpd: fix compiler warnings in bgp_mpath.c [In reply to]

On Fri, Apr 20, 2012 at 02:05:15PM +0200, Jorge Boncompte [DTI2] wrote:
> - bgp_attr_unintern() and ecommunity_free() changed a while ago to accept
> a pointer to struct pointer.

> - bgp_attr_unintern ((*mpath)->mp_attr);
> + bgp_attr_unintern (&(*mpath)->mp_attr);

Blergh, missed this and fixed it independently. "fix compiler warning"
as Subject sounded like it was only prettying up things ;)

-David
Attachments: signature.asc (0.22 KB)


jorge at dti2

Apr 30, 2012, 1:57 AM

Post #3 of 3 (149 views)
Permalink
Re: [PATCH] bgpd: fix compiler warnings in bgp_mpath.c [In reply to]

El 29/04/2012 2:28, David Lamparter escribió:
> On Fri, Apr 20, 2012 at 02:05:15PM +0200, Jorge Boncompte [DTI2] wrote:
>> - bgp_attr_unintern() and ecommunity_free() changed a while ago to accept
>> a pointer to struct pointer.
>
>> - bgp_attr_unintern ((*mpath)->mp_attr);
>> + bgp_attr_unintern (&(*mpath)->mp_attr);
>
> Blergh, missed this and fixed it independently. "fix compiler warning"
> as Subject sounded like it was only prettying up things ;)

No problem. I just noticed it after rebasing my tree on top of master. I didn't
find that it crashed the daemon until I setup a multipath test scenario... and
the patch was already sent. :)

_______________________________________________
Quagga-dev mailing list
Quagga-dev [at] lists
http://lists.quagga.net/mailman/listinfo/quagga-dev

Quagga dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.