Remove some unneeded initializations in minimal_symbol_reader

minimal_symbol_reader::record_full does not need to initialize any
minsym fields to 0, because that was already done implicitly via the
use of XCNEW when allocating the msym_bunch.

gdb/ChangeLog
2019-03-15  Tom Tromey  <tom@tromey.com>

	* minsyms.c (minimal_symbol_reader::record_full): Remove some
	initializations.
This commit is contained in:
Tom Tromey 2019-03-01 19:56:45 -07:00
parent 1b7a07cba0
commit 788c80d1af
2 changed files with 5 additions and 10 deletions

View File

@ -1,3 +1,8 @@
2019-03-15 Tom Tromey <tom@tromey.com>
* minsyms.c (minimal_symbol_reader::record_full): Remove some
initializations.
2019-03-15 Tom Tromey <tom@tromey.com>
* objfiles.h (struct objfile_per_bfd_storage)

View File

@ -1163,16 +1163,6 @@ minimal_symbol_reader::record_full (const char *name, int name_len,
MSYMBOL_SECTION (msymbol) = section;
MSYMBOL_TYPE (msymbol) = ms_type;
MSYMBOL_TARGET_FLAG_1 (msymbol) = 0;
MSYMBOL_TARGET_FLAG_2 (msymbol) = 0;
/* Do not use the SET_MSYMBOL_SIZE macro to initialize the size,
as it would also set the has_size flag. */
msymbol->size = 0;
/* The hash pointers must be cleared! If they're not,
add_minsym_to_hash_table will NOT add this msymbol to the hash table. */
msymbol->hash_next = NULL;
msymbol->demangled_hash_next = NULL;
/* If we already read minimal symbols for this objfile, then don't
ever allocate a new one. */