gdb: remove unnecessary nullptr check in remove_user_added_objfile

Since commit 74daa597e7 ("gdb: add all_objfiles_removed observer"), the
objfile passed to the free_objfile observable can't be nullptr.

Change-Id: If215aa051ab43c068b11746938022c7efca09caa
Approved-By: Andrew Burgess <aburgess@redhat.com>
This commit is contained in:
Simon Marchi
2024-02-07 11:53:23 -05:00
committed by Simon Marchi
parent c1663e3620
commit 590a4cb21e

View File

@@ -1695,7 +1695,7 @@ gdb_bfd_lookup_symbol (bfd *abfd,
static void
remove_user_added_objfile (struct objfile *objfile)
{
if (objfile != 0 && objfile->flags & OBJF_USERLOADED)
if (objfile->flags & OBJF_USERLOADED)
{
for (solib &so : objfile->pspace->solibs ())
if (so.objfile == objfile)