=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/stat/stat.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- src/usr.bin/stat/stat.c 2010/06/29 20:51:05 1.15 +++ src/usr.bin/stat/stat.c 2010/09/01 06:35:05 1.16 @@ -1,4 +1,4 @@ -/* $OpenBSD: stat.c,v 1.15 2010/06/29 20:51:05 tedu Exp $ */ +/* $OpenBSD: stat.c,v 1.16 2010/09/01 06:35:05 lum Exp $ */ /* $NetBSD: stat.c,v 1.19 2004/06/20 22:20:16 jmc Exp $ */ /* @@ -141,7 +141,6 @@ int, int); char *timefmt; -int linkfail; #define addchar(s, c, nl) \ do { \ @@ -164,7 +163,6 @@ usestat = 0; nonl = 0; quiet = 0; - linkfail = 0; statfmt = NULL; timefmt = NULL; @@ -266,7 +264,6 @@ if (rc == -1) { errs = 1; - linkfail = 1; if (!quiet) warn("%s", argc == 0 ? "(stdin)" : argv[0]); @@ -690,16 +687,14 @@ snprintf(path, sizeof(path), " -> "); l = readlink(file, path + 4, sizeof(path) - 4 - 1); if (l == -1) { - linkfail = 1; l = 0; path[0] = '\0'; } path[l + 4] = '\0'; sdata = path + (ofmt == FMTF_STRING ? 0 : 4); - } else { - linkfail = 1; + } else sdata = ""; - } + formats = FMTF_STRING; if (ofmt == 0) ofmt = FMTF_STRING;