aboutsummaryrefslogtreecommitdiff
path: root/gdb/elf-none-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/elf-none-tdep.c')
-rw-r--r--gdb/elf-none-tdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/elf-none-tdep.c b/gdb/elf-none-tdep.c
index 0d94dc4..1802ffb 100644
--- a/gdb/elf-none-tdep.c
+++ b/gdb/elf-none-tdep.c
@@ -49,9 +49,9 @@ elf_none_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd,
fname = lbasename (exe);
psargs = std::string (exe);
- const char *infargs = current_inferior ()->args ();
- if (infargs != nullptr)
- psargs += " " + std::string (infargs);
+ const std::string &infargs = current_inferior ()->args ();
+ if (!infargs.empty ())
+ psargs += ' ' + infargs;
/* All existing targets that handle writing out prpsinfo expect the
fname and psargs strings to be at least 16 and 80 characters long