staging: rtl8723bs: core: Change NULL comparisons to Boolean negation
authorNishka Dasgupta <nishka.dasgupta@yahoo.com>
Thu, 21 Mar 2019 20:13:54 +0000 (01:43 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Mar 2019 14:16:29 +0000 (15:16 +0100)
Change NULL comparisons to Boolean negations. Issue found with
Coccinelle using matchnull.cocci.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c

index b2813eb3d9d2be0a1579470b3d27be663dbc54d6..c2884c35c4601de20eec7fe604c5a679a281b56a 100644 (file)
@@ -3512,7 +3512,7 @@ int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int pow
 
 
        /* da == NULL, assum it's null data for sta to ap*/
-       if (da == NULL)
+       if (!da)
                da = get_my_bssid(&(pmlmeinfo->network));
 
        psta = rtw_get_stainfo(&padapter->stapriv, da);
@@ -3578,7 +3578,7 @@ s32 issue_nulldata_in_interrupt(struct adapter *padapter, u8 *da)
        pmlmeinfo = &pmlmeext->mlmext_info;
 
        /* da == NULL, assum it's null data for sta to ap*/
-       if (da == NULL)
+       if (!da)
                da = get_my_bssid(&(pmlmeinfo->network));
 
        ret = _issue_nulldata(padapter, da, 0, false);
@@ -3675,7 +3675,7 @@ int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int
        struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
 
        /* da == NULL, assum it's null data for sta to ap*/
-       if (da == NULL)
+       if (!da)
                da = get_my_bssid(&(pmlmeinfo->network));
 
        do {