mirror of
https://github.com/rkd77/elinks.git
synced 2024-07-16 15:04:37 -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 {
|
||||
/* The initial value is used only when state == NORMAL.
|
||||
* Unconditional initialization avoids a GCC warning. */
|
||||
int to_read = PIPE_BUF;
|
||||
|
||||
if (state == NORMAL) {
|
||||
/* ... we aren't finishing yet. */
|
||||
int written;
|
||||
|
||||
written = safe_write(conn->stream_pipes[1], data,
|
||||
len > to_read ? to_read : len);
|
||||
len > PIPE_BUF ? PIPE_BUF : len);
|
||||
|
||||
if (written > 0) {
|
||||
data += written;
|
||||
|
Loading…
Reference in New Issue
Block a user