All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alison Schofield <amsfield22@gmail.com>
To: outreachy-kernel@googlegroups.com
Subject: [PATCH v2] staging: r8723au: replace NULL and zero comparison tests with ! operator
Date: Fri, 16 Oct 2015 11:46:29 -0700	[thread overview]
Message-ID: <1445021189-17800-1-git-send-email-amsfield22@gmail.com> (raw)
In-Reply-To: <20151016162645.GA17124@Ubuntu-D830>

Replace explicit NULL comparison and zero comparison test with ! operator
to simplify code.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
---

Change in v2: commit & description message update to include zero case.

 drivers/staging/rtl8723au/core/rtw_ap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c
index 65b209a..59bb3da 100644
--- a/drivers/staging/rtl8723au/core/rtw_ap.c
+++ b/drivers/staging/rtl8723au/core/rtw_ap.c
@@ -919,8 +919,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
 			break;
 		}
 
-		if ((p == NULL) || (ie_len == 0))
-				break;
+		if (!p || !ie_len)
+			break;
 	}
 
 	/* wmm */
-- 
2.1.4



      parent reply	other threads:[~2015-10-16 18:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16 16:26 [PATCH] staging: r8723au: replace explicit NULL comparisons with ! Alison Schofield
2015-10-16 16:34 ` [Outreachy kernel] " Julia Lawall
2015-10-16 18:46 ` Alison Schofield [this message]

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=1445021189-17800-1-git-send-email-amsfield22@gmail.com \
    --to=amsfield22@gmail.com \
    --cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.