[PATCH] staging: dgnc: Remove explicit NULL comparison
Muhammad Falak R Wani
falakreyaz at gmail.com
Mon Oct 19 17:44:35 UTC 2015
Rewrite explicit NULL comparison in its simpler form.
<smpl>
@NULL_REPLACE@
expression e;
@@
-e == NULL
+ !e
</smpl>
Signed-off-by: Muhammad Falak R Wani <falakreyaz at gmail.com>
---
drivers/staging/dgnc/dgnc_tty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index ce4187f..973263e 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -1521,7 +1521,7 @@ static int dgnc_tty_chars_in_buffer(struct tty_struct *tty)
uint chars = 0;
unsigned long flags;
- if (tty == NULL)
+ if (!tty)
return 0;
un = tty->driver_data;
--
1.9.1
More information about the devel
mailing list