diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-02-13 19:59:29 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-02-13 19:59:29 +0000 |
commit | 779740c5bf70c1972514e353be168626655957d0 (patch) | |
tree | c4c6dc35ed772c1467fbe5ccfc28b67f1e1e892d /gcc/prefix.c | |
parent | 4329b35fe8ffab2dcb88718ad7bb51ab18d0bb22 (diff) | |
download | gcc-779740c5bf70c1972514e353be168626655957d0.tar.gz |
* prefix.c (concat, lookup_key): Use xmalloc and xrealloc
consistently.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31958 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/prefix.c')
-rw-r--r-- | gcc/prefix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/prefix.c b/gcc/prefix.c index 88cff94e194..a7336e0395d 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); } |