You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2006/08/08 00:41:06 UTC
svn commit: r429499 - /incubator/stdcxx/trunk/util/output.cpp
Author: sebor
Date: Mon Aug 7 15:41:05 2006
New Revision: 429499
URL: http://svn.apache.org/viewvc?rev=429499&view=rev
Log:
2006-08-07 Andrew Black <ab...@roguewave.com>
* output.cpp (check_example): Initialized read buffers prior
to read to prevent incorrect results.
Modified:
incubator/stdcxx/trunk/util/output.cpp
Modified: incubator/stdcxx/trunk/util/output.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/output.cpp?rev=429499&r1=429498&r2=429499&view=diff
==============================================================================
--- incubator/stdcxx/trunk/util/output.cpp (original)
+++ incubator/stdcxx/trunk/util/output.cpp Mon Aug 7 15:41:05 2006
@@ -296,6 +296,10 @@
size_t out_read, ref_read;
int match = 1;
+ /* Zero out holding buffers to avoid false differences */
+ memset (out_buf, 0, DELTA_BUF_LEN);
+ memset (ref_buf, 0, DELTA_BUF_LEN);
+
while (!feof (reference) && !feof (output)) {
/* First, read a block from the files into the buffer */
out_read = fread (out_buf, DELTA_BUF_LEN, 1, output);