From 5169ab683432f97215f4895a94af4b9a372a6f01 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 23 Nov 2005 22:33:07 +0000 Subject: Bug #5003 Patch #3763 Xorg code misuses S_IF* macros --- lndir.c | 6 +++--- 1 file 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); -- cgit v1.2.3