From: Ben Pfaff Date: Wed, 9 Jan 2013 18:31:20 +0000 (-0800) Subject: ofproto-dpif: Eliminate unneeded call to ofproto_dpif_cast(). X-Git-Tag: sliver-openvswitch-1.9.90-3~10^2~24 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=6472ba1117d19919c9cd1726e4f8cef0669059d6;p=sliver-openvswitch.git ofproto-dpif: Eliminate unneeded call to ofproto_dpif_cast(). I noticed this was unneeded while looking over commit 7c33b18807804f (ofproto-dpif: More efficient implementation of get_odp_port().). Signed-off-by: Ben Pfaff --- diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 5b86d463e..4d8540ecf 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -7889,7 +7889,7 @@ odp_port_to_ofp_port(const struct ofproto_dpif *ofproto, uint32_t odp_port) struct ofport_dpif *port; port = odp_port_to_ofport(ofproto->backer, odp_port); - if (port && ofproto == ofproto_dpif_cast(port->up.ofproto)) { + if (port && &ofproto->up == port->up.ofproto) { return port->up.ofp_port; } else { return OFPP_NONE;