Formerly expand.c.~4~

This commit is contained in:
Roland McGrath 1992-06-16 23:43:29 +00:00
parent ade465512f
commit 29380252a8

View file

@ -47,7 +47,9 @@ variable_buffer_output (ptr, string, length)
if (newlen > variable_buffer_length)
{
unsigned int offset = ptr - variable_buffer;
variable_buffer_length = max (2 * variable_buffer_length, newlen + 100);
variable_buffer_length = (newlen + 100 > 2 * variable_buffer_length
? newlen + 100
: 2 * variable_buffer_length);
variable_buffer = (char *) xrealloc (variable_buffer,
variable_buffer_length);
ptr = variable_buffer + offset;