lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190220180117.2ad552d0@shemminger-XPS-13-9360>
Date:   Wed, 20 Feb 2019 18:01:17 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Jiri Pirko <jiri@...nulli.us>
Cc:     netdev@...r.kernel.org, dsahern@...il.com, mlxsw@...lanox.com
Subject: Re: [patch iproute2] devlink: relax dpipe table show dependency on
 resources

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ