This stylistic change makes the following patch a bit simpler.
Signed-off-by: Jarno Rajahalme <[email protected]>
---
lib/classifier.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/lib/classifier.c b/lib/classifier.c
index 723749a..d400180 100644
--- a/lib/classifier.c
+++ b/lib/classifier.c
@@ -1998,31 +1998,31 @@ trie_lookup_value(const rcu_trie_ptr *trie, const
ovs_be32 value[],
unsigned int n_bits, unsigned int *checkbits)
{
const struct trie_node *node = ovsrcu_get(struct trie_node *, trie);
- unsigned int ofs = 0, match_len = 0;
+ unsigned int m_bits = 0, match_len = 0;
const struct trie_node *prev = NULL;
- for (; node; prev = node, node = trie_next_node(node, value, ofs)) {
+ for (; node; prev = node, node = trie_next_node(node, value, m_bits)) {
unsigned int eqbits;
/* Check if this edge can be followed. */
- eqbits = prefix_equal_bits(node->prefix, node->n_bits, value, ofs);
- ofs += eqbits;
+ eqbits = prefix_equal_bits(node->prefix, node->n_bits, value, m_bits);
+ m_bits += eqbits;
if (eqbits < node->n_bits) { /* Mismatch, nothing more to be found. */
- /* Bit at offset 'ofs' differed. */
- *checkbits = ofs + 1; /* Includes the first mismatching bit. */
+ /* Bit at offset 'm_bits' differed. */
+ *checkbits = m_bits + 1; /* Includes the first mismatching bit. */
return match_len;
}
/* Full match, check if rules exist at this prefix length. */
if (node->n_rules > 0) {
- match_len = ofs;
+ match_len = m_bits;
}
- if (ofs >= n_bits) {
+ if (m_bits >= n_bits) {
*checkbits = n_bits; /* Full prefix. */
return match_len;
}
}
/* node == NULL. Full match so far, but we came to a dead end.
* need to exclude the other branch if it exists. */
- *checkbits = !prev || trie_is_leaf(prev) ? ofs : ofs + 1;
+ *checkbits = !prev || trie_is_leaf(prev) ? m_bits : m_bits + 1;
return match_len;
}
--
1.7.10.4
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev