From: Shraddha Barke <shraddha.6596@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>,
Julia Lawall <Julia.Lawall@lip6.fr>
Cc: linux-kernel@vger.kernel.org, Shraddha Barke <shraddha.6596@gmail.com>
Subject: [PATCH 15/16] Staging: rtl8188eu: os_dep: mlme_linux.c: Remove explicit NULL comparison
Date: Fri, 11 Sep 2015 07:38:01 +0530 [thread overview]
Message-ID: <1441937282-2621-7-git-send-email-shraddha.6596@gmail.com> (raw)
In-Reply-To: <1441937282-2621-1-git-send-email-shraddha.6596@gmail.com>
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>
---
drivers/staging/rtl8188eu/os_dep/mlme_linux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8188eu/os_dep/mlme_linux.c b/drivers/staging/rtl8188eu/os_dep/mlme_linux.c
index 218adaa..eb8ecb7 100644
--- a/drivers/staging/rtl8188eu/os_dep/mlme_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/mlme_linux.c
@@ -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)
--
2.1.4
next prev parent reply other threads:[~2015-09-11 2:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 2:07 [PATCH 05/16] Staging: rtl8188eu: core: Remove explicit NULL comparison Shraddha Barke
2015-09-11 2:07 ` [PATCH 06/16] Staging: rtl8188eu: " Shraddha Barke
2015-09-11 2:07 ` [PATCH 11/16] Staging: rtl8188eu: hal: " Shraddha Barke
2015-09-11 2:07 ` [PATCH 12/16] Staging: rtl8188eu: hal: Hal8188ERateAdaptive.c: " Shraddha Barke
2015-09-11 2:07 ` [PATCH 13/16] Staging: rtl8188eu: hal: rtl8188eu_xmit.c: " Shraddha Barke
2015-09-11 2:08 ` [PATCH 14/16] Staging: rtl8188eu: os_dep: recv_linux.c: " Shraddha Barke
2015-09-11 2:08 ` Shraddha Barke [this message]
2015-09-11 2:08 ` [PATCH 16/16] Staging: rtl8188eu: os_dep: osdep_service.c: " Shraddha Barke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441937282-2621-7-git-send-email-shraddha.6596@gmail.com \
--to=shraddha.6596@gmail.com \
--cc=Julia.Lawall@lip6.fr \
--cc=andrzejtp2010@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudipm.mukherjee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).