commit 60da4fb049eb1168331d0754e34519af3627a2e8
parent 24810426519a002749016cbb04e6c21cd2d890cb
Author: Robert Karl <robertkarljr@gmail.com>
Date: Mon, 26 Dec 2016 16:22:36 -0800
paste: fix warning on indentation in parallel()
_Bug_
Got the following error after cloning and running make:
paste.c: In function ‘parallel’:
paste.c:70:4: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
else
^~~~
paste.c:72:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
last++;
^~~~
This patch preserves the same functionality and just adjusts indentation to squelch the warning.
_Test plan_
Used the following 'script' to convince myself output looked correct for inputs
where the latter arguments to paste had fewer lines.
make && printf "1\n2\n" > two.txt && printf "" > zero.txt && ./paste -d, two.txt zero.txt
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/paste.c b/paste.c
@@ -69,7 +69,7 @@ nextline:
putchar('\n');
else
efputrune(&d, stdout, "<stdout>");
- last++;
+ last++;
}
}
if (last != -1)