diff options
author | Alan Modra <amodra@gmail.com> | 2002-06-26 01:18:42 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-06-26 01:18:42 +0000 |
commit | a2c360614deb3d332ac9630f75c4abeb9bc92216 (patch) | |
tree | 1064ff588ae9e7c4d8338c80cd341f7a3883f913 /gas/ecoff.c | |
parent | a13a0de813a30307e3f8c41ae93fb8cc11a64553 (diff) | |
download | binutils-gdb-a2c360614deb3d332ac9630f75c4abeb9bc92216.tar.gz |
* ecoff.c: (get_tag): Replace strcpy with xstrdup.
(ecoff_directive_def): Likewise.
(ecoff_directive_tag): Likewise.
* listing.c (file_info): Likewise.
* hash.c (what): Likewise.
Diffstat (limited to 'gas/ecoff.c')
-rw-r--r-- | gas/ecoff.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gas/ecoff.c b/gas/ecoff.c index ed1192115ff..75e0479189d 100644 --- a/gas/ecoff.c +++ b/gas/ecoff.c @@ -1,5 +1,5 @@ /* ECOFF debugging support. - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Cygnus Support. This file was put together by Ian Lance Taylor <ian@cygnus.com>. A @@ -2037,8 +2037,7 @@ get_tag (tag, sym, basic_type) { char *perm; - perm = xmalloc ((unsigned long) (strlen (tag) + 1)); - strcpy (perm, tag); + perm = xstrdup (tag); hash_ptr = allocate_shash (); err = hash_insert (tag_hash, perm, (char *) hash_ptr); if (err) @@ -2545,8 +2544,8 @@ ecoff_directive_def (ignore) free (coff_sym_name); if (coff_tag != (char *) NULL) free (coff_tag); - coff_sym_name = (char *) xmalloc ((unsigned long) (strlen (name) + 1)); - strcpy (coff_sym_name, name); + + coff_sym_name = xstrdup (name); coff_type = type_info_init; coff_storage_class = sc_Nil; coff_symbol_typ = st_Nil; @@ -2778,8 +2777,7 @@ ecoff_directive_tag (ignore) name = input_line_pointer; name_end = get_symbol_end (); - coff_tag = (char *) xmalloc ((unsigned long) (strlen (name) + 1)); - strcpy (coff_tag, name); + coff_tag = xstrdup (name); *input_line_pointer = name_end; |