* fhandler.cc (fhandler_base::puts_readahead): Fix end-condition.

This commit is contained in:
Bas van Gompel 2004-12-12 02:15:34 +00:00
parent c546950745
commit 3020ba83ce
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2004-12-12 Bas van Gompel <cygwin-patch@bavag.tmfweb.nl>
* fhandler.cc (fhandler_base::puts_readahead): Fix end-condition.
2004-12-10 Corinna Vinschen <corinna@vinschen.de>
* errno.cc (errmap): Map ERROR_INVALID_ADDRESS to EINVAL instead of

View File

@ -54,7 +54,7 @@ int
fhandler_base::puts_readahead (const char *s, size_t len)
{
int success = 1;
while ((*s || (len != (size_t) -1 && len--))
while ((len == (size_t) -1 ? *s : len--)
&& (success = put_readahead (*s++) > 0))
continue;
return success;