* config/tc-dlx.c (s_proc): Don't use asprintf.
[deliverable/binutils-gdb.git] / gas / config / tc-dlx.c
index b84625293164c08c3e992bb7085b9b9ea41edb2f..a629533b93cc4bd1b239f601a4bee98ea5c49a8b 100644 (file)
@@ -1,5 +1,5 @@
-/* tc-ldx.c -- Assemble for the DLX
-   Copyright 2002, 2003, 2004, 2005, 2007, 2009, 2010
+/* tc-dlx.c -- Assemble for the DLX
+   Copyright 2002, 2003, 2004, 2005, 2007, 2009, 2010, 2012
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -21,8 +21,8 @@
 
 /* Initially created by Kuang Hwa Lin, 3/20/2002.  */
 
-#include "safe-ctype.h"
 #include "as.h"
+#include "safe-ctype.h"
 #include "tc-dlx.h"
 #include "opcode/dlx.h"
 
@@ -245,7 +245,12 @@ s_proc (int end_p)
          /* Missing entry point, use function's name with the leading
             char prepended.  */
          if (leading_char)
-           asprintf (&label, "%c%s", leading_char, name);
+           {
+             unsigned len = strlen (name) + 1;
+             label = xmalloc (len + 1);
+             label[0] = leading_char;
+             memcpy (label + 1, name, len);
+           }
          else
            label = name;
        }
This page took 0.026445 seconds and 4 git commands to generate.