From: Tom Tromey Date: Thu, 23 May 2024 15:35:57 +0000 (-0600) Subject: Remove an unnecessary null check from lookup_local_symbol X-Git-Tag: binutils-2_43~397 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b2cb4b4005e88bf31ced0c899527b374a9abcfca;p=thirdparty%2Fbinutils-gdb.git Remove an unnecessary null check from lookup_local_symbol lookup_local_symbol checks whether 'function' is null before calling block::inlined_p, but this is not necessary. --- diff --git a/gdb/symtab.c b/gdb/symtab.c index c9629ceb1c8..c65d562f783 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -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 (); }