From: Ben Pfaff Date: Thu, 1 Jan 2009 00:43:28 +0000 (-0800) Subject: vswitchd: Minor code simplification. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d5393af61a18e22a16da9ee083d9bfde454d504;p=openvswitch vswitchd: Minor code simplification. The 'vlan' argument is exactly what we want here. --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 81806d97..cd92ecd1 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1391,8 +1391,7 @@ compose_dsts(const struct bridge *br, const struct flow *flow, uint16_t vlan, while (mirrors) { struct mirror *m = br->mirrors[mirror_mask_ffs(mirrors) - 1]; - if ((!m->n_vlans - || vlan_is_mirrored(m, in_port->vlan ? in_port->vlan : vlan)) + if ((!m->n_vlans || vlan_is_mirrored(m, vlan)) && set_dst(dst, flow, in_port, m->out_port, tags)) { if (m->set_vlan >= 0) { dst->vlan = m->set_vlan;