Staging: speakup: i18n: Use x instead of x != NULL.
PATCH 1/1 Staging: speakup: i18n: Use x instead of x != NULL.
Use x instead of x != NULL.
The patch removes the explicit NULL comparisons.This patch is detected by checkpatch.pl.
--- drivers/staging/speakup/i18n.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/speakup/i18n.c +2 -2
@@ -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
1.8.2.3
Quoted 2 lines · Sandhya Bankar
Use x instead of x != NULL.
The patch removes the explicit NULL comparisons.This patch is detected by checkpatch.pl.
Please always put at least one space after the end of a sentence, if i is followed by another one.
Quoted 11 lines
Signed-off-by Sandhya Bankar <[email protected]>--- drivers/staging/speakup/i18n.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/speakup/i18n.c +0
-0
drivers/staging/speakup/i18n.c static char *next_specifier(char *input) · line 410
Quoted 5 lines
drivers/staging/speakup/i18n.c +1
-1@@ -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) {
You could really drop the parentheses at the same time. They were not necessary before, but they are even less necessary when only a single variable is involved.
julia
Quoted 16 lines
drivers/staging/speakup/i18n.c +1
-2next_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
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160914092903.GA2663%40sandhya.
For more options, visit https://groups.google.com/d/optout.
Quoted 4 lines · Julia Lawall
Quoted 2 lines · Sandhya Bankar
Use x instead of x != NULL.
The patch removes the explicit NULL comparisons.This patch is detected by checkpatch.pl.
Again line with more than 80 characters. Also, this should come as v2. Changes should be written under ---. Please look at other patches and tutorial about sending
revised patches.
Quoted 42 lines
Please always put at least one space after the end of a sentence, if i is followed by another one.
Quoted 11 lines
Signed-off-by Sandhya Bankar <[email protected]>--- drivers/staging/speakup/i18n.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/speakup/i18n.c +0
-0drivers/staging/speakup/i18n.c static char *next_specifier(char *input) · line 410
Quoted 5 lines
drivers/staging/speakup/i18n.c +1
-1@@ -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) {You could really drop the parentheses at the same time. They were not necessary before, but they are even less necessary when only a single variable is involved.
julia
Quoted 16 lines
drivers/staging/speakup/i18n.c +1
-2next_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
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160914092903.GA2663%40sandhya.
For more options, visit https://groups.google.com/d/optout.
Signature · 2 lines
Vaishali http://vaishalithakkar.in/