Skip to contentSkip to conversation

staging: speakup: Compress two lines into one line

PATCH In review Payal Kshirsagar 2 participants 3 messages Mar 30, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: speakup: Compress two lines into one line

Challenge suggested by coccinelle.
Return value directly without saving it in a variable.

---
 drivers/staging/speakup/i18n.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/speakup/i18n.c +1 -2
index ee240d3..a748eb8 100644
@@ -470,8 +470,7 @@ static char *find_specifier_end(char *input)
 	input++;		/* Advance over %. */
 	input = skip_flags(input);
 	input = skip_width(input);
-	input = skip_conversion(input);
-	return input;
+	return skip_conversion(input);
 }
 
 /*
Signature · 1 line
2.7.4
#1 lore raw
Quoted 13 lines · Payal Kshirsagar

Challenge suggested by coccinelle.
Return value directly without saving it in a variable.

---
 drivers/staging/speakup/i18n.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/speakup/i18n.c +0 -0
index ee240d3..a748eb8 100644

drivers/staging/speakup/i18n.c static char *find_specifier_end(char *input) · line 473

Quoted 6 lines
drivers/staging/speakup/i18n.c +1 -2
@@ -470,8 +470,7 @@ static char *find_specifier_end(char *input)
 	input++;		/* Advance over %. */
 	input = skip_flags(input);
 	input = skip_width(input);
-	input = skip_conversion(input);
-	return input;
+	return skip_conversion(input);

Many people have proposed this already and the maintainer prefers that the code is left as it is, with input = over and over, for uniformity.

julia

Quoted 13 lines
drivers/staging/speakup/i18n.c +0 -1
 }
 
 /*
--

2.7.4

--
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/1553923565-12066-1-git-send-email-payal.s.kshirsagar.98%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#2 lore raw
Quoted 14 lines · Julia Lawall

Review

Quoted 9 lines · Payal Kshirsagar

Challenge suggested by coccinelle.
Return value directly without saving it in a variable.

---
 drivers/staging/speakup/i18n.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/staging/speakup/i18n.c

Quoted 14 lines

drivers/staging/speakup/i18n.c static char *find_specifier_end(char *input) · line 473

Quoted 10 lines

index ee240d3..a748eb8 100644

drivers/staging/speakup/i18n.c +1 -2
@@ -470,8 +470,7 @@ static char *find_specifier_end(char *input)
      input++;                /* Advance over %. */
      input = skip_flags(input);
      input = skip_width(input);
-     input = skip_conversion(input);
-     return input;
+     return skip_conversion(input);

Many people have proposed this already and the maintainer prefers that the code is left as it is, with input = over and over, for uniformity.

Okay I will drop this patch.
Thanks,
Payal

julia

Quoted 30 lines
Quoted 9 lines
drivers/staging/speakup/i18n.c +0 -1
 }
 
 /*
--

2.7.4

--
You received this message because you are subscribed to the Google

Groups "outreachy-kernel" group.

Quoted 1 line

To unsubscribe from this group and stop receiving emails from it, send

an email to [email protected].

Quoted 2 lines

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/1553923565-12066-1-git-send-email-payal.s.kshirsagar.98%40gmail.com
.

Quoted 2 lines

For more options, visit https://groups.google.com/d/optout.

--
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/alpine.DEB.2.21.1903300740450.2817%40hadrien
.
For more options, visit https://groups.google.com/d/optout.