diff options
author | Jorge Boncompte [DTI2] <jorge@dti2.net> | 2012-05-07 16:52:57 +0000 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2012-05-22 20:25:49 +0200 |
commit | e16a413313cf985ae2b8d2f1a9e8fd0ab6f5b9fc (patch) | |
tree | e6810289e60312da431a8f992903275d952d0e6b /bgpd/bgp_route.c | |
parent | 8ff56318a8bd188cfcc1cdab689c46c326b50d38 (diff) |
bgpd: remove some useless initializations
* bgp_attr.c: (bgp_attr_default_intern) bgp_attr_default_set() already
initializes the memory. Fixes a struct attr_extra leak.
* bgp_route.c: Remove useless on stack struct initializations.
Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r-- | bgpd/bgp_route.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index cb15c152..68eae6a0 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -2465,7 +2465,7 @@ void bgp_default_originate (struct peer *peer, afi_t afi, safi_t safi, int withdraw) { struct bgp *bgp; - struct attr attr = { 0 }; + struct attr attr; struct aspath *aspath = { 0 }; struct prefix p; struct bgp_info binfo; @@ -3270,8 +3270,8 @@ bgp_static_update_rsclient (struct peer *rsclient, struct prefix *p, struct bgp_info *new; struct bgp_info info; struct attr *attr_new; - struct attr attr = {0 }; - struct attr new_attr = { .extra = 0 }; + struct attr attr; + struct attr new_attr = { 0 }; struct bgp *bgp; int ret; char buf[SU_ADDRSTRLEN]; @@ -3423,7 +3423,7 @@ bgp_static_update_main (struct bgp *bgp, struct prefix *p, struct bgp_info *ri; struct bgp_info *new; struct bgp_info info; - struct attr attr = { 0 }; + struct attr attr; struct attr *attr_new; int ret; @@ -5352,7 +5352,7 @@ bgp_redistribute_add (struct prefix *p, const struct in_addr *nexthop, struct bgp_info *bi; struct bgp_info info; struct bgp_node *bn; - struct attr attr = { 0 }; + struct attr attr; struct attr attr_new = { 0 }; struct attr *new_attr; afi_t afi; |