Skip to contentSkip to conversation

staging: speakup: i18n: Replace 'x!=NULL' with 'x'

PATCH New sayli karnik 1 participant 1 message Feb 23, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: speakup: i18n: Replace 'x!=NULL' with 'x'

The patch removes the explicit NULL comparison by replacing 'x!=NULL' with 'x'. This issue was found by checkpatch.pl

---
 drivers/staging/speakup/i18n.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/speakup/i18n.c +2 -2
index 2f9b3df..b8f5bed 100644
@@ -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] == '%'))
Signature · 1 line
2.7.4