I noticed a couple of spots using concat that could use xstrdup
instead. This patch fixes these.
gdb/ChangeLog
2019-06-16 Tom Tromey <tom@tromey.com>
* coffread.c (process_coff_symbol): Use xstrdup.
* value.c (create_internalvar): Use xstrdup.
+2019-06-16 Tom Tromey <tom@tromey.com>
+
+ * coffread.c (process_coff_symbol): Use xstrdup.
+ * value.c (create_internalvar): Use xstrdup.
+
2019-06-16 Tom Tromey <tom@tromey.com>
* valops.c (value_cast, value_slice): Remove unnecessary cast.
&& *SYMBOL_LINKAGE_NAME (sym) != '~'
&& *SYMBOL_LINKAGE_NAME (sym) != '.')
TYPE_NAME (SYMBOL_TYPE (sym)) =
- concat (SYMBOL_LINKAGE_NAME (sym), (char *)NULL);
+ xstrdup (SYMBOL_LINKAGE_NAME (sym));
add_symbol_to_list (sym, get_file_symbols ());
break;
{
struct internalvar *var = XNEW (struct internalvar);
- var->name = concat (name, (char *)NULL);
+ var->name = xstrdup (name);
var->kind = INTERNALVAR_VOID;
var->next = internalvars;
internalvars = var;