aboutsummaryrefslogtreecommitdiff
path: root/gdb/charset.c
diff options
context:
space:
mode:
authorAli Tamur <tamur@google.com>2019-10-21 16:34:19 -0700
committerAli Tamur <tamur@google.com>2019-10-25 13:57:05 -0700
commit1834d45f0ff231bf74de3b0305949cf991470a35 (patch)
tree0dcc36b4c5304f32ecaa47d795d14def15643603 /gdb/charset.c
parent92174eeae843d8295791b9d9f03a7a291cc3c694 (diff)
downloadgdb-1834d45f0ff231bf74de3b0305949cf991470a35.zip
gdb-1834d45f0ff231bf74de3b0305949cf991470a35.tar.gz
gdb-1834d45f0ff231bf74de3b0305949cf991470a35.tar.bz2
Fix find_charset_names.
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.
Diffstat (limited to 'gdb/charset.c')
-rw-r--r--gdb/charset.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/charset.c b/gdb/charset.c
index 7568e47..a93fe99 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -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");