staging: speakup: i18n: Replace 'x!=NULL' with 'x'
authorsayli karnik <karniksayli1995@gmail.com>
Thu, 23 Feb 2017 11:55:08 +0000 (17:25 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:17:02 +0000 (09:17 +0100)
The patch removes the explicit NULL comparison by replacing 'x!=NULL'
with 'x'. This issue was found by checkpatch.pl

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/i18n.c

index 2f9b3df..56ce386 100644 (file)
@@ -407,9 +407,9 @@ static char *next_specifier(char *input)
        int found = 0;
        char *next_percent = input;
 
-       while ((next_percent != NULL) && !found) {
+       while (next_percent && !found) {
                next_percent = strchr(next_percent, '%');
-               if (next_percent != NULL) {
+               if (next_percent) {
                        /* skip over doubled percent signs */
                        while ((next_percent[0] == '%')
                               && (next_percent[1] == '%'))