diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2001-01-01 01:51:17 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2001-01-01 01:51:17 +0000 |
commit | a735d1cdb9dc4ce824aa7f73fe6b3c50ae13ff9c (patch) | |
tree | 437801f13eaa9e305befea489d7a9b31063c5647 /gas/listing.c | |
parent | 0fc3347a5cbe0d5c58a4ac3c75d05a93773002fb (diff) | |
download | fsf-binutils-gdb-a735d1cdb9dc4ce824aa7f73fe6b3c50ae13ff9c.zip fsf-binutils-gdb-a735d1cdb9dc4ce824aa7f73fe6b3c50ae13ff9c.tar.gz fsf-binutils-gdb-a735d1cdb9dc4ce824aa7f73fe6b3c50ae13ff9c.tar.bz2 |
2000-12-31 H.J. Lu <hjl@gnu.org>
* listing.c (listing_message): Allocate string only if it is
used.
* configure: Rebuild.
Diffstat (limited to 'gas/listing.c')
-rw-r--r-- | gas/listing.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gas/listing.c b/gas/listing.c index 03dcfe8..2c165dc 100644 --- a/gas/listing.c +++ b/gas/listing.c @@ -226,12 +226,12 @@ listing_message (name, message) const char *name; const char *message; { - unsigned int l = strlen (name) + strlen (message) + 1; - char *n = (char *) xmalloc (l); - strcpy (n, name); - strcat (n, message); if (listing_tail != (list_info_type *) NULL) { + unsigned int l = strlen (name) + strlen (message) + 1; + char *n = (char *) xmalloc (l); + strcpy (n, name); + strcat (n, message); listing_tail->message = n; } } |