Replace some uses of xstrprintf with string_printf
[deliverable/binutils-gdb.git] / gdb / xtensa-tdep.c
index 60e34c3075b233f6ffcef09959b33232e0256ecf..7c0d8c15a752f97838405518fd7d5f47693cccb7 100644 (file)
@@ -319,15 +319,14 @@ xtensa_register_type (struct gdbarch *gdbarch, int regnum)
 
              if (tp == NULL)
                {
-                 char *name = xstrprintf ("int%d", size * 8);
+                 std::string name = string_printf ("int%d", size * 8);
 
                  tp = XNEW (struct ctype_cache);
                  tp->next = tdep->type_entries;
                  tdep->type_entries = tp;
                  tp->size = size;
                  tp->virtual_type
-                   = arch_integer_type (gdbarch, size * 8, 1, name);
-                 xfree (name);
+                   = arch_integer_type (gdbarch, size * 8, 1, name.c_str ());
                }
 
              reg->ctype = tp->virtual_type;
This page took 0.025268 seconds and 4 git commands to generate.