Skip to content

Commit

Permalink
ofproto-dpif-xlate: Eliminate duplicate read of xcfgp.
Browse files Browse the repository at this point in the history
This inner 'xcfg' shadowed the outer one and could have read a different
value if 'xcfgp' was changing, so this is possibly a bug fix.

Found by -Wshadow=local in GCC 7.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
  • Loading branch information
blp committed Aug 2, 2017
1 parent f3eb769 commit b24fa3f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion ofproto/ofproto-dpif-xlate.c
Expand Up @@ -6679,7 +6679,6 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout)

/* Set the bridge for post-recirculation processing if needed. */
if (!uuid_equals(&ctx.xbridge->ofproto->uuid, &state->ofproto_uuid)) {
struct xlate_cfg *xcfg = ovsrcu_get(struct xlate_cfg *, &xcfgp);
const struct xbridge *new_bridge
= xbridge_lookup_by_uuid(xcfg, &state->ofproto_uuid);

Expand Down

0 comments on commit b24fa3f

Please sign in to comment.