Skip to contentSkip to conversation

Staging: wlan-ng: Convert explicit comparison to NULL to !x.

PATCH Superseded Sandhya Bankar 1 participant 2 messages Feb 20, 2016 Staging

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Staging: wlan-ng: Convert explicit comparison to NULL to !x.

Convert explicit comparison to NULL to !x.

---
 drivers/staging/wlan-ng/cfg80211.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wlan-ng/cfg80211.c +2 -2
index 8c1e3f0..c59dd33 100644
@@ -303,7 +303,7 @@ static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,
 
 	memset(sinfo, 0, sizeof(*sinfo));
 
-	if ((wlandev == NULL) || (wlandev->msdstate != WLAN_MSD_RUNNING))
+	if (!wlandev || (wlandev->msdstate != WLAN_MSD_RUNNING))
 		return -EOPNOTSUPP;
 
 	/* build request message */
@@ -312,7 +312,7 @@ static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,
 	quality.dbm.status = P80211ENUM_msgitem_status_data_ok;
 
 	/* send message to nsd */
-	if (wlandev->mlmerequest == NULL)
+	if (!wlandev->mlmerequest)
 		return -EOPNOTSUPP;
 
 	result = wlandev->mlmerequest(wlandev, (struct p80211msg *) &quality);
Signature · 1 line
1.8.3.4
#1 lore raw

I already sent v2 without adding any comment below sign-off .. now should i send v3 with mentioning comment?

sorry for all this mistakes.

Thanks

Quoted 37 lines · Sandhya Bankar

Convert explicit comparison to NULL to !x.

---
 drivers/staging/wlan-ng/cfg80211.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wlan-ng/cfg80211.c +1 -1
index 8c1e3f0..c59dd33 100644
@@ -303,7 +303,7 @@ static int prism2_get_station(struct wiphy *wiphy,
 struct net_device *dev,
 
        memset(sinfo, 0, sizeof(*sinfo));
 
-       if ((wlandev == NULL) || (wlandev->msdstate != WLAN_MSD_RUNNING))
+       if (!wlandev || (wlandev->msdstate != WLAN_MSD_RUNNING))
                return -EOPNOTSUPP;
 
        /* build request message */
drivers/staging/wlan-ng/cfg80211.c +1 -1
@@ -312,7 +312,7 @@ static int prism2_get_station(struct wiphy *wiphy,
 struct net_device *dev,
        quality.dbm.status = P80211ENUM_msgitem_status_data_ok;
 
        /* send message to nsd */
-       if (wlandev->mlmerequest == NULL)
+       if (!wlandev->mlmerequest)
                return -EOPNOTSUPP;
 
        result = wlandev->mlmerequest(wlandev, (struct p80211msg *)

&quality);
--
1.8.3.4