From b1ddacc73c2f63bad81ee74d733c9b7e0cbebbac Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Sun, 5 Aug 2007 21:41:09 +0000 Subject: [PATCH] * macroexp.c (init_buffer): Remove testing code that overrides the caller's length guess. (gather_arguments): Use a larger initial size, now that the vector growth code has been exercised. --- gdb/ChangeLog | 7 +++++++ gdb/macroexp.c | 5 +---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fa5740009d6..f7f00b93648 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2007-08-05 Jim Blandy + + * macroexp.c (init_buffer): Remove testing code that overrides the + caller's length guess. + (gather_arguments): Use a larger initial size, now that the vector + growth code has been exercised. + 2007-08-05 Pedro Alves * solib-target.c (solib_target_relocate_section_addresses): Add diff --git a/gdb/macroexp.c b/gdb/macroexp.c index a0ac7cc5924..68b38629b2f 100644 --- a/gdb/macroexp.c +++ b/gdb/macroexp.c @@ -81,9 +81,6 @@ struct macro_buffer static void init_buffer (struct macro_buffer *b, int n) { - /* Small value for initial testing. */ - n = 1; - b->size = n; if (n > 0) b->text = (char *) xmalloc (n); @@ -715,7 +712,7 @@ gather_arguments (const char *name, struct macro_buffer *src, int *argc_p) get_token (&tok, src); args_len = 0; - args_size = 1; /* small for initial testing */ + args_size = 6; args = (struct macro_buffer *) xmalloc (sizeof (*args) * args_size); for (;;) -- 2.30.2