aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2020-09-14 22:28:25 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2020-09-14 22:28:25 -0400
commit3246bd8ec50fa312403a8629bcad798a1dbbbc0f (patch)
tree647fd418890e11ada872a8aada9c48dac7ad77b1 /gdb
parent10242f367fe102a4d55574c930ebfb389dbd233d (diff)
downloadgdb-3246bd8ec50fa312403a8629bcad798a1dbbbc0f.zip
gdb-3246bd8ec50fa312403a8629bcad798a1dbbbc0f.tar.gz
gdb-3246bd8ec50fa312403a8629bcad798a1dbbbc0f.tar.bz2
gdb: use make_unique_xstrdup in debuginfod-support.c
Use make_unique_xstrdup instead of reset + xstrdup. gdb/ChangeLog: * debuginfod-support.c (debuginfod_source_query): Use make_unique_xstrdup. Change-Id: Iee9524fea7630b4d6ee5c74e30c60fe222dc1d2c
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/debuginfod-support.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a68c1ab..9ae4900 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-09-14 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * debuginfod-support.c (debuginfod_source_query): Use
+ make_unique_xstrdup.
+
2020-09-14 Simon Marchi <simon.marchi@efficios.com>
* gdbtypes.h (TYPE_INSTANCE_FLAGS): Remove, replace all uses
diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c
index 0dc88c2..73db536 100644
--- a/gdb/debuginfod-support.c
+++ b/gdb/debuginfod-support.c
@@ -121,7 +121,7 @@ debuginfod_source_query (const unsigned char *build_id,
safe_strerror (-fd.get ()),
styled_string (file_name_style.style (), srcpath));
else
- destname->reset (xstrdup (srcpath));
+ *destname = make_unique_xstrdup (srcpath);
debuginfod_end (c);
return fd;