[ovs-dev] OVN: remove useless ds_clear() on actions ds
diff mbox series

Message ID 9fee0ad1a1302ceb9569b0cdb12cb622c6cda11d.1515173721.git.lorenzo.bianconi@redhat.com
State Accepted
Headers show
Series
  • [ovs-dev] OVN: remove useless ds_clear() on actions ds
Related show

Commit Message

Lorenzo Bianconi Jan. 5, 2018, 5:52 p.m. UTC
Remove ds_clear() on actions dynamic string in build_acls()
since they have just been initialized to DS_EMPTY_INITIALIZER

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
 ovn/northd/ovn-northd.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Ben Pfaff Jan. 8, 2018, 4:41 p.m. UTC | #1
On Fri, Jan 05, 2018 at 06:52:00PM +0100, Lorenzo Bianconi wrote:
> Remove ds_clear() on actions dynamic string in build_acls()
> since they have just been initialized to DS_EMPTY_INITIALIZER
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

Thanks, applied to master.

Patch
diff mbox series

diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index e3ddc1fd9..63ed97efb 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -3272,7 +3272,6 @@  build_acls(struct ovn_datapath *od, struct hmap *lflows)
                               "(!ct.est || (ct.est && ct_label.blocked == 1)) "
                               "&& (%s)",
                               acl->match);
-                ds_clear(&actions);
                 build_acl_log(&actions, acl);
                 ds_put_cstr(&actions, "/* drop */");
                 ovn_lflow_add_with_hint(lflows, od, stage,
@@ -3307,7 +3306,6 @@  build_acls(struct ovn_datapath *od, struct hmap *lflows)
                 /* There are no stateful ACLs in use on this datapath,
                  * so a "drop" ACL is simply the "drop" logical flow action
                  * in all cases. */
-                ds_clear(&actions);
                 build_acl_log(&actions, acl);
                 ds_put_cstr(&actions, "/* drop */");
                 ovn_lflow_add_with_hint(lflows, od, stage,