mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
lib: Use MAP_FOR_EACH_INDEX to improve readability.
Use MAP_FOR_EACH_INDEX to improve readability when there is no apparent cost for it. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -1283,7 +1283,7 @@ miniflow_and_mask_matches_flow(const struct miniflow *flow,
|
||||
{
|
||||
const uint32_t *flowp = miniflow_get_u32_values(flow);
|
||||
const uint32_t *maskp = miniflow_get_u32_values(&mask->masks);
|
||||
uint32_t idx;
|
||||
int idx;
|
||||
|
||||
MAP_FOR_EACH_INDEX(idx, mask->masks.map) {
|
||||
uint32_t diff = (*flowp++ ^ flow_u32_value(target, idx)) & *maskp++;
|
||||
@@ -1326,7 +1326,7 @@ miniflow_and_mask_matches_flow_wc(const struct miniflow *flow,
|
||||
{
|
||||
const uint32_t *flowp = miniflow_get_u32_values(flow);
|
||||
const uint32_t *maskp = miniflow_get_u32_values(&mask->masks);
|
||||
uint32_t idx;
|
||||
int idx;
|
||||
|
||||
MAP_FOR_EACH_INDEX(idx, mask->masks.map) {
|
||||
uint32_t mask = *maskp++;
|
||||
|
Reference in New Issue
Block a user