From: Alan Modra Date: Fri, 18 May 2012 23:21:49 +0000 (+0000) Subject: * config/tc-dlx.c (s_proc): Don't use asprintf. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f3719d90a6ab4600dab4ab5e7f238b75105cca00;p=binutils-gdb.git * config/tc-dlx.c (s_proc): Don't use asprintf. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index e037ffa1214..0c2bc268136 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2012-05-19 Alan Modra + + * config/tc-dlx.c (s_proc): Don't use asprintf. + 2012-05-18 Alan Modra * config/tc-dlx.c (s_proc): Avoid warning about ignoring asprintf diff --git a/gas/config/tc-dlx.c b/gas/config/tc-dlx.c index 530e03cbd21..a629533b93c 100644 --- a/gas/config/tc-dlx.c +++ b/gas/config/tc-dlx.c @@ -246,8 +246,10 @@ s_proc (int end_p) char prepended. */ if (leading_char) { - if (asprintf (&label, "%c%s", leading_char, name)) - { /* Avoid warning */ } + unsigned len = strlen (name) + 1; + label = xmalloc (len + 1); + label[0] = leading_char; + memcpy (label + 1, name, len); } else label = name;