diff mbox

[ovs-dev] bond: don't re-zero recirc_id when creating bond

Message ID 1457417303-14778-1-git-send-email-simon.horman@netronome.com
State Accepted
Headers show

Commit Message

Simon Horman March 8, 2016, 6:08 a.m. UTC
The bond structure is already zeroed as it is allocated
using xzalloc so there is no need to re-zero the recirc_id field.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
---
Found by inspection.
---
 ofproto/bond.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Ben Pfaff March 22, 2016, 5:48 p.m. UTC | #1
On Tue, Mar 08, 2016 at 03:08:23PM +0900, Simon Horman wrote:
> The bond structure is already zeroed as it is allocated
> using xzalloc so there is no need to re-zero the recirc_id field.
> 
> Signed-off-by: Simon Horman <simon.horman@netronome.com>
> ---
> Found by inspection.

Acked-by: Ben Pfaff <blp@ovn.org>
Simon Horman March 23, 2016, 1:27 a.m. UTC | #2
On Tue, Mar 22, 2016 at 10:48:29AM -0700, Ben Pfaff wrote:
> On Tue, Mar 08, 2016 at 03:08:23PM +0900, Simon Horman wrote:
> > The bond structure is already zeroed as it is allocated
> > using xzalloc so there is no need to re-zero the recirc_id field.
> > 
> > Signed-off-by: Simon Horman <simon.horman@netronome.com>
> > ---
> > Found by inspection.
> 
> Acked-by: Ben Pfaff <blp@ovn.org>

Thanks, I have pushed this to master.
diff mbox

Patch

diff --git a/ofproto/bond.c b/ofproto/bond.c
index c2749e52db94..a3d0c2d6faff 100644
--- a/ofproto/bond.c
+++ b/ofproto/bond.c
@@ -237,8 +237,6 @@  bond_create(const struct bond_settings *s, struct ofproto_dpif *ofproto)
     list_init(&bond->enabled_slaves);
     ovs_mutex_init(&bond->mutex);
     ovs_refcount_init(&bond->ref_cnt);
-
-    bond->recirc_id = 0;
     hmap_init(&bond->pr_rule_ops);
 
     bond_reconfigure(bond, s);