Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1250965 > unrolled thread
| Started by | Muhammad Falak R Wani <falakreyaz@gmail.com> |
|---|---|
| First post | 2015-10-19 19:50 +0200 |
| Last post | 2015-10-25 09:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] staging: dgnc: Remove explicit NULL comparison Muhammad Falak R Wani <falakreyaz@gmail.com> - 2015-10-19 19:50 +0200
Re: [PATCH] staging: dgnc: Remove explicit NULL comparison Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-25 09:40 +0100
| From | Muhammad Falak R Wani <falakreyaz@gmail.com> |
|---|---|
| Date | 2015-10-19 19:50 +0200 |
| Subject | [PATCH] staging: dgnc: Remove explicit NULL comparison |
| Message-ID | <qlmJk-35z-25@gated-at.bofh.it> |
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@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 -- 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/
[toc] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2015-10-25 09:40 +0100 |
| Message-ID | <qnp0m-8fj-23@gated-at.bofh.it> |
| In reply to | #1250965 |
On Mon, Oct 19, 2015 at 11:14:35PM +0530, Muhammad Falak R Wani wrote: > 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@gmail.com> > --- > drivers/staging/dgnc/dgnc_tty.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Someone else already did this before you :( -- 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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web