From: Jim Meyering Date: Fri, 31 Jan 2003 13:52:18 +0000 (+0000) Subject: (print_stat): Use S_ISLNK rather than an explicit X-Git-Tag: v4.5.5~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb9e95e6c3db7c8698d67db9b26cc529bf6d239e;p=thirdparty%2Fcoreutils.git (print_stat): Use S_ISLNK rather than an explicit test using S_IFMT and S_IFLNK. S_IFLNK may not be defined. --- diff --git a/src/stat.c b/src/stat.c index 61afafb2a9..7f2c5d2a4d 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)