]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: remove unnecessary nullptr check in remove_user_added_objfile
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 7 Feb 2024 16:53:23 +0000 (11:53 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 9 Feb 2024 16:09:56 +0000 (11:09 -0500)
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>
gdb/solib.c

index 991ff156d12fb8ced358f5e1c42c8d275cbfc01e..952897c37fc95d1abf71b09e938d958b680d700a 100644 (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)