aboutsummaryrefslogtreecommitdiff
path: root/gcc/prefix.c
diff options
context:
space:
mode:
authorNeil Booth <neilb@earthling.net>2000-02-13 12:59:29 -0700
committerJeff Law <law@gcc.gnu.org>2000-02-13 12:59:29 -0700
commit3ea6b4769892a6cef622a6bc6306a371e65f92f4 (patch)
treec4c6dc35ed772c1467fbe5ccfc28b67f1e1e892d /gcc/prefix.c
parent445ab4438d7e1d3969ee449a169f7f2104d52b50 (diff)
downloadgcc-3ea6b4769892a6cef622a6bc6306a371e65f92f4.zip
gcc-3ea6b4769892a6cef622a6bc6306a371e65f92f4.tar.gz
gcc-3ea6b4769892a6cef622a6bc6306a371e65f92f4.tar.bz2
prefix.c (concat, lookup_key): Use xmalloc and xrealloc consistently.
* prefix.c (concat, lookup_key): Use xmalloc and xrealloc consistently. From-SVN: r31958
Diffstat (limited to 'gcc/prefix.c')
-rw-r--r--gcc/prefix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/prefix.c b/gcc/prefix.c
index 88cff94..a7336e0 100644
--- a/gcc/prefix.c
+++ b/gcc/prefix.c
@@ -139,7 +139,7 @@ concat VPARAMS ((const char *first, ...))
arg = va_arg (args, const char *);
}
- newstr = (char *) malloc (length + 1);
+ newstr = (char *) xmalloc (length + 1);
va_end (args);
/* Now copy the individual pieces to the result string. */
@@ -211,12 +211,12 @@ lookup_key (key)
}
size = 32;
- dst = (char *) malloc (size);
+ dst = (char *) xmalloc (size);
res = RegQueryValueExA (reg_key, key, 0, &type, dst, &size);
if (res == ERROR_MORE_DATA && type == REG_SZ)
{
- dst = (char *) realloc (dst, size);
+ dst = (char *) xrealloc (dst, size);
res = RegQueryValueExA (reg_key, key, 0, &type, dst, &size);
}