Skip to contentSkip to conversation

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

PATCH Superseded Sandhya Bankar 2 participants 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/p80211conv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/p80211conv.c +1 -1
index 1b02cdf..86fd23f 100644
@@ -613,7 +613,7 @@ int p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb)
 	/* Allocate the rxmeta */
 	rxmeta = kzalloc(sizeof(struct p80211_rxmeta), GFP_ATOMIC);
 
-	if (rxmeta == NULL) {
+	if (!rxmeta) {
 		netdev_err(wlandev->netdev,
 			   "%s: Failed to allocate rxmeta.\n", wlandev->name);
 		result = 1;
Signature · 1 line
1.8.3.4
#1 lore raw
Quoted 1 line · Sandhya Bankar

Convert explicit comparison to NULL to !x.

When you send a v2, you need to say what changed in the v2, below the ---

julia

Quoted 29 lines
---
 drivers/staging/wlan-ng/p80211conv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/p80211conv.c +1 -2
index 1b02cdf..86fd23f 100644
@@ -613,7 +613,7 @@ int p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb)
 	/* Allocate the rxmeta */
 	rxmeta = kzalloc(sizeof(struct p80211_rxmeta), GFP_ATOMIC);
 
-	if (rxmeta == NULL) {
+	if (!rxmeta) {
 		netdev_err(wlandev->netdev,
 			   "%s: Failed to allocate rxmeta.\n", wlandev->name);
 		result = 1;
--

1.8.3.4

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160220111903.GA3134%40sandhya.
For more options, visit https://groups.google.com/d/optout.