aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/adaint.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2016-07-11 07:41:11 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2016-07-11 07:41:11 +0000
commit833c1dbc609404a69b30d7f045b50935c058302b (patch)
tree3ac5066dcdd6eb2add7e791a2894dd257fd61500 /gcc/ada/adaint.c
parent4adc6a122c802d0227445bce69cb2d0e6219a8f8 (diff)
downloadgcc-833c1dbc609404a69b30d7f045b50935c058302b.zip
gcc-833c1dbc609404a69b30d7f045b50935c058302b.tar.gz
gcc-833c1dbc609404a69b30d7f045b50935c058302b.tar.bz2
re PR ada/71817 (suspicious condition in C code)
PR ada/71817 * adaint.c (__gnat_is_read_accessible_file): Add parentheses. (__gnat_is_write_accessible_file): Likewise. From-SVN: r238204
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r--gcc/ada/adaint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 67bdad3..e011fef 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -1924,7 +1924,7 @@ __gnat_is_read_accessible_file (char *name)
#elif defined (__vxworks)
int fd;
- if (fd = open (name, O_RDONLY, 0) < 0)
+ if ((fd = open (name, O_RDONLY, 0)) < 0)
return 0;
close (fd);
return 1;
@@ -1997,7 +1997,7 @@ __gnat_is_write_accessible_file (char *name)
#elif defined (__vxworks)
int fd;
- if (fd = open (name, O_WRONLY, 0) < 0)
+ if ((fd = open (name, O_WRONLY, 0)) < 0)
return 0;
close (fd);
return 1;