From b2cb4b4005e88bf31ced0c899527b374a9abcfca Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 23 May 2024 09:35:57 -0600 Subject: 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. --- gdb/symtab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb') diff --git a/gdb/symtab.c b/gdb/symtab.c index c9629ce..c65d562 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 (); } -- cgit v1.1