ofproto-dpif: Eliminate unneeded call to ofproto_dpif_cast().
authorBen Pfaff <blp@nicira.com>
Wed, 9 Jan 2013 18:31:20 +0000 (10:31 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 9 Jan 2013 22:15:21 +0000 (14:15 -0800)
I noticed this was unneeded while looking over commit 7c33b18807804f
(ofproto-dpif: More efficient implementation of get_odp_port().).

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif.c

index 5b86d46..4d8540e 100644 (file)
@@ -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;