*/
#include "includes.h"
-RCSID("$OpenBSD: buffer.c,v 1.18 2003/09/16 21:02:39 markus Exp $");
+RCSID("$OpenBSD: buffer.c,v 1.21 2003/11/21 11:57:03 djm Exp $");
#include "xmalloc.h"
#include "buffer.h"
{
if (buffer->alloc > 0) {
memset(buffer->buf, 0, buffer->alloc);
+ buffer->alloc = 0;
xfree(buffer->buf);
}
}
goto restart;
}
/* Increase the size of the buffer and retry. */
-
+
newlen = buffer->alloc + len + 32768;
if (newlen > 0xa00000)
fatal("buffer_append_space: alloc %u not supported",
void
buffer_dump(Buffer *buffer)
{
- int i;
+ u_int i;
u_char *ucp = buffer->buf;
for (i = buffer->offset; i < buffer->end; i++) {