aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppfiles.c
diff options
context:
space:
mode:
authorGraham Stott <grahams@gcc.gnu.org>2001-01-09 10:43:47 +0000
committerGraham Stott <grahams@gcc.gnu.org>2001-01-09 10:43:47 +0000
commit8e178c1d09d772144d5200306042b0561322a0cd (patch)
tree5ee842f2a2fe1be2971f604f4ada41f02ce94d6f /gcc/cppfiles.c
parent28ec8d6bf8e283dbdaf0a068723426fc1d5f9e4b (diff)
downloadgcc-8e178c1d09d772144d5200306042b0561322a0cd.zip
gcc-8e178c1d09d772144d5200306042b0561322a0cd.tar.gz
gcc-8e178c1d09d772144d5200306042b0561322a0cd.tar.bz2
cppfiles.c (_cpp_execute_include): Move `len` initialisation after `ptr` is initialised.
* cppfiles.c (_cpp_execute_include): Move `len` initialisation after `ptr` is initialised. From-SVN: r38826
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r--gcc/cppfiles.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c
index b0678d7..0549df3 100644
--- a/gcc/cppfiles.c
+++ b/gcc/cppfiles.c
@@ -654,7 +654,7 @@ _cpp_execute_include (pfile, header, no_reinclude, include_next)
{
char *p;
struct file_name_list *ptr;
- int len = strlen (ptr->name);
+ int len;
/* If requested as a system header, assume it belongs in
the first system header directory. */
@@ -663,6 +663,7 @@ _cpp_execute_include (pfile, header, no_reinclude, include_next)
else
ptr = CPP_OPTION (pfile, quote_include);
+ len = strlen (ptr->name);
p = (char *) alloca (len + strlen (fname) + 2);
if (len)
{