diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-03 08:23:32 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-03 08:23:39 -0500 |
commit | e3ee979c1f24984eb93b32822338aa425afbc2af (patch) | |
tree | b1deef277b0c863670313645234dfaec9377bbc6 | |
parent | 9a4a44998662fc71b821ce46ad71e5063b38d758 (diff) | |
download | gdb-e3ee979c1f24984eb93b32822338aa425afbc2af.zip gdb-e3ee979c1f24984eb93b32822338aa425afbc2af.tar.gz gdb-e3ee979c1f24984eb93b32822338aa425afbc2af.tar.bz2 |
gdb: use assignment to initialize variable in tdesc_parse_xml
Since allocate_target_description returns a target_desc_up, use
assignment to initialize the description variable.
Change-Id: Iab3311642c09b95648984f305936f4a4cde09440
-rw-r--r-- | gdb/xml-tdesc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/xml-tdesc.c b/gdb/xml-tdesc.c index ba7154c..a8b0b05 100644 --- a/gdb/xml-tdesc.c +++ b/gdb/xml-tdesc.c @@ -638,7 +638,7 @@ tdesc_parse_xml (const char *document, xml_fetch_another fetcher) return it->second.get (); memset (&data, 0, sizeof (struct tdesc_parsing_data)); - target_desc_up description (allocate_target_description ()); + target_desc_up description = allocate_target_description (); data.tdesc = description.get (); if (gdb_xml_parse_quick (_("target description"), "gdb-target.dtd", |