All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: speakup: i18n: Use x instead of x != NULL.
@ 2016-09-14  9:29 Sandhya Bankar
  2016-09-14  9:33 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Sandhya Bankar @ 2016-09-14  9:29 UTC (permalink / raw)
  To: outreachy-kernel

Use x instead of x != NULL.
The patch removes the explicit NULL comparisons.This patch is detected by checkpatch.pl.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
 drivers/staging/speakup/i18n.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c
index 8960079..41b56d6 100644
--- a/drivers/staging/speakup/i18n.c
+++ b/drivers/staging/speakup/i18n.c
@@ -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] == '%'))
-- 
1.8.2.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-14  9:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-14  9:29 [PATCH] Staging: speakup: i18n: Use x instead of x != NULL Sandhya Bankar
2016-09-14  9:33 ` [Outreachy kernel] " Julia Lawall
2016-09-14  9:38   ` Vaishali Thakkar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.