diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-02 21:33:44 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-02 21:33:44 +0000 |
commit | f664da299a9f3b7eed0b9c9659419126aa836b97 (patch) | |
tree | 9fe1e405393244380f65722f3e7480f9b2bc1441 /gcc | |
parent | 064527ea299d3bf53f236a4ad7916d90a3e9b4f7 (diff) | |
download | gcc-f664da299a9f3b7eed0b9c9659419126aa836b97.tar.gz |
* varasm.c (named_section): Use xstrdup rather than doing it by
hand.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95812 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/varasm.c | 9 |
2 files changed, 5 insertions, 7 deletions
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 <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> 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); |