aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2024-02-07 11:53:23 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2024-02-09 11:09:56 -0500
commit590a4cb21e8e2883fcc8796eab20a110e77f9e2f (patch)
treea9da197d1e40c820563626d8f7fd96a9c061488d /gdb/solib.c
parentc1663e3620dd05657e1abb0b32723b6234519e32 (diff)
downloadgdb-590a4cb21e8e2883fcc8796eab20a110e77f9e2f.zip
gdb-590a4cb21e8e2883fcc8796eab20a110e77f9e2f.tar.gz
gdb-590a4cb21e8e2883fcc8796eab20a110e77f9e2f.tar.bz2
gdb: remove unnecessary nullptr check in remove_user_added_objfile
Since commit 74daa597e74 ("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>
Diffstat (limited to 'gdb/solib.c')
-rw-r--r--gdb/solib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/solib.c b/gdb/solib.c
index 991ff15..952897c 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -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)