[ovs-dev] [PATCH] ofproto-dpif: Eliminate unneeded call to ofproto_dpif_cast().

Jarno Rajahalme jarno.rajahalme at nsn.com
Wed Jan 9 21:56:32 UTC 2013


Looks the same as the other, which is good :-)

 Jarno

On Jan 9, 2013, at 20:31 , ext Ben Pfaff wrote:

> 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 at nicira.com>
> ---
> ofproto/ofproto-dpif.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> index 5b86d46..4d8540e 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;
> -- 
> 1.7.2.5
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev




More information about the dev mailing list