From 2e01fc43f23f0e960dc08984ffaff2d1e6ad5cea Mon Sep 17 00:00:00 2001 From: Faraz Vahedi Date: Tue, 8 Oct 2024 21:39:39 +0330 Subject: [PATCH] paste(1): Make small modifications to improve readability Signed-off-by: Faraz Vahedi Reviewed by: imp, oshogbo Pull Request: https://github.com/freebsd/freebsd-src/pull/1443 --- usr.bin/paste/paste.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/usr.bin/paste/paste.c b/usr.bin/paste/paste.c index fa8be54ebe5..39e2577200b 100644 --- a/usr.bin/paste/paste.c +++ b/usr.bin/paste/paste.c @@ -99,10 +99,8 @@ main(int argc, char *argv[]) delim = tab; } - if (seq) - rval = sequential(argv); - else - rval = parallel(argv); + rval = seq ? sequential(argv) : parallel(argv); + exit(rval); } @@ -118,7 +116,6 @@ static STAILQ_HEAD(head, _list) lh; static int parallel(char **argv) { - struct head lh; LIST *lp; int cnt; wint_t ich; @@ -244,7 +241,8 @@ tr(wchar_t *arg) default: *arg = ch; break; - } else + } + else *arg = ch; if (!cnt)