[ovs-dev] [PATCH 1/2] ofp-parse: Remove unreachable code.

Isaku Yamahata yamahata at valinux.co.jp
Thu Oct 18 18:37:46 UTC 2012


Looks good.
Reviewed-by: Isaku Yamahata <yamahata at valinux.co.jp>

On Thu, Oct 18, 2012 at 11:13:04AM -0700, Ben Pfaff wrote:
> OFPUTIL_OFPAT11_DEC_NW_TTL does not have a name in the table of actions'
> names, so this code in parse_named_action() can never be reached.
> 
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
>  lib/ofp-parse.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c
> index 122f4b3..a9d70de 100644
> --- a/lib/ofp-parse.c
> +++ b/lib/ofp-parse.c
> @@ -439,8 +439,7 @@ parse_named_action(enum ofputil_action_code code, const struct flow *flow,
>          break;
>  
>      case OFPUTIL_OFPAT11_DEC_NW_TTL:
> -        parse_noargs_dec_ttl(ofpacts, code);
> -        break;
> +        NOT_REACHED();
>  
>      case OFPUTIL_OFPAT10_SET_TP_SRC:
>      case OFPUTIL_OFPAT11_SET_TP_SRC:
> -- 
> 1.7.10.4
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
> 

-- 
yamahata



More information about the dev mailing list