aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmisc.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2001-05-02 16:42:55 +0000
committerH.J. Lu <hjl.tools@gmail.com>2001-05-02 16:42:55 +0000
commitd1b2b2dcb9990cc1b113ce35fe9ebe120d34b1c3 (patch)
tree1b9443e600a2baea4f6e474bbbf51aa384bb04fb /ld/ldmisc.c
parent5cb1517bba5802b8b14e2ed42cffdaee788704df (diff)
downloadfsf-binutils-gdb-d1b2b2dcb9990cc1b113ce35fe9ebe120d34b1c3.zip
fsf-binutils-gdb-d1b2b2dcb9990cc1b113ce35fe9ebe120d34b1c3.tar.gz
fsf-binutils-gdb-d1b2b2dcb9990cc1b113ce35fe9ebe120d34b1c3.tar.bz2
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 a27cf11..397442e 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