summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2005-11-23 22:33:07 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2005-11-23 22:33:07 +0000
commit5169ab683432f97215f4895a94af4b9a372a6f01 (patch)
tree05173b5a1796c3647df069ac47f01eec722be87c
parentdedfbb8bf81f67a75e31a77b7525c372d64939c7 (diff)
Bug #5003 <https://bugs.freedesktop.org/show_bug.cgi?id=5003> Patch #3763XORG-6_99_99_903XORG-6_8_99_903
<https://bugs.freedesktop.org/attachment.cgi?id=3763> Xorg code misuses S_IF* macros
-rw-r--r--lndir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lndir.c b/lndir.c
index 3ce6a92..cd1d983 100644
--- a/lndir.c
+++ b/lndir.c
@@ -202,7 +202,7 @@ dodir (char *fn, /* name of "from" directory, either absolute or
#ifdef S_ISDIR
if(S_ISDIR(sb.st_mode))
#else
- if (sb.st_mode & S_IFDIR)
+ if ((sb.st_mode & S_IFMT) == S_IFDIR)
#endif
{
/* directory */
@@ -371,7 +371,7 @@ main (int ac, char *av[])
#ifdef S_ISDIR
if (!(S_ISDIR(ts.st_mode)))
#else
- if (!(ts.st_mode & S_IFDIR))
+ if (!(ts.st_mode & S_IFMT) == S_IFDIR)
#endif
quit (2, "%s: Not a directory", tn);
if (chdir (tn) < 0)
@@ -383,7 +383,7 @@ main (int ac, char *av[])
#ifdef S_ISDIR
if (!(S_ISDIR(fs.st_mode)))
#else
- if (!(fs.st_mode & S_IFDIR))
+ if (!(fs.st_mode & S_IFMT) == S_IFDIR)
#endif
quit (2, "%s: Not a directory", fn);