summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-04-05 11:20:46 +0200
committerKay Sievers <kay@vrfy.org>2012-04-05 11:20:46 +0200
commita30f498d891f8917e9f6dd7082bec0cb90ac7944 (patch)
tree6250fd4635063dbfd3d270faef36d336431c7141
parentfc19d790bb76b68ef687d8fabf4d13614d88e811 (diff)
downloadpatches-a30f498d891f8917e9f6dd7082bec0cb90ac7944.tar.gz
printk: remove only the last trailing newline
-rw-r--r--printk.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/printk.patch b/printk.patch
index 2b3b082..1666319 100644
--- a/printk.patch
+++ b/printk.patch
@@ -1619,8 +1619,8 @@ Signed-off-by: Kay Sievers <kay@vrfy.org>
- emit_log_char(*tp);
- printed_len += tlen;
- }
-+ while (textlen && text[textlen-1] == '\n') {
-+ /* mark and strip a trailing newline */
++ /* mark and strip a trailing newline */
++ if (textlen && text[textlen-1] == '\n') {
+ textlen--;
+ newline = true;
+ }