From: Stephen Hemminger <stephen@networkplumber.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, dsahern@gmail.com, mlxsw@mellanox.com
Subject: Re: [patch iproute2] devlink: relax dpipe table show dependency on resources
Date: Wed, 20 Feb 2019 18:01:17 -0800 [thread overview]
Message-ID: <20190220180117.2ad552d0@shemminger-XPS-13-9360> (raw)
In-Reply-To: <20190220092109.4496-1-jiri@resnulli.us>
On Wed, 20 Feb 2019 10:21:09 +0100
Jiri Pirko <jiri@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.
next prev parent reply other threads:[~2019-02-21 2:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-20 9:21 [patch iproute2] devlink: relax dpipe table show dependency on resources Jiri Pirko
2019-02-21 2:01 ` Stephen Hemminger [this message]
2019-02-21 7:02 ` Jiri Pirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190220180117.2ad552d0@shemminger-XPS-13-9360 \
--to=stephen@networkplumber.org \
--cc=dsahern@gmail.com \
--cc=jiri@resnulli.us \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox