Read suppression files in 256 byte chunks, not 64 byte chunks.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8698
This commit is contained in:
Julian Seward 2008-10-23 10:15:37 +00:00
parent fbdd00b6e0
commit 94b473cf2b

View File

@ -848,21 +848,21 @@ void VG_(show_error_counts_as_XML) ( void )
static Int get_char ( Int fd, Char* out_buf )
{
Int r;
static Char buf[64];
static Char buf[256];
static Int buf_size = 0;
static Int buf_used = 0;
vg_assert(buf_size >= 0 && buf_size <= 64);
vg_assert(buf_size >= 0 && buf_size <= 256);
vg_assert(buf_used >= 0 && buf_used <= buf_size);
if (buf_used == buf_size) {
r = VG_(read)(fd, buf, 64);
r = VG_(read)(fd, buf, 256);
if (r < 0) return r; /* read failed */
vg_assert(r >= 0 && r <= 64);
vg_assert(r >= 0 && r <= 256);
buf_size = r;
buf_used = 0;
}
if (buf_size == 0)
return 0; /* eof */
vg_assert(buf_size >= 0 && buf_size <= 64);
vg_assert(buf_size >= 0 && buf_size <= 256);
vg_assert(buf_used >= 0 && buf_used < buf_size);
*out_buf = buf[buf_used];
buf_used++;