From 590a4cb21e8e2883fcc8796eab20a110e77f9e2f Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 7 Feb 2024 11:53:23 -0500 Subject: [PATCH] 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 --- gdb/solib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/solib.c b/gdb/solib.c index 991ff156d12..952897c37fc 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) -- 2.47.3