This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: [Patch] fhandler.cc (pust_readahead): end-condition off.
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: cygwin-patches at cygwin dot com
- Date: Sat, 11 Dec 2004 09:53:19 +0100
- Subject: Re: [Patch] fhandler.cc (pust_readahead): end-condition off.
- References: <n2m-g.cp0gle.3vsh6i5.1@buzzy-box.bavag>
- Reply-to: cygwin-patches at cygwin dot com
On Dec 6 02:45, Bas van Gompel wrote:
> 2004-12-06 Bas van Gompel <cygwin-patch@bavag.tmfweb.nl>
>
> * fhandler.cc (fhandler_base::puts_readahead): Fix end-condition.
>
>
> --- src/winsup/cygwin-mmod/fhandler.cc 5 Dec 2004 07:28:27 -0000 1.209
> +++ src/winsup/cygwin-mmod/fhandler.cc 6 Dec 2004 01:14:14 -0000
> @@ -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;
Yes, that looks better. I'd say the patch is correct. Please apply.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader mailto:cygwin@cygwin.com
Red Hat, Inc.