summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-01-31 13:52:18 +0000
committerJim Meyering <jim@meyering.net>2003-01-31 13:52:18 +0000
commitfb9e95e6c3db7c8698d67db9b26cc529bf6d239e (patch)
treeebdf65a86ef533e4990808f448c8373a1814282d /src
parentd060450cc8accc7ba47fbd3a52f73d4a4a98c267 (diff)
downloadcoreutils-fb9e95e6c3db7c8698d67db9b26cc529bf6d239e.tar.xz
(print_stat): Use S_ISLNK rather than an explicit
test using S_IFMT and S_IFLNK. S_IFLNK may not be defined.
Diffstat (limited to 'src')
-rw-r--r--src/stat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stat.c b/src/stat.c
index 61afafb2a..7f2c5d2a4 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -448,7 +448,7 @@ print_stat (char *pformat, char m, char const *filename, void const *data)
break;
case 'N':
strcat (pformat, "s");
- if ((statbuf->st_mode & S_IFMT) == S_IFLNK)
+ if (S_ISLNK (statbuf->st_mode))
{
char *linkname = xreadlink (filename);
if (linkname == NULL)