aboutsummaryrefslogtreecommitdiff
path: root/gdb/macroexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/macroexp.c')
-rw-r--r--gdb/macroexp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/macroexp.c b/gdb/macroexp.c
index e6c9c86..bbd81e7 100644
--- a/gdb/macroexp.c
+++ b/gdb/macroexp.c
@@ -146,7 +146,7 @@ resize_buffer (struct macro_buffer *b, int n)
while (b->size <= n)
b->size *= 2;
- b->text = xrealloc (b->text, b->size);
+ b->text = (char *) xrealloc (b->text, b->size);
}
@@ -825,7 +825,7 @@ gather_arguments (const char *name, struct macro_buffer *src,
if (args_len >= args_size)
{
args_size *= 2;
- args = xrealloc (args, sizeof (*args) * args_size);
+ args = XRESIZEVEC (struct macro_buffer, args, args_size);
}
/* Initialize the next argument. */
@@ -858,7 +858,8 @@ gather_arguments (const char *name, struct macro_buffer *src,
if (args_len >= args_size)
{
args_size++;
- args = xrealloc (args, sizeof (*args) * args_size);
+ args = XRESIZEVEC (struct macro_buffer, args,
+ args_size);
}
arg = &args[args_len++];
set_token (arg, src->text, src->text);
@@ -1330,7 +1331,7 @@ maybe_expand (struct macro_buffer *dest,
{
/* Make a null-terminated copy of it, since that's what our
lookup function expects. */
- char *id = xmalloc (src_first->len + 1);
+ char *id = (char *) xmalloc (src_first->len + 1);
struct cleanup *back_to = make_cleanup (xfree, id);
memcpy (id, src_first->text, src_first->len);