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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH6sp9PvyPCbxdCVt5-grfXA+Vk=vwhDpKDU1j3kzUNumZrLAw@mail.gmail.com>
Date:	Tue, 23 Jun 2015 14:56:38 +0200
From:	Frans Klaver <fransklaver@...il.com>
To:	Luis de Bethencourt <luis@...ethencourt.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Antoine Schweitzer-Chaput <antoine@...weitzer-chaput.fr>,
	Cristina Opriceana <cristina.opriceana@...il.com>,
	Aya Mahfouz <mahfouz.saif.elyazal@...il.com>,
	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
	Koray Gulcu <koray.gulcu@....edu.tr>,
	Greg Donald <gdonald@...il.com>,
	Lorenzo Stoakes <lstoakes@...il.com>,
	Ebru Akagunduz <ebru.akagunduz@...il.com>,
	Karthik Nayak <karthik.188@...il.com>,
	devel@...verdev.osuosl.org
Subject: Re: [PATCH] staging: rtl8192u: bool tests don't need comparisons

On Tue, Jun 23, 2015 at 2:52 PM, Luis de Bethencourt
<luis@...ethencourt.com> wrote:
> Remove explicit true/false comparations to bool variables.
>
> Signed-off-by: Luis de Bethencourt <luis@...ethencourt.com>
> ---
>  drivers/staging/rtl8192u/r8192U_core.c |  7 ++++---
>  drivers/staging/rtl8192u/r8192U_dm.c   | 21 +++++++++++----------
>  2 files changed, 15 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index a4795af..c53d670 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -2047,7 +2047,7 @@ static bool GetHalfNmodeSupportByAPs819xUsb(struct net_device *dev)
>         struct r8192_priv *priv = ieee80211_priv(dev);
>         struct ieee80211_device *ieee = priv->ieee80211;
>
> -       if (ieee->bHalfWirelessN24GMode == true)
> +       if (ieee->bHalfWirelessN24GMode)
>                 Reval = true;
>         else
>                 Reval =  false;

With this one I'd go as far as saying that

Reval = ieee->bHalfWirelessN24GMode;

Frans
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ