diff options
author | Juli Mallett <jmallett@FreeBSD.org> | 2007-05-17 00:18:01 +0000 |
---|---|---|
committer | Juli Mallett <jmallett@FreeBSD.org> | 2007-05-17 00:18:01 +0000 |
commit | 36c5e18daacc4bf3769cdc717b3c6338d4f102f8 (patch) | |
tree | 5d067bacd46ce48c01a5bf3ee9f04c36859ad1ec /usr.bin/uniq | |
parent | 481dd885f8ed49114e2001e93ea45d2d5730eaf9 (diff) | |
download | src-36c5e18daacc4bf3769cdc717b3c6338d4f102f8.tar.gz src-36c5e18daacc4bf3769cdc717b3c6338d4f102f8.zip |
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.
Notes
Notes:
svn path=/head/; revision=169638
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 3521b5020b4e..18ac1aed181a 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); |