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:
parent
170e6badb6
commit
1ed909e047
|
@ -566,7 +566,7 @@ fhandler_pipe_fifo::raw_write (const void *ptr, size_t len)
|
||||||
PDA_WRITE);
|
PDA_WRITE);
|
||||||
if (avail < 1) /* error or pipe closed */
|
if (avail < 1) /* error or pipe closed */
|
||||||
break;
|
break;
|
||||||
if (avail >= len1) /* somebody read from the pipe */
|
if (avail > len1) /* somebody read from the pipe */
|
||||||
avail = len1;
|
avail = len1;
|
||||||
if (avail == 1) /* 1 byte left or non-Cygwin pipe */
|
if (avail == 1) /* 1 byte left or non-Cygwin pipe */
|
||||||
len1 >>= 1;
|
len1 >>= 1;
|
||||||
|
|
Loading…
Reference in New Issue