summaryrefslogtreecommitdiffstats
path: root/usr.bin/wc
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-06-15 08:31:19 +0000
committertjr <tjr@FreeBSD.org>2002-06-15 08:31:19 +0000
commit7abf4fbe29810519a58e90f6d95382b675629416 (patch)
tree2b7d022881ce911f807becd384b88c92c8ca9cd7 /usr.bin/wc
parent6ff6823d37ca694f76a33a7a9c54596c9a0960d7 (diff)
downloadFreeBSD-src-7abf4fbe29810519a58e90f6d95382b675629416.zip
FreeBSD-src-7abf4fbe29810519a58e90f6d95382b675629416.tar.gz
fstat() returns information about the target of any symbolic link that
was opened, not the link itself. Remove dead code.
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 cacc08e..7562f9d 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);
OpenPOWER on IntegriCloud