mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
(prjoin): Rewrite loop that iterates over field specs.
This commit is contained in:
1 parent
11b87d29cc
commit
9845d179b3
1 file changed
+6
-3
+6
-3
@@ -406,11 +406,14 @@ prjoin (struct line *line1, struct line *line2)
|
||||
{
|
||||
const struct outlist *o;
|
||||
|
||||
prfield (outlist->field - 1, outlist->file == 1 ? line1 : line2);
|
||||
for (o = outlist->next; o; o = o->next)
|
||||
o = outlist;
|
||||
while (1)
|
||||
{
|
||||
putchar (tab ? tab : ' ');
|
||||
prfield (o->field - 1, o->file == 1 ? line1 : line2);
|
||||
o = o->next;
|
||||
if (o == NULL)
|
||||
break;
|
||||
putchar (tab ? tab : ' ');
|
||||
}
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user