[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190221070256.GB2312@nanopsycho>
Date: Thu, 21 Feb 2019 08:02:56 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org, dsahern@...il.com, mlxsw@...lanox.com
Subject: Re: [patch iproute2] devlink: relax dpipe table show dependency on
resources
Thu, Feb 21, 2019 at 03:01:17AM CET, stephen@...workplumber.org wrote:
>On Wed, 20 Feb 2019 10:21:09 +0100
>Jiri Pirko <jiri@...nulli.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.
Okay. Will send v2.
Powered by blists - more mailing lists