summaryrefslogtreecommitdiff
path: root/ld/ldmisc.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2001-05-02 16:42:55 +0000
committerH.J. Lu <hjl@lucon.org>2001-05-02 16:42:55 +0000
commit8a0a249a6a1261dec7bc670e457c9e8fe0357cb2 (patch)
tree332e22cdb259b8b13d5953b679bb08866c853072 /ld/ldmisc.c
parentbb0ba76fa70d230e8ac510da1543db034cb7de11 (diff)
downloadbinutils-redhat-8a0a249a6a1261dec7bc670e457c9e8fe0357cb2.tar.gz
2001-05-02 H.J. Lu <hjl@gnu.org>
* ldfile.c: Include "libiberty.h". * ldlex.l: Likewise. * ldmisc.c (buystring): Removed. * ldmisc.h: Likewise. * ldfile.c: Replace buystring with xstrdup. * ldlang.c: Likewise. * ldlex.l: Likewise. * ldmain.c: Likewise. * ldmisc.c: Likewise. * lexsup.c: Likewise. * mpw-eppcmac.c: Likewise.
Diffstat (limited to 'ld/ldmisc.c')
-rw-r--r--ld/ldmisc.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index a27cf1166d..397442e1cc 100644
--- a/ld/ldmisc.c
+++ b/ld/ldmisc.c
@@ -335,10 +335,10 @@ vfinfo (fp, fmt, arg)
last_bfd = abfd;
if (last_file != NULL)
free (last_file);
- last_file = buystring (filename);
+ last_file = xstrdup (filename);
if (last_function != NULL)
free (last_function);
- last_function = buystring (functionname);
+ last_function = xstrdup (functionname);
}
discard_last = false;
if (linenumber != 0)
@@ -467,16 +467,6 @@ info_assert (file, line)
einfo (_("%F%P: internal error %s %d\n"), file, line);
}
-char *
-buystring (x)
- CONST char *CONST x;
-{
- size_t l = strlen (x) + 1;
- char *r = xmalloc (l);
- memcpy (r, x, l);
- return r;
-}
-
/* ('m' for map) Format info message and print on map. */
void