[ovs-dev] [PATCH 3/3] dpif-netlink-rtnl: Use OVS_NOT_REACHED in verify.

Eric Garver e at erig.me
Mon May 22 17:42:04 UTC 2017


On Fri, May 19, 2017 at 01:27:36PM -0700, Joe Stringer wrote:
> The vport_type_to_kind() call at the top of dpif_netlink_rtnl_verify()
> ensures that these cases can never be hit, so use OVS_NOT_REACHED()
> instead of setting the err to EOPNOTSUPP.
> 
> Signed-off-by: Joe Stringer <joe at ovn.org>
> ---
>  lib/dpif-netlink-rtnl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c
> index 76ab0fe3fdec..c57923756f42 100644
> --- a/lib/dpif-netlink-rtnl.c
> +++ b/lib/dpif-netlink-rtnl.c
> @@ -256,7 +256,7 @@ dpif_netlink_rtnl_verify(const struct netdev_tunnel_config *tnl_cfg,
>      case OVS_VPORT_TYPE_UNSPEC:
>      case __OVS_VPORT_TYPE_MAX:
>      default:
> -        err = EOPNOTSUPP;
> +        OVS_NOT_REACHED();
>      }
>  
>      ofpbuf_delete(reply);
> -- 
> 2.11.1
> 

Acked-by: Eric Garver <e at erig.me>

Thanks for the clean ups, Joe.
Eric.


More information about the dev mailing list