Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1222476

[PATCH 03/16] Staging: speakup: serialio.c: Remove explicit NULL comparison

From Shraddha Barke <shraddha.6596@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 03/16] Staging: speakup: serialio.c: Remove explicit NULL comparison
Date 2015-09-11 04:00 +0200
Message-ID <q7lN8-3yj-15@gated-at.bofh.it> (permalink)
References <q7lN8-3yj-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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/speakup/serialio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c
index 66ac999..3b5835b 100644
--- a/drivers/staging/speakup/serialio.c
+++ b/drivers/staging/speakup/serialio.c
@@ -101,7 +101,7 @@ static void start_serial_interrupt(int irq)
 {
 	int rv;
 
-	if (synth->read_buff_add == NULL)
+	if (!synth->read_buff_add)
 		return;
 
 	rv = request_irq(irq, synth_readbuf_handler, IRQF_SHARED,
@@ -127,7 +127,7 @@ void spk_stop_serial_interrupt(void)
 	if (speakup_info.port_tts == 0)
 		return;
 
-	if (synth->read_buff_add == NULL)
+	if (!synth->read_buff_add)
 		return;
 
 	/* Turn off interrupts */
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH 01/16] Staging: speakup: varhandlers.c: Remove explicit NULL comparison Shraddha Barke <shraddha.6596@gmail.com> - 2015-09-11 04:00 +0200
  [PATCH 04/16] Staging: speakup: kobjects.c: Remove explicit NULL comparison Shraddha Barke <shraddha.6596@gmail.com> - 2015-09-11 04:00 +0200
  [PATCH 03/16] Staging: speakup: serialio.c: Remove explicit NULL comparison Shraddha Barke <shraddha.6596@gmail.com> - 2015-09-11 04:00 +0200

csiph-web