Cygwin: pipe: fix comparison

There's no reason to overwrite len1 with align if they are the same value.

Fixes: 170e6badb6 ("Cygwin: pipe: improve writing when pipe buffer is almost full")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2024-08-19 11:44:42 +02:00
parent 170e6badb6
commit 1ed909e047
1 changed files with 1 additions and 1 deletions

View File

@ -566,7 +566,7 @@ fhandler_pipe_fifo::raw_write (const void *ptr, size_t len)
PDA_WRITE);
if (avail < 1) /* error or pipe closed */
break;
if (avail >= len1) /* somebody read from the pipe */
if (avail > len1) /* somebody read from the pipe */
avail = len1;
if (avail == 1) /* 1 byte left or non-Cygwin pipe */
len1 >>= 1;