Re: [PATCH] staging: rtl8192u: bool tests don't need comparisons

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 23, 2015 at 2:52 PM, Luis de Bethencourt
<luis@xxxxxxxxxxxxxxxxx> wrote:
> Remove explicit true/false comparations to bool variables.
>
> Signed-off-by: Luis de Bethencourt <luis@xxxxxxxxxxxxxxxxx>
> ---
>  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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux