aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-spu.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/solib-spu.c')
-rw-r--r--gdb/solib-spu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c
index a629ec9..12ff49e 100644
--- a/gdb/solib-spu.c
+++ b/gdb/solib-spu.c
@@ -56,8 +56,8 @@ spu_relocate_main_executable (int spufs_fd)
if (symfile_objfile == NULL)
return;
- new_offsets = alloca (symfile_objfile->num_sections
- * sizeof (struct section_offsets));
+ new_offsets = XALLOCAVEC (struct section_offsets,
+ symfile_objfile->num_sections);
for (i = 0; i < symfile_objfile->num_sections; i++)
new_offsets->offsets[i] = SPUADDR (spufs_fd, 0);
@@ -373,7 +373,8 @@ spu_bfd_open (char *pathname)
if (sect_size > 20)
{
- char *buf = alloca (sect_size - 20 + strlen (original_name) + 1);
+ char *buf
+ = (char *) alloca (sect_size - 20 + strlen (original_name) + 1);
bfd_get_section_contents (abfd, spu_name, buf, 20, sect_size - 20);
buf[sect_size - 20] = '\0';