staging: speakup: (coding style) Rewrite comparisons to NULL
authorChristian Colic <colic.christian@gmail.com>
Thu, 19 Nov 2015 16:18:43 +0000 (17:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jan 2016 06:40:31 +0000 (22:40 -0800)
Rewrite comparisons to NULL so they dont show any checkpatch errors anymore.
"vc_cons[i].d != NULL" => "vc_cons[i].d"

Signed-off-by: Christian Colic <colic.christian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/buffers.c

index 8565c2343968a80695887ed798ce3a4a52a5df44..723d5df44221628903c57b5325a4a32dc1c8cac9 100644 (file)
@@ -27,7 +27,7 @@ void speakup_start_ttys(void)
        for (i = 0; i < MAX_NR_CONSOLES; i++) {
                if (speakup_console[i] && speakup_console[i]->tty_stopped)
                        continue;
-               if ((vc_cons[i].d != NULL) && (vc_cons[i].d->port.tty != NULL))
+               if ((vc_cons[i].d) && (vc_cons[i].d->port.tty))
                        start_tty(vc_cons[i].d->port.tty);
        }
 }
@@ -38,7 +38,7 @@ static void speakup_stop_ttys(void)
        int i;
 
        for (i = 0; i < MAX_NR_CONSOLES; i++)
-               if ((vc_cons[i].d != NULL) && (vc_cons[i].d->port.tty != NULL))
+               if ((vc_cons[i].d && (vc_cons[i].d->port.tty)))
                        stop_tty(vc_cons[i].d->port.tty);
 }