aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/wc
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2002-06-15 08:31:19 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2002-06-15 08:31:19 +0000
commita1a27143bdddb03a4eb067538ef4117a9d84239e (patch)
tree2b7d022881ce911f807becd384b88c92c8ca9cd7 /usr.bin/wc
parent3627fe880c45913a3994ec0db3c6a7b62b81c1de (diff)
downloadsrc-a1a27143bdddb03a4eb067538ef4117a9d84239e.tar.gz
src-a1a27143bdddb03a4eb067538ef4117a9d84239e.zip
fstat() returns information about the target of any symbolic link that
was opened, not the link itself. Remove dead code.
Notes
Notes: svn path=/head/; revision=98245
Diffstat (limited to 'usr.bin/wc')
-rw-r--r--usr.bin/wc/wc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/wc/wc.c b/usr.bin/wc/wc.c
index cacc08e03ef6..7562f9d1f59d 100644
--- a/usr.bin/wc/wc.c
+++ b/usr.bin/wc/wc.c
@@ -182,7 +182,7 @@ cnt(file)
}
/*
* If all we need is the number of characters and it's a
- * regular or linked file, just stat the puppy.
+ * regular file, just stat the puppy.
*/
if (dochar || domulti) {
if (fstat(fd, &sb)) {
@@ -190,7 +190,7 @@ cnt(file)
(void)close(fd);
return (1);
}
- if (S_ISREG(sb.st_mode) || S_ISLNK(sb.st_mode)) {
+ if (S_ISREG(sb.st_mode)) {
(void)printf(" %7lld", (long long)sb.st_size);
tcharct += sb.st_size;
(void)close(fd);