]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove an unnecessary null check from lookup_local_symbol
authorTom Tromey <tromey@adacore.com>
Thu, 23 May 2024 15:35:57 +0000 (09:35 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 14 Jun 2024 16:56:37 +0000 (10:56 -0600)
lookup_local_symbol checks whether 'function' is null before calling
block::inlined_p, but this is not necessary.

gdb/symtab.c

index c9629ceb1c8303b7ff705d9b74d0ea50ad1759df..c65d562f783298e8f821341c18218cb5df41cae6 100644 (file)
@@ -2251,7 +2251,7 @@ lookup_local_symbol (const char *name,
            return blocksym;
        }
 
-      if (function != nullptr && block->inlined_p ())
+      if (block->inlined_p ())
        break;
       block = block->superblock ();
     }