varasm.c (named_section): Use xstrdup rather than doing it by hand.

* varasm.c (named_section): Use xstrdup rather than doing it by
	hand.

From-SVN: r95812
This commit is contained in:
Geoffrey Keating 2005-03-02 21:33:44 +00:00 committed by Geoffrey Keating
parent 0aca3a6145
commit 7df74013f1
2 changed files with 5 additions and 7 deletions

View file

@ -1,5 +1,8 @@
2005-03-02 Geoffrey Keating <geoffk@apple.com>
* varasm.c (named_section): Use xstrdup rather than doing it by
hand.
* config/darwin8.h (LIB_SPEC): Switch -lmx and -lSystem.
2005-03-02 Devang Patel <dpatel@apple.com>

View file

@ -455,13 +455,8 @@ named_section (tree decl, const char *name, int reloc)
if (strcmp (name, UNLIKELY_EXECUTED_TEXT_SECTION_NAME) == 0
&& !unlikely_text_section_name)
{
unlikely_text_section_name = xmalloc
(strlen (UNLIKELY_EXECUTED_TEXT_SECTION_NAME) + 1
* sizeof (char));
strcpy (unlikely_text_section_name,
UNLIKELY_EXECUTED_TEXT_SECTION_NAME);
}
unlikely_text_section_name =
xstrdup (UNLIKELY_EXECUTED_TEXT_SECTION_NAME);
flags = targetm.section_type_flags (decl, name, reloc);