aboutsummaryrefslogtreecommitdiff
path: root/gas/hash.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/hash.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/hash.c')
-rw-r--r--gas/hash.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/gas/hash.c b/gas/hash.c
index e993136..df9101d 100644
--- a/gas/hash.c
+++ b/gas/hash.c
@@ -1,6 +1,6 @@
/* hash.c -- gas hash table code
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
- 2000, 2001
+ 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -546,19 +546,9 @@ char *
what (description)
char *description;
{
- char *retval;
- char *malloc ();
-
printf (" %s : ", description);
gets (answer);
- /* Will one day clean up answer here. */
- retval = malloc (strlen (answer) + 1);
- if (!retval)
- {
- error ("room");
- }
- (void) strcpy (retval, answer);
- return (retval);
+ return xstrdup (answer);
}
void