It's slightly more cognitive load to read an inverse condition and then invert it again to understand the 'else' condition.
Signed-off-by: Joe Stringer <[email protected]> --- ofproto/ofproto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index c6d83d4e6b29..e196597f4013 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -5118,15 +5118,15 @@ ofproto_flow_mod_learn(struct ofproto_flow_mod *ofm, bool keep_ref, rule_criteria_destroy(&criteria); } - if (!limited) { + if (limited) { + ofproto_flow_mod_uninit(ofm); + } else { ofm->version = rule->ofproto->tables_version + 1; error = ofproto_flow_mod_learn_start(ofm); if (!error) { ofproto_flow_mod_learn_finish(ofm, NULL); } - } else { - ofproto_flow_mod_uninit(ofm); } ovs_mutex_unlock(&ofproto_mutex); -- 2.11.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
