diff options
author | jmallett <jmallett@FreeBSD.org> | 2007-05-17 00:18:01 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2007-05-17 00:18:01 +0000 |
commit | 070c749233eac6ab7d648d39d5d6cceae8393b06 (patch) | |
tree | 5d067bacd46ce48c01a5bf3ee9f04c36859ad1ec /usr.bin/uniq | |
parent | 705e551878305c4f68f6a632abb54055c59c3092 (diff) | |
download | FreeBSD-src-070c749233eac6ab7d648d39d5d6cceae8393b06.zip FreeBSD-src-070c749233eac6ab7d648d39d5d6cceae8393b06.tar.gz |
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.
Diffstat (limited to 'usr.bin/uniq')
-rw-r--r-- | usr.bin/uniq/uniq.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index 3521b50..18ac1ae 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -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); |