mirror of
https://github.com/rkd77/elinks.git
synced 2024-08-25 21:44:47 -04:00
Drop to_read.
This commit is contained in:
parent
f7b9be4aa1
commit
ef5f2638a3
@ -978,14 +978,12 @@ decompress_data(struct connection *conn, unsigned char *data, int len,
|
|||||||
do {
|
do {
|
||||||
/* The initial value is used only when state == NORMAL.
|
/* The initial value is used only when state == NORMAL.
|
||||||
* Unconditional initialization avoids a GCC warning. */
|
* Unconditional initialization avoids a GCC warning. */
|
||||||
int to_read = PIPE_BUF;
|
|
||||||
|
|
||||||
if (state == NORMAL) {
|
if (state == NORMAL) {
|
||||||
/* ... we aren't finishing yet. */
|
/* ... we aren't finishing yet. */
|
||||||
int written;
|
int written;
|
||||||
|
|
||||||
written = safe_write(conn->stream_pipes[1], data,
|
written = safe_write(conn->stream_pipes[1], data,
|
||||||
len > to_read ? to_read : len);
|
len > PIPE_BUF ? PIPE_BUF : len);
|
||||||
|
|
||||||
if (written > 0) {
|
if (written > 0) {
|
||||||
data += written;
|
data += written;
|
||||||
|
Loading…
Reference in New Issue
Block a user