projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
an open file will never be a symbolic link (from pendry)
[unix-history]
/
usr
/
src
/
usr.bin
/
wc
/
wc.c
diff --git
a/usr/src/usr.bin/wc/wc.c
b/usr/src/usr.bin/wc/wc.c
index
c93fe74
..
fe4f1c2
100644
(file)
--- a/
usr/src/usr.bin/wc/wc.c
+++ b/
usr/src/usr.bin/wc/wc.c
@@
-12,7
+12,7
@@
static char copyright[] =
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)wc.c 8.
1
(Berkeley) %G%";
+static char sccsid[] = "@(#)wc.c 8.
2
(Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
@@
-134,7
+134,7
@@
cnt(file)
if (dochar) {
if (fstat(fd, &sb))
err("%s: %s", file, strerror(errno));
if (dochar) {
if (fstat(fd, &sb))
err("%s: %s", file, strerror(errno));
- if (S_ISREG(sb.st_mode)
|| S_ISLNK(sb.st_mode)
) {
+ if (S_ISREG(sb.st_mode)) {
(void)printf(" %7qu", sb.st_size);
tcharct += sb.st_size;
(void)close(fd);
(void)printf(" %7qu", sb.st_size);
tcharct += sb.st_size;
(void)close(fd);