[v2,03/16] Staging: speakup: serialio.c: Remove explicit NULL comparison
diff mbox series

Message ID 1441951349-5562-2-git-send-email-shraddha.6596@gmail.com
State New, archived
Headers show
Series
  • [v2,01/16] Staging: speakup: varhandlers.c: Remove explicit NULL comparison
Related show

Commit Message

Shraddha Barke Sept. 11, 2015, 6:02 a.m. UTC
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>
---
Change in v2-
 No change

 drivers/staging/speakup/serialio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

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 */