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

Frans Klaver fransklaver at gmail.com
Tue Jun 23 12:56:38 UTC 2015


On Tue, Jun 23, 2015 at 2:52 PM, Luis de Bethencourt
<luis at debethencourt.com> wrote:
> Remove explicit true/false comparations to bool variables.
>
> Signed-off-by: Luis de Bethencourt <luis at debethencourt.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


More information about the devel mailing list