diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-09-19 05:52:24 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-09-19 05:52:24 +0000 |
commit | 2bcd7d59789e29c0979e4586e27c91231e0d98b0 (patch) | |
tree | 5dd2bc9696ae22a3cce9ac3a7b267336caf4f3a2 /usr.bin/mg/fileio.c | |
parent | bec9fbb71b6b98020d52074619a34722765ce4ac (diff) |
Use S_IS* macros insted of masking with S_IF* flags. The latter may
have multiple bits set, which lead to surprising results. Spotted by
Paul Stoeber, more to come. ok millert@ pedro@ jaredy@ djm@
Diffstat (limited to 'usr.bin/mg/fileio.c')
-rw-r--r-- | usr.bin/mg/fileio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mg/fileio.c b/usr.bin/mg/fileio.c index 5d8583abaaf..2ad4967f8da 100644 --- a/usr.bin/mg/fileio.c +++ b/usr.bin/mg/fileio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fileio.c,v 1.77 2006/07/25 08:22:32 kjell Exp $ */ +/* $OpenBSD: fileio.c,v 1.78 2006/09/19 05:52:23 otto Exp $ */ /* This file is in the public domain. */ @@ -518,7 +518,7 @@ make_file_list(char *buf) continue; if (stat(statname, &statbuf) < 0) continue; - if (statbuf.st_mode & S_IFDIR) + if (S_ISDIR(statbuf.st_mode)) isdir = 1; } |