From 8a0a249a6a1261dec7bc670e457c9e8fe0357cb2 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 2 May 2001 16:42:55 +0000 Subject: 2001-05-02 H.J. Lu * 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. --- ld/ldmisc.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'ld/ldmisc.c') 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 -- cgit v1.2.1