aboutsummaryrefslogtreecommitdiff
path: root/gdb/go-exp.y
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/go-exp.y')
-rw-r--r--gdb/go-exp.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/go-exp.y b/gdb/go-exp.y
index 4e017fe..c2ae28d 100644
--- a/gdb/go-exp.y
+++ b/gdb/go-exp.y
@@ -535,7 +535,7 @@ string_exp:
vec->type = $1.type;
vec->length = $1.length;
- vec->ptr = malloc ($1.length + 1);
+ vec->ptr = (char *) malloc ($1.length + 1);
memcpy (vec->ptr, $1.ptr, $1.length + 1);
}
@@ -545,10 +545,10 @@ string_exp:
for convenience. */
char *p;
++$$.len;
- $$.tokens = realloc ($$.tokens,
- $$.len * sizeof (struct typed_stoken));
+ $$.tokens = XRESIZEVEC (struct typed_stoken,
+ $$.tokens, $$.len);
- p = malloc ($3.length + 1);
+ p = (char *) malloc ($3.length + 1);
memcpy (p, $3.ptr, $3.length + 1);
$$.tokens[$$.len - 1].type = $3.type;