From: Simon Marchi Date: Wed, 5 Mar 2025 05:06:36 +0000 (-0500) Subject: gdb/dwarf: remove unnecessary local variable in dw2_get_file_names_reader X-Git-Tag: binutils-2_45~1385 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=20c09c608f929cf46a3979622d2ea7e20b5aa719;p=thirdparty%2Fbinutils-gdb.git gdb/dwarf: remove unnecessary local variable in dw2_get_file_names_reader It seems like the lh_cu variable is not necessary, we can just use this_cu. Change-Id: Ic2ed6ee82faf1fb5d340cd92dc8ef15434b20cb8 Approved-By: Tom Tromey --- diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index bacec23af3e..3a4e350e7bb 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -1865,7 +1865,6 @@ dw2_get_file_names_reader (const struct die_reader_specs *reader, if (comp_unit_die->tag == DW_TAG_partial_unit) return; - dwarf2_per_cu *lh_cu = this_cu; slot = NULL; line_header_up lh; @@ -1888,7 +1887,7 @@ dw2_get_file_names_reader (const struct die_reader_specs *reader, &find_entry, INSERT); if (*slot != NULL) { - lh_cu->file_names = (struct quick_file_names *) *slot; + this_cu->file_names = (struct quick_file_names *) *slot; return; } @@ -1938,7 +1937,7 @@ dw2_get_file_names_reader (const struct die_reader_specs *reader, qfn->real_names = NULL; - lh_cu->file_names = qfn; + this_cu->file_names = qfn; } /* A helper for the "quick" functions which attempts to read the line