Skip to content

Commit

Permalink
Revert "ofctrl: Don't use designated initializers."
Browse files Browse the repository at this point in the history
This reverts commit 0b090f2.  When that
commit was applied, we did not know of a fix for the MSVC bug that it
avoided, but now we know that sufficiently new MSVC 2013 supports this
feature.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
  • Loading branch information
blp committed Jul 14, 2015
1 parent 4819b3a commit af6d538
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions ovn/controller/ofctrl.c
Expand Up @@ -406,12 +406,12 @@ ofctrl_update_flows(void)
if (!d) {
/* Installed flow is no longer desirable. Delete it from the
* switch and from installed_flows. */
struct ofputil_flow_mod fm;
memset(&fm, 0, sizeof fm);
fm.match = i->match;
fm.priority = i->priority;
fm.table_id = i->table_id;
fm.command = OFPFC_DELETE_STRICT;
struct ofputil_flow_mod fm = {
.match = i->match,
.priority = i->priority,
.table_id = i->table_id,
.command = OFPFC_DELETE_STRICT,
};
queue_flow_mod(&fm);
ovn_flow_log(i, "removing");

Expand All @@ -421,14 +421,14 @@ ofctrl_update_flows(void)
if (!ofpacts_equal(i->ofpacts, i->ofpacts_len,
d->ofpacts, d->ofpacts_len)) {
/* Update actions in installed flow. */
struct ofputil_flow_mod fm;
memset(&fm, 0, sizeof fm);
fm.match = i->match;
fm.priority = i->priority;
fm.table_id = i->table_id;
fm.ofpacts = d->ofpacts;
fm.ofpacts_len = d->ofpacts_len;
fm.command = OFPFC_MODIFY_STRICT;
struct ofputil_flow_mod fm = {
.match = i->match,
.priority = i->priority,
.table_id = i->table_id,
.ofpacts = d->ofpacts,
.ofpacts_len = d->ofpacts_len,
.command = OFPFC_MODIFY_STRICT,
};
queue_flow_mod(&fm);
ovn_flow_log(i, "updating");

Expand All @@ -451,14 +451,14 @@ ofctrl_update_flows(void)
struct ovn_flow *d;
HMAP_FOR_EACH_SAFE (d, next, hmap_node, &desired_flows) {
/* Send flow_mod to add flow. */
struct ofputil_flow_mod fm;
memset(&fm, 0, sizeof fm);
fm.match = d->match;
fm.priority = d->priority;
fm.table_id = d->table_id;
fm.ofpacts = d->ofpacts;
fm.ofpacts_len = d->ofpacts_len;
fm.command = OFPFC_ADD;
struct ofputil_flow_mod fm = {
.match = d->match,
.priority = d->priority,
.table_id = d->table_id,
.ofpacts = d->ofpacts,
.ofpacts_len = d->ofpacts_len,
.command = OFPFC_ADD,
};
queue_flow_mod(&fm);
ovn_flow_log(d, "adding");

Expand Down

0 comments on commit af6d538

Please sign in to comment.