aboutsummaryrefslogtreecommitdiff
path: root/gas/listing.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-06-26 01:18:42 +0000
committerAlan Modra <amodra@gmail.com>2002-06-26 01:18:42 +0000
commita2c360614deb3d332ac9630f75c4abeb9bc92216 (patch)
tree1064ff588ae9e7c4d8338c80cd341f7a3883f913 /gas/listing.c
parenta13a0de813a30307e3f8c41ae93fb8cc11a64553 (diff)
downloadgdb-a2c360614deb3d332ac9630f75c4abeb9bc92216.zip
gdb-a2c360614deb3d332ac9630f75c4abeb9bc92216.tar.gz
gdb-a2c360614deb3d332ac9630f75c4abeb9bc92216.tar.bz2
* 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/listing.c')
-rw-r--r--gas/listing.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gas/listing.c b/gas/listing.c
index 95f4129..7510d85 100644
--- a/gas/listing.c
+++ b/gas/listing.c
@@ -269,8 +269,7 @@ file_info (file_name)
p = (file_info_type *) xmalloc (sizeof (file_info_type));
p->next = file_info_head;
file_info_head = p;
- p->filename = xmalloc ((unsigned long) strlen (file_name) + 1);
- strcpy (p->filename, file_name);
+ p->filename = xstrdup (file_name);
p->pos = 0;
p->linenum = 0;
p->at_end = 0;