summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2006-09-25 20:43:36 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2006-09-25 20:43:36 +0000
commit6f2b5e015d3daa3d20ff97d02e7bc7e9064a183e (patch)
tree485f0d16ae8aff478f76f4bbffa57b8aff80a619 /gnu/usr.bin
parent0ef21ef51c087909b39e3786a0efbb03915ad2d5 (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. ok kettenis@
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/binutils/gdb/remote-fileio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gnu/usr.bin/binutils/gdb/remote-fileio.c b/gnu/usr.bin/binutils/gdb/remote-fileio.c
index 281872ec6c0..4593ac0cf08 100644
--- a/gnu/usr.bin/binutils/gdb/remote-fileio.c
+++ b/gnu/usr.bin/binutils/gdb/remote-fileio.c
@@ -181,11 +181,11 @@ remote_fileio_mode_to_target (mode_t mode)
{
mode_t tmode = 0;
- if (mode & S_IFREG)
+ if (S_ISREG(mode))
tmode |= FILEIO_S_IFREG;
- if (mode & S_IFDIR)
+ if (S_ISDIR(mode))
tmode |= FILEIO_S_IFDIR;
- if (mode & S_IFCHR)
+ if (S_ISCHR(mode))
tmode |= FILEIO_S_IFCHR;
if (mode & S_IRUSR)
tmode |= FILEIO_S_IRUSR;