Commit cca8ead2 by Bernardo Innocenti Committed by Bernardo Innocenti

gengtype.c (oprintf): Replace xrealloc () with XRESIZEVEC ().

	* gengtype.c (oprintf): Replace xrealloc () with XRESIZEVEC ().
	* gengtype-yacc.y: Likewise.  Replace free() with XDELETE ().
	* c-typeck.c (PUSH_SPELLING): Remove redundant NULL-pointer
	check on invocation of XRESIZEVEC ().

From-SVN: r85177
parent 1ad463f4
2004-07-26 Bernardo Innocenti <bernie@develer.com>
* gengtype.c (oprintf): Replace xrealloc () with XRESIZEVEC ().
* gengtype-yacc.y: Likewise. Replace free() with XDELETE ().
* c-typeck.c (PUSH_SPELLING): Remove redundant NULL-pointer
check on invocation of XRESIZEVEC ().
2004-07-26 Bernardo Innocenti <bernie@develer.com>
* c-common.c (disable_builtin_function): Rename variable n to
new_disabled_builtin.
* c-decl.c (duplicate_decls): Rename parameter decl to new_decl.
......
......@@ -3755,11 +3755,8 @@ static int spelling_size; /* Size of the spelling stack. */
if (depth >= spelling_size) \
{ \
spelling_size += 10; \
if (spelling_base == 0) \
spelling_base = XNEWVEC (struct spelling, spelling_size); \
else \
spelling_base = XRESIZEVEC (struct spelling, spelling_base, \
spelling_size); \
spelling_base = XRESIZEVEC (struct spelling, spelling_base, \
spelling_size); \
RESTORE_SPELLING_DEPTH (depth); \
} \
\
......
......@@ -314,9 +314,9 @@ stringseq: STRING
{
size_t l1 = strlen ($1);
size_t l2 = strlen ($2);
char *s = (char *) xrealloc ((char *)$1, l1 + l2 + 1);
char *s = XRESIZEVEC (char, $1, l1 + l2 + 1);
memcpy (s + l1, $2, l2 + 1);
free ((void *)$2);
XDELETE ($2);
$$ = s;
}
;
......
......@@ -1028,7 +1028,7 @@ oprintf (outf_p o, const char *format, ...)
do {
new_len *= 2;
} while (o->bufused + slength >= new_len);
o->buf = (char *) xrealloc (o->buf, new_len);
o->buf = XRESIZEVEC (char, o->buf, new_len);
o->buflength = new_len;
}
memcpy (o->buf + o->bufused, s, slength);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment