Replace some xmalloc-family functions with XNEW-family ones
[deliverable/binutils-gdb.git] / gdb / gdbarch.sh
index 994a87bf2039f6d263867f04218dc4cdd13f46a4..5831b7b78a2099fba474df075e78769d4bbf5283 100755 (executable)
@@ -1741,7 +1741,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
      then use that to allocate the architecture vector.  */
   struct obstack *obstack = XNEW (struct obstack);
   obstack_init (obstack);
-  gdbarch = obstack_alloc (obstack, sizeof (*gdbarch));
+  gdbarch = XOBNEW (obstack, struct gdbarch);
   memset (gdbarch, 0, sizeof (*gdbarch));
   gdbarch->obstack = obstack;
 
@@ -2201,7 +2201,7 @@ static struct gdbarch_registration *gdbarch_registry = NULL;
 static void
 append_name (const char ***buf, int *nr, const char *name)
 {
-  *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
+  *buf = XRESIZEVEC (const char **, *buf, *nr + 1);
   (*buf)[*nr] = name;
   *nr += 1;
 }
This page took 0.032617 seconds and 4 git commands to generate.