diff options
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 98e81c4..2ec358a 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -147,11 +147,7 @@ get_objfile_bfd_data (struct objfile *objfile, struct bfd *abfd) set_bfd_data (abfd, objfiles_bfd_data, storage); } else - { - storage = (objfile_per_bfd_storage *) - obstack_alloc (&objfile->objfile_obstack, - sizeof (objfile_per_bfd_storage)); - } + storage = XOBNEW (&objfile->objfile_obstack, objfile_per_bfd_storage); /* objfile_per_bfd_storage is not trivially constructible, must call the ctor manually. */ @@ -269,8 +265,7 @@ objfile_register_static_link (struct objfile *objfile, slot = htab_find_slot (objfile->static_links, &lookup_entry, INSERT); gdb_assert (*slot == NULL); - entry = (struct static_link_htab_entry *) obstack_alloc - (&objfile->objfile_obstack, sizeof (*entry)); + entry = XOBNEW (&objfile->objfile_obstack, static_link_htab_entry); entry->block = block; entry->static_link = static_link; *slot = (void *) entry; |