Use obstack_strdup more
[deliverable/binutils-gdb.git] / gdb / typeprint.c
index 6a052005d4bf484db79f209e5b1a74ed6755d8a9..c87f6d13e02ec5aa191027ce3f5795c6352df639 100644 (file)
@@ -325,9 +325,8 @@ typedef_hash_table::find_global_typedef (const struct type_print_options *flags,
 
   if (applied != NULL)
     {
-      new_tf->name
-       = (const char *) obstack_copy0 (&flags->global_typedefs->m_storage,
-                                       applied, strlen (applied));
+      new_tf->name = obstack_strdup (&flags->global_typedefs->m_storage,
+                                    applied);
       xfree (applied);
     }
 
This page took 0.030685 seconds and 4 git commands to generate.