]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gas/subsegs.c
use XNEW and related macros more
[thirdparty/binutils-gdb.git] / gas / subsegs.c
index e9c575cdd94f785ecc44e80ee9689b556e89a9f5..0647653f8784e1d8c9bec2bd248082454ff4b215 100644 (file)
@@ -63,7 +63,7 @@ subseg_change (segT seg, int subseg)
 
   if (! seginfo)
     {
-      seginfo = (segment_info_type *) xcalloc (1, sizeof (*seginfo));
+      seginfo = XCNEW (segment_info_type);
       seginfo->bfd_section = seg;
       bfd_set_section_userdata (stdoutput, seg, seginfo);
     }
@@ -165,7 +165,7 @@ subseg_get (const char *segname, int force_new)
   if (! seginfo)
     {
       secptr->output_section = secptr;
-      seginfo = (segment_info_type *) xcalloc (1, sizeof (*seginfo));
+      seginfo = XCNEW (segment_info_type);
       seginfo->bfd_section = secptr;
       bfd_set_section_userdata (stdoutput, secptr, seginfo);
     }