On Wed, 20 Feb 2019 10:21:09 +0100
Jiri Pirko <j...@resnulli.us> wrote:

> -     resource_valid = !!nla_table[DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID];
> +     resource_valid = !!nla_table[DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID] &&
> +                      ctx->resources;

When you add a logical AND operator the !! is no longer needed. The !! 
convention
is used to turn a value of not zero (ie not NULL) into a boolean. When you add 
the
additional operator the result is already boolean.

Reply via email to