2011-03-02 Michael Snyder <msnyder@vmware.com>
authorMichael Snyder <msnyder@vmware.com>
Wed, 2 Mar 2011 23:14:32 +0000 (23:14 +0000)
committerMichael Snyder <msnyder@vmware.com>
Wed, 2 Mar 2011 23:14:32 +0000 (23:14 +0000)
* target-descriptions.c (tdesc_gdb_type): No need to call
xstrdup, callee saves a copy.

gdb/ChangeLog
gdb/target-descriptions.c

index ae76da176abc1c52e5355cc252f904276dbfea3a..c27e6a7ec2f4c6752cc6013d9dd756c2a838bafe 100644 (file)
@@ -1,5 +1,8 @@
 2011-03-02  Michael Snyder  <msnyder@vmware.com>
 
+       * target-descriptions.c (tdesc_gdb_type): No need to call
+       xstrdup, callee saves a copy.
+
        * printcmd.c (print_scalar_formatted): Use strncpy for safety.
 
        * infcall.c (call_function_by_hand): Add break statements for lint.
index 631d9d6a78af47d127e43e3d1ad046aff490c0e5..a3096d7078d3d72e03a7f3d438686eaeb7df138c 100644 (file)
@@ -706,7 +706,7 @@ tdesc_gdb_type (struct gdbarch *gdbarch, struct tdesc_type *tdesc_type)
        struct tdesc_type_flag *f;
        int ix;
 
-       type = arch_flags_type (gdbarch, xstrdup (tdesc_type->name),
+       type = arch_flags_type (gdbarch, tdesc_type->name,
                                tdesc_type->u.f.size);
        for (ix = 0;
             VEC_iterate (tdesc_type_flag, tdesc_type->u.f.flags, ix, f);