From: Geoffrey Keating Date: Wed, 2 Mar 2005 21:33:44 +0000 (+0000) Subject: varasm.c (named_section): Use xstrdup rather than doing it by hand. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7df74013f138db3ed797e9be6759c644ba7364c3;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2872f636bdd..b545f960e88 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2005-03-02 Geoffrey Keating + * 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 diff --git a/gcc/varasm.c b/gcc/varasm.c index 29ce0486766..0a667fe2e3f 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -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);