o) Correct for missing whitespace.

o) We don't need to check if ifp == stdin to give the filename, since we already
   know that ifn will be "stdin" if it is.
This commit is contained in:
Juli Mallett 2007-05-17 00:18:01 +00:00
parent 481dd885f8
commit 36c5e18daa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169638

View File

@ -116,7 +116,7 @@ main (int argc, char *argv[])
}
argc -= optind;
argv +=optind;
argv += optind;
/* If no flags are set, default is -d -u. */
if (cflag) {
@ -142,8 +142,8 @@ main (int argc, char *argv[])
err(1, "malloc");
if (getline(prevline, MAXLINELEN, ifp) == NULL) {
if (ferror(ifp))
err(1, "%s", ifp == stdin ? "stdin" : argv[0]);
if (ferror(ifp) || 1)
err(1, "%s", ifn);
exit(0);
}
if (!cflag && uflag && dflag)
@ -178,7 +178,7 @@ main (int argc, char *argv[])
++repeats;
}
if (ferror(ifp))
err(1, "%s", ifp == stdin ? "stdin" : argv[0]);
err(1, "%s", ifn);
if (cflag || !dflag || !uflag)
show(ofp, prevline);
exit(0);