aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-05-18 23:21:49 +0000
committerAlan Modra <amodra@gmail.com>2012-05-18 23:21:49 +0000
commitf3719d90a6ab4600dab4ab5e7f238b75105cca00 (patch)
tree977f80e7f55cad80a548e77acded80022497593f
parent02b67415e097cee626b6abf06346e5696ea8d334 (diff)
downloadgdb-f3719d90a6ab4600dab4ab5e7f238b75105cca00.zip
gdb-f3719d90a6ab4600dab4ab5e7f238b75105cca00.tar.gz
gdb-f3719d90a6ab4600dab4ab5e7f238b75105cca00.tar.bz2
* config/tc-dlx.c (s_proc): Don't use asprintf.
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/config/tc-dlx.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index e037ffa..0c2bc26 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,7 @@
+2012-05-19 Alan Modra <amodra@gmail.com>
+
+ * config/tc-dlx.c (s_proc): Don't use asprintf.
+
2012-05-18 Alan Modra <amodra@gmail.com>
* 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 530e03c..a629533 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;