]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Staging: rtl8188eu: os_dep: mlme_linux.c: Remove explicit NULL comparison
authorShraddha Barke <shraddha.6596@gmail.com>
Fri, 11 Sep 2015 05:10:58 +0000 (10:40 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:25:02 +0000 (18:25 -0700)
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/os_dep/mlme_linux.c

index 218adaa574b58f2f2b8101bb7728f3d34af19d4b..eb8ecb7fbd16fc1a251f3adbeaaa495a89cd4b74 100644 (file)
@@ -152,7 +152,7 @@ void rtw_indicate_sta_assoc_event(struct adapter *padapter, struct sta_info *pst
        union iwreq_data wrqu;
        struct sta_priv *pstapriv = &padapter->stapriv;
 
-       if (psta == NULL)
+       if (!psta)
                return;
 
        if (psta->aid > NUM_STA)
@@ -176,7 +176,7 @@ void rtw_indicate_sta_disassoc_event(struct adapter *padapter, struct sta_info *
        union iwreq_data wrqu;
        struct sta_priv *pstapriv = &padapter->stapriv;
 
-       if (psta == NULL)
+       if (!psta)
                return;
 
        if (psta->aid > NUM_STA)