* 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
+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
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); \
} \
\
{
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;
}
;
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);