diff options
author | Nicolas Setton <setton@adacore.com> | 2005-12-09 18:10:46 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-12-09 18:10:46 +0100 |
commit | e51b97bef78798d57a052a1a09ce8823aa926efd (patch) | |
tree | 9ed6a66dab02b6aa79d40851428da6082304e3aa /gcc/ada | |
parent | 81408d4928fe405b27c5b1cfe0b3d65ae4a35523 (diff) | |
download | gcc-e51b97bef78798d57a052a1a09ce8823aa926efd.zip gcc-e51b97bef78798d57a052a1a09ce8823aa926efd.tar.gz gcc-e51b97bef78798d57a052a1a09ce8823aa926efd.tar.bz2 |
adaint.c (__gnat_locate_regular_file): Return immediately if file_name is empty.
2005-12-05 Nicolas Setton <setton@adacore.com>
* adaint.c (__gnat_locate_regular_file): Return immediately if
file_name is empty.
From-SVN: r108283
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/adaint.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index d73665b..7594e7b 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -1960,6 +1960,11 @@ __gnat_locate_regular_file (char *file_name, char *path_val) char *file_path = alloca (strlen (file_name) + 1); int absolute; + /* Return immediately if file_name is empty */ + + if (*file_name == '\0') + return 0; + /* Remove quotes around file_name if present */ ptr = file_name; |