re PR bootstrap/53912 (bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32)

PR target/53912
	* prefix.c (lookup_key): Replace xmalloc/xrealloc
	use by XNEWVEC/XRESIZEVEC.

From-SVN: r193946
This commit is contained in:
Kai Tietz 2012-11-29 19:40:27 +01:00 committed by Kai Tietz
parent 744c3195ef
commit e97cae9682
2 changed files with 8 additions and 2 deletions

View 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

View 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);
}