aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/arch-utils.c')
-rw-r--r--gdb/arch-utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 7df5570..bb93fbe 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -44,7 +44,7 @@ simple_displaced_step_copy_insn (struct gdbarch *gdbarch,
struct regcache *regs)
{
size_t len = gdbarch_max_insn_length (gdbarch);
- gdb_byte *buf = xmalloc (len);
+ gdb_byte *buf = (gdb_byte *) xmalloc (len);
read_memory (from, buf, len);
write_memory (to, buf, len);
@@ -684,7 +684,7 @@ initialize_current_architecture (void)
/* Append ``auto''. */
int nr;
for (nr = 0; arches[nr] != NULL; nr++);
- arches = xrealloc (arches, sizeof (char*) * (nr + 2));
+ arches = XRESIZEVEC (const char *, arches, nr + 2);
arches[nr + 0] = "auto";
arches[nr + 1] = NULL;
add_setshow_enum_cmd ("architecture", class_support,