Added clear() function to rewind().

The unittest NetworkSourceLineServerTest.TestMalformedRequest fails since
http://gcc.gnu.org/viewcvs?view=revision&revision=166911. That CL is supposed to
be C++ standards-compliant in resetting the EOF.

Earlier, because of the first malformed request, the eof() bit was set to 1 and
was never reset back to 0 during the seeks. The fail() bit was also set to 1.
Subsequent operations always returned eof() to be true (even just after the
write before the read). So the test was relying on incorrect behavior.

BUG=none
TEST=FEATURES=test emerge-$board google-breakpad

Change-Id: Id7165537db7dee51a732b5030d68411725e8c90c
Reviewed-on: http://gerrit.chromium.org/gerrit/7797
Reviewed-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: asharif <asharif@chromium.org>
Tested-by: asharif <asharif@chromium.org>
1 file changed