summaryrefslogtreecommitdiff
path: root/usr.bin/join/join.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/join/join.c')
-rw-r--r--usr.bin/join/join.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/join/join.c b/usr.bin/join/join.c
index 7e467e1dc78..9e32a834bab 100644
--- a/usr.bin/join/join.c
+++ b/usr.bin/join/join.c
@@ -1,4 +1,4 @@
-/* $Id: join.c,v 1.10 1997/08/25 05:31:10 deraadt Exp $
+/* $Id: join.c,v 1.11 1998/11/16 06:09:12 deraadt Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -45,7 +45,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "@(#)join.c 8.6 (Berkeley) 5/4/95"; */
-static char rcsid[] = "$Id: join.c,v 1.10 1997/08/25 05:31:10 deraadt Exp $";
+static char rcsid[] = "$Id: join.c,v 1.11 1998/11/16 06:09:12 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -471,13 +471,13 @@ outtwoline(F1, lp1, F2, lp2)
int cnt;
/* Output a pair of lines according to the join list (if any). */
- if (olist)
+ if (olist) {
for (cnt = 0; cnt < olistcnt; ++cnt)
if (olist[cnt].filenum == 1)
outfield(lp1, olist[cnt].fieldno, 0);
else /* if (olist[cnt].filenum == 2) */
outfield(lp2, olist[cnt].fieldno, 0);
- else {
+ } else {
/*
* Output the join field, then the remaining fields from F1
* and F2.
@@ -504,7 +504,7 @@ outfield(lp, fieldno, out_empty)
{
if (needsep++)
putchar((int)*tabchar);
- if (!ferror(stdout))
+ if (!ferror(stdout)) {
if (lp->fieldcnt < fieldno || out_empty) {
if (empty != NULL)
fputs(empty, stdout);
@@ -513,6 +513,7 @@ outfield(lp, fieldno, out_empty)
return;
fputs(lp->fields[fieldno], stdout);
}
+ }
if (ferror(stdout))
err(1, "stdout");
}