Subject: Re: [PATCH 04/11] Use new compress helpers in http-push.c

From: Junio C Hamano <[email-masked]>
Date: Sun, 03 Feb 2008 14:53:57 -0800

Marco Costalba <[email-masked]> writes:

> A multistep compress is required here, so
> we need the full arsenal of compress helpers.
>
> Signed-off-by: Marco Costalba <[email-masked]>
> ---
>  http-push.c |   22 ++++++++--------------
>  1 files changed, 8 insertions(+), 14 deletions(-)
>
> diff --git a/http-push.c b/http-push.c
> index b2b410d..a7997ec 100644
> --- a/http-push.c
> +++ b/http-push.c
> @@ -491,31 +492,24 @@ static void start_put(struct transfer_request *request)
> ...
> -	stream.next_in = (void *)hdr;
> -	stream.avail_in = hdrlen;
> -	while (deflate(&stream, 0) == Z_OK)
> -		/* nothing */;
> +	compress_next(&stream, Z_NO_FLUSH);

Although the original does not bother to, the return value from
compress_next() should be checked in later rounds.