re PR bootstrap/53912 (bootstrap fails using default c++ mode in stage 2 and 3 for...
authorKai Tietz <ktietz@redhat.com>
Thu, 29 Nov 2012 18:40:27 +0000 (19:40 +0100)
committerKai Tietz <ktietz@gcc.gnu.org>
Thu, 29 Nov 2012 18:40:27 +0000 (19:40 +0100)
PR target/53912
* prefix.c (lookup_key): Replace xmalloc/xrealloc
use by XNEWVEC/XRESIZEVEC.

From-SVN: r193946

gcc/ChangeLog
gcc/prefix.c

index 7560e28eb8768d0b94e8cf832b01ec4d339a96ec..475a81eb7f1c90a61d47b8c480f9b6f69af60f82 100644 (file)
@@ -1,3 +1,9 @@
+2012-11-29 Kai Tietz  <ktietz@redhat.com>
+
+       PR target/53912
+       * prefix.c (lookup_key): Replace xmalloc/xrealloc
+       use by XNEWVEC/XRESIZEVEC.
+
 2012-11-29  Richard Earnshaw  <rearnsha@arm.com>
 
        PR target/55073
index 369ede703090153bebb615dbba1b20ac1e0b70c5..c7003f8c6746bd249cc85db6575b4f4f13b14638 100644 (file)
@@ -157,12 +157,12 @@ lookup_key (char *key)
     }
 
   size = 32;
-  dst = xmalloc (size);
+  dst = XNEWVEC (char, size);
 
   res = RegQueryValueExA (reg_key, key, 0, &type, (LPBYTE) dst, &size);
   if (res == ERROR_MORE_DATA && type == REG_SZ)
     {
-      dst = xrealloc (dst, size);
+      dst = XRESIZEVEC (char, dst, size);
       res = RegQueryValueExA (reg_key, key, 0, &type, (LPBYTE) dst, &size);
     }