use xstrdup, xmemdup0 and concat more
[deliverable/binutils-gdb.git] / gas / itbl-ops.c
index 2c09f715e56d6e5f4ee771bfa56c75a4a142a911..1a4e2bb0b941ba22f537e77d3ad823b8d2f4d7af 100644 (file)
@@ -857,9 +857,7 @@ alloc_entry (e_processor processor, e_type type,
   if (e)
     {
       memset (e, 0, sizeof (struct itbl_entry));
-      e->name = (char *) malloc (sizeof (strlen (name)) + 1);
-      if (e->name)
-       strcpy (e->name, name);
+      e->name = xstrdup (name);
       e->processor = processor;
       e->type = type;
       e->value = value;
This page took 0.022298 seconds and 4 git commands to generate.