I came close to add a "continue;" inside the main "while" loop in
compose_mirror_dsts(), which would have turned it into an infinite loop.
This commit changes it to a "for" loop that is harder to screw up.
}
flow_vid = vlan_tci_to_vid(ctx->flow.vlan_tci);
- while (mirrors) {
+ for (; mirrors; mirrors &= mirrors - 1) {
struct ofmirror *m = ofproto->mirrors[mirror_mask_ffs(mirrors) - 1];
if (vlan_is_mirrored(m, vlan)) {
struct dst dst;
}
}
}
- mirrors &= mirrors - 1;
}
}