* cppexp.c (_cpp_expand_op_stack): Set op_limit.

From-SVN: r53348
This commit is contained in:
Neil Booth 2002-05-09 22:27:31 +00:00 committed by Neil Booth
parent 23357c552c
commit 32fa4565a7
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
* cppexp.c (_cpp_expand_op_stack): Set op_limit.
2002-05-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config/mips/t-iris6 (SHLIB_SLIBDIR_SUFFIXES): Define.

View File

@ -824,10 +824,12 @@ struct op *
_cpp_expand_op_stack (pfile)
cpp_reader *pfile;
{
size_t n = (size_t) (pfile->op_limit - pfile->op_stack);
size_t old_size = (size_t) (pfile->op_limit - pfile->op_stack);
size_t new_size = old_size * 2 + 20;
pfile->op_stack = (struct op *) xrealloc (pfile->op_stack,
(n * 2 + 20) * sizeof (struct op));
new_size * sizeof (struct op));
pfile->op_limit = pfile->op_stack + new_size;
return pfile->op_stack + n;
return pfile->op_stack + old_size;
}