From 7f7ae89d2477e14b11c1355668366030fc590c64 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 29 Oct 2010 15:25:55 -0700 Subject: [PATCH] ofproto: Don't bother returning value from facet_make_actions(). None of the remaining callers use the return value. --- ofproto/ofproto.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 0bc31a5f..14570be9 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -180,8 +180,8 @@ static void facet_install(struct ofproto *, struct facet *, bool zero_stats); static void facet_uninstall(struct ofproto *, struct facet *); static void facet_flush_stats(struct ofproto *, struct facet *); -static bool facet_make_actions(struct ofproto *, struct facet *, - const struct ofpbuf *packet); +static void facet_make_actions(struct ofproto *, struct facet *, + const struct ofpbuf *packet); static void facet_update_stats(struct ofproto *, struct facet *, const struct odp_flow_stats *); @@ -2156,9 +2156,8 @@ facet_remove(struct ofproto *ofproto, struct facet *facet) facet_free(facet); } -/* Composes the ODP actions for 'facet' based on its rule's actions. - * Returns true if the actions changed, false otherwise. */ -static bool +/* Composes the ODP actions for 'facet' based on its rule's actions. */ +static void facet_make_actions(struct ofproto *p, struct facet *facet, const struct ofpbuf *packet) { @@ -2171,15 +2170,12 @@ facet_make_actions(struct ofproto *p, struct facet *facet, &facet->nf_flow.output_iface); actions_len = a.n_actions * sizeof *a.actions; - if (facet->n_actions == a.n_actions - && !memcmp(facet->actions, a.actions, actions_len)) { - return false; + if (facet->n_actions != a.n_actions + || memcmp(facet->actions, a.actions, actions_len)) { + free(facet->actions); + facet->n_actions = a.n_actions; + facet->actions = xmemdup(a.actions, actions_len); } - - free(facet->actions); - facet->n_actions = a.n_actions; - facet->actions = xmemdup(a.actions, actions_len); - return true; } static int -- 2.30.2