[PATCH v3] remote-curl.c: fix rpc_out()
- From
Tay Ray Chuan <rctay89@gmail.com>
- Date
- Nov 24, 2009, 02:31 UTC
- Message-ID
- <20091124103130.e1bdf09f.rctay89@gmail.com>
- In-Reply-To
- <20091124095508.d6312ab0.rctay89@gmail.com>
Remove the extraneous semicolon (';') at the end of the if statement that allowed the code in its block to execute regardless of the condition.
This fixes pushing to a smart http backend with chunked encoding.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> ---
Reworded the part on code execution, so that it doesn't say "the code doesn't execute", but rather "the code always executes".
Thanks to Paul for spotting that.
remote-curl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/remote-curl.c b/remote-curl.c index 69eaf58..a331bae 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -307,7 +307,7 @@ static size_t rpc_out(void *ptr, size_t eltsize, rpc->len = avail; } - if (max < avail); + if (max < avail) avail = max; memcpy(ptr, rpc->buf + rpc->pos, avail); rpc->pos += avail; -- 1.6.4.4