Commit 833c1dbc by Eric Botcazou Committed by Eric Botcazou

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
parent 4adc6a12
2016-07-11 Eric Botcazou <ebotcazou@adacore.com>
PR ada/71817
* adaint.c (__gnat_is_read_accessible_file): Add parentheses.
(__gnat_is_write_accessible_file): Likewise.
2016-07-07 Ed Schonberg <schonberg@adacore.com> 2016-07-07 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Internal_Init_Call): Subsidiary procedure * exp_ch6.adb (Expand_Internal_Init_Call): Subsidiary procedure
......
...@@ -1924,7 +1924,7 @@ __gnat_is_read_accessible_file (char *name) ...@@ -1924,7 +1924,7 @@ __gnat_is_read_accessible_file (char *name)
#elif defined (__vxworks) #elif defined (__vxworks)
int fd; int fd;
if (fd = open (name, O_RDONLY, 0) < 0) if ((fd = open (name, O_RDONLY, 0)) < 0)
return 0; return 0;
close (fd); close (fd);
return 1; return 1;
...@@ -1997,7 +1997,7 @@ __gnat_is_write_accessible_file (char *name) ...@@ -1997,7 +1997,7 @@ __gnat_is_write_accessible_file (char *name)
#elif defined (__vxworks) #elif defined (__vxworks)
int fd; int fd;
if (fd = open (name, O_WRONLY, 0) < 0) if ((fd = open (name, O_WRONLY, 0)) < 0)
return 0; return 0;
close (fd); close (fd);
return 1; return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment