an open file will never be a symbolic link (from pendry)
[unix-history] / usr / src / usr.bin / wc / wc.c
index c93fe74..fe4f1c2 100644 (file)
@@ -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);