[ovs-dev] [PATCH] dpif-netdev: Fix integer handling issue.

Gregory Rose gvrose8192 at gmail.com
Wed Mar 18 14:45:58 UTC 2020


On 3/17/2020 4:31 PM, William Tu wrote:
> Coverity CID 279497 reports "Operands don't affect result".
> Because flow->ct_state is uint8_t and DP_NETDEV_CS_UNSUPPORTED_MASK
> is '0xffffff00'. So remove the statement.
>
> Cc: Usman Ansari <uansari at vmware.com>
> Signed-off-by: William Tu <u9012063 at gmail.com>
> ---
>   lib/dpif-netdev.c | 4 ----
>   1 file changed, 4 deletions(-)
>
> diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
> index a798db45d9cb..0e2678d002d5 100644
> --- a/lib/dpif-netdev.c
> +++ b/lib/dpif-netdev.c
> @@ -3224,10 +3224,6 @@ dpif_netdev_flow_from_nlattrs(const struct nlattr *key, uint32_t key_len,
>           return EINVAL;
>       }
>   
> -    if (flow->ct_state & DP_NETDEV_CS_UNSUPPORTED_MASK) {
> -        return EINVAL;
> -    }
> -
>       return 0;
>   }
>   

Reviewed-by: Greg Rose <gvrose8192 at gmail.com>


More information about the dev mailing list