]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix find_charset_names.
authorAli Tamur <tamur@google.com>
Mon, 21 Oct 2019 23:34:19 +0000 (16:34 -0700)
committerAli Tamur <tamur@google.com>
Fri, 25 Oct 2019 20:57:05 +0000 (13:57 -0700)
The patch f2aec7f6d14 changed the return type of relocate_gdb_directory to
std::string, but the change is not reflected in find_charset_names function.
(Probably missed because the broken code is behind an #ifdef).

gdb/ChangeLog

* charset.c (find_charset_names): Reflect API change.

gdb/ChangeLog
gdb/charset.c

index 55c46473ab3c3cf53d7504bd99db022a93bc5bcc..9acc579f1eecbbfabfaeb766318020cd55d6840e 100644 (file)
@@ -1,3 +1,7 @@
+2019-10-25  Ali Tamur <tamur@google.com>
+
+       * charset.c (find_charset_names): Reflect API change.
+
 2019-10-25  Christian Biesinger  <cbiesinger@google.com>
 
        * symtab.c (struct demangled_name_entry): Change demangled name
index 7568e47cf9ab436bf2c28bbaecfd7a99ed393801..a93fe99c41fa78a54550548e346966d73c474480 100644 (file)
@@ -816,10 +816,9 @@ find_charset_names (void)
 
 #ifdef ICONV_BIN
   {
-    char *iconv_dir = relocate_gdb_directory (ICONV_BIN,
-                                             ICONV_BIN_RELOCATABLE);
-    iconv_program = concat (iconv_dir, SLASH_STRING, "iconv", NULL);
-    xfree (iconv_dir);
+    std::string iconv_dir = relocate_gdb_directory (ICONV_BIN,
+                                                   ICONV_BIN_RELOCATABLE);
+    iconv_program = concat (iconv_dir.c_str(), SLASH_STRING, "iconv", NULL);
   }
 #else
   iconv_program = xstrdup ("iconv");