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: r193947
This commit is contained in:
Kai Tietz 2012-11-29 19:43:29 +01:00 committed by Kai Tietz
parent 1742a3c595
commit 0c0d9de605
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,9 @@
2012-11-29 Kai Tietz <ktietz@redhat.com>
PR target/55171
* prefix.c (lookup_key): Replace xmalloc/xrealloc
use by XNEWVEC/XRESIZEVEC.
* i386.c (get_scratch_register_on_entry): Handle
thiscall-convention.
(split_stack_prologue_scratch_regno): Likewise.

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