use xstrdup, xmemdup0 and concat more
[deliverable/binutils-gdb.git] / gas / write.c
index 15330cfc3345a5b14cbb1d87def476f52c4e946b..c965e6878562815dc2eddf0b2a789301b5898e94 100644 (file)
@@ -1545,10 +1545,7 @@ compress_debug (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED)
   gas_assert (x);
   if (!compression_header_size)
     {
-      compressed_name = (char *) xmalloc (strlen (section_name) + 2);
-      compressed_name[0] = '.';
-      compressed_name[1] = 'z';
-      strcpy (compressed_name + 2, section_name + 1);
+      compressed_name = concat (".z", section_name + 1, (char *) NULL);
       bfd_section_name (stdoutput, sec) = compressed_name;
     }
 }
This page took 0.024758 seconds and 4 git commands to generate.