diff --git a/src/protocol/http/http.c b/src/protocol/http/http.c index 3d116121..a69da1be 100644 --- a/src/protocol/http/http.c +++ b/src/protocol/http/http.c @@ -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;