From 5153027c7ffba3cbb8c6fd78144eed2e386ac952 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 24 Aug 2023 08:53:30 -0600 Subject: [PATCH] Small constructor change to target_buffer This changes the target_buffer constructor to initialize m_filename rather than assign to it. Reviewed-By: Lancelot Six --- gdb/gdb_bfd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c index de7ecaea630..6b64e92b48e 100644 --- a/gdb/gdb_bfd.c +++ b/gdb/gdb_bfd.c @@ -226,10 +226,10 @@ struct target_buffer target memory. */ target_buffer (CORE_ADDR base, ULONGEST size) : m_base (base), - m_size (size) + m_size (size), + m_filename (xstrprintf ("", + core_addr_to_string_nz (m_base))) { - m_filename - = xstrprintf ("", core_addr_to_string_nz (m_base)); } /* Return the size of the in-memory BFD file. */ -- 2.30.2