* config/tc-dlx.c (s_proc): Don't use asprintf.
authorAlan Modra <amodra@gmail.com>
Fri, 18 May 2012 23:21:49 +0000 (23:21 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 18 May 2012 23:21:49 +0000 (23:21 +0000)
gas/ChangeLog
gas/config/tc-dlx.c

index e037ffa12149ffdb9a9df096ffe25f787bd53fcc..0c2bc2681366de3e6400a24d1a56af3c6a36dbdc 100644 (file)
@@ -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
index 530e03cbd21f53619ffdd01e908caf5d24222e2e..a629533b93cc4bd1b239f601a4bee98ea5c49a8b 100644 (file)
@@ -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;