Code cleanup.
	* objfiles.c (allocate_objfile) <objfile->name != NULL>: Remove.
	(free_objfile) <objfile->name != NULL>: Remove the conditional around
	xfree.
	* objfiles.h (struct objfile) <name>: New comment it is never NULL.
	* python/py-auto-load.c (auto_load_new_objfile) <!objfile->name>:
	Remove.
	* python/py-objfile.c (objfpy_get_filename) <obj->objfile->name>
	Remove the conditional.
	* python/py-progspace.c (pspy_get_filename) <objfile->name>: Likewise.
This commit is contained in:
Jan Kratochvil
2010-09-22 20:00:53 +00:00
parent 7f6130ff85
commit d31d2fc374
6 changed files with 18 additions and 14 deletions

View File

@ -214,10 +214,6 @@ allocate_objfile (bfd *abfd, int flags)
region. */
objfile->obfd = gdb_bfd_ref (abfd);
if (objfile->name != NULL)
{
xfree (objfile->name);
}
if (abfd != NULL)
{
/* Look up the gdbarch associated with the BFD. */
@ -649,10 +645,7 @@ free_objfile (struct objfile *objfile)
/* The last thing we do is free the objfile struct itself. */
if (objfile->name != NULL)
{
xfree (objfile->name);
}
xfree (objfile->name);
if (objfile->global_psymbols.list)
xfree (objfile->global_psymbols.list);
if (objfile->static_psymbols.list)