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/hash.c | |
parent | a13a0de813a30307e3f8c41ae93fb8cc11a64553 (diff) | |
download | gdb-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.c | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -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 |