From: Michael Snyder Date: Wed, 2 Mar 2011 23:14:32 +0000 (+0000) Subject: 2011-03-02 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3494b66d76fd4258a2464fd43bd186558960baf5;p=binutils-gdb.git 2011-03-02 Michael Snyder * target-descriptions.c (tdesc_gdb_type): No need to call xstrdup, callee saves a copy. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ae76da176ab..c27e6a7ec2f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2011-03-02 Michael Snyder + * 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. diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c index 631d9d6a78a..a3096d7078d 100644 --- a/gdb/target-descriptions.c +++ b/gdb/target-descriptions.c @@ -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);