summaryrefslogtreecommitdiff
path: root/lib/nx-match.c
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@ovn.org>2018-02-27 12:32:29 -0800
committerJustin Pettit <jpettit@ovn.org>2018-02-28 14:53:29 -0800
commit97bf8f478d1956ee28b40a564b35cfb065782e0c (patch)
tree1d1e8f6fc6a1da066f7829a2780b56a5ac15a312 /lib/nx-match.c
parente883448e3f90e75aedf20e969b61334357fcf7b3 (diff)
downloadopenvswitch-97bf8f478d1956ee28b40a564b35cfb065782e0c.tar.gz
Don't shadow iterator values.
Signed-off-by: Justin Pettit <jpettit@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib/nx-match.c')
-rw-r--r--lib/nx-match.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/nx-match.c b/lib/nx-match.c
index 005c4a6ac..a8edb2e9d 100644
--- a/lib/nx-match.c
+++ b/lib/nx-match.c
@@ -1025,7 +1025,6 @@ nx_put_raw(struct ofpbuf *b, enum ofp_version oxm, const struct match *match,
ovs_be16 dl_type = get_dl_type(flow);
ovs_be32 spi_mask;
int match_len;
- int i;
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 40);
@@ -1182,12 +1181,12 @@ nx_put_raw(struct ofpbuf *b, enum ofp_version oxm, const struct match *match,
/* Registers. */
if (oxm < OFP15_VERSION) {
- for (i = 0; i < FLOW_N_REGS; i++) {
+ for (int i = 0; i < FLOW_N_REGS; i++) {
nxm_put_32m(&ctx, MFF_REG0 + i, oxm,
htonl(flow->regs[i]), htonl(match->wc.masks.regs[i]));
}
} else {
- for (i = 0; i < FLOW_N_XREGS; i++) {
+ for (int i = 0; i < FLOW_N_XREGS; i++) {
nxm_put_64m(&ctx, MFF_XREG0 + i, oxm,
htonll(flow_get_xreg(flow, i)),
htonll(flow_get_xreg(&match->wc.masks, i)));