diff options
author | Shu Shen <shu.shen@gmail.com> | 2017-01-26 15:56:17 -0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-01-31 10:22:27 -0800 |
commit | 4d7729b1ad4620dab38f0075c34ade4cbe1788f2 (patch) | |
tree | bf3b987f3380681a3e18404dc6e220890c7e0f3d | |
parent | 955b53356776687b0043094eddd9836818dcedcf (diff) | |
download | openvswitch-4d7729b1ad4620dab38f0075c34ade4cbe1788f2.tar.gz |
lacp: fix build failure with inline declaration
Previous commit 336a5584 has a variable declared inline, while
-Wdeclaration-after-statement flag is enabled on this branch. This
causes build failure:
lib/lacp.c:620:9: error: mixing declarations and code
The declaration of the variable "enable" has been moved in this change
to comply with the expected behavior.
Signed-off-by: Shu Shen <shu.shen@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
-rw-r--r-- | lib/lacp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/lacp.c b/lib/lacp.c index d006d7b56..e37177813 100644 --- a/lib/lacp.c +++ b/lib/lacp.c @@ -597,6 +597,7 @@ lacp_update_attached(struct lacp *lacp) OVS_REQUIRES(mutex) lead_enable = false; HMAP_FOR_EACH (slave, node, &lacp->slaves) { struct lacp_info pri; + bool enable; slave->attached = false; @@ -617,7 +618,7 @@ lacp_update_attached(struct lacp *lacp) OVS_REQUIRES(mutex) slave->attached = true; slave_get_priority(slave, &pri); - bool enable = slave_may_enable__(slave); + enable = slave_may_enable__(slave); if (!lead || enable > lead_enable |